[Xfce4-commits] <xfce4-panel:devel> Remove the optional hash table from panel_properties_bind().
Nick Schermer
nick at xfce.org
Tue Aug 11 20:34:29 CEST 2009
Updating branch refs/heads/devel
to fe27f9a9f4277dc791d2062430506c6043a05863 (commit)
from 9d9c2546378a0f3c79ee232cb040f5cbadc0ee47 (commit)
commit fe27f9a9f4277dc791d2062430506c6043a05863
Author: Nick Schermer <nick at xfce.org>
Date: Mon Jun 1 01:34:27 2009 +0200
Remove the optional hash table from panel_properties_bind().
common/panel-xfconf.c | 8 +++-----
common/panel-xfconf.h | 3 +--
panel/panel-application.c | 2 +-
plugins/actions/actions.c | 2 +-
plugins/launcher/launcher.c | 2 +-
plugins/pager/pager.c | 2 +-
plugins/separator/separator.c | 2 +-
plugins/systray/systray.c | 2 +-
plugins/tasklist/tasklist.c | 2 +-
plugins/windowmenu/windowmenu.c | 2 +-
10 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/common/panel-xfconf.c b/common/panel-xfconf.c
index b2d8957..86d6ea6 100644
--- a/common/panel-xfconf.c
+++ b/common/panel-xfconf.c
@@ -155,13 +155,13 @@ void
panel_properties_bind (XfconfChannel *channel,
GObject *object,
const gchar *property_base,
- const PanelProperty *properties,
- GHashTable *hash_table)
+ const PanelProperty *properties)
{
const PanelProperty *prop;
const GValue *value;
gchar buf[512];
PropertyBinding *binding;
+ GHashTable *hash_table;
panel_return_if_fail (XFCONF_IS_CHANNEL (channel));
panel_return_if_fail (G_IS_OBJECT (object));
@@ -169,9 +169,7 @@ panel_properties_bind (XfconfChannel *channel,
panel_return_if_fail (properties != NULL);
/* get or ref the hash table */
- if (G_LIKELY (hash_table != NULL))
- g_hash_table_ref (hash_table);
- else if (shared_hash_table != NULL)
+ if (shared_hash_table != NULL)
hash_table = g_hash_table_ref (shared_hash_table);
else
hash_table = xfconf_channel_get_properties (channel, property_base);
diff --git a/common/panel-xfconf.h b/common/panel-xfconf.h
index b192e86..a74d43f 100644
--- a/common/panel-xfconf.h
+++ b/common/panel-xfconf.h
@@ -32,8 +32,7 @@ struct _PanelProperty
void panel_properties_bind (XfconfChannel *channel,
GObject *object,
const gchar *property_base,
- const PanelProperty *properties,
- GHashTable *hash_table);
+ const PanelProperty *properties);
void panel_properties_unbind (GObject *object);
diff --git a/panel/panel-application.c b/panel/panel-application.c
index e9d1e81..7498578 100644
--- a/panel/panel-application.c
+++ b/panel/panel-application.c
@@ -266,7 +266,7 @@ panel_application_xfconf_window_bindings (PanelApplication *application,
/* bind all the properties */
panel_properties_bind (application->xfconf, G_OBJECT (window),
- property_base, properties, NULL);
+ property_base, properties);
/* cleanup */
g_free (property_base);
diff --git a/plugins/actions/actions.c b/plugins/actions/actions.c
index 13f32e0..d3a6a0d 100644
--- a/plugins/actions/actions.c
+++ b/plugins/actions/actions.c
@@ -316,7 +316,7 @@ actions_plugin_construct (XfcePanelPlugin *panel_plugin)
/* bind all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* set orientation and size */
actions_plugin_orientation_changed (panel_plugin,
diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 0ef8f6a..73b5291 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -519,7 +519,7 @@ launcher_plugin_construct (XfcePanelPlugin *panel_plugin)
/* bind all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* handle and empty plugin */
if (G_UNLIKELY (plugin->items == NULL))
diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index e7ead78..92051de 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -324,7 +324,7 @@ pager_plugin_construct (XfcePanelPlugin *panel_plugin)
/* bind all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* create the pager */
g_signal_connect (G_OBJECT (plugin), "screen-changed",
diff --git a/plugins/separator/separator.c b/plugins/separator/separator.c
index 12353c6..cc11db2 100644
--- a/plugins/separator/separator.c
+++ b/plugins/separator/separator.c
@@ -289,7 +289,7 @@ separator_plugin_construct (XfcePanelPlugin *panel_plugin)
/* connect all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* make sure the plugin is drawn */
gtk_widget_queue_draw (GTK_WIDGET (panel_plugin));
diff --git a/plugins/systray/systray.c b/plugins/systray/systray.c
index 43221a4..7e5c626 100644
--- a/plugins/systray/systray.c
+++ b/plugins/systray/systray.c
@@ -311,7 +311,7 @@ systray_plugin_construct (XfcePanelPlugin *panel_plugin)
/* bind all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* monitor screen changes */
g_signal_connect (G_OBJECT (plugin), "screen-changed",
diff --git a/plugins/tasklist/tasklist.c b/plugins/tasklist/tasklist.c
index a067a21..a2fe334 100644
--- a/plugins/tasklist/tasklist.c
+++ b/plugins/tasklist/tasklist.c
@@ -150,7 +150,7 @@ tasklist_plugin_construct (XfcePanelPlugin *panel_plugin)
/* bind all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin->tasklist),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* show the tasklist */
gtk_widget_show (plugin->tasklist);
diff --git a/plugins/windowmenu/windowmenu.c b/plugins/windowmenu/windowmenu.c
index 8d97cd0..19aff30 100644
--- a/plugins/windowmenu/windowmenu.c
+++ b/plugins/windowmenu/windowmenu.c
@@ -403,7 +403,7 @@ window_menu_plugin_construct (XfcePanelPlugin *panel_plugin)
/* bind all properties */
panel_properties_bind (plugin->channel, G_OBJECT (plugin),
xfce_panel_plugin_get_property_base (panel_plugin),
- properties, NULL);
+ properties);
/* monitor screen changes */
g_signal_connect (G_OBJECT (plugin), "screen-changed",
More information about the Xfce4-commits
mailing list