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
This commit is contained in:
Chris Toshok
2004-02-26 17:51:26 +00:00
committed by Chris Toshok
parent 1e99d93fbe
commit 2b46283efc
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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;
}