aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-04 02:30:35 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-04 02:30:35 +0800
commit8665558111a7e4bc439818a8fc1c34c81bac7da4 (patch)
treed89339d854d6faeae6d2e0c8dafde1b18e8bcf26
parentb369515aba539de144a26529515fdcbeb1b7e07d (diff)
downloadgsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.tar
gsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.tar.gz
gsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.tar.bz2
gsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.tar.lz
gsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.tar.xz
gsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.tar.zst
gsoc2013-epiphany-8665558111a7e4bc439818a8fc1c34c81bac7da4.zip
Add type for flags.
2005-01-03 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_flags_get_type): * lib/egg/egg-toolbars-model.h: Add type for flags.
-rw-r--r--ChangeLog8
-rwxr-xr-xlib/egg/egg-toolbars-model.c24
-rwxr-xr-xlib/egg/egg-toolbars-model.h3
3 files changed, 35 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 08bf1d30f..0d14e1947 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-01-03 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/egg/egg-toolbars-model.c:
+ (egg_toolbars_model_flags_get_type):
+ * lib/egg/egg-toolbars-model.h:
+
+ Add type for flags.
+
2005-01-03 Crispin Flowerday <gnome@flowerday.cx>
* src/ephy-shell.c: (ephy_shell_error_get_type),
diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c
index c4c30880f..0b4bc93ff 100755
--- a/lib/egg/egg-toolbars-model.c
+++ b/lib/egg/egg-toolbars-model.c
@@ -71,6 +71,30 @@ struct EggToolbarsModelPrivate
};
GType
+egg_toolbars_model_flags_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GFlagsValue values[] =
+ {
+ { EGG_TB_MODEL_NOT_REMOVABLE, "EGG_TB_MODEL_NOT_REMOVABLE", "not-removable" },
+ { EGG_TB_MODEL_ICONS_ONLY, "EGG_TB_MODEL_ICONS_ONLY", "icons-only" },
+ { EGG_TB_MODEL_TEXT_ONLY, "EGG_TB_MODEL_TEXT_ONLY", "text-only" },
+ { EGG_TB_MODEL_ICONS_TEXT, "EGG_TB_MODEL_ICONS_TEXT", "text" },
+ { EGG_TB_MODEL_ICONS_TEXT_HORIZ, "EGG_TB_MODEL_ICONS_TEXT_HORIZ", "text-horiz" },
+ { EGG_TB_MODEL_ACCEPT_ITEMS_ONLY, "EGG_TB_MODEL_ACCEPT_ITEMS_ONLY", "accept-items-only" },
+ { 0, NULL, NULL }
+ };
+
+ type = g_flags_register_static ("EggToolbarsModelFlags", values);
+ }
+
+return type;
+}
+
+GType
egg_toolbars_model_get_type (void)
{
static GType type = 0;
diff --git a/lib/egg/egg-toolbars-model.h b/lib/egg/egg-toolbars-model.h
index 0ea3c55d4..551f46edb 100755
--- a/lib/egg/egg-toolbars-model.h
+++ b/lib/egg/egg-toolbars-model.h
@@ -34,6 +34,8 @@ G_BEGIN_DECLS
#define EGG_IS_TOOLBARS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TOOLBARS_MODEL))
#define EGG_TOOLBARS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelClass))
+#define EGG_TYPE_TOOLBARS_MODEL_FLAGS (egg_toolbars_model_flags_get_type ())
+
typedef struct EggToolbarsModel EggToolbarsModel;
typedef struct EggToolbarsModelPrivate EggToolbarsModelPrivate;
typedef struct EggToolbarsModelClass EggToolbarsModelClass;
@@ -92,6 +94,7 @@ struct EggToolbarsModelClass
const char *type);
};
+GType egg_toolbars_model_flags_get_type (void);
GType egg_toolbars_model_get_type (void);
EggToolbarsModel *egg_toolbars_model_new (void);
gboolean egg_toolbars_model_load (EggToolbarsModel *model,