Author: olivier
Date: 2008-10-16 08:04:46 +0000 (Thu, 16 Oct 2008)
New Revision: 28266

Modified:
   xfwm4/trunk/ChangeLog
   xfwm4/trunk/settings-dialogs/xfwm4-settings.c
Log:
Fix compilation with glib-2.10, there is no g_hash_table_get_keys() nor 
constructed method for GObjects in glib-2.10.

Modified: xfwm4/trunk/ChangeLog
===================================================================
--- xfwm4/trunk/ChangeLog       2008-10-16 01:09:18 UTC (rev 28265)
+++ xfwm4/trunk/ChangeLog       2008-10-16 08:04:46 UTC (rev 28266)
@@ -1,3 +1,38 @@
+2008-10-16  olivier
+
+       * settings-dialogs/xfwm4-settings.c: Fix compilation with glib-2.10,
+         there is no g_hash_table_get_keys() nor constructed method for 
+         GObjects in glib-2.10.
+
+2008-10-16  jannis
+
+       * settings-dialogs/xfwm4-settings.h: Add missing header file for
+         the main settings dialog.
+
+2008-10-15  jannis
+
+       * settings-dialogs/frap-shortcuts.c.bak: Remove backup file.
+
+2008-10-15  jannis
+
+       * settings-dialogs/Makefile.am,
+         settings-dialogs/frap-shortcuts-dialog.c,
+         settings-dialogs/frap-shortcuts-dialog.h,
+         settings-dialogs/frap-shortcuts-provider.c,
+         settings-dialogs/frap-shortcuts-provider.h,
+         settings-dialogs/frap-shortcuts.c,
+         settings-dialogs/frap-shortcuts.c.bak,
+         settings-dialogs/frap-shortcuts.h,
+         settings-dialogs/xfwm4-dialog.glade,
+         settings-dialogs/xfwm4-settings.c: GObject-ify the main settings
+         dialog. Update frap shortcuts files.
+         Tweak the settings dialog UI a bit. Next task will be support for
+         shortcuts.
+
+2008-10-14  stephan
+
+       * configure.ac.in: Bump version number and dependency requirements
+
 2008-10-14  olivier
 
        * settings-dialogs/Makefile.am: Include monitor-icon.h, 

Modified: xfwm4/trunk/settings-dialogs/xfwm4-settings.c
===================================================================
--- xfwm4/trunk/settings-dialogs/xfwm4-settings.c       2008-10-16 01:09:18 UTC 
(rev 28265)
+++ xfwm4/trunk/settings-dialogs/xfwm4-settings.c       2008-10-16 08:04:46 UTC 
(rev 28266)
@@ -233,7 +233,26 @@
 }
 
 
+/*
+ * Xfce 4.6 depends on glib 2.12,
+ * Glib 2.14 comes with g_hash_table_get_keys(),
+ * until then... use the following function with
+ * g_hash_table_foreach()
+ */
+#if !GLIB_CHECK_VERSION (2,14,0)
+static void
+xfwm4_settings_get_list_keys_foreach (gpointer key,
+                                      gpointer value,
+                                      gpointer user_data)
+{
+  GList **keys = user_data;
+  *keys = g_list_prepend (*keys, key);
+}
+#endif
 
+
+
+
 static void
 xfwm_settings_class_init (XfwmSettingsClass *klass)
 {
@@ -245,7 +264,9 @@
   xfwm_settings_parent_class = g_type_class_peek_parent (klass);
 
   gobject_class = G_OBJECT_CLASS (klass);
-  gobject_class->constructed = xfwm_settings_constructed; 
+#if GLIB_CHECK_VERSION (2,14,0)
+  gobject_class->constructed = xfwm_settings_constructed;
+#endif
   gobject_class->finalize = xfwm_settings_finalize; 
   gobject_class->get_property = xfwm_settings_get_property;
   gobject_class->set_property = xfwm_settings_set_property;
@@ -615,6 +636,9 @@
 
   if (G_LIKELY (glade_xml != NULL))
     settings = g_object_new (XFWM_TYPE_SETTINGS, "glade-xml", glade_xml, NULL);
+#if !GLIB_CHECK_VERSION (2,14,0)
+  xfwm_settings_constructed (G_OBJECT(settings));
+#endif
 
   return settings;
 }
@@ -696,7 +720,12 @@
 
   active_theme_name = xfconf_channel_get_string (settings->priv->wm_channel, 
"/general/theme", DEFAULT_THEME);
 
+  keys = NULL;
+#if !GLIB_CHECK_VERSION (2,14,0)
+  g_hash_table_foreach (themes, xfwm4_settings_get_list_keys_foreach, &keys);
+#else
   keys = g_hash_table_get_keys (themes);
+#endif
 
   for (key = keys; key != NULL; key = g_list_next (key))
     {

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to