Mercurial > pidgin.yaz
diff finch/gntblist.c @ 20701:8a830c4ce996
propagate from branch 'im.pidgin.pidgin.2.2.1' (head 39fb78e8732dc4465a2c4908c796df3d745b752c)
to branch 'im.pidgin.pidgin' (head 8b8bc5b1ef1263e1c0f00a9ed208accff09d988e)
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Sat, 29 Sep 2007 02:50:14 +0000 |
parents | 54ff514fdd04 |
children | 3f9520e09805 |
line wrap: on
line diff
--- a/finch/gntblist.c Sat Sep 29 02:49:25 2007 +0000 +++ b/finch/gntblist.c Sat Sep 29 02:50:14 2007 +0000 @@ -1510,6 +1510,8 @@ } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) { purple_prefs_set_bool(PREF_ROOT "/showoffline", !purple_prefs_get_bool(PREF_ROOT "/showoffline")); + } else if (strcmp(text, GNT_KEY_INS) == 0) { + purple_blist_request_add_buddy(NULL, NULL, NULL, NULL); } else if (!gnt_tree_is_searching(GNT_TREE(ggblist->tree))) { if (strcmp(text, "t") == 0) { finch_blist_toggle_tag_buddy(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree))); @@ -2225,9 +2227,27 @@ } static void +menu_add_buddy_cb(GntMenuItem *item, gpointer null) +{ + purple_blist_request_add_buddy(NULL, NULL, NULL, NULL); +} + +static void +menu_add_chat_cb(GntMenuItem *item, gpointer null) +{ + purple_blist_request_add_chat(NULL, NULL, NULL, NULL); +} + +static void +menu_add_group_cb(GntMenuItem *item, gpointer null) +{ + purple_blist_request_add_group(); +} + +static void create_menu() { - GntWidget *menu, *sub; + GntWidget *menu, *sub, *subsub; GntMenuItem *item; GntWindow *window; @@ -2248,29 +2268,57 @@ gnt_menu_add_item(GNT_MENU(sub), item); gnt_menuitem_set_callback(GNT_MENU_ITEM(item), send_im_select, NULL); - item = gnt_menuitem_check_new(_("Show empty groups")); + item = gnt_menuitem_new(_("Show")); + gnt_menu_add_item(GNT_MENU(sub), item); + subsub = gnt_menu_new(GNT_MENU_POPUP); + gnt_menuitem_set_submenu(item, GNT_MENU(subsub)); + + item = gnt_menuitem_check_new(_("Empty groups")); gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item), purple_prefs_get_bool(PREF_ROOT "/emptygroups")); - gnt_menu_add_item(GNT_MENU(sub), item); + gnt_menu_add_item(GNT_MENU(subsub), item); gnt_menuitem_set_callback(GNT_MENU_ITEM(item), toggle_pref_cb, PREF_ROOT "/emptygroups"); - item = gnt_menuitem_check_new(_("Show offline buddies")); + item = gnt_menuitem_check_new(_("Offline buddies")); gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item), purple_prefs_get_bool(PREF_ROOT "/showoffline")); - gnt_menu_add_item(GNT_MENU(sub), item); + gnt_menu_add_item(GNT_MENU(subsub), item); gnt_menuitem_set_callback(GNT_MENU_ITEM(item), toggle_pref_cb, PREF_ROOT "/showoffline"); - item = gnt_menuitem_new(_("Sort by status")); + item = gnt_menuitem_new(_("Sort")); gnt_menu_add_item(GNT_MENU(sub), item); + subsub = gnt_menu_new(GNT_MENU_POPUP); + gnt_menuitem_set_submenu(item, GNT_MENU(subsub)); + + item = gnt_menuitem_new(_("By Status")); + gnt_menu_add_item(GNT_MENU(subsub), item); gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "status"); - item = gnt_menuitem_new(_("Sort alphabetically")); - gnt_menu_add_item(GNT_MENU(sub), item); + item = gnt_menuitem_new(_("Alphabetically")); + gnt_menu_add_item(GNT_MENU(subsub), item); gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "text"); - item = gnt_menuitem_new(_("Sort by log size")); + item = gnt_menuitem_new(_("By Log Size")); + gnt_menu_add_item(GNT_MENU(subsub), item); + gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "log"); + + item = gnt_menuitem_new(_("Add")); gnt_menu_add_item(GNT_MENU(sub), item); - gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "log"); + + subsub = gnt_menu_new(GNT_MENU_POPUP); + gnt_menuitem_set_submenu(item, GNT_MENU(subsub)); + + item = gnt_menuitem_new("Buddy"); + gnt_menu_add_item(GNT_MENU(subsub), item); + gnt_menuitem_set_callback(item, menu_add_buddy_cb, NULL); + + item = gnt_menuitem_new("Chat"); + gnt_menu_add_item(GNT_MENU(subsub), item); + gnt_menuitem_set_callback(item, menu_add_chat_cb, NULL); + + item = gnt_menuitem_new("Group"); + gnt_menu_add_item(GNT_MENU(subsub), item); + gnt_menuitem_set_callback(item, menu_add_group_cb, NULL); reconstruct_accounts_menu(); gnt_menu_add_item(GNT_MENU(menu), ggblist->accounts);