diff options
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 19 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 6 | ||||
-rw-r--r-- | addressbook/gui/component/e-address-popup.c | 10 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-manager.c | 12 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 13 |
5 files changed, 30 insertions, 30 deletions
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index 4bfc49e9e1..ce515e1b00 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -317,8 +317,9 @@ addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, Addressbo } static void -addressbook_source_dialog_destroy (GtkWidget *widget, AddressbookSourceDialog *dialog) +addressbook_source_dialog_destroy (gpointer data, GObject *where_object_was) { + AddressbookSourceDialog *dialog = data; #ifdef NEW_ADVANCED_UI #define IF_UNREF(x) if (x) g_object_unref ((x)) @@ -1080,8 +1081,8 @@ addressbook_add_server_druid (AddressbookDialog *dialog) G_CALLBACK(addressbook_add_server_druid_finish), sdialog); g_signal_connect (sdialog->druid, "cancel", G_CALLBACK(addressbook_add_server_druid_cancel), sdialog); - g_signal_connect (sdialog->window, "destroy", - G_CALLBACK(addressbook_source_dialog_destroy), sdialog); + g_object_weak_ref (G_OBJECT (sdialog->window), + addressbook_source_dialog_destroy, sdialog); /* make sure we fill in the default values */ addressbook_source_dialog_set_source (sdialog, NULL); @@ -1416,8 +1417,8 @@ addressbook_edit_server_dialog (AddressbookDialog *dialog, int model_row) "clicked", G_CALLBACK(edit_dialog_apply_clicked), sdialog); g_signal_connect (sdialog->close_button, "clicked", G_CALLBACK(edit_dialog_close_clicked), sdialog); - g_signal_connect (sdialog->window, "destroy", - G_CALLBACK(addressbook_source_dialog_destroy), sdialog); + g_object_weak_ref (G_OBJECT (sdialog->window), + addressbook_source_dialog_destroy, sdialog); gtk_widget_set_sensitive (sdialog->ok_button, FALSE); gtk_widget_set_sensitive (sdialog->apply_button, FALSE); @@ -1498,8 +1499,8 @@ delete_source_clicked (GtkWidget *widget, AddressbookDialog *dialog) } static void -ldap_config_control_destroy_callback (EvolutionConfigControl *config_control, - void *data) +ldap_config_control_destroy_callback (gpointer data, + GObject *where_object_was) { AddressbookDialog *dialog; @@ -1659,8 +1660,8 @@ ldap_config_control_new (GNOME_Evolution_Shell shell) dialog->config_control = control; g_signal_connect (dialog->config_control, "apply", G_CALLBACK (ldap_config_control_apply_callback), dialog); - g_signal_connect (dialog->config_control, "destroy", - G_CALLBACK (ldap_config_control_destroy_callback), dialog); + g_object_weak_ref (G_OBJECT (dialog->config_control), + ldap_config_control_destroy_callback, dialog); gtk_widget_unref (dialog->page); #endif diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 51314199e4..e97c79d091 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -539,7 +539,7 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) } static void -destroy_callback(GtkWidget *widget, gpointer data) +destroy_callback(gpointer data, GObject *where_object_was) { AddressbookView *view = data; if (view->view && view->view->model && view->view->model->book_view) @@ -1111,9 +1111,7 @@ addressbook_factory_new_control (void) view->vbox = gtk_vbox_new (FALSE, 0); - g_signal_connect (view->vbox, "destroy", - G_CALLBACK (destroy_callback), - (gpointer) view); + g_object_weak_ref (G_OBJECT (view->vbox), destroy_callback, view); /* Create the control. */ view->control = bonobo_control_new (view->vbox); diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c index 7b8e3b4411..a0581c6dcf 100644 --- a/addressbook/gui/component/e-address-popup.c +++ b/addressbook/gui/component/e-address-popup.c @@ -114,7 +114,7 @@ mini_wizard_cancel_cb (GtkWidget *b, gpointer closure) } static void -mini_wizard_destroy_cb (GtkWidget *w, gpointer closure) +mini_wizard_destroy_cb (gpointer closure, GObject *where_object_was) { MiniWizard *wiz = (MiniWizard *) closure; if (wiz->cleanup_cb) @@ -158,10 +158,10 @@ mini_wizard_new (void) "clicked", G_CALLBACK (mini_wizard_cancel_cb), wiz); - g_signal_connect (wiz->body, - "destroy", - G_CALLBACK (mini_wizard_destroy_cb), - wiz); + + g_object_weak_ref (G_OBJECT (wiz->body), + mini_wizard_destroy_cb, + wiz); return wiz; 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)); } diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 162343675d..7120537070 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -457,9 +457,9 @@ e_select_names_create_categories (gchar *name, } static void -clear_widget (GtkWidget *w, gpointer user_data) +clear_widget (gpointer data, GObject *where_object_was) { - GtkWidget **widget_ref = user_data; + GtkWidget **widget_ref = data; *widget_ref = NULL; } @@ -511,8 +511,7 @@ e_select_names_init (ESelectNames *e_select_names) if (e_select_names->status_message) { g_signal_connect (e_select_names->model, "status_message", G_CALLBACK (status_message), e_select_names); - g_signal_connect(e_select_names->status_message, "destroy", - G_CALLBACK(clear_widget), &e_select_names->status_message); + g_object_weak_ref (e_select_names->status_message, clear_widget, &e_select_names->status_message); } e_select_names->categories = glade_xml_get_widget (gui, "custom-categories"); @@ -521,8 +520,7 @@ e_select_names_init (ESelectNames *e_select_names) if (e_select_names->categories) { g_signal_connect(e_select_names->categories, "changed", G_CALLBACK(categories_changed), e_select_names); - g_signal_connect(e_select_names->categories, "destroy", - G_CALLBACK(clear_widget), &e_select_names->categories); + g_object_weak_ref (e_select_names->categories, clear_widget, &e_select_names->categories); } e_select_names->select_entry = glade_xml_get_widget (gui, "entry-select"); @@ -533,8 +531,7 @@ e_select_names_init (ESelectNames *e_select_names) G_CALLBACK(select_entry_changed), e_select_names); g_signal_connect(e_select_names->select_entry, "activate", G_CALLBACK(update_query), e_select_names); - g_signal_connect(e_select_names->select_entry, "destroy", - G_CALLBACK(clear_widget), &e_select_names->select_entry); + g_object_weak_ref (e_select_names->select_entry, clear_widget, &e_select_names->select_entry); } button = glade_xml_get_widget (gui, "button-find"); |