diff --git a/plugins/systray/sn-config.c b/plugins/systray/sn-config.c index eab0c5daa1a5ad0898d78a1ba050b5b60db8530c..48a5b081758293c8a84b8f522e72b045477ba952 100644 --- a/plugins/systray/sn-config.c +++ b/plugins/systray/sn-config.c @@ -797,21 +797,6 @@ sn_config_get_known_legacy_items (SnConfig *config) -static void -sn_config_collect_hidden_legacy_items (gpointer key, - gpointer value, - gpointer array) -{ - GList *list = (GList *)array; - gchar *item = g_strdup ((gchar *)value); - - list = g_list_prepend (list, item); - - array = (gpointer)list; -} - - - GList* sn_config_get_hidden_legacy_items (SnConfig *config) { @@ -819,7 +804,7 @@ sn_config_get_hidden_legacy_items (SnConfig *config) g_return_val_if_fail (XFCE_IS_SN_CONFIG (config), NULL); - g_hash_table_foreach (config->hidden_legacy_items, sn_config_collect_hidden_legacy_items, list); + list = g_hash_table_get_values (config->hidden_legacy_items); return list; } diff --git a/plugins/systray/sn-plugin.c b/plugins/systray/sn-plugin.c index 85f27d34dfd2201ef97b49649f667d794a795377..5d52d385dc980eb8bfc935e031931c0bd78108cf 100644 --- a/plugins/systray/sn-plugin.c +++ b/plugins/systray/sn-plugin.c @@ -254,17 +254,6 @@ sn_plugin_construct (XfcePanelPlugin *panel_plugin) gtk_container_set_border_width (GTK_CONTAINER (plugin->systray_box), 1); gtk_widget_show (plugin->systray_box); - /* Systray arrow button */ - plugin->button = xfce_arrow_button_new (GTK_ARROW_RIGHT); - gtk_box_pack_start (GTK_BOX (plugin->box), plugin->button, FALSE, FALSE, 0); - g_signal_connect (G_OBJECT (plugin->button), "toggled", - G_CALLBACK (systray_plugin_button_toggled), plugin); - gtk_button_set_relief (GTK_BUTTON (plugin->button), GTK_RELIEF_NONE); - g_object_bind_property (G_OBJECT (plugin->systray_box), "has-hidden", - G_OBJECT (plugin->button), "visible", - G_BINDING_SYNC_CREATE); - xfce_panel_plugin_add_action_widget (XFCE_PANEL_PLUGIN (plugin), plugin->button); - /* monitor screen changes */ g_signal_connect (G_OBJECT (plugin), "screen-changed", G_CALLBACK (systray_plugin_screen_changed), NULL); @@ -292,4 +281,15 @@ sn_plugin_construct (XfcePanelPlugin *panel_plugin) g_signal_connect_swapped (plugin->backend, "item-removed", G_CALLBACK (sn_plugin_item_removed), plugin); sn_backend_start (plugin->backend); + + /* Systray arrow button */ + plugin->button = xfce_arrow_button_new(GTK_ARROW_RIGHT); + gtk_box_pack_start(GTK_BOX(plugin->box), plugin->button, FALSE, FALSE, 0); + g_signal_connect(G_OBJECT(plugin->button), "toggled", + G_CALLBACK(systray_plugin_button_toggled), plugin); + gtk_button_set_relief(GTK_BUTTON(plugin->button), GTK_RELIEF_NONE); + g_object_bind_property(G_OBJECT(plugin->systray_box), "has-hidden", + G_OBJECT(plugin->button), "visible", + G_BINDING_SYNC_CREATE); + xfce_panel_plugin_add_action_widget(XFCE_PANEL_PLUGIN(plugin), plugin->button); } diff --git a/plugins/systray/systray.c b/plugins/systray/systray.c index 48287fcbe6ac1ee6b56c812cd0d1180254acf2bf..c8b360888ccafabcd38ac221824982fcd6b5bcaf 100644 --- a/plugins/systray/systray.c +++ b/plugins/systray/systray.c @@ -152,9 +152,6 @@ void systray_plugin_configuration_changed (SnConfig *config, plugin->names_ordered = g_slist_prepend (plugin->names_ordered, name); } plugin->names_ordered = g_slist_reverse (plugin->names_ordered); - - /* update icons in the box */ - systray_plugin_names_update (plugin); } /* hidden-legacy-items */ @@ -170,12 +167,12 @@ void systray_plugin_configuration_changed (SnConfig *config, } if (list != NULL) - g_list_free_full (list, (GDestroyNotify) g_free); - - /* update icons in the box */ - systray_plugin_names_update(plugin); + g_list_free (list); } + /* update icons in the box */ + systray_plugin_names_update (plugin); + /* symbolic-icons */ { /* apply symbolic colors */