diff options
author | Chris Toshok <toshok@ximian.com> | 2002-11-12 12:01:10 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-11-12 12:01:10 +0800 |
commit | d7aee7e7edfe1d76beba4246f50510479af955a7 (patch) | |
tree | db6f952d40cf95964810b1467d15ebcb8fc1460e /addressbook/gui/widgets/e-addressbook-view.c | |
parent | b5d027f4285267d769975ab7fc4ec95959375b26 (diff) | |
download | gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar.gz gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar.bz2 gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar.lz gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar.xz gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar.zst gsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.zip |
change signature to that of a weak ref notify function. (main): ::destroy
2002-11-11 Chris Toshok <toshok@ximian.com>
* gui/widgets/test-reflow.c (destroy_callback): change signature
to that of a weak ref notify function.
(main): ::destroy -> weak_ref.
* gui/widgets/test-minicard.c (destroy_callback): change signature
to that of a weak ref notify function.
(main): ::destroy -> weak_ref.
* gui/widgets/test-minicard-view.c (destroy_callback): change
signature to that of a weak ref notify function.
(main): ::destroy -> weak_ref.
* gui/widgets/test-minicard-label.c (destroy_callback): change
signature to that of a weak ref notify function.
(main): ::destroy -> weak_ref.
* gui/widgets/e-minicard-widget.c (e_minicard_widget_init): ifdef
out the call to gnome_canvas_set_scroll_region. It doesn't seem
necessary judging from the rest of the code, and it also crashes
the addressbook if it's in.
* gui/widgets/e-minicard-widget-test.c (destroy_callback): change
signature to that of a weak ref notify function.
(main): ::destroy -> weak_ref.
* gui/widgets/e-minicard-control.c (free_struct): change signature
to that of a weak ref notify function.
(e_minicard_control_factory): ::destroy -> weak_ref.
* gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
::destroy -> weak_ref.
(e_addressbook_view_print): same.
(free_closure): change signature to that of a weak ref notify
function.
(e_contact_print_destroy): same.
(invisible_destroyed): same.
* gui/widgets/e-addressbook-util.c
(e_addressbook_prompt_save_dialog): convert from GnomeDialog to
GtkDialog.
(e_addressbook_show_multiple_cards): same.
* gui/contact-list-editor/e-contact-list-editor.c
(prompt_to_save_changes): change response ids to use
GTK_RESPONSE_.
* gui/component/select-names/e-select-names-manager.c
(clear_widget): new function.
(e_select_names_manager_activate_dialog): ::destroy -> weak_ref.
* gui/component/select-names/e-select-names.c (clear_widget):
change signature to that of a weak ref notify function.
(e_select_names_init): ::destroy -> weak_ref.
* gui/component/e-address-popup.c (mini_wizard_destroy_cb): change
signature to that of a weak ref notify function.
(mini_wizard_new): ::destroy -> weak_ref.
* gui/component/addressbook-config.c
(addressbook_source_dialog_destroy): change signature to that of a
weak ref notify function.
(ldap_config_control_destroy_callback): same.
(addressbook_add_server_druid): ::destroy -> weak_ref.
(addressbook_edit_server_dialog): same.
(ldap_config_control_new): same.
* gui/component/addressbook.c (destroy_callback): change signature
to that of a a weak ref notify function.
(addressbook_factory_new_control): ::destroy -> weak_ref.
* gui/merging/e-card-merging.c (response): rename clicked to this,
and destroy the dialog here.
(match_query_callback): ::clicked -> ::response
* gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
convert.
* gui/merging/e-card-duplicate-detected.glade: same.
svn path=/trunk/; revision=18719
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-view.c')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 1c74a1b636..5c4cd58ac3 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -92,7 +92,7 @@ static void selection_received (GtkWidget *invisible, GtkSelectionData *selectio guint time, EAddressbookView *view); static void selection_get (GtkWidget *invisible, GtkSelectionData *selection_data, guint info, guint time_stamp, EAddressbookView *view); -static void invisible_destroyed (GtkWidget *invisible, EAddressbookView *view); +static void invisible_destroyed (gpointer data, GObject *where_object_was); static GtkTableClass *parent_class = NULL; @@ -303,9 +303,7 @@ e_addressbook_view_init (EAddressbookView *eav) g_signal_connect (eav->invisible, "selection_received", G_CALLBACK (selection_received), eav); - g_signal_connect (eav->invisible, "destroy", - G_CALLBACK (invisible_destroyed), - eav); + g_object_weak_ref (G_OBJECT (eav->invisible), invisible_destroyed, eav); } static void @@ -1018,8 +1016,10 @@ button_toggled(GtkWidget *button, LetterClosure *closure) } static void -free_closure(GtkWidget *button, LetterClosure *closure) +free_closure(gpointer data, GObject *where_object_was) { + GtkWidget *button = GTK_WIDGET (where_object_was); + LetterClosure *closure = data; if (button != NULL && button == closure->view->current_alphabet_widget) { closure->view->current_alphabet_widget = NULL; @@ -1074,8 +1074,7 @@ create_alphabet (EAddressbookView *view) closure->vbox = vbox; g_signal_connect(button, "toggled", G_CALLBACK (button_toggled), closure); - g_signal_connect(button, "destroy", - G_CALLBACK (free_closure), closure); + g_object_weak_ref (G_OBJECT (button), free_closure, closure); } g_strfreev (label_v); @@ -1397,13 +1396,18 @@ change_view_type (EAddressbookView *view, EAddressbookViewType view_type) command_state_change (view); } +typedef struct { + GtkWidget *table; + GObject *printable; +} EContactPrintDialogWeakData; + static void -e_contact_print_destroy(GnomeDialog *dialog, gpointer data) +e_contact_print_destroy(gpointer data, GObject *where_object_was) { - ETableScrolled *table = g_object_get_data(G_OBJECT(dialog), "table"); - EPrintable *printable = g_object_get_data(G_OBJECT(dialog), "printable"); - g_object_unref (printable); - g_object_unref (table); + EContactPrintDialogWeakData *weak_data = data; + g_object_unref (weak_data->printable); + g_object_unref (weak_data->table); + g_free (weak_data); } static void @@ -1534,6 +1538,7 @@ e_addressbook_view_print(EAddressbookView *view) GtkWidget *dialog; EPrintable *printable; ETable *etable; + EContactPrintDialogWeakData *weak_data; dialog = gnome_print_dialog_new("Print cards", GNOME_PRINT_DIALOG_RANGE | GNOME_PRINT_DIALOG_COPIES); gnome_print_dialog_construct_range_any(GNOME_PRINT_DIALOG(dialog), GNOME_PRINT_RANGE_ALL | GNOME_PRINT_RANGE_SELECTION, @@ -1549,8 +1554,14 @@ e_addressbook_view_print(EAddressbookView *view) g_signal_connect(dialog, "clicked", G_CALLBACK(e_contact_print_button), NULL); - g_signal_connect(dialog, - "destroy", G_CALLBACK(e_contact_print_destroy), NULL); + + weak_data = g_new (EContactPrintDialogWeakData, 1); + + weak_data->table = view->widget; + weak_data->printable = G_OBJECT (printable); + + g_object_weak_ref (G_OBJECT (dialog), e_contact_print_destroy, weak_data); + gtk_widget_show(dialog); } } @@ -1646,8 +1657,9 @@ e_addressbook_view_delete_selection(EAddressbookView *view) } static void -invisible_destroyed (GtkWidget *invisible, EAddressbookView *view) +invisible_destroyed (gpointer data, GObject *where_object_was) { + EAddressbookView *view = data; view->invisible = NULL; } |