diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-28 05:13:23 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-28 05:13:23 +0800 |
commit | 4c06d16120fb6686c08c74192d62efa2b5d89a24 (patch) | |
tree | c44d99a0341e6c92ad90af68350112e7d284bfcf /addressbook | |
parent | ae98b77f3a7516a133b227832041d66ef12a7e0e (diff) | |
download | gsoc2013-evolution-4c06d16120fb6686c08c74192d62efa2b5d89a24.tar.gz gsoc2013-evolution-4c06d16120fb6686c08c74192d62efa2b5d89a24.tar.zst gsoc2013-evolution-4c06d16120fb6686c08c74192d62efa2b5d89a24.zip |
Set book_uri when cardification occurs.
2001-10-27 Christopher James Lahey <clahey@ximian.com>
* backend/ebook/e-destination.c (name_and_email_simple_query_cb,
nickname_simple_query_cb): Set book_uri when cardification occurs.
svn path=/trunk/; revision=14230
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-destination.c | 37 |
2 files changed, 32 insertions, 13 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index d756e3deea..cc5f58faa6 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,8 +1,14 @@ 2001-10-27 Christopher James Lahey <clahey@ximian.com> + * backend/ebook/e-destination.c (name_and_email_simple_query_cb, + nickname_simple_query_cb): Set book_uri when cardification occurs. + +2001-10-27 Christopher James Lahey <clahey@ximian.com> + * gui/component/select-names/e-select-names.c (e_select_names_add_section): Turned off use_ellipsis (it breaks - emulate_label_resize) and on emulate_label_resize. + emulate_label_resize) and on emulate_label_resize. Fixes Ximian + bug #13693. 2001-10-27 Jon Trowbridge <trow@ximian.com> diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c index 5cd6d24379..20365491a3 100644 --- a/addressbook/backend/ebook/e-destination.c +++ b/addressbook/backend/ebook/e-destination.c @@ -67,20 +67,23 @@ struct _EDestinationPrivate { gchar *addr; gchar *textrep; - gboolean html_mail_override; - gboolean wants_html_mail; - GList *list_dests; - gboolean show_addresses; - gboolean has_been_cardified; - gboolean allow_cardify; - gboolean cannot_cardify; + guint html_mail_override : 1; + guint wants_html_mail : 1; + + guint show_addresses : 1; + + guint has_been_cardified : 1; + guint allow_cardify : 1; + guint cannot_cardify : 1; guint pending_cardification; + + guint pending_change : 1; + EBook *cardify_book; gint freeze_count; - gboolean pending_change; }; static void e_destination_clear_card (EDestination *); @@ -588,11 +591,8 @@ e_destination_use_card (EDestination *dest, EDestinationCardCallback cb, gpointe g_return_if_fail (dest && E_IS_DESTINATION (dest)); if (dest->priv->card != NULL) { - - if (cb) { + if (cb) cb (dest, dest->priv->card, closure); - } - } else if (dest->priv->book_uri != NULL && dest->priv->card_uid != NULL) { UseCard *uc = g_new (UseCard, 1); @@ -602,6 +602,9 @@ e_destination_use_card (EDestination *dest, EDestinationCardCallback cb, gpointe uc->cb = cb; uc->closure = closure; e_card_load_uri (dest->priv->book_uri, dest->priv->card_uid, use_card_cb, uc); + } else { + if (cb) + cb (dest, NULL, closure); } } @@ -941,8 +944,13 @@ name_and_email_simple_query_cb (EBook *book, EBookSimpleQueryStatus status, cons } if (email_num >= 0) { + const char *book_uri; + + book_uri = e_book_get_uri (book); + dest->priv->has_been_cardified = TRUE; e_destination_set_card (dest, card, email_num); + e_destination_set_book_uri (dest, book_uri); gtk_signal_emit (GTK_OBJECT (dest), e_destination_signals[CARDIFIED]); } } @@ -963,8 +971,13 @@ nickname_simple_query_cb (EBook *book, EBookSimpleQueryStatus status, const GLis if (status == E_BOOK_SIMPLE_QUERY_STATUS_SUCCESS) { if (g_list_length ((GList *) cards) == 1) { + const char *book_uri; + + book_uri = e_book_get_uri (book); + dest->priv->has_been_cardified = TRUE; e_destination_set_card (dest, E_CARD (cards->data), 0); /* Uses primary e-mail by default. */ + e_destination_set_book_uri (dest, book_uri); gtk_signal_emit (GTK_OBJECT (dest), e_destination_signals[CARDIFIED]); gtk_object_unref (GTK_OBJECT (dest)); /* drop the reference held by the query */ |