diff pidgin/gtkblist.c @ 16777:1de66d5d1de8

if you're offline, and right-click on a group, you shouldn't be presented with the ability to add a buddy
author Nathan Walp <nwalp@pidgin.im>
date Wed, 02 May 2007 03:20:20 +0000
parents a836be6f3b3a
children 56823a55581a f2068bc21af7
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Wed May 02 00:56:11 2007 +0000
+++ b/pidgin/gtkblist.c	Wed May 02 03:20:20 2007 +0000
@@ -1172,8 +1172,9 @@
 	GtkWidget *item;
 
 	menu = gtk_menu_new();
-	pidgin_new_item_from_stock(menu, _("Add a _Buddy"), GTK_STOCK_ADD,
+	item = pidgin_new_item_from_stock(menu, _("Add a _Buddy"), GTK_STOCK_ADD,
 				 G_CALLBACK(pidgin_blist_add_buddy_cb), node, 0, 0, NULL);
+	gtk_widget_set_sensitive(item, purple_connections_get_all() != NULL);
 	item = pidgin_new_item_from_stock(menu, _("Add a C_hat"), GTK_STOCK_ADD,
 				 G_CALLBACK(pidgin_blist_add_chat_cb), node, 0, 0, NULL);
 	gtk_widget_set_sensitive(item, pidgin_blist_joinchat_is_showable());