diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2004-08-04 06:53:33 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2004-08-04 06:53:33 +0800 |
commit | e42af08627db9fd5eed66551e52157bb91c0e642 (patch) | |
tree | 4e80054e95c2867e0ac3eec639c237a06356ef21 /addressbook | |
parent | f929f20b9f9f643e48d4c4be4a380a2dd44ce0c6 (diff) | |
download | gsoc2013-evolution-e42af08627db9fd5eed66551e52157bb91c0e642.tar.gz gsoc2013-evolution-e42af08627db9fd5eed66551e52157bb91c0e642.tar.zst gsoc2013-evolution-e42af08627db9fd5eed66551e52157bb91c0e642.zip |
Fixes #60529.
2004-08-02 Hans Petter Jansson <hpj@ximian.com>
Fixes #60529.
* gui/contact-list-editor/e-contact-list-editor.c
(table_drag_drop_cb): Make sure to get the text/x-vcard target.
2004-08-02 Hans Petter Jansson <hpj@ximian.com>
Fixes #62085.
* gui/contact-list-editor/e-contact-list-editor.c
(e_contact_list_editor_class_init): Set the save_contact method.
(e_contact_list_editor_save_contact): Implement.
svn path=/trunk/; revision=26816
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 15 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 37 |
2 files changed, 46 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 41f77c51eb..f6dad555b0 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,18 @@ +2004-08-02 Hans Petter Jansson <hpj@ximian.com> + + Fixes #60529. + + * gui/contact-list-editor/e-contact-list-editor.c + (table_drag_drop_cb): Make sure to get the text/x-vcard target. + +2004-08-02 Hans Petter Jansson <hpj@ximian.com> + + Fixes #62085. + + * gui/contact-list-editor/e-contact-list-editor.c + (e_contact_list_editor_class_init): Set the save_contact method. + (e_contact_list_editor_save_contact): Implement. + 2004-08-02 JP Rosevear <jpr@novell.com> * conduit/address-conduit.c (addrconduit_load_configuration): get 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 dd2dd19045..ec91ff612e 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -62,6 +62,7 @@ static void e_contact_list_editor_dispose (GObject *object); static void e_contact_list_editor_show (EABEditor *editor); static void e_contact_list_editor_raise (EABEditor *editor); static void e_contact_list_editor_close (EABEditor *editor); +static void e_contact_list_editor_save_contact (EABEditor *editor, gboolean should_close); static gboolean e_contact_list_editor_is_valid (EABEditor *editor); static gboolean e_contact_list_editor_is_changed (EABEditor *editor); static GtkWindow* e_contact_list_editor_get_window (EABEditor *editor); @@ -150,6 +151,7 @@ e_contact_list_editor_class_init (EContactListEditorClass *klass) editor_class->show = e_contact_list_editor_show; editor_class->raise = e_contact_list_editor_raise; editor_class->close = e_contact_list_editor_close; + editor_class->save_contact = e_contact_list_editor_save_contact; editor_class->is_valid = e_contact_list_editor_is_valid; editor_class->is_changed = e_contact_list_editor_is_changed; editor_class->get_window = e_contact_list_editor_get_window; @@ -432,6 +434,14 @@ is_named (EContactListEditor *editor) return named; } +static void +e_contact_list_editor_save_contact (EABEditor *editor, gboolean should_close) +{ + EContactListEditor *cle = E_CONTACT_LIST_EDITOR (editor); + + save_contact (editor, should_close); +} + static gboolean e_contact_list_editor_is_valid (EABEditor *editor) { @@ -882,14 +892,29 @@ table_drag_drop_cb (ETable *table, int row, int col, GdkDragContext *context, gint x, gint y, guint time, EContactListEditor *editor) { - if (context->targets == NULL) - return FALSE; + GList *p; + for (p = context->targets; p != NULL; p = p->next) { + char *possible_type; - gtk_drag_get_data (GTK_WIDGET (table), context, - GDK_POINTER_TO_ATOM (context->targets->data), - time); - return TRUE; + possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data)); + if (!strcmp (possible_type, VCARD_TYPE)) { + g_free (possible_type); + break; + } + + g_free (possible_type); + } + + + if (p) { + gtk_drag_get_data (GTK_WIDGET (table), context, + GDK_POINTER_TO_ATOM (p->data), + time); + return TRUE; + } + + return FALSE; } static void |