aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names/e-select-names-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-manager.c')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-manager.c b/addressbook/gui/component/select-names/e-select-names-manager.c
index 120fc25f97..9d26dc4dc5 100644
--- a/addressbook/gui/component/select-names/e-select-names-manager.c
+++ b/addressbook/gui/component/select-names/e-select-names-manager.c
@@ -573,6 +573,13 @@ e_select_names_clicked(ESelectNames *dialog, gint button, ESelectNamesManager *m
}
}
+static void
+clear_widget (gpointer data, GObject *where_object_was)
+{
+ GtkWidget **widget_ref = data;
+ *widget_ref = NULL;
+}
+
void
e_select_names_manager_activate_dialog (ESelectNamesManager *manager,
const char *id)
@@ -605,10 +612,7 @@ e_select_names_manager_activate_dialog (ESelectNamesManager *manager,
G_CALLBACK(e_select_names_clicked),
manager);
- g_signal_connect(manager->names,
- "destroy",
- G_CALLBACK(gtk_widget_destroyed),
- &manager->names);
+ g_object_weak_ref (manager->names, clear_widget, &manager->names);
gtk_widget_show(GTK_WIDGET(manager->names));
}