Commit bff167d1 authored by Sean Davis's avatar Sean Davis 🕶

Make the clear button work for systray; Strip out the systray dialog code

parent 3ba22350
Pipeline #1124 passed with stages
in 4 minutes and 46 seconds
......@@ -14,7 +14,6 @@ libsystray_built_sources = \
sn-watcher.h \
sn-watcher.c \
sn-dialog-ui.h \
systray-dialog_ui.h \
systray-marshal.c \
systray-marshal.h
......@@ -119,9 +118,6 @@ systray-marshal.h: systray-marshal.list Makefile
systray-marshal.c: systray-marshal.list Makefile
$(AM_V_GEN) echo "#include \"systray-marshal.h\"" > $@ \
&& glib-genmarshal --prefix=_systray_marshal --body $< >> $@
systray-dialog_ui.h: systray-dialog.glade
$(AM_V_GEN) xdt-csource --static --strip-comments --strip-content --name=systray_dialog_ui $< >$@
endif
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
......@@ -116,7 +116,7 @@ enum
CONFIGURATION_CHANGED,
ITEM_LIST_CHANGED,
COLLECT_KNOWN_ITEMS,
KNOWN_ITEM_LIST_CHANGED,
LEGACY_ITEM_LIST_CHANGED,
LAST_SIGNAL
};
......@@ -258,8 +258,8 @@ sn_config_class_init (SnConfigClass *klass)
g_cclosure_marshal_generic,
G_TYPE_NONE, 1, G_TYPE_POINTER);
sn_config_signals[KNOWN_ITEM_LIST_CHANGED] =
g_signal_new (g_intern_static_string ("known-items-list-changed"),
sn_config_signals[LEGACY_ITEM_LIST_CHANGED] =
g_signal_new (g_intern_static_string ("legacy-items-list-changed"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
......@@ -485,7 +485,7 @@ sn_config_set_property (GObject *object,
{
config->mode_whitelist = val;
g_signal_emit (G_OBJECT (config), sn_config_signals[ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[KNOWN_ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
}
break;
......@@ -536,7 +536,7 @@ sn_config_set_property (GObject *object,
config->known_legacy_items = g_list_append (config->known_legacy_items, name);
}
}
g_signal_emit (G_OBJECT (config), sn_config_signals[KNOWN_ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
break;
case PROP_HIDDEN_LEGACY_ITEMS:
......@@ -552,7 +552,7 @@ sn_config_set_property (GObject *object,
g_hash_table_replace (config->hidden_legacy_items, name, name);
}
}
g_signal_emit (G_OBJECT (config), sn_config_signals[KNOWN_ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
break;
default:
......@@ -772,7 +772,7 @@ sn_config_set_legacy_hidden (SnConfig *config,
g_hash_table_remove (config->hidden_legacy_items, name);
}
g_object_notify (G_OBJECT (config), "hidden-legacy-items");
g_signal_emit (G_OBJECT (config), sn_config_signals[KNOWN_ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
}
......@@ -864,7 +864,7 @@ sn_config_add_known_legacy_item (SnConfig *config,
}
g_object_notify (G_OBJECT (config), "known-legacy-items");
g_signal_emit (G_OBJECT (config), sn_config_signals[KNOWN_ITEM_LIST_CHANGED], 0);
g_signal_emit (G_OBJECT (config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
}
......@@ -941,7 +941,7 @@ void sn_config_swap_known_legacy_items(SnConfig *config,
g_list_free(li_tmp);
g_object_notify(G_OBJECT(config), "known-legacy-items");
g_signal_emit(G_OBJECT(config), sn_config_signals[KNOWN_ITEM_LIST_CHANGED], 0);
g_signal_emit(G_OBJECT(config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
}
......@@ -990,8 +990,6 @@ sn_config_items_clear (SnConfig *config)
{
g_object_notify (G_OBJECT (config), "known-items");
g_object_notify (G_OBJECT (config), "hidden-items");
g_object_notify (G_OBJECT (config), "known-legacy-items");
g_object_notify (G_OBJECT (config), "hidden-legacy-items");
g_signal_emit (G_OBJECT (config), sn_config_signals[ITEM_LIST_CHANGED], 0);
return TRUE;
......@@ -1004,6 +1002,23 @@ sn_config_items_clear (SnConfig *config)
gboolean
sn_config_legacy_items_clear(SnConfig *config)
{
g_list_free_full(config->known_legacy_items, g_free);
config->known_legacy_items = NULL;
g_hash_table_remove_all (config->hidden_legacy_items);
g_object_notify(G_OBJECT(config), "known-legacy-items");
g_object_notify(G_OBJECT(config), "hidden-legacy-items");
g_signal_emit(G_OBJECT(config), sn_config_signals[LEGACY_ITEM_LIST_CHANGED], 0);
return TRUE;
}
SnConfig *
sn_config_new (const gchar *property_base)
{
......
......@@ -97,6 +97,7 @@ void sn_config_swap_known_legacy_items (SnConfig
const gchar *name2);
gboolean sn_config_items_clear (SnConfig *config);
gboolean sn_config_legacy_items_clear (SnConfig *config);
G_END_DECLS
......
......@@ -637,6 +637,11 @@ sn_dialog_clear_clicked (GtkWidget *button,
gtk_list_store_clear (GTK_LIST_STORE (dialog->store));
sn_dialog_update_names (dialog);
}
if (sn_config_legacy_items_clear (dialog->config))
{
gtk_list_store_clear (GTK_LIST_STORE (dialog->legacy_store));
sn_dialog_update_legacy_names (dialog);
}
}
}
......
......@@ -272,7 +272,7 @@ sn_plugin_construct (XfcePanelPlugin *panel_plugin)
G_CALLBACK (gtk_widget_queue_resize), plugin->systray_box);
g_signal_connect (plugin->config, "configuration-changed",
G_CALLBACK (systray_plugin_configuration_changed), plugin);
g_signal_connect (plugin->config, "known-items-list-changed",
g_signal_connect (plugin->config, "legacy-items-list-changed",
G_CALLBACK (systray_plugin_configuration_changed), plugin);
plugin->backend = sn_backend_new ();
......
This diff is collapsed.
This diff is collapsed.
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