[Xfce4-commits] <xfce4-indicator-plugin:andrzejr/tmp3> Properly connecting indicator-list-changed signal.
Andrzej
noreply at xfce.org
Tue Mar 12 23:14:01 CET 2013
Updating branch refs/heads/andrzejr/tmp3
to 290c5f4596900e67f3c2e87f730812e8e48a9333 (commit)
from 0db001bdd6e764e2e375ac69ad01418c09c3b6da (commit)
commit 290c5f4596900e67f3c2e87f730812e8e48a9333
Author: Andrzej <ndrwrdck at gmail.com>
Date: Tue Mar 12 22:13:44 2013 +0000
Properly connecting indicator-list-changed signal.
panel-plugin/indicator-box.c | 8 ++++----
panel-plugin/indicator-config.c | 5 +++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/indicator-box.c b/panel-plugin/indicator-box.c
index a48f22b..3b820a9 100644
--- a/panel-plugin/indicator-box.c
+++ b/panel-plugin/indicator-box.c
@@ -113,10 +113,6 @@ xfce_indicator_box_init (XfceIndicatorBox *box)
/* todo: no deallocation function for values */
box->children = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-
- box->indicator_list_changed_id =
- g_signal_connect_swapped (G_OBJECT (box->config), "indicator-list-changed",
- G_CALLBACK (xfce_indicator_box_list_changed), box);
}
@@ -146,6 +142,10 @@ xfce_indicator_box_new (IndicatorConfig *config)
box->config = config;
+ box->indicator_list_changed_id =
+ g_signal_connect_swapped (G_OBJECT (box->config), "indicator-list-changed",
+ G_CALLBACK (xfce_indicator_box_list_changed), box);
+
return GTK_WIDGET (box);
}
diff --git a/panel-plugin/indicator-config.c b/panel-plugin/indicator-config.c
index f73ea94..09dbb96 100644
--- a/panel-plugin/indicator-config.c
+++ b/panel-plugin/indicator-config.c
@@ -596,6 +596,7 @@ indicator_config_blacklist_set (IndicatorConfig *config,
g_hash_table_remove (config->blacklist, name);
}
g_object_notify (G_OBJECT (config), "blacklist");
+ g_signal_emit (G_OBJECT (config), indicator_config_signals [INDICATOR_LIST_CHANGED], 0);
}
@@ -622,6 +623,7 @@ indicator_config_whitelist_set (IndicatorConfig *config,
g_hash_table_remove (config->whitelist, name);
}
g_object_notify (G_OBJECT (config), "whitelist");
+ g_signal_emit (G_OBJECT (config), indicator_config_signals [INDICATOR_LIST_CHANGED], 0);
}
@@ -668,6 +670,7 @@ indicator_config_add_known_indicator (IndicatorConfig *config,
config->known_indicators = g_list_append (config->known_indicators, g_strdup (name));
g_object_notify (G_OBJECT (config), "known-indicators");
+ g_signal_emit (G_OBJECT (config), indicator_config_signals [INDICATOR_LIST_CHANGED], 0);
}
@@ -709,6 +712,7 @@ indicator_config_swap_known_indicators (IndicatorConfig *config,
g_list_free (li_tmp);
g_object_notify (G_OBJECT (config), "known-indicators");
+ g_signal_emit (G_OBJECT (config), indicator_config_signals [INDICATOR_LIST_CHANGED], 0);
}
@@ -727,6 +731,7 @@ indicator_config_names_clear (IndicatorConfig *config)
g_hash_table_remove_all (config->whitelist);
g_object_notify (G_OBJECT (config), "whitelist");
+ g_signal_emit (G_OBJECT (config), indicator_config_signals [INDICATOR_LIST_CHANGED], 0);
}
More information about the Xfce4-commits
mailing list