[gnome-applets/wip/segeiger/windowpicker: 4/7] windowpicker: cleanup tasklist signal connections
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets/wip/segeiger/windowpicker: 4/7] windowpicker: cleanup tasklist signal connections
- Date: Fri, 11 Oct 2019 21:24:19 +0000 (UTC)
commit 3ac65d419dd8994db221eea0b86092048d7215b2
Author: Sebastian Geiger <sbastig gmx net>
Date: Tue Oct 8 23:35:58 2019 +0200
windowpicker: cleanup tasklist signal connections
windowpicker/src/task-list.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/windowpicker/src/task-list.c b/windowpicker/src/task-list.c
index 68cfbb753..c1503d4c8 100644
--- a/windowpicker/src/task-list.c
+++ b/windowpicker/src/task-list.c
@@ -171,12 +171,12 @@ static void create_task_item (TaskList *taskList,
{
gtk_container_add (GTK_CONTAINER (taskList), item);
- g_signal_connect (TASK_ITEM (item), "task-item-closed",
- G_CALLBACK (on_task_item_closed), taskList);
+ g_signal_connect_object (TASK_ITEM (item), "task-item-closed",
+ G_CALLBACK (on_task_item_closed), taskList, 0);
- g_signal_connect (TASK_ITEM (item), "monitor-changed",
- G_CALLBACK (on_task_item_monitor_changed_cb),
- taskList);
+ g_signal_connect_object (TASK_ITEM (item), "monitor-changed",
+ G_CALLBACK (on_task_item_monitor_changed_cb),
+ taskList, 0);
}
}
@@ -202,8 +202,8 @@ static void on_window_opened (WnckScreen *screen,
g_return_if_fail (taskList != NULL);
WnckWindowType type = wnck_window_get_window_type (window);
- g_signal_connect (window, "type-changed", G_CALLBACK (type_changed),
- taskList);
+ g_signal_connect_object (window, "type-changed", G_CALLBACK (type_changed),
+ taskList, 0);
if (type == WNCK_WINDOW_DESKTOP
|| type == WNCK_WINDOW_DOCK
@@ -317,7 +317,6 @@ static void
task_list_dispose (GObject *object)
{
TaskList *task_list = TASK_LIST (object);
- g_signal_handlers_disconnect_by_func (task_list->screen, on_window_opened, task_list);
G_OBJECT_CLASS (task_list_parent_class)->dispose (object);
}
@@ -366,10 +365,11 @@ GtkWidget *task_list_new (WpApplet *windowPickerApplet) {
taskList->windowPickerApplet = windowPickerApplet;
- g_signal_connect(PANEL_APPLET(windowPickerApplet), "change-orient",
- G_CALLBACK(on_task_list_orient_changed), taskList);
- g_signal_connect (taskList->screen, "window-opened",
- G_CALLBACK (on_window_opened), taskList);
+ g_signal_connect_object (windowPickerApplet, "change-orient",
+ G_CALLBACK (on_task_list_orient_changed), taskList, 0);
+
+ g_signal_connect_object (taskList->screen, "window-opened",
+ G_CALLBACK (on_window_opened), taskList, 0);
gdk_window_add_filter (gtk_widget_get_window (GTK_WIDGET (taskList)),
window_filter_function,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]