diff options
author | monsta <[email protected]> | 2017-11-14 12:21:23 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-11-14 12:24:49 +0300 |
commit | 2b17f4f461cff056ab0f4687a9ac673a16933f7c (patch) | |
tree | d399d633a3cbc2b4a70784c130f52e637eb54af9 /applets/wncklet | |
parent | f751ec74a3184fd60061ecff1bfc9992605f57b4 (diff) | |
download | mate-panel-2b17f4f461cff056ab0f4687a9ac673a16933f7c.tar.bz2 mate-panel-2b17f4f461cff056ab0f4687a9ac673a16933f7c.tar.xz |
wncklet: disconnect signals by data on destroy
do the same as in 4fbe8e24933d367316441166ca448cdb03c6a35f
this optimizes 9f43dd5c7c37b84960d06a98a4738ee40d8bfd50
Diffstat (limited to 'applets/wncklet')
-rw-r--r-- | applets/wncklet/window-list.c | 17 | ||||
-rw-r--r-- | applets/wncklet/workspace-switcher.c | 14 |
2 files changed, 4 insertions, 27 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index e3d2e208..da232447 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -688,22 +688,9 @@ static void display_properties_dialog(GtkAction* action, TasklistData* tasklist) static void destroy_tasklist(GtkWidget* widget, TasklistData* tasklist) { + g_signal_handlers_disconnect_by_data (G_OBJECT (tasklist->applet), tasklist); - g_signal_handlers_disconnect_by_func(G_OBJECT(tasklist->applet), - G_CALLBACK(applet_change_orient), tasklist); - g_signal_handlers_disconnect_by_func(G_OBJECT(tasklist->applet), - G_CALLBACK(applet_change_pixel_size), tasklist); - g_signal_handlers_disconnect_by_func(G_OBJECT(tasklist->applet), - G_CALLBACK(applet_change_background), tasklist); - g_signal_handlers_disconnect_by_func (tasklist->settings, - G_CALLBACK (display_all_workspaces_changed), - tasklist); - g_signal_handlers_disconnect_by_func (tasklist->settings, - G_CALLBACK (group_windows_changed), - tasklist); - g_signal_handlers_disconnect_by_func (tasklist->settings, - G_CALLBACK (move_unminimized_windows_changed), - tasklist); + g_signal_handlers_disconnect_by_data (tasklist->settings, tasklist); g_object_unref(tasklist->settings); diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index 05ca4432..cdeca09c 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -961,18 +961,8 @@ static void display_properties_dialog(GtkAction* action, PagerData* pager) static void destroy_pager(GtkWidget* widget, PagerData* pager) { - g_signal_handlers_disconnect_by_func (pager->settings, - G_CALLBACK (num_rows_changed), - pager); - g_signal_handlers_disconnect_by_func (pager->settings, - G_CALLBACK (display_workspace_names_changed), - pager); - g_signal_handlers_disconnect_by_func (pager->settings, - G_CALLBACK (all_workspaces_changed), - pager); - g_signal_handlers_disconnect_by_func (pager->settings, - G_CALLBACK (wrap_workspaces_changed), - pager); + g_signal_handlers_disconnect_by_data (pager->settings, pager); + g_object_unref (pager->settings); if (pager->properties_dialog) |