Mercurial > pidgin.yaz
diff src/gtkroomlist.c @ 8352:77baefe979c6
[gaim-migrate @ 9076]
this compiles, and I don't think it breaks anything, so here's
/list support, again from our patient friend marv
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 27 Feb 2004 01:48:11 +0000 |
parents | ef881489396e |
children | c1ca19c8f749 |
line wrap: on
line diff
--- a/src/gtkroomlist.c Fri Feb 27 01:45:26 2004 +0000 +++ b/src/gtkroomlist.c Fri Feb 27 01:48:11 2004 +0000 @@ -343,29 +343,28 @@ gtk_container_add(GTK_CONTAINER(vbox), vbox2); gtk_widget_show(vbox2); - /* accounts dropdown list */ - if (!account) { - account_hbox = gtk_hbox_new(FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, FALSE, FALSE, 0); - gtk_widget_show(account_hbox); + if (!account) dialog->account = first_account; - label = gtk_label_new(NULL); - gtk_box_pack_start(GTK_BOX(account_hbox), label, TRUE, TRUE, 0); - gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:")); - gtk_misc_set_alignment(GTK_MISC(label), 0, 0); - gtk_widget_show(label); + else + dialog->account = account; + /* accounts dropdown list */ + account_hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, FALSE, FALSE, 0); + gtk_widget_show(account_hbox); - dialog->account_widget = gaim_gtk_account_option_menu_new(first_account, FALSE, - G_CALLBACK(dialog_select_account_cb), accounts_filter_func, dialog); + label = gtk_label_new(NULL); + gtk_box_pack_start(GTK_BOX(account_hbox), label, TRUE, TRUE, 0); + gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_widget_show(label); - 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); + dialog->account_widget = gaim_gtk_account_option_menu_new(dialog->account, FALSE, + G_CALLBACK(dialog_select_account_cb), accounts_filter_func, dialog); - } else { - dialog->account = account; - } + 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); /* scrolled window */ dialog->sw = gtk_scrolled_window_new(NULL, NULL); @@ -434,6 +433,17 @@ return gaim_gtk_roomlist_dialog_new_with_account(NULL); } +static void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account) +{ + GaimGtkRoomlistDialog *dialog; + + dialog = gaim_gtk_roomlist_dialog_new_with_account(account); + if (!dialog) + return; + + list_button_cb(GTK_BUTTON(dialog->list_button), dialog); +} + void gaim_gtk_roomlist_dialog_show(void) { gaim_gtk_roomlist_dialog_new(); @@ -701,6 +711,7 @@ } static GaimRoomlistUiOps ops = { + gaim_gtk_roomlist_dialog_show_with_account, gaim_gtk_roomlist_new, gaim_gtk_roomlist_set_fields, gaim_gtk_roomlist_add_room,