diff options
author | Chris Toshok <toshok@ximian.com> | 2004-03-25 04:18:49 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-03-25 04:18:49 +0800 |
commit | 7f5228bdbad17fddedaddc4714a52b5601cb0769 (patch) | |
tree | 036bc242b90ca17ad33a850bb45e009fb4c339f7 /addressbook/gui/widgets | |
parent | 5b496f26137ee1d0920a94e7c19926d6584cd624 (diff) | |
download | gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.tar gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.tar.gz gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.tar.bz2 gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.tar.lz gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.tar.xz gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.tar.zst gsoc2013-evolution-7f5228bdbad17fddedaddc4714a52b5601cb0769.zip |
parent_type == EAB_TYPE_EDITOR. (e_contact_list_editor_class_init): fill
2004-03-24 Chris Toshok <toshok@ximian.com>
* gui/contact-list-editor/e-contact-list-editor.c
(e_contact_list_editor_get_type): parent_type == EAB_TYPE_EDITOR.
(e_contact_list_editor_class_init): fill in editor_class virtual
functions, and remove all the signals.
(list_added_cb): call eab_editor_contact_* instead of emitting a
signal here. also call eab_editor_close
(list_modified_cb): same.
(e_contact_list_editor_is_valid): new function.
(e_contact_list_editor_is_changed): same.
(e_contact_list_editor_get_window): same.
(file_close_cb): call eab_editor_ functions.
(list_deleted_cb): call eab_editor_contact_* instead of emitting a
signal here. also call eab_editor_close
(delete_cb): call eab_editor_* functions.
(contact_list_editor_destroy_notify): call eab_editor_remove.
(e_contact_list_editor_new): call eab_editor_add, and remove the
g_object_ref/gtk_object_sink two-step.
(e_contact_list_editor_show): make static, and make arg EABEditor.
(e_contact_list_editor_raise): same.
(e_contact_list_editor_close): same.
(app_delete_event_cb): call eab_editor_ functions.
(command_state_changed): use eab_editor_is_valid instead of
is_named.
(e_contact_list_editor_request_close_all): nuke.
* gui/contact-list-editor/e-contact-list-editor.h: nuke a bunch of
prototypes for functions that are now either virtual functions
from EABEditor or eab_editor_* functions.
(struct _EContactListEditor): we subclass from EABEditor.
(struct _EContactListEditorClass): same, and nuke all the signals.
* gui/contact-editor/e-contact-editor.c
(e_contact_editor_get_type): parent_type == EAB_TYPE_EDITOR.
(e_contact_editor_class_init): fill in editor_class virtual
functions, and remove all the signals.
(contact_moved_cb): call eab_editor_contact_* instead of emitting
a signal here. also call eab_editor_close
(contact_added_cb): same.
(contact_modified_cb): same.
(e_contact_editor_close): rename from close_dialog.
(e_contact_editor_is_valid): new function.
(e_contact_editor_is_changed): new function.
(e_contact_editor_get_window): new function.
(file_close_cb): use eab_editor_ calls here.
(e_contact_editor_confirm_delete): nuke.
(contact_deleted_cb): call eab_editor_contact_* instead of
emitting a signal here. also call eab_editor_close
(delete_cb): use eab_editor_ functions.
(e_contact_editor_dispose): chain up to our parent's ::dispose.
(contact_editor_destroy_notify): use eab_editor_remove.
(e_contact_editor_new): use eab_editor_add, and remove the
g_object_ref/gtk_object_sink two-step.
(_popup_position): nuke dead function.
(set_fields): i is an index, not a field_id.
(e_contact_editor_raise): make this static, and it takes an
EABEditor arg now, not a EContactEditor.
(e_contact_editor_show): same.
(e_contact_editor_request_close_all): nuke.
* gui/contact-editor/e-contact-editor.h: nuke a bunch of
prototypes for functions that are now either virtual functions
from EABEditor or eab_editor_* functions.
(struct _EContactEditor): we subclass from EABEditor.
(struct _EContactEditorClass): same, and remove the signals.
* gui/widgets/e-addressbook-view.c (delete): call
eab_editor_confirm_delete.
* gui/widgets/eab-popup-control.c (contact_editor_cb): don't
bother calling e_contact_editor_raise since this is a new contact
editor anyway.
* gui/widgets/eab-gui-util.c (eab_show_contact_list_editor): use
EABEditor signals, and eab_editor_show.
* gui/widgets/e-minicard.h: "editor" is now of type EABEditor, not
GObject.
* gui/widgets/e-minicard.c (e_minicard_event): just use
eab_editor_raise instead of
e_contact_editor_raise/e_contact_list_editor_raise.
* gui/component/addressbook-component.c (impl_requestQuit):
implement this again, calling eab_editor_request_close_all.
(addressbook_component_class_init): fill in epv->requestQuit.
svn path=/trunk/; revision=25173
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 9 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.h | 4 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 9 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-popup-control.c | 3 |
5 files changed, 12 insertions, 15 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 2521638cca..963f1389b1 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -911,7 +911,7 @@ cut (GtkWidget *widget, ContactAndBook *contact_and_book) static void delete (GtkWidget *widget, ContactAndBook *contact_and_book) { - if (e_contact_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(contact_and_book->view->widget)))) { + if (eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(contact_and_book->view->widget)))) { EBook *book; GList *list = get_contact_list(contact_and_book); GList *iterator; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 7e831090a6..c587d9764e 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -602,10 +602,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_2BUTTON_PRESS: if (event->button.button == 1 && E_IS_MINICARD_VIEW(item->parent)) { if (e_minicard->editor) { - if (GPOINTER_TO_INT (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))) - e_contact_list_editor_raise (E_CONTACT_LIST_EDITOR(e_minicard->editor)); - else - e_contact_editor_raise(E_CONTACT_EDITOR(e_minicard->editor)); + eab_editor_raise (e_minicard->editor); } else { EBook *book = NULL; if (E_IS_MINICARD_VIEW(item->parent)) { @@ -618,12 +615,12 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) if (e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST)) { EContactListEditor *editor = eab_show_contact_list_editor (book, e_minicard->contact, FALSE, e_minicard->editable); - e_minicard->editor = G_OBJECT (editor); + e_minicard->editor = EAB_EDITOR (editor); } else { EContactEditor *editor = eab_show_contact_editor (book, e_minicard->contact, FALSE, e_minicard->editable); - e_minicard->editor = G_OBJECT (editor); + e_minicard->editor = EAB_EDITOR (editor); } g_object_ref (e_minicard->editor); diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index 8fbb2b7a01..dd6ab33199 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -21,7 +21,7 @@ #define __E_MINICARD_H__ #include <gdk-pixbuf/gdk-pixbuf.h> -#include "addressbook/gui/contact-editor/e-contact-editor.h" +#include "addressbook/gui/contact-editor/eab-editor.h" #include <libgnomecanvas/gnome-canvas.h> #include <libebook/e-contact.h> @@ -72,7 +72,7 @@ struct _EMinicard GdkPixbuf *list_icon_pixbuf; double list_icon_size; - GObject *editor; + EABEditor *editor; GList *fields; /* Of type EMinicardField */ guint needs_remodeling : 1; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 7c9e540cbe..6dd72d9325 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -35,6 +35,7 @@ #include <gnome.h> +#include "addressbook/gui/contact-editor/eab-editor.h" #include "addressbook/gui/contact-editor/e-contact-editor.h" #include "addressbook/gui/contact-list-editor/e-contact-list-editor.h" #include "addressbook/gui/component/addressbook-component.h" @@ -163,16 +164,16 @@ eab_show_contact_list_editor (EBook *book, EContact *contact, ce = e_contact_list_editor_new (book, contact, is_new_contact, editable); - g_signal_connect (ce, "list_added", + g_signal_connect (ce, "contact_added", G_CALLBACK (added_cb), GINT_TO_POINTER (TRUE)); - g_signal_connect (ce, "list_modified", + g_signal_connect (ce, "contact_modified", G_CALLBACK (modified_cb), GINT_TO_POINTER (TRUE)); - g_signal_connect (ce, "list_deleted", + g_signal_connect (ce, "contact_deleted", G_CALLBACK (deleted_cb), GINT_TO_POINTER (TRUE)); g_signal_connect (ce, "editor_closed", G_CALLBACK (editor_closed_cb), GINT_TO_POINTER (TRUE)); - e_contact_list_editor_show (ce); + eab_editor_show (EAB_EDITOR (ce)); return ce; } diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c index b7c635b089..943803ef47 100644 --- a/addressbook/gui/widgets/eab-popup-control.c +++ b/addressbook/gui/widgets/eab-popup-control.c @@ -933,10 +933,9 @@ contact_editor_cb (EBook *book, EBookStatus status, gpointer closure) { if (status == E_BOOK_ERROR_OK) { EABPopupControl *pop = EAB_POPUP_CONTROL (closure); - EContactEditor *ce = eab_show_contact_editor (book, pop->contact, FALSE, TRUE); + eab_show_contact_editor (book, pop->contact, FALSE, TRUE); eab_popup_control_cleanup (pop); emit_event (pop, "Destroy"); - e_contact_editor_raise (ce); } if (book) |