Mercurial > pidgin.yaz
comparison pidgin/gtkblist.c @ 27963:85fa979b08c2
propagate from branch 'im.pidgin.pidgin' (head 921a6693312cc38dd6dbc93e91d6bf5c60938634)
to branch 'im.pidgin.pidgin.yaz' (head 1f0dc57711925c17aef0a129bec2d272c21236ba)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 07 Jul 2009 06:09:35 +0000 |
parents | f058edca3d66 4fd6b50d03b3 |
children | e1cd44c7c7af |
comparison
equal
deleted
inserted
replaced
27962:3663c7e208ef | 27963:85fa979b08c2 |
---|---|
1578 G_CALLBACK(gtk_blist_menu_showlog_cb), buddy, 0, 0, NULL); | 1578 G_CALLBACK(gtk_blist_menu_showlog_cb), buddy, 0, 0, NULL); |
1579 } | 1579 } |
1580 | 1580 |
1581 if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) { | 1581 if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) { |
1582 show_offline = purple_blist_node_get_bool(node, "show_offline"); | 1582 show_offline = purple_blist_node_get_bool(node, "show_offline"); |
1583 pidgin_new_item_from_stock(menu, show_offline ? _("Hide when offline") : _("Show when offline"), | 1583 pidgin_new_item_from_stock(menu, show_offline ? _("Hide When Offline") : _("Show When Offline"), |
1584 NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); | 1584 NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); |
1585 } | 1585 } |
1586 | 1586 |
1587 pidgin_append_blist_node_proto_menu(menu, buddy->account->gc, node); | 1587 pidgin_append_blist_node_proto_menu(menu, buddy->account->gc, node); |
1588 pidgin_append_blist_node_extended_menu(menu, node); | 1588 pidgin_append_blist_node_extended_menu(menu, node); |
1762 G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL); | 1762 G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL); |
1763 pidgin_new_item_from_stock(menu, _("_Rename"), NULL, | 1763 pidgin_new_item_from_stock(menu, _("_Rename"), NULL, |
1764 G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); | 1764 G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); |
1765 if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) { | 1765 if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) { |
1766 gboolean show_offline = purple_blist_node_get_bool(node, "show_offline"); | 1766 gboolean show_offline = purple_blist_node_get_bool(node, "show_offline"); |
1767 pidgin_new_item_from_stock(menu, show_offline ? _("Hide when offline") : _("Show when offline"), | 1767 pidgin_new_item_from_stock(menu, show_offline ? _("Hide When Offline") : _("Show When Offline"), |
1768 NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); | 1768 NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL); |
1769 } | 1769 } |
1770 | 1770 |
1771 add_buddy_icon_menu_items(menu, node); | 1771 add_buddy_icon_menu_items(menu, node); |
1772 | 1772 |
6304 NODE_COLUMN, &selected_node, -1); | 6304 NODE_COLUMN, &selected_node, -1); |
6305 } | 6305 } |
6306 selected = (gnode == selected_node); | 6306 selected = (gnode == selected_node); |
6307 | 6307 |
6308 if (!expanded) { | 6308 if (!expanded) { |
6309 g_snprintf(group_count, sizeof(group_count), " (%d/%d)", | 6309 g_snprintf(group_count, sizeof(group_count), "%d/%d", |
6310 purple_blist_get_group_online_count(group), | 6310 purple_blist_get_group_online_count(group), |
6311 purple_blist_get_group_size(group, FALSE)); | 6311 purple_blist_get_group_size(group, FALSE)); |
6312 } | 6312 } |
6313 | 6313 |
6314 theme = pidgin_blist_get_theme(); | 6314 theme = pidgin_blist_get_theme(); |
6323 text_color = selected ? NULL : theme_font_get_color_default(pair, NULL); | 6323 text_color = selected ? NULL : theme_font_get_color_default(pair, NULL); |
6324 text_font = theme_font_get_face_default(pair, ""); | 6324 text_font = theme_font_get_face_default(pair, ""); |
6325 | 6325 |
6326 esc = g_markup_escape_text(group->name, -1); | 6326 esc = g_markup_escape_text(group->name, -1); |
6327 if (text_color) { | 6327 if (text_color) { |
6328 mark = g_strdup_printf("<span foreground='%s' font_desc='%s'><b>%s</b>%s</span>", | 6328 mark = g_strdup_printf("<span foreground='%s' font_desc='%s'><b>%s</b>%s%s%s</span>", |
6329 text_color, text_font, esc ? esc : "", group_count); | 6329 text_color, text_font, |
6330 esc ? esc : "", | |
6331 !expanded ? " <span font_weight='light'>(</span>" : "", | |
6332 group_count, | |
6333 !expanded ? "<span font_weight='light'>)</span>" : ""); | |
6330 } else { | 6334 } else { |
6331 mark = g_strdup_printf("<span font_desc='%s'><b>%s</b>%s</span>", | 6335 mark = g_strdup_printf("<span font_desc='%s'><b>%s</b>%s%s%s</span>", |
6332 text_font, esc ? esc : "", group_count); | 6336 text_font, esc ? esc : "", |
6337 !expanded ? " <span font_weight='light'>(</span>" : "", | |
6338 group_count, | |
6339 !expanded ? "<span font_weight='light'>)</span>" : ""); | |
6333 } | 6340 } |
6334 | 6341 |
6335 g_free(esc); | 6342 g_free(esc); |
6336 return mark; | 6343 return mark; |
6337 } | 6344 } |