aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-07 22:15:34 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-07 22:15:34 +0800
commitc3da24579d8f707e1da5ed2a2e0040e2b724757f (patch)
tree3a845cedbb57ddd3f37352568f40fae7d62f58a8
parent056bcae1bf6a4a9faf18806388107cbcc7131372 (diff)
downloadgsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.tar
gsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.tar.gz
gsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.tar.bz2
gsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.tar.lz
gsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.tar.xz
gsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.tar.zst
gsoc2013-epiphany-c3da24579d8f707e1da5ed2a2e0040e2b724757f.zip
Make sure our flags/enum types are registered.
2005-01-07 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_get_type), (egg_toolbars_model_get_item_type): * lib/ephy-state.c: (ensure_states): Make sure our flags/enum types are registered.
-rw-r--r--ChangeLog8
-rwxr-xr-xlib/egg/egg-toolbars-model.c10
-rw-r--r--lib/ephy-state.c10
3 files changed, 16 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 6391b17c8..53aee9660 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2005-01-07 Christian Persch <chpe@cvs.gnome.org>
+ * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_get_type),
+ (egg_toolbars_model_get_item_type):
+ * lib/ephy-state.c: (ensure_states):
+
+ Make sure our flags/enum types are registered.
+
+2005-01-07 Christian Persch <chpe@cvs.gnome.org>
+
* lib/egg/egg-toolbars-model.c: (register_type):
* lib/ephy-state.c: (register_type):
* lib/ephy-state.h:
diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c
index 5e9d81b65..3837cc3f6 100755
--- a/lib/egg/egg-toolbars-model.c
+++ b/lib/egg/egg-toolbars-model.c
@@ -89,6 +89,10 @@ egg_toolbars_model_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) egg_toolbars_model_init
};
+ volatile GType flags_type; /* work around gcc's optimiser */
+
+ /* make sure the flags type is known */
+ flags_type = EGG_TYPE_TB_MODEL_FLAGS;
type = g_type_register_static (G_TYPE_OBJECT,
"EggToolbarsModel",
@@ -827,9 +831,3 @@ egg_toolbars_model_get_item_type (EggToolbarsModel *t,
return retval;
}
-
-G_GNUC_UNUSED static void
-register_type (void)
-{
- egg_tb_model_flags_get_type ();
-}
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index 66e673504..ad8c6e018 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -104,8 +104,12 @@ ensure_states (void)
{
if (states == NULL)
{
+ volatile GType flags_type; /* work around gcc's optimiser */
char *xml_file;
+ /* make sure the type is known when we read the db */
+ flags_type = EPHY_TYPE_STATE_WINDOW_FLAGS;
+
xml_file = g_build_filename (ephy_dot_dir (),
EPHY_STATES_XML_FILE,
NULL);
@@ -514,9 +518,3 @@ ephy_state_save (void)
states_db = NULL;
}
}
-
-G_GNUC_UNUSED static void
-register_type (void)
-{
- ephy_state_window_flags_get_type ();
-}