Mercurial > pidgin.yaz
diff src/gtkroomlist.c @ 8937:fd1a4ff1f7ed
[gaim-migrate @ 9707]
Tools->Room List will now be grayed out when you're not signed on
with an account that supports listing rooms.
This involved 2 big changes:
-Change when the sign_on_off_cb function in gtkblist gets called...
it used to get called when the signing-on and signing-off signal
was emitted, but I changed it to signed-on and signed-off. This
makes more sense to me, and it makes my code work :-) Let me know
if you notice any side-effects
-Add functions to the roomlist API for determining if any online
accounts support chatting or not. This involved extracting a
function from gtkroomlist.c and putting it in roomlist.c, and
adding a little helper TRUE/FALSE function
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 15 May 2004 21:56:17 +0000 |
parents | 058efd3cb86f |
children | 19885cb8a24c |
line wrap: on
line diff
--- a/src/gtkroomlist.c Sat May 15 21:24:43 2004 +0000 +++ b/src/gtkroomlist.c Sat May 15 21:56:17 2004 +0000 @@ -302,22 +302,11 @@ GtkWidget *account_hbox; GtkWidget *bbox; GtkWidget *label; - GaimAccount *first_account = NULL; - - if (!account) { - GList *c; - GaimConnection *gc; - for (c = gaim_connections_get_all(); c != NULL; c = c->next) { - gc = c->data; + if (account == NULL) { + account = gaim_roomlist_get_first_valid_account(); - if (gaim_roomlist_is_possible(gc)) { - first_account = gaim_connection_get_account(gc); - break; - } - } - - if (first_account == NULL) { + if (account == NULL) { gaim_notify_error(NULL, NULL, _("You are not currently signed on with any " "protocols that have the ability to list rooms."), @@ -328,6 +317,7 @@ } dialog = g_new0(GaimGtkRoomlistDialog, 1); + dialog->account = account; /* Create the window. */ dialog->window = window = gtk_window_new(GTK_WINDOW_TOPLEVEL); @@ -349,12 +339,6 @@ gtk_container_add(GTK_CONTAINER(vbox), vbox2); gtk_widget_show(vbox2); - - if (!account) - dialog->account = first_account; - else - dialog->account = account; - /* accounts dropdown list */ account_hbox = gtk_hbox_new(FALSE, 6); gtk_box_pack_start(GTK_BOX(vbox2), account_hbox, FALSE, FALSE, 0);