From f1da7aaa9b1cbc5f0ea703bbd5719d9c64dc2b15 Mon Sep 17 00:00:00 2001
From: infirit <infirit@gmail.com>
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 <friemann@gnome.org>
---
 src/eom-window.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'src')

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