[eog/gnome-2-32: 30/34] Mark startup-flags property as GFlags which it actually is.



commit a3d805e088526fb84c496ee51d630f716b2db165
Author: Felix Riemann <friemann gnome org>
Date:   Sun Jul 18 23:53:03 2010 +0200

    Mark startup-flags property as GFlags which it actually is.
    
    Instead of using some strange guchar magic.

 src/eog-window.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index b413cf0..630efd8 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -53,6 +53,8 @@
 #include "eog-plugin-engine.h"
 #include "eog-close-confirmation-dialog.h"
 
+#include "eog-enum-types.h"
+
 #include "egg-toolbar-editor.h"
 #include "egg-editable-toolbar.h"
 #include "egg-toolbars-model.h"
@@ -5162,7 +5164,7 @@ eog_window_set_property (GObject      *object,
 
         switch (property_id) {
 	case PROP_STARTUP_FLAGS:
-		priv->flags = (gint8) g_value_get_uchar (value);
+		priv->flags = g_value_get_flags (value);
 		break;
 
         default:
@@ -5186,7 +5188,7 @@ eog_window_get_property (GObject    *object,
 
         switch (property_id) {
 	case PROP_STARTUP_FLAGS:
-		g_value_set_uchar (value, priv->flags);
+		g_value_set_flags (value, priv->flags);
 		break;
 
         default:
@@ -5241,11 +5243,10 @@ eog_window_class_init (EogWindowClass *class)
  */
 	g_object_class_install_property (g_object_class,
 					 PROP_STARTUP_FLAGS,
-					 g_param_spec_uchar ("startup-flags",
+					 g_param_spec_flags ("startup-flags",
 							     NULL,
 							     NULL,
-							     0,
-					 		     G_MAXUINT8,
+							     EOG_TYPE_STARTUP_FLAGS,
 					 		     0,
 					 		     G_PARAM_READWRITE |
 							     G_PARAM_CONSTRUCT_ONLY));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]