changeset 9067:1f2bbb359adb

[gaim-migrate @ 9843] This fixes a bug where the account was always null until you actually clicked on the account selector, instead of being the first selected account. The only time this wouldn't happen was when the roomlist was invoked with /list. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 26 May 2004 01:13:10 +0000
parents 148198ce58bb
children 2652d92ebd4d
files src/gtkroomlist.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkroomlist.c	Wed May 26 00:01:07 2004 +0000
+++ b/src/gtkroomlist.c	Wed May 26 01:13:10 2004 +0000
@@ -356,6 +356,9 @@
 	dialog->account_widget = gaim_gtk_account_option_menu_new(dialog->account, FALSE,
 	                         G_CALLBACK(dialog_select_account_cb), account_filter_func, dialog);
 
+	if (!dialog->account) /* this is normally null, and we normally don't care what the first selected item is */
+		dialog->account = gaim_gtk_account_option_menu_get_selected(dialog->account_widget);
+
 	gtk_box_pack_start(GTK_BOX(account_hbox), dialog->account_widget, TRUE, TRUE, 0);
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(dialog->account_widget));
 	gtk_widget_show(dialog->account_widget);