From d7aee7e7edfe1d76beba4246f50510479af955a7 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 12 Nov 2002 04:01:10 +0000 Subject: change signature to that of a weak ref notify function. (main): ::destroy 2002-11-11 Chris Toshok * 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 --- .../gui/merging/e-card-duplicate-detected.glade | 427 +++++++++------------ ...rd-merging-book-commit-duplicate-detected.glade | 427 +++++++++------------ addressbook/gui/merging/e-card-merging.c | 14 +- 3 files changed, 390 insertions(+), 478 deletions(-) (limited to 'addressbook/gui/merging') diff --git a/addressbook/gui/merging/e-card-duplicate-detected.glade b/addressbook/gui/merging/e-card-duplicate-detected.glade index bc6624e8fd..67536bf7cf 100644 --- a/addressbook/gui/merging/e-card-duplicate-detected.glade +++ b/addressbook/gui/merging/e-card-duplicate-detected.glade @@ -1,255 +1,210 @@ - - + + - - e-card-duplicate-detected - e-card-duplicate-detected - - src - pixmaps - C - True - True - True - False - False - False - True - + - - GnomeDialog - dialog-duplicate-contact - Duplicate Contact Detected - GTK_WINDOW_POPUP - GTK_WIN_POS_NONE - False - False - True - False - False - False + + True + Duplicate Contact Detected + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True - - GtkVBox - GnomeDialog:vbox - dialog-vbox1 - False - 8 - - 4 - True - True - + + + True + False + 8 - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area1 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - + + + True + GTK_BUTTONBOX_END - - GtkButton - button3 - True - True - - GNOME_STOCK_PIXMAP_ADD - + + + True + True + True + Add Anyway + True + GTK_RELIEF_NORMAL + 0 + + - - GtkButton - button4 - True - True - GNOME_STOCK_BUTTON_CANCEL - - + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + 1 + + + + + 0 + False + True + GTK_PACK_END + + - - GtkTable - table1 - 5 - 2 - False - 6 - 6 - 0 - True - True - + + True + 5 + 2 + False + 6 + 6 - - Custom - custom-old-card - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - 1 - 2 - 4 - 5 - 0 - 0 - True - True - False - False - True - True - - + + + True + e_card_merging_create_old_card + 0 + 0 + Fri, 08 Jun 2001 01:33:22 GMT + + + 1 + 2 + 4 + 5 + + - - GtkLabel - label1 - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - - + + + True + The name or email address of this contact already exists +in this folder. Would you like to add it anyway? + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 0 + 1 + fill + + - - GtkLabel - label3 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 3 - 4 - 0 - 0 - True - False - False - False - True - True - - + + + True + Original Contact: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 3 + 4 + fill + + - - GtkLabel - label4 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - + + + True + New Contact: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 1 + 2 + fill + + + - - Custom - custom-new-card - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - 1 - 2 - 2 - 3 - 0 - 0 - True - True - False - False - True - True - - + + + True + e_card_merging_create_old_card + 0 + 0 + Fri, 08 Jun 2001 01:33:22 GMT + + + 1 + 2 + 2 + 3 + + - - GtkAlignment - alignment1 - 0.5 - 0 - 1 - 0 - - 0 - 1 - 0 - 5 - 0 - 0 - False - False - False - False - True - True - + + + True + 0.5 + 0 + 1 + 0 - - Custom - custom2 - e_create_image_widget - malehead.png - 0 - 0 - Fri, 08 Jun 2001 00:18:39 GMT + + + True + e_create_image_widget + malehead.png + 0 + 0 + Fri, 08 Jun 2001 00:18:39 GMT + + + + + 0 + 1 + 0 + 5 + fill + fill + + - + + 0 + True + True + + - + - + diff --git a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade b/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade index 0bc60ba13a..89599a3f7c 100644 --- a/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade +++ b/addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade @@ -1,255 +1,210 @@ - - + + - - e-card-merging-book-commit-duplicate-detected - e-card-merging-book-commit-duplicate-detected - - src - pixmaps - C - True - True - True - False - False - False - True - + - - GnomeDialog - dialog-duplicate-contact - Duplicate Contact Detected - GTK_WINDOW_POPUP - GTK_WIN_POS_NONE - False - False - True - False - False - False + + True + Duplicate Contact Detected + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True - - GtkVBox - GnomeDialog:vbox - dialog-vbox1 - False - 8 - - 4 - True - True - + + + True + False + 8 - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area1 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - + + + True + GTK_BUTTONBOX_END - - GtkButton - button3 - True - True - - GNOME_STOCK_PIXMAP_ADD - + + + True + True + True + Change Anyway + True + GTK_RELIEF_NORMAL + 0 + + - - GtkButton - button4 - True - True - GNOME_STOCK_BUTTON_CANCEL - - + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + 1 + + + + + 0 + False + True + GTK_PACK_END + + - - GtkTable - table1 - 5 - 2 - False - 6 - 6 - 0 - True - True - + + True + 5 + 2 + False + 6 + 6 - - Custom - custom-old-card - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - 1 - 2 - 4 - 5 - 0 - 0 - True - True - False - False - True - True - - + + + True + e_card_merging_create_old_card + 0 + 0 + Fri, 08 Jun 2001 01:33:22 GMT + + + 1 + 2 + 4 + 5 + + - - GtkLabel - label1 - - GTK_JUSTIFY_LEFT - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 0 - 1 - 0 - 0 - True - False - False - False - True - True - - + + + True + The changed email or name of this contact already +exists in this folder. Would you like to add it anyway? + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 0 + 1 + fill + + - - GtkLabel - label3 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 3 - 4 - 0 - 0 - True - False - False - False - True - True - - + + + True + Conflicting Contact: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 3 + 4 + fill + + - - GtkLabel - label4 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 1 - 2 - 1 - 2 - 0 - 0 - False - False - False - False - True - False - - + + + True + Changed Contact: + False + False + GTK_JUSTIFY_CENTER + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 1 + 2 + fill + + + - - Custom - custom-new-card - e_card_merging_create_old_card - 0 - 0 - Fri, 08 Jun 2001 01:33:22 GMT - - 1 - 2 - 2 - 3 - 0 - 0 - True - True - False - False - True - True - - + + + True + e_card_merging_create_old_card + 0 + 0 + Fri, 08 Jun 2001 01:33:22 GMT + + + 1 + 2 + 2 + 3 + + - - GtkAlignment - alignment1 - 0.5 - 0 - 1 - 0 - - 0 - 1 - 0 - 5 - 0 - 0 - False - False - False - False - True - True - + + + True + 0.5 + 0 + 1 + 0 - - Custom - custom2 - e_create_image_widget - malehead.png - 0 - 0 - Fri, 08 Jun 2001 00:18:39 GMT + + + True + e_create_image_widget + malehead.png + 0 + 0 + Fri, 08 Jun 2001 00:18:39 GMT + + + + + 0 + 1 + 0 + 5 + fill + fill + + - + + 0 + True + True + + - + - + diff --git a/addressbook/gui/merging/e-card-merging.c b/addressbook/gui/merging/e-card-merging.c index 28357f2f58..1b3da3e063 100644 --- a/addressbook/gui/merging/e-card-merging.c +++ b/addressbook/gui/merging/e-card-merging.c @@ -11,7 +11,6 @@ #include #include "e-card-merging.h" -#include #include #include #include @@ -53,9 +52,11 @@ cancelit (ECardMergingLookup *lookup) } static void -clicked (GnomeDialog *dialog, int button, ECardMergingLookup *lookup) +response (GtkWidget *dialog, int response, ECardMergingLookup *lookup) { - switch (button) { + gtk_widget_destroy (dialog); + + switch (response) { case 0: doit (lookup); break; @@ -64,7 +65,6 @@ clicked (GnomeDialog *dialog, int button, ECardMergingLookup *lookup) break; } g_free (lookup); - gnome_dialog_close (dialog); } static void @@ -102,8 +102,10 @@ match_query_callback (ECard *card, ECard *match, ECardMatchType type, gpointer c widget = glade_xml_get_widget (ui, "dialog-duplicate-contact"); - g_signal_connect (widget, "clicked", - G_CALLBACK (clicked), lookup); + g_signal_connect (widget, "response", + G_CALLBACK (response), lookup); + + gtk_widget_show_all (widget); } } -- cgit v1.2.3