aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-02-27 01:51:26 +0800
committerChris Toshok <toshok@src.gnome.org>2004-02-27 01:51:26 +0800
commit2b46283efc6ca1cd1dee7e63128378022bb862ac (patch)
tree33d28cbaa00e5542228e032ae523d59564bbac0a
parent1e99d93fbecd6b6c2f5feabb16d5da3b14e20075 (diff)
downloadgsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.tar
gsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.tar.gz
gsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.tar.bz2
gsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.tar.lz
gsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.tar.xz
gsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.tar.zst
gsoc2013-evolution-2b46283efc6ca1cd1dee7e63128378022bb862ac.zip
fix checks for locations.
2004-02-26 Chris Toshok <toshok@ximian.com> * gui/contact-editor/e-contact-editor.c (edit_im_clicked): fix checks for locations. svn path=/trunk/; revision=24888
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index a3ea201fc2..fb00fbd906 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,10 @@
2004-02-26 Chris Toshok <toshok@ximian.com>
+ * gui/contact-editor/e-contact-editor.c (edit_im_clicked): fix
+ checks for locations.
+
+2004-02-26 Chris Toshok <toshok@ximian.com>
+
* gui/contact-editor/im.glade: set the location label/option menu
to visible.
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 420c5aa6ee..8a7c92e371 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -407,10 +407,9 @@ edit_im_clicked(GtkWidget *widget, EContactEditor *editor)
NULL);
if (service == old_service &&
- (location == old_location ||
- (location != NULL && old_location == NULL) ||
- (location == NULL && old_location != NULL) ||
- !strcmp(old_location, location)) &&
+ ((!location && !old_location) ||
+ (location && old_location &&
+ !strcmp(old_location, location))) &&
!strcmp(screenname, old_screenname)) {
gtk_widget_destroy(GTK_WIDGET(dialog));
@@ -426,7 +425,8 @@ edit_im_clicked(GtkWidget *widget, EContactEditor *editor)
if (!found
&& !strcmp(e_vcard_attribute_get_value (attr), old_screenname)
- && e_vcard_attribute_has_type (attr, old_location)) {
+ && ((old_location && e_vcard_attribute_has_type (attr, old_location))
+ || (!old_location && !e_vcard_attribute_has_type (attr, "HOME") && !e_vcard_attribute_has_type (attr, "WORK")))) {
e_vcard_attribute_free (attr);
found = TRUE;
}