aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-12 12:01:10 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-12 12:01:10 +0800
commitd7aee7e7edfe1d76beba4246f50510479af955a7 (patch)
treedb6f952d40cf95964810b1467d15ebcb8fc1460e
parentb5d027f4285267d769975ab7fc4ec95959375b26 (diff)
downloadgsoc2013-evolution-d7aee7e7edfe1d76beba4246f50510479af955a7.tar.gz
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
-rw-r--r--addressbook/ChangeLog81
-rw-r--r--addressbook/gui/component/addressbook-config.c19
-rw-r--r--addressbook/gui/component/addressbook.c6
-rw-r--r--addressbook/gui/component/e-address-popup.c10
-rw-r--r--addressbook/gui/component/select-names/e-select-names-manager.c12
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c13
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c6
-rw-r--r--addressbook/gui/merging/e-card-duplicate-detected.glade427
-rw-r--r--addressbook/gui/merging/e-card-merging-book-commit-duplicate-detected.glade427
-rw-r--r--addressbook/gui/merging/e-card-merging.c14
-rw-r--r--addressbook/gui/widgets/e-addressbook-util.c91
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c42
-rw-r--r--addressbook/gui/widgets/e-minicard-control.c5
-rw-r--r--addressbook/gui/widgets/e-minicard-widget-test.c6
-rw-r--r--addressbook/gui/widgets/e-minicard-widget.c4
-rw-r--r--addressbook/gui/widgets/test-minicard-label.c6
-rw-r--r--addressbook/gui/widgets/test-minicard-view.c6
-rw-r--r--addressbook/gui/widgets/test-minicard.c6
-rw-r--r--addressbook/gui/widgets/test-reflow.c6
19 files changed, 578 insertions, 609 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index e714b1b544..cdd0a9650c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,86 @@
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.
+
+2002-11-11 Chris Toshok <toshok@ximian.com>
+
* gui/contact-editor/e-contact-editor.c (_arrow_pressed): change
around a little, still ifdefed though.
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");
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 9c696f9040..1605a69ae4 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -413,12 +413,12 @@ prompt_to_save_changes (EContactListEditor *editor)
return TRUE;
switch (e_addressbook_prompt_save_dialog (GTK_WINDOW(editor->app))) {
- case 0: /* Save */
+ case GTK_RESPONSE_YES:
save_card (editor, FALSE);
return TRUE;
- case 1: /* Discard */
+ case GTK_RESPONSE_NO:
return TRUE;
- case 2: /* Cancel */
+ case GTK_RESPONSE_CANCEL:
default:
return FALSE;
}
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 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-<project>
- <name>e-card-duplicate-detected</name>
- <program_name>e-card-duplicate-detected</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
+<glade-interface>
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-duplicate-contact</name>
- <title>Duplicate Contact Detected</title>
- <type>GTK_WINDOW_POPUP</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
+<widget class="GtkDialog" id="dialog-duplicate-contact">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Duplicate Contact Detected</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="has_separator">True</property>
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add Anyway</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Add Anyway</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button4</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">1</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>5</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
<child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
- <widget>
- <class>Custom</class>
- <name>custom-old-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="Custom" id="custom-old-card">
+ <property name="visible">True</property>
+ <property name="creation_function">e_card_merging_create_old_card</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>The name or email address of this contact already exists
-in this folder. Would you like to add it anyway?</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The name or email address of this contact already exists
+in this folder. Would you like to add it anyway?</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Original Contact:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Original Contact:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>New Contact:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">New Contact:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <widget>
- <class>Custom</class>
- <name>custom-new-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="Custom" id="custom-new-card">
+ <property name="visible">True</property>
+ <property name="creation_function">e_card_merging_create_old_card</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0.5</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="xscale">1</property>
+ <property name="yscale">0</property>
- <widget>
- <class>Custom</class>
- <name>custom2</name>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 00:18:39 GMT</last_modification_time>
+ <child>
+ <widget class="Custom" id="custom2">
+ <property name="visible">True</property>
+ <property name="creation_function">e_create_image_widget</property>
+ <property name="string1">malehead.png</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
- </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
- </widget>
+ </child>
</widget>
-</GTK-Interface>
+</glade-interface>
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 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-<project>
- <name>e-card-merging-book-commit-duplicate-detected</name>
- <program_name>e-card-merging-book-commit-duplicate-detected</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>True</use_widget_names>
- <output_main_file>False</output_main_file>
- <output_support_files>False</output_support_files>
- <output_build_files>False</output_build_files>
- <gnome_help_support>True</gnome_help_support>
-</project>
+<glade-interface>
-<widget>
- <class>GnomeDialog</class>
- <name>dialog-duplicate-contact</name>
- <title>Duplicate Contact Detected</title>
- <type>GTK_WINDOW_POPUP</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
+<widget class="GtkDialog" id="dialog-duplicate-contact">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Duplicate Contact Detected</property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="has_separator">True</property>
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">8</property>
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">GTK_BUTTONBOX_END</property>
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Change Anyway</label>
- <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button3">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Change Anyway</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
- <widget>
- <class>GtkButton</class>
- <name>button4</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
+ <child>
+ <widget class="GtkButton" id="button4">
+ <property name="visible">True</property>
+ <property name="can_default">True</property>
+ <property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="response_id">1</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">GTK_PACK_END</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <rows>5</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>6</row_spacing>
- <column_spacing>6</column_spacing>
<child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
- <widget>
- <class>Custom</class>
- <name>custom-old-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="Custom" id="custom-old-card">
+ <property name="visible">True</property>
+ <property name="creation_function">e_card_merging_create_old_card</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label1</name>
- <label>The changed email or name of this contact already
-exists in this folder. Would you like to add it anyway?</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">The changed email or name of this contact already
+exists in this folder. Would you like to add it anyway?</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Conflicting Contact:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Conflicting Contact:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>Changed Contact:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Changed Contact:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
- <widget>
- <class>Custom</class>
- <name>custom-new-card</name>
- <creation_function>e_card_merging_create_old_card</creation_function>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 01:33:22 GMT</last_modification_time>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
+ <child>
+ <widget class="Custom" id="custom-new-card">
+ <property name="visible">True</property>
+ <property name="creation_function">e_card_merging_create_old_card</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Jun 2001 01:33:22 GMT</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
- <widget>
- <class>GtkAlignment</class>
- <name>alignment1</name>
- <xalign>0.5</xalign>
- <yalign>0</yalign>
- <xscale>1</xscale>
- <yscale>0</yscale>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>5</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0</property>
+ <property name="xscale">1</property>
+ <property name="yscale">0</property>
- <widget>
- <class>Custom</class>
- <name>custom2</name>
- <creation_function>e_create_image_widget</creation_function>
- <string1>malehead.png</string1>
- <int1>0</int1>
- <int2>0</int2>
- <last_modification_time>Fri, 08 Jun 2001 00:18:39 GMT</last_modification_time>
+ <child>
+ <widget class="Custom" id="custom2">
+ <property name="visible">True</property>
+ <property name="creation_function">e_create_image_widget</property>
+ <property name="string1">malehead.png</property>
+ <property name="int1">0</property>
+ <property name="int2">0</property>
+ <property name="last_modification_time">Fri, 08 Jun 2001 00:18:39 GMT</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
</widget>
- </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
- </widget>
+ </child>
</widget>
-</GTK-Interface>
+</glade-interface>
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 <config.h>
#include "e-card-merging.h"
-#include <libgnomeui/gnome-dialog.h>
#include <ebook/e-card-compare.h>
#include <glade/glade.h>
#include <gtk/gtksignal.h>
@@ -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);
}
}
diff --git a/addressbook/gui/widgets/e-addressbook-util.c b/addressbook/gui/widgets/e-addressbook-util.c
index 93727b7e1b..76453d5616 100644
--- a/addressbook/gui/widgets/e-addressbook-util.c
+++ b/addressbook/gui/widgets/e-addressbook-util.c
@@ -60,19 +60,26 @@ gint
e_addressbook_prompt_save_dialog (GtkWindow *parent)
{
GtkWidget *dialog;
+ gint response;
- dialog = gnome_message_box_new (_("Do you want to save changes?"),
- GNOME_MESSAGE_BOX_QUESTION,
- GNOME_STOCK_BUTTON_YES,
- GNOME_STOCK_BUTTON_NO,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
+ dialog = gtk_message_dialog_new (parent,
+ (GtkDialogFlags)0,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_NONE,
+ _("Do you want to save changes?"));
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ GTK_STOCK_YES, GTK_RESPONSE_YES,
+ GTK_STOCK_NO, GTK_RESPONSE_NO,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
- gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
- gnome_dialog_grab_focus (GNOME_DIALOG (dialog), 0);
- gnome_dialog_set_parent (GNOME_DIALOG (dialog), parent);
+ gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
- return gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ gtk_widget_destroy (dialog);
+
+ return response;
}
static void
@@ -154,12 +161,6 @@ e_addressbook_show_contact_list_editor (EBook *book, ECard *card,
return ce;
}
-typedef struct {
- EBook *book;
- GList *list;
- gboolean editable;
-} BookAndList;
-
static void
view_cards (EBook *book, GList *list, gboolean editable)
{
@@ -172,24 +173,6 @@ view_cards (EBook *book, GList *list, gboolean editable)
}
}
-static void
-view_question_clicked (GtkObject *object, int button, BookAndList *bnl)
-{
- GnomeDialog *dialog = GNOME_DIALOG (object);
- switch (button) {
- case 0:
- view_cards (bnl->book, bnl->list, bnl->editable);
- break;
- }
- gnome_dialog_close(dialog);
-}
-
-static void
-view_question_destroyed (GtkObject *object, GList *list)
-{
- gtk_main_quit();
-}
-
void
e_addressbook_show_multiple_cards (EBook *book,
GList *list,
@@ -198,32 +181,22 @@ e_addressbook_show_multiple_cards (EBook *book,
if (list) {
int length = g_list_length (list);
if (length > 5) {
- char *string;
GtkWidget *dialog;
- BookAndList bnl;
-
- bnl.book = book;
- bnl.list = list;
- bnl.editable = editable;
-
- dialog = gnome_dialog_new (_("Display Cards?"),
- _("Display Cards"),
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
-
- string = g_strdup_printf (_("Opening %d cards will open %d new windows as well.\n"
- "Do you really want to display all of these cards?"), length, length);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), gtk_label_new (string), FALSE, FALSE, 0);
- g_free (string);
-
- g_signal_connect (dialog, "destroy",
- G_CALLBACK (view_question_destroyed), &bnl);
- g_signal_connect (dialog, "clicked",
- G_CALLBACK (view_question_clicked), &bnl);
-
- gtk_widget_show_all (dialog);
-
- gtk_main();
+ gint response;
+
+ dialog = gtk_message_dialog_new (NULL,
+ 0,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
+ _("Opening %d cards will open %d new windows as well.\n"
+ "Do you really want to display all of these cards?"),
+ length,
+ length);
+
+ response = gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ if (response == GTK_RESPONSE_YES)
+ view_cards (book, list, editable);
} else {
view_cards (book, list, editable);
}
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;
}
diff --git a/addressbook/gui/widgets/e-minicard-control.c b/addressbook/gui/widgets/e-minicard-control.c
index c5256f6c3e..278cfa0120 100644
--- a/addressbook/gui/widgets/e-minicard-control.c
+++ b/addressbook/gui/widgets/e-minicard-control.c
@@ -265,7 +265,7 @@ save_in_addressbook(GtkWidget *button, gpointer data)
}
static void
-free_struct (GtkWidget *control, gpointer data)
+free_struct (gpointer data, GObject *where_object_was)
{
EMinicardControl *minicard_control = data;
e_free_object_list (minicard_control->card_list);
@@ -317,8 +317,7 @@ e_minicard_control_factory (BonoboGenericFactory *Factory,
control = bonobo_control_new (vbox);
- g_signal_connect (control, "destroy",
- G_CALLBACK (free_struct), minicard_control);
+ g_object_weak_ref (G_OBJECT (control), free_struct, minicard_control);
stream = bonobo_persist_stream_new (pstream_load, pstream_save,
pstream_get_content_types,
diff --git a/addressbook/gui/widgets/e-minicard-widget-test.c b/addressbook/gui/widgets/e-minicard-widget-test.c
index b768ff9e74..9a8d27d21c 100644
--- a/addressbook/gui/widgets/e-minicard-widget-test.c
+++ b/addressbook/gui/widgets/e-minicard-widget-test.c
@@ -60,7 +60,7 @@
/* This is a horrible thing to do, but it is just a test. */
-static void destroy_callback(GtkWidget *app, gpointer data)
+static void destroy_callback(gpointer data, GObject *where_object_was)
{
exit(0);
}
@@ -106,9 +106,7 @@ int main( int argc, char *argv[] )
gnome_app_set_contents( GNOME_APP( app ), minicard );
/* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK( destroy_callback ),
- ( gpointer ) app );
+ g_object_weak_ref (app, destroy_callback, app);
gtk_widget_show_all( app );
diff --git a/addressbook/gui/widgets/e-minicard-widget.c b/addressbook/gui/widgets/e-minicard-widget.c
index 5c8483ac88..e8f33673c3 100644
--- a/addressbook/gui/widgets/e-minicard-widget.c
+++ b/addressbook/gui/widgets/e-minicard-widget.c
@@ -169,10 +169,12 @@ e_minicard_widget_init (EMinicardWidget *emw)
"width", (double) 100,
NULL );
+#if PENDING_PORT_WORK
+ /* XXX this crashes since the canvas has no h/v adjustments. */
gnome_canvas_set_scroll_region ( GNOME_CANVAS( emw ),
0, 0,
100, 100 );
-
+#endif
emw->card = NULL;
}
diff --git a/addressbook/gui/widgets/test-minicard-label.c b/addressbook/gui/widgets/test-minicard-label.c
index cdbebe3160..c109497628 100644
--- a/addressbook/gui/widgets/test-minicard-label.c
+++ b/addressbook/gui/widgets/test-minicard-label.c
@@ -32,7 +32,7 @@
GnomeCanvasItem *label;
GnomeCanvasItem *rect;
-static void destroy_callback(GtkWidget *app, gpointer data)
+static void destroy_callback(gpointer data, GObject *where_object_was)
{
exit(0);
}
@@ -110,9 +110,7 @@ int main( int argc, char *argv[] )
/* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK( destroy_callback ),
- ( gpointer ) app );
+ g_object_weak_ref (app, destroy_callback, app);
g_signal_connect( canvas , "size_allocate",
G_CALLBACK ( allocate_callback ),
diff --git a/addressbook/gui/widgets/test-minicard-view.c b/addressbook/gui/widgets/test-minicard-view.c
index e14443b01e..7abe611711 100644
--- a/addressbook/gui/widgets/test-minicard-view.c
+++ b/addressbook/gui/widgets/test-minicard-view.c
@@ -48,7 +48,7 @@ init_bonobo (int argc, char **argv)
}
-static void destroy_callback(GtkWidget *app, gpointer data)
+static void destroy_callback(gpointer data, GObject *where_object_was)
{
exit(0);
}
@@ -188,9 +188,7 @@ int main( int argc, char *argv[] )
gnome_app_set_contents( GNOME_APP( app ), vbox );
/* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK ( destroy_callback ),
- ( gpointer ) app );
+ g_object_weak_ref (app, destroy_callback, app);
g_signal_connect( canvas, "size_allocate",
G_CALLBACK ( allocate_callback ),
diff --git a/addressbook/gui/widgets/test-minicard.c b/addressbook/gui/widgets/test-minicard.c
index 77cc2975cb..822362d972 100644
--- a/addressbook/gui/widgets/test-minicard.c
+++ b/addressbook/gui/widgets/test-minicard.c
@@ -33,7 +33,7 @@
GnomeCanvasItem *card;
GnomeCanvasItem *rect;
-static void destroy_callback(GtkWidget *app, gpointer data)
+static void destroy_callback(gpointer data, GObject *where_object_was)
{
exit(0);
}
@@ -105,9 +105,7 @@ int main( int argc, char *argv[] )
gnome_app_set_contents( GNOME_APP( app ), canvas );
/* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK( destroy_callback ),
- ( gpointer ) app );
+ g_object_weak_ref (app, destroy_callback, app);
g_signal_connect( canvas, "size_allocate",
G_CALLBACK( allocate_callback ),
diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c
index 7f4325f130..66f003fe2c 100644
--- a/addressbook/gui/widgets/test-reflow.c
+++ b/addressbook/gui/widgets/test-reflow.c
@@ -65,7 +65,7 @@ GnomeCanvasItem *reflow;
GnomeCanvasItem *rect;
GtkAllocation last_alloc;
-static void destroy_callback(GtkWidget *app, gpointer data)
+static void destroy_callback(gpointer data, GObject *where_object_was)
{
exit(0);
}
@@ -183,9 +183,7 @@ int main( int argc, char *argv[] )
gnome_app_set_contents( GNOME_APP( app ), scrollframe );
/* Connect the signals */
- g_signal_connect( app, "destroy",
- G_CALLBACK ( destroy_callback ),
- ( gpointer ) app );
+ g_object_weak_ref (app, destroy_callback, app);
g_signal_connect( canvas, "size_allocate",
G_CALLBACK ( allocate_callback ),