[gaim-migrate @ 15795]

Tue, 07 Mar 2006 02:11:59 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 07 Mar 2006 02:11:59 +0000
changeset 13421
df841c5c3638
parent 13420
c734909b3d43
child 13422
0221ca926ebe

[gaim-migrate @ 15795]
(19:58:46) faceprint: I don't think gtk_entry_get_text ever returns NULL
(20:03:43) faceprint: i think the purpose of that if statement was to only do anything if they actually entered any text

I've undone my previous changes and fixed the inner if...else if...else block to match.

plugins/gevolution/new_person_dialog.c file | annotate | diff | comparison | revisions
--- a/plugins/gevolution/new_person_dialog.c	Tue Mar 07 02:09:05 2006 +0000
+++ b/plugins/gevolution/new_person_dialog.c	Tue Mar 07 02:11:59 2006 +0000
@@ -104,7 +104,7 @@
 	lastname   = gtk_entry_get_text(GTK_ENTRY(dialog->lastname));
 	email      = gtk_entry_get_text(GTK_ENTRY(dialog->email));
 
-	if (firstname != NULL || lastname != NULL)
+	if (*firstname || *lastname)
 	{
 		if (dialog->contact == NULL)
 		{
@@ -112,9 +112,9 @@
 
 			dialog->contact = e_contact_new();
 
-			if (lastname != NULL && firstname != NULL)
+			if (*lastname && *firstname)
 				file_as = g_strdup_printf("%s, %s", lastname, firstname);
-			else if (lastname != NULL)
+			else if (*lastname)
 				file_as = g_strdup(lastname);
 			else
 				file_as = g_strdup(firstname);

mercurial