# HG changeset patch # User Richard Laager # Date 1163829187 0 # Node ID 33ac3c591b4a42bf9da900c6eb1b5b7a2c5de89a # Parent 0d9f69b23352a285ee6d627903610d60d9dc5def [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 diff -r 0d9f69b23352 -r 33ac3c591b4a gtk/gtkblist.c --- 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)); diff -r 0d9f69b23352 -r 33ac3c591b4a gtk/gtkpounce.c --- 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",