diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2004-04-23 07:51:43 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2004-04-23 07:51:43 +0800 |
commit | 976cdd5eb9d8ad0800761ce883efe9289edf9c54 (patch) | |
tree | 68c26d879a1c703cadc99be8cd83dbbe8ca022c5 /addressbook/gui/contact-editor/e-contact-editor.c | |
parent | 4cfb4a015fd96675c31dca04cf86d06b623a44ac (diff) | |
download | gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.tar gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.tar.gz gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.tar.bz2 gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.tar.lz gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.tar.xz gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.tar.zst gsoc2013-evolution-976cdd5eb9d8ad0800761ce883efe9289edf9c54.zip |
Override the save_contact function. (e_contact_editor_save_contact):
2004-04-22 Hans Petter Jansson <hpj@ximian.com>
* gui/contact-editor/e-contact-editor.c (e_contact_editor_class_init):
Override the save_contact function.
(e_contact_editor_save_contact): Implement.
(e_contact_editor_init): Remove some unnecessary checks - if
something's the matter with the UI files, that needs to be warned
about and fixed, not silently worked around.
svn path=/trunk/; revision=25589
Diffstat (limited to 'addressbook/gui/contact-editor/e-contact-editor.c')
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 0ce3f02d9d..b5aead2397 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -95,6 +95,7 @@ static void e_contact_editor_dispose (GObject *object); static void e_contact_editor_raise (EABEditor *editor); static void e_contact_editor_show (EABEditor *editor); +static void e_contact_editor_save_contact (EABEditor *editor, gboolean should_close); static void e_contact_editor_close (EABEditor *editor); static gboolean e_contact_editor_is_valid (EABEditor *editor); static gboolean e_contact_editor_is_changed (EABEditor *editor); @@ -234,6 +235,7 @@ e_contact_editor_class_init (EContactEditorClass *klass) editor_class->show = e_contact_editor_show; editor_class->close = e_contact_editor_close; editor_class->is_valid = e_contact_editor_is_valid; + editor_class->save_contact = e_contact_editor_save_contact; editor_class->is_changed = e_contact_editor_is_changed; editor_class->get_window = e_contact_editor_get_window; @@ -1788,6 +1790,12 @@ save_contact (EContactEditor *ce, gboolean should_close) } } +static void +e_contact_editor_save_contact (EABEditor *editor, gboolean should_close) +{ + save_contact (E_CONTACT_EDITOR (editor), should_close); +} + /* Closes the dialog box and emits the appropriate signals */ static void e_contact_editor_close (EABEditor *editor) @@ -1930,27 +1938,15 @@ e_contact_editor_init (EContactEditor *e_contact_editor) init_address (e_contact_editor); wants_html = glade_xml_get_widget(e_contact_editor->gui, "checkbutton-htmlmail"); - if (wants_html && GTK_IS_TOGGLE_BUTTON(wants_html)) - g_signal_connect (wants_html, "toggled", - G_CALLBACK (wants_html_changed), e_contact_editor); - + g_signal_connect (wants_html, "toggled", G_CALLBACK (wants_html_changed), e_contact_editor); widget = glade_xml_get_widget(e_contact_editor->gui, "button-fullname"); - if (widget && GTK_IS_BUTTON(widget)) - g_signal_connect (widget, "clicked", - G_CALLBACK (full_name_clicked), e_contact_editor); - + g_signal_connect (widget, "clicked", G_CALLBACK (full_name_clicked), e_contact_editor); widget = glade_xml_get_widget(e_contact_editor->gui, "button-categories"); - if (widget && GTK_IS_BUTTON(widget)) - g_signal_connect (widget, "clicked", - G_CALLBACK (categories_clicked), e_contact_editor); + g_signal_connect (widget, "clicked", G_CALLBACK (categories_clicked), e_contact_editor); widget = glade_xml_get_widget (e_contact_editor->gui, "source-option-menu-source"); - if (widget && E_IS_SOURCE_OPTION_MENU (widget)) - g_signal_connect (widget, "source_selected", - G_CALLBACK (source_selected), e_contact_editor); - + g_signal_connect (widget, "source_selected", G_CALLBACK (source_selected), e_contact_editor); widget = glade_xml_get_widget (e_contact_editor->gui, "button-ok"); g_signal_connect (widget, "clicked", G_CALLBACK (file_save_and_close_cb), e_contact_editor); - widget = glade_xml_get_widget (e_contact_editor->gui, "button-cancel"); g_signal_connect (widget, "clicked", G_CALLBACK (file_cancel_cb), e_contact_editor); |