From f1da7aaa9b1cbc5f0ea703bbd5719d9c64dc2b15 Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 29 Jul 2014 17:55:31 +0200 Subject: Make the image-collection-position GSetting an enum Based on eog commit 7c69b182662f43636b1027fa395f9372593e39bb From Felix Riemann --- data/org.mate.eom.gschema.xml.in.in | 6 +++--- 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 @@ false <_summary>Show/Hide the image collection pane. - - 0 - <_summary>Image collection pane position. Set to 0 for bottom; 1 for left; 2 for top; 3 for right. + + 'bottom' + <_summary>Image collection pane position. false 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: -- cgit v1.2.1