changeset 9987:5eedb0a9093d

[gaim-migrate @ 10900] (10:24:49) lschiere2: mmm. the join chat dialog seems to be broken in the oldstatus tree (10:26:12) nosnilmot: I have a fix for that (10:27:27) nosnilmot: lschiere2: this fixes the join chat dialog, and removes some duplicate code : http://nosnilmot.com/patches/gaim-1.0.0cvs-gtkblist-fixes.patch (10:28:24) lschiere2: both trees need this patch? (10:28:42) nosnilmot: umm... (10:29:24) nosnilmot: yes, both trees need it committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 08 Sep 2004 14:30:13 +0000
parents cf27dea1d0a5
children d770673338f4
files src/gtkblist.c
diffstat 1 files changed, 6 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Wed Sep 08 11:38:00 2004 +0000
+++ b/src/gtkblist.c	Wed Sep 08 14:30:13 2004 +0000
@@ -685,7 +685,7 @@
 
 	data->entries = NULL;
 
-	if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info == NULL)
+	if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL)
 		list = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info(gc);
 
 	if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info_defaults != NULL)
@@ -774,7 +774,7 @@
 }
 
 static gboolean
-joinchat_account_filter_func(GaimAccount *account)
+chat_account_filter_func(GaimAccount *account)
 {
 	GaimConnection *gc = gaim_account_get_connection(account);
 	GaimPluginProtocolInfo *prpl_info = NULL;
@@ -793,7 +793,7 @@
 	for (c = gaim_connections_get_all(); c != NULL; c = c->next) {
 		gc = c->data;
 
-		if (joinchat_account_filter_func(gaim_connection_get_account(gc)))
+		if (chat_account_filter_func(gaim_connection_get_account(gc)))
 			return TRUE;
 	}
 
@@ -854,7 +854,7 @@
 
 	data->account_menu = gaim_gtk_account_option_menu_new(NULL, FALSE,
 			G_CALLBACK(joinchat_select_account_cb),
-			joinchat_account_filter_func, data);
+			chat_account_filter_func, data);
 	gtk_box_pack_start(GTK_BOX(rowbox), data->account_menu, TRUE, TRUE, 0);
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label),
 								  GTK_WIDGET(data->account_menu));
@@ -4380,15 +4380,6 @@
 	}
 }
 
-/* XXX this does exactly the same thing as joinchat_account_filter_func() */
-static gboolean
-add_chat_check_account_func(GaimAccount *account)
-{
-	GaimConnection *gc = gaim_account_get_connection(account);
-
-	return (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->chat_info != NULL);
-}
-
 void
 gaim_gtk_blist_request_add_chat(GaimAccount *account, GaimGroup *group,
 								const char *alias, const char *name)
@@ -4481,7 +4472,7 @@
 
 	data->account_menu = gaim_gtk_account_option_menu_new(account, FALSE,
 			G_CALLBACK(add_chat_select_account_cb),
-			add_chat_check_account_func, data);
+			chat_account_filter_func, data);
 	gtk_box_pack_start(GTK_BOX(rowbox), data->account_menu, TRUE, TRUE, 0);
 	gaim_set_accessible_label (data->account_menu, label);
 
@@ -5095,7 +5086,7 @@
 	/* Clear the old Account Actions menu */
 	for (l = gtk_container_get_children(GTK_CONTAINER(protomenu)); l; l = l->next) {
 		GaimPluginAction *action;
-		
+
 		menuitem = l->data;
 		action = (GaimPluginAction *) g_object_get_data(G_OBJECT(menuitem),
 				"plugin_action");