diff options
author | infirit <[email protected]> | 2014-07-29 17:55:31 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2014-07-29 17:55:31 +0200 |
commit | f1da7aaa9b1cbc5f0ea703bbd5719d9c64dc2b15 (patch) | |
tree | 778acd8c0720fa2333ad9b221b29ac9d32cc8fdb | |
parent | c68023e360495587bd0a53f54425235d9d461e43 (diff) | |
download | eom-f1da7aaa9b1cbc5f0ea703bbd5719d9c64dc2b15.tar.bz2 eom-f1da7aaa9b1cbc5f0ea703bbd5719d9c64dc2b15.tar.xz |
Make the image-collection-position GSetting an enum
Based on eog commit 7c69b182662f43636b1027fa395f9372593e39bb
From Felix Riemann <[email protected]>
-rw-r--r-- | data/org.mate.eom.gschema.xml.in.in | 6 | ||||
-rw-r--r-- | src/eom-window.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/data/org.mate.eom.gschema.xml.in.in b/data/org.mate.eom.gschema.xml.in.in index fbf8e0b..3579727 100644 --- a/data/org.mate.eom.gschema.xml.in.in +++ b/data/org.mate.eom.gschema.xml.in.in @@ -87,9 +87,9 @@ <default>false</default> <_summary>Show/Hide the image collection pane.</_summary> </key> - <key name="image-collection-position" type="i"> - <default>0</default> - <_summary>Image collection pane position. Set to 0 for bottom; 1 for left; 2 for top; 3 for right.</_summary> + <key name="image-collection-position" enum="org.mate.eom.EomWindowCollectionPos"> + <default>'bottom'</default> + <_summary>Image collection pane position.</_summary> </key> <key name="image-collection-resizable" type="b"> <default>false</default> diff --git a/src/eom-window.c b/src/eom-window.c index 06e6ab9..7ac77f5 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -5009,7 +5009,7 @@ eom_window_set_property (GObject *object, switch (property_id) { case PROP_COLLECTION_POS: - eom_window_set_collection_mode (window, g_value_get_int (value), + eom_window_set_collection_mode (window, g_value_get_enum (value), priv->collection_resizable); break; case PROP_COLLECTION_RESIZABLE: @@ -5041,7 +5041,7 @@ eom_window_get_property (GObject *object, switch (property_id) { case PROP_COLLECTION_POS: - g_value_set_int (value, priv->collection_position); + g_value_set_enum (value, priv->collection_position); break; case PROP_COLLECTION_RESIZABLE: g_value_set_boolean (value, priv->collection_resizable); @@ -5101,8 +5101,10 @@ eom_window_class_init (EomWindowClass *class) */ g_object_class_install_property ( g_object_class, PROP_COLLECTION_POS, - g_param_spec_int ("collection-position", NULL, NULL, 0, 3, 0, - G_PARAM_READWRITE | G_PARAM_STATIC_NAME)); + g_param_spec_enum ("collection-position", NULL, NULL, + EOM_TYPE_WINDOW_COLLECTION_POS, + EOM_WINDOW_COLLECTION_POS_BOTTOM, + G_PARAM_READWRITE | G_PARAM_STATIC_NAME)); /** * EomWindow:collection-resizable: |