Mercurial > pidgin
changeset 14996:33ac3c591b4a
[gaim-migrate @ 17775]
SF Patch #1597292 from Eduardo Prez
This allows you to use the buddy pounce editor when you're offline.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 18 Nov 2006 05:53:07 +0000 |
parents | 0d9f69b23352 |
children | fee45b614eb7 |
files | gtk/gtkblist.c gtk/gtkpounce.c |
diffstat | 2 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/gtk/gtkblist.c Sat Nov 18 05:30:57 2006 +0000 +++ b/gtk/gtkblist.c Sat Nov 18 05:53:07 2006 +0000 @@ -3394,7 +3394,7 @@ gtk_widget_set_sensitive(widget, gaim_gtk_blist_joinchat_is_showable()); widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Buddy Pounces")); - gtk_widget_set_sensitive(widget, (gaim_connections_get_all() != NULL)); + gtk_widget_set_sensitive(widget, (gaim_accounts_get_all() != NULL)); widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Privacy")); gtk_widget_set_sensitive(widget, (gaim_connections_get_all() != NULL));
--- a/gtk/gtkpounce.c Sat Nov 18 05:30:57 2006 +0000 +++ b/gtk/gtkpounce.c Sat Nov 18 05:53:07 2006 +0000 @@ -182,9 +182,6 @@ account = gaim_pounce_get_pouncer(pounce); - if (gaim_account_is_disconnected(account)) - return; - events = gaim_pounce_get_events(pounce); pixbuf = gaim_gtk_create_prpl_icon(account, 0.5); @@ -462,8 +459,9 @@ GPtrArray *sound_widgets; GPtrArray *exec_widgets; - g_return_if_fail((cur_pounce != NULL) || (account != NULL) || - (gaim_connections_get_all() != NULL)); + g_return_if_fail((cur_pounce != NULL) || + (account != NULL) || + (gaim_accounts_get_all() != NULL)); dialog = g_new0(GaimGtkPounceDialog, 1); @@ -479,12 +477,18 @@ } else { + GList *connections = gaim_connections_get_all(); GaimConnection *gc; - gc = (GaimConnection *)gaim_connections_get_all()->data; + if (connections != NULL) + { + gc = (GaimConnection *)connections->data; + dialog->account = gaim_connection_get_account(gc); + } + else + dialog->account = gaim_accounts_get_all()->data; dialog->pounce = NULL; - dialog->account = gaim_connection_get_account(gc); } sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -527,7 +531,7 @@ gtk_size_group_add_widget(sg, label); dialog->account_menu = - gaim_gtk_account_option_menu_new(dialog->account, FALSE, + gaim_gtk_account_option_menu_new(dialog->account, TRUE, G_CALLBACK(pounce_choose_cb), NULL, dialog); @@ -1339,7 +1343,7 @@ /* Add button */ button = gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); - gtk_widget_set_sensitive(button, (gaim_connections_get_all() != NULL)); + gtk_widget_set_sensitive(button, (gaim_accounts_get_all() != NULL)); gaim_signal_connect(gaim_connections_get_handle(), "signed-on", pounces_manager, GAIM_CALLBACK(pounces_manager_connection_cb), button); gaim_signal_connect(gaim_connections_get_handle(), "signed-off",