empathy r736 - trunk/libempathy-gtk



Author: xclaesse
Date: Tue Mar 11 08:50:02 2008
New Revision: 736
URL: http://svn.gnome.org/viewvc/empathy?rev=736&view=rev

Log:
Fix a leak and simplify account_chooser_set_account_foreach.


Modified:
   trunk/libempathy-gtk/empathy-account-chooser.c

Modified: trunk/libempathy-gtk/empathy-account-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-account-chooser.c	(original)
+++ trunk/libempathy-gtk/empathy-account-chooser.c	Tue Mar 11 08:50:02 2008
@@ -606,13 +606,16 @@
 	gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
 
 	/* Special case so we can make it possible to select the All option */
-	if (!data->account && !account) {
-		equal = TRUE;
-	}
-	else if ((data->account && !account) || (!data->account && account)) {
+	if ((data->account == NULL) != (account == NULL)) {
 		equal = FALSE;
+	}
+	else if (data->account == account) {
+		equal = TRUE;
 	} else {
 		equal = empathy_account_equal (data->account, account);
+	}
+
+	if (account) {
 		g_object_unref (account);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]