diff options
author | Chris Toshok <toshok@ximian.com> | 2001-06-29 12:31:39 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-06-29 12:31:39 +0800 |
commit | 9b19b1d618903203dbda010b82a65aa0717d183a (patch) | |
tree | d6d1cab24c66af4f60f67821808c7fba21fe8b6d /addressbook/gui/widgets/e-minicard.c | |
parent | f2d683ced7a847e978a3763f91f63b943b56bbee (diff) | |
download | gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.gz gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.bz2 gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.lz gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.xz gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.tar.zst gsoc2013-evolution-9b19b1d618903203dbda010b82a65aa0717d183a.zip |
pop up list editor for lists, contact editor otherwise.
2001-06-28 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-addressbook-view.c (table_double_click): pop up
list editor for lists, contact editor otherwise.
* gui/widgets/e-minicard.c (e_minicard_event): same.
* gui/widgets/e-minicard.h (struct _EMinicard): change "editor" to
GtkOjbect, since it can be either a contact editor or contact list
editor.
* gui/widgets/e-addressbook-table-adapter.c
(addressbook_is_cell_editable): don't allow editting of any fields
except the name and file_as for lists.
svn path=/trunk/; revision=10590
Diffstat (limited to 'addressbook/gui/widgets/e-minicard.c')
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 23fa560f2f..6c06952c6e 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -438,10 +438,10 @@ card_modified_cb (EBook* book, EBookStatus status, gpointer user_data) /* Callback used when the contact editor is closed */ static void -editor_closed_cb (EContactEditor *ce, gpointer data) +editor_closed_cb (GtkObject *editor, gpointer data) { EMinicard *minicard = data; - gtk_object_unref (GTK_OBJECT (ce)); + gtk_object_unref (GTK_OBJECT (editor)); minicard->editor = NULL; } @@ -528,7 +528,10 @@ 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) { - e_contact_editor_raise(e_minicard->editor); + if (e_card_evolution_list (e_minicard->card)) + e_contact_list_editor_raise (E_CONTACT_LIST_EDITOR(e_minicard->editor)); + else + e_contact_editor_raise(E_CONTACT_EDITOR(e_minicard->editor)); } else { EBook *book = NULL; if (E_IS_MINICARD_VIEW(item->parent)) { @@ -538,11 +541,19 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) } if (book != NULL) { - e_minicard->editor = e_addressbook_show_contact_editor (book, e_minicard->card, - FALSE, e_minicard->editable); - gtk_object_ref (GTK_OBJECT (e_minicard->editor)); + if (e_card_evolution_list (e_minicard->card)) { + EContactListEditor *editor = e_addressbook_show_contact_list_editor (book, e_minicard->card, + FALSE, e_minicard->editable); + e_minicard->editor = GTK_OBJECT (editor); + } + else { + EContactEditor *editor = e_addressbook_show_contact_editor (book, e_minicard->card, + FALSE, e_minicard->editable); + e_minicard->editor = GTK_OBJECT (editor); + } + gtk_object_ref (e_minicard->editor); - gtk_signal_connect (GTK_OBJECT (e_minicard->editor), "editor_closed", + gtk_signal_connect (e_minicard->editor, "editor_closed", GTK_SIGNAL_FUNC (editor_closed_cb), e_minicard); } |