Mercurial > pidgin
changeset 11988:9ccbd9f8e8c6
[gaim-migrate @ 14281]
Put the priority buddy in a contact at the top of the tooltip, and
de-sensitize some chat related things when no accounts supporting chats
are connected
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 06 Nov 2005 19:16:32 +0000 |
parents | 831e52ceddf3 |
children | c7a36461b00c |
files | src/gtkblist.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Sun Nov 06 01:08:56 2005 +0000 +++ b/src/gtkblist.c Sun Nov 06 19:16:32 2005 +0000 @@ -1014,12 +1014,14 @@ create_group_menu (GaimBlistNode *node, GaimGroup *g) { GtkWidget *menu; + GtkWidget *item; menu = gtk_menu_new(); gaim_new_item_from_stock(menu, _("Add a _Buddy"), GTK_STOCK_ADD, G_CALLBACK(gaim_gtk_blist_add_buddy_cb), node, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Add a C_hat"), GTK_STOCK_ADD, + item = gaim_new_item_from_stock(menu, _("Add a C_hat"), GTK_STOCK_ADD, G_CALLBACK(gaim_gtk_blist_add_chat_cb), node, 0, 0, NULL); + gtk_widget_set_sensitive(item, gaim_gtk_blist_joinchat_is_showable()); gaim_new_item_from_stock(menu, _("_Delete Group"), GTK_STOCK_REMOVE, G_CALLBACK(gaim_gtk_blist_remove_cb), node, 0, 0, NULL); gaim_new_item_from_stock(menu, _("_Rename"), NULL, @@ -2179,12 +2181,17 @@ h = td->height; } else if(GAIM_BLIST_NODE_IS_CONTACT(node)) { GaimBlistNode *child; + GaimBuddy *b = gaim_contact_get_priority_buddy((GaimContact *)node); w = h = 0; for(child = node->child; child; child = child->next) { if(GAIM_BLIST_NODE_IS_BUDDY(child) && buddy_is_displayable((GaimBuddy*)child)) { struct tooltip_data *td = create_tip_for_node(child); - gtkblist->tooltipdata = g_list_append(gtkblist->tooltipdata, td); + if (b == (GaimBuddy *)child) { + gtkblist->tooltipdata = g_list_prepend(gtkblist->tooltipdata, td); + } else { + gtkblist->tooltipdata = g_list_append(gtkblist->tooltipdata, td); + } w = MAX(w, td->width); h += td->height; } @@ -3049,6 +3056,9 @@ widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Buddies/Join a Chat...")); gtk_widget_set_sensitive(widget, gaim_gtk_blist_joinchat_is_showable()); + widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Buddies/Add Chat...")); + gtk_widget_set_sensitive(widget, gaim_gtk_blist_joinchat_is_showable()); + widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Room List")); gtk_widget_set_sensitive(widget, gaim_gtk_roomlist_is_showable());