aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-destination.c
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-07-18 02:47:44 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-07-18 02:47:44 +0800
commit217e75d071c4de2305d44af930e7a6ebd7b453f0 (patch)
treed9fe5954c026019c9ad5037e801eb7a279b5837c /addressbook/backend/ebook/e-destination.c
parentd54c49a59b9f56f48ab8e04856fe7134c6b1787a (diff)
downloadgsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.tar
gsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.tar.gz
gsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.tar.bz2
gsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.tar.lz
gsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.tar.xz
gsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.tar.zst
gsoc2013-evolution-217e75d071c4de2305d44af930e7a6ebd7b453f0.zip
Removed old, broken code and annoying g_messages.
2001-07-17 Jon Trowbridge <trow@ximian.com> * backend/ebook/e-destination.c (e_destination_set_string): Removed old, broken code and annoying g_messages. * backend/ebook/e-book-listener.c (e_book_listener_queue_response): Hold a reference to the listener while the idle function is active. (e_book_listener_check_queue): Only release our reference to the listener when the queue is empty. These two changes fix a race condition, since the listener could be unrefed while the listener was still active. (Seems to fix bug #4485) svn path=/trunk/; revision=11164
Diffstat (limited to 'addressbook/backend/ebook/e-destination.c')
-rw-r--r--addressbook/backend/ebook/e-destination.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index 8a25fd1937..42377aaa33 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -271,58 +271,11 @@ e_destination_set_email (EDestination *dest, const gchar *email)
void
e_destination_set_string (EDestination *dest, const gchar *str)
{
- gchar *name = NULL;
- gchar *email = NULL;
-#if 0
- gchar *lt, *gt;
-#endif
-
g_return_if_fail (dest && E_IS_DESTINATION (dest));
g_return_if_fail (str != NULL);
- /* This turned out to be an overly-clever approach... */
-#if 0
- /* Look for something of the form Jane Smith <jane@assbarn.com> */
- if ( (lt = strrchr (str, '<')) && (gt = strrchr (str, '>')) && lt+1 < gt) {
- name = g_strndup (str, lt-str);
- email = g_strndup (lt+1, gt-lt-1);
-
- /* I love using goto. It makes me feel so wicked. */
- goto finished;
- }
-
- /* If it contains '@', assume it is an e-mail address. */
- if (strchr (str, '@')) {
- email = g_strdup (str);
- goto finished;
- }
-
- /* If we contain whitespace, that is very suggestive of being a name. */
- if (strchr (str, ' ')) {
- name = g_strdup (str);
- goto finished;
- }
-#endif
-
/* Default: Just treat it as a name address. */
- name = g_strdup (str);
-
-#if 0
- finished:
-#endif
- if (name) {
- g_message ("name: [%s]", name);
- if (*name)
- e_destination_set_name (dest, name);
- g_free (name);
- }
-
- if (email) {
- g_message ("email: [%s]", email);
- if (*email)
- e_destination_set_email (dest, email);
- g_free (email);
- }
+ e_destination_set_name (dest, str);
}
void