/pidgin/main: 441740e869b2: Clean up some logic

Mark Doliner mark at kingant.net
Wed Jan 23 02:13:48 EST 2013


Changeset: 441740e869b2860205623b097dd5c24957bfb65b
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-01-22 23:03 -0800
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/441740e869b2

Description:

Clean up some logic

diffstat:

 pidgin/gtkconv.c |  19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diffs (30 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -3315,17 +3315,16 @@ populate_menu_with_options(GtkWidget *me
 			return FALSE;
 
 		buddy = purple_find_buddy(account, purple_conversation_get_name(conv));
-
-		if ((buddy == NULL) && (gtkconv->webview != NULL)) {
+		if (!buddy && gtkconv->webview) {
 			buddy = g_object_get_data(G_OBJECT(gtkconv->webview), "transient_buddy");
-		}
-
-		if ((buddy == NULL) && (gtkconv->webview != NULL)) {
-			buddy = purple_buddy_new(account, purple_conversation_get_name(conv), NULL);
-			purple_blist_node_set_flags((PurpleBlistNode *)buddy,
-					PURPLE_BLIST_NODE_FLAG_NO_SAVE);
-			g_object_set_data_full(G_OBJECT(gtkconv->webview), "transient_buddy",
-					buddy, (GDestroyNotify)purple_buddy_destroy);
+
+			if (!buddy) {
+				buddy = purple_buddy_new(account, purple_conversation_get_name(conv), NULL);
+				purple_blist_node_set_flags((PurpleBlistNode *)buddy,
+						PURPLE_BLIST_NODE_FLAG_NO_SAVE);
+				g_object_set_data_full(G_OBJECT(gtkconv->webview), "transient_buddy",
+						buddy, (GDestroyNotify)purple_buddy_destroy);
+			}
 		}
 	}
 



More information about the Commits mailing list