Commit 3ba22350 authored by Sean Davis's avatar Sean Davis 🕶

Fix hidden setting, move arrow to end of box

parent 1e9c2b48
Pipeline #1112 passed with stages
in 4 minutes and 45 seconds
......@@ -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;
}
......
......@@ -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);
}
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment