aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-04 03:36:07 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-04 03:36:07 +0800
commit3ab9a0de0534c260fec251c9e76e54cf5989d507 (patch)
treefb5c3da3e723c9d450e3c0f0272d3e2f10ff431f
parentc7eaafa8fa678b1908b629495fb263dca7b76751 (diff)
downloadgsoc2013-epiphany-3ab9a0de0534c260fec251c9e76e54cf5989d507.tar.gz
gsoc2013-epiphany-3ab9a0de0534c260fec251c9e76e54cf5989d507.tar.zst
gsoc2013-epiphany-3ab9a0de0534c260fec251c9e76e54cf5989d507.zip
Add type for flags.
2005-01-03 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-state.c: (ephy_state_window_flags_get_type): * lib/ephy-state.h: Add type for flags.
-rw-r--r--ChangeLog7
-rw-r--r--lib/ephy-state.c22
-rw-r--r--lib/ephy-state.h12
3 files changed, 37 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c0c5f49dd..24651c3d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2005-01-03 Christian Persch <chpe@cvs.gnome.org>
+ * lib/ephy-state.c: (ephy_state_window_flags_get_type):
+ * lib/ephy-state.h:
+
+ Add type for flags.
+
+2005-01-03 Christian Persch <chpe@cvs.gnome.org>
+
* embed/ephy-embed-persist.c: (ephy_embed_persist_flags_get_type):
* embed/ephy-embed-persist.h:
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index 452d56b7b..4871b2ea1 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -513,3 +513,25 @@ ephy_state_save (void)
states_db = NULL;
}
}
+
+GType
+ephy_state_window_flags_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GFlagsValue values[] =
+ {
+ { EPHY_STATE_WINDOW_SAVE_NONE, "EPHY_STATE_WINDOW_SAVE_NONE", "none" },
+ { EPHY_STATE_WINDOW_SAVE_SIZE, "EPHY_STATE_WINDOW_SAVE_SIZE", "size" },
+ { EPHY_STATE_WINDOW_SAVE_POSITION, "EPHY_STATE_WINDOW_SAVE_POSITION", "position" },
+
+ { 0, NULL, NULL }
+ };
+
+ type = g_flags_register_static ("EphyStateWindowFlags", values);
+ }
+
+ return type;
+}
diff --git a/lib/ephy-state.h b/lib/ephy-state.h
index f54eb9bc0..883c9b9db 100644
--- a/lib/ephy-state.h
+++ b/lib/ephy-state.h
@@ -27,6 +27,8 @@
G_BEGIN_DECLS
+#define EPHY_TYPE_STATE_WINDOW_FLAGS (ephy_state_window_flags_get_type ())
+
typedef enum
{
EPHY_STATE_WINDOW_SAVE_NONE = 0,
@@ -34,22 +36,24 @@ typedef enum
EPHY_STATE_WINDOW_SAVE_POSITION = 1 << 1
} EphyStateWindowFlags;
-void ephy_state_add_window (GtkWidget *window,
+GType ephy_state_window_flags_get_type (void);
+
+void ephy_state_add_window (GtkWidget *window,
const char *name,
int default_width,
int default_heigth,
gboolean maximize,
EphyStateWindowFlags flags);
-void ephy_state_add_paned (GtkWidget *paned,
+void ephy_state_add_paned (GtkWidget *paned,
const char *name,
int default_width);
-void ephy_state_add_expander (GtkWidget *expander,
+void ephy_state_add_expander (GtkWidget *expander,
const char *name,
gboolean default_state);
-void ephy_state_save (void);
+void ephy_state_save (void);
G_END_DECLS