From: <rl...@us...> - 2006-11-18 05:53:07
|
Revision: 17775 http://svn.sourceforge.net/gaim/?rev=17775&view=rev Author: rlaager Date: 2006-11-17 21:53:07 -0800 (Fri, 17 Nov 2006) Log Message: ----------- SF Patch #1597292 from Eduardo P?\195?\169rez This allows you to use the buddy pounce editor when you're offline. Modified Paths: -------------- trunk/gtk/gtkblist.c trunk/gtk/gtkpounce.c Modified: trunk/gtk/gtkblist.c =================================================================== --- trunk/gtk/gtkblist.c 2006-11-18 05:30:57 UTC (rev 17774) +++ trunk/gtk/gtkblist.c 2006-11-18 05:53:07 UTC (rev 17775) @@ -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)); Modified: trunk/gtk/gtkpounce.c =================================================================== --- trunk/gtk/gtkpounce.c 2006-11-18 05:30:57 UTC (rev 17774) +++ trunk/gtk/gtkpounce.c 2006-11-18 05:53:07 UTC (rev 17775) @@ -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", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |