changeset 11071:e6b4badef34d

[gaim-migrate @ 13072] (15:40:40) Sean Egan: By the way, I no longer like my logs populate list of screennames idea :-P I changed this so that screen names from logs only populate the View User Log dialog. That way, you can still easily access all your logs. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 08 Jul 2005 06:47:24 +0000
parents fdb8ba7a4857
children fe1a1d73f42c
files src/gtkrequest.c
diffstat 1 files changed, 18 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkrequest.c	Fri Jul 08 05:11:08 2005 +0000
+++ b/src/gtkrequest.c	Fri Jul 08 06:47:24 2005 +0000
@@ -684,27 +684,29 @@
 		}
 	}
 
-	log_sets = gaim_log_get_log_sets();
-	for (log_set = log_sets ; log_set != NULL ; log_set = log_set->next) {
-		GaimLogSet *set = log_set->data;
+	if (all)
+	{
+		log_sets = gaim_log_get_log_sets();
+		for (log_set = log_sets ; log_set != NULL ; log_set = log_set->next) {
+			GaimLogSet *set = log_set->data;
 
-		/* 1. Don't show buddies because we will have gotten them above.
-		 * 2. If we're not showing all accounts, then only show those with
-		 *    non-NULL accounts that are currently connected.
-		 * 3. The boxes that use this autocomplete code handle only IMs. */
-		if (!set->buddy &&
-			(all || (set->account != NULL && gaim_account_is_connected(set->account))) &&
-		    set->type != GAIM_LOG_CHAT) {
+			/* 1. Don't show buddies because we will have gotten them above.
+			 * 2. Only show those with non-NULL accounts that are currently connected.
+			 * 3. The boxes that use this autocomplete code handle only IMs. */
+			if (!set->buddy &&
+			    (set->account != NULL && gaim_account_is_connected(set->account)) &&
+			    set->type != GAIM_LOG_CHAT) {
 #ifdef NEW_STYLE_COMPLETION
-				names = g_list_append(names, NULL);
-				names = g_list_append(names, NULL);
-				names = g_list_append(names, set->account);
+					names = g_list_append(names, NULL);
+					names = g_list_append(names, NULL);
+					names = g_list_append(names, set->account);
 #endif /* NEW_STYLE_COMPLETION */
 
-				names = g_list_append(names, set->name);
+					names = g_list_append(names, set->name);
+			}
+
+			g_free(set);
 		}
-
-		g_free(set);
 	}
 
 	return names;