Skip to content

Commit 10afd1a

Browse files
committed
use enum pspec for background
1 parent 70af436 commit 10afd1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tilecache.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ tilecache_set_property(GObject *object,
518518

519519
switch (prop_id) {
520520
case PROP_BACKGROUND:
521-
i = g_value_get_int(value);
521+
i = g_value_get_enum(value);
522522
if (i >= 0 &&
523523
i < TILECACHE_BACKGROUND_LAST &&
524524
tilecache->background != i) {
@@ -548,7 +548,7 @@ tilecache_get_property(GObject *object,
548548

549549
switch (prop_id) {
550550
case PROP_BACKGROUND:
551-
g_value_set_int(value, tilecache->background);
551+
g_value_set_enum(value, tilecache->background);
552552
break;
553553

554554
case PROP_TILESOURCE:
@@ -571,10 +571,10 @@ tilecache_class_init(TilecacheClass *class)
571571
gobject_class->get_property = tilecache_get_property;
572572

573573
g_object_class_install_property(gobject_class, PROP_BACKGROUND,
574-
g_param_spec_int("background",
574+
g_param_spec_enum("background",
575575
_("Background"),
576576
_("Background mode"),
577-
0, TILECACHE_BACKGROUND_LAST - 1,
577+
TILECACHE_BACKGROUND_TYPE,
578578
TILECACHE_BACKGROUND_CHECKERBOARD,
579579
G_PARAM_READWRITE));
580580

0 commit comments

Comments
 (0)