comparison finch/gntblist.c @ 21214:05bb2853f350

Add IDs to the menuitems in the buddylist menu so they can have acceletor keys.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 03 Oct 2007 07:12:01 +0000
parents 3f9520e09805
children 0b67d509a305
comparison
equal deleted inserted replaced
21213:4d6828b8da3e 21214:05bb2853f350
2326 2326
2327 sub = gnt_menu_new(GNT_MENU_POPUP); 2327 sub = gnt_menu_new(GNT_MENU_POPUP);
2328 gnt_menuitem_set_submenu(item, GNT_MENU(sub)); 2328 gnt_menuitem_set_submenu(item, GNT_MENU(sub));
2329 2329
2330 item = gnt_menuitem_new(_("Send IM...")); 2330 item = gnt_menuitem_new(_("Send IM..."));
2331 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "send-im");
2331 gnt_menu_add_item(GNT_MENU(sub), item); 2332 gnt_menu_add_item(GNT_MENU(sub), item);
2332 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), send_im_select, NULL); 2333 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), send_im_select, NULL);
2333 2334
2334 item = gnt_menuitem_new(_("Join Chat...")); 2335 item = gnt_menuitem_new(_("Join Chat..."));
2336 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "join-chat");
2335 gnt_menu_add_item(GNT_MENU(sub), item); 2337 gnt_menu_add_item(GNT_MENU(sub), item);
2336 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), join_chat_select, NULL); 2338 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), join_chat_select, NULL);
2337 2339
2338 item = gnt_menuitem_new(_("Show")); 2340 item = gnt_menuitem_new(_("Show"));
2339 gnt_menu_add_item(GNT_MENU(sub), item); 2341 gnt_menu_add_item(GNT_MENU(sub), item);
2340 subsub = gnt_menu_new(GNT_MENU_POPUP); 2342 subsub = gnt_menu_new(GNT_MENU_POPUP);
2341 gnt_menuitem_set_submenu(item, GNT_MENU(subsub)); 2343 gnt_menuitem_set_submenu(item, GNT_MENU(subsub));
2342 2344
2343 item = gnt_menuitem_check_new(_("Empty groups")); 2345 item = gnt_menuitem_check_new(_("Empty groups"));
2346 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "show-empty-groups");
2344 gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item), 2347 gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item),
2345 purple_prefs_get_bool(PREF_ROOT "/emptygroups")); 2348 purple_prefs_get_bool(PREF_ROOT "/emptygroups"));
2346 gnt_menu_add_item(GNT_MENU(subsub), item); 2349 gnt_menu_add_item(GNT_MENU(subsub), item);
2347 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), toggle_pref_cb, PREF_ROOT "/emptygroups"); 2350 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), toggle_pref_cb, PREF_ROOT "/emptygroups");
2348 2351
2349 item = gnt_menuitem_check_new(_("Offline buddies")); 2352 item = gnt_menuitem_check_new(_("Offline buddies"));
2353 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "show-offline-buddies");
2350 gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item), 2354 gnt_menuitem_check_set_checked(GNT_MENU_ITEM_CHECK(item),
2351 purple_prefs_get_bool(PREF_ROOT "/showoffline")); 2355 purple_prefs_get_bool(PREF_ROOT "/showoffline"));
2352 gnt_menu_add_item(GNT_MENU(subsub), item); 2356 gnt_menu_add_item(GNT_MENU(subsub), item);
2353 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), toggle_pref_cb, PREF_ROOT "/showoffline"); 2357 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), toggle_pref_cb, PREF_ROOT "/showoffline");
2354 2358
2356 gnt_menu_add_item(GNT_MENU(sub), item); 2360 gnt_menu_add_item(GNT_MENU(sub), item);
2357 subsub = gnt_menu_new(GNT_MENU_POPUP); 2361 subsub = gnt_menu_new(GNT_MENU_POPUP);
2358 gnt_menuitem_set_submenu(item, GNT_MENU(subsub)); 2362 gnt_menuitem_set_submenu(item, GNT_MENU(subsub));
2359 2363
2360 item = gnt_menuitem_new(_("By Status")); 2364 item = gnt_menuitem_new(_("By Status"));
2365 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "sort-status");
2361 gnt_menu_add_item(GNT_MENU(subsub), item); 2366 gnt_menu_add_item(GNT_MENU(subsub), item);
2362 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "status"); 2367 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "status");
2363 2368
2364 item = gnt_menuitem_new(_("Alphabetically")); 2369 item = gnt_menuitem_new(_("Alphabetically"));
2370 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "sort-alpha");
2365 gnt_menu_add_item(GNT_MENU(subsub), item); 2371 gnt_menu_add_item(GNT_MENU(subsub), item);
2366 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "text"); 2372 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "text");
2367 2373
2368 item = gnt_menuitem_new(_("By Log Size")); 2374 item = gnt_menuitem_new(_("By Log Size"));
2375 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "sort-log");
2369 gnt_menu_add_item(GNT_MENU(subsub), item); 2376 gnt_menu_add_item(GNT_MENU(subsub), item);
2370 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "log"); 2377 gnt_menuitem_set_callback(GNT_MENU_ITEM(item), sort_blist_change_cb, "log");
2371 2378
2372 item = gnt_menuitem_new(_("Add")); 2379 item = gnt_menuitem_new(_("Add"));
2373 gnt_menu_add_item(GNT_MENU(sub), item); 2380 gnt_menu_add_item(GNT_MENU(sub), item);
2374 2381
2375 subsub = gnt_menu_new(GNT_MENU_POPUP); 2382 subsub = gnt_menu_new(GNT_MENU_POPUP);
2376 gnt_menuitem_set_submenu(item, GNT_MENU(subsub)); 2383 gnt_menuitem_set_submenu(item, GNT_MENU(subsub));
2377 2384
2378 item = gnt_menuitem_new("Buddy"); 2385 item = gnt_menuitem_new("Buddy");
2386 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "add-buddy");
2379 gnt_menu_add_item(GNT_MENU(subsub), item); 2387 gnt_menu_add_item(GNT_MENU(subsub), item);
2380 gnt_menuitem_set_callback(item, menu_add_buddy_cb, NULL); 2388 gnt_menuitem_set_callback(item, menu_add_buddy_cb, NULL);
2381 2389
2382 item = gnt_menuitem_new("Chat"); 2390 item = gnt_menuitem_new("Chat");
2391 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "add-chat");
2383 gnt_menu_add_item(GNT_MENU(subsub), item); 2392 gnt_menu_add_item(GNT_MENU(subsub), item);
2384 gnt_menuitem_set_callback(item, menu_add_chat_cb, NULL); 2393 gnt_menuitem_set_callback(item, menu_add_chat_cb, NULL);
2385 2394
2386 item = gnt_menuitem_new("Group"); 2395 item = gnt_menuitem_new("Group");
2396 gnt_menuitem_set_id(GNT_MENU_ITEM(item), "add-group");
2387 gnt_menu_add_item(GNT_MENU(subsub), item); 2397 gnt_menu_add_item(GNT_MENU(subsub), item);
2388 gnt_menuitem_set_callback(item, menu_add_group_cb, NULL); 2398 gnt_menuitem_set_callback(item, menu_add_group_cb, NULL);
2389 2399
2390 reconstruct_accounts_menu(); 2400 reconstruct_accounts_menu();
2391 gnt_menu_add_item(GNT_MENU(menu), ggblist->accounts); 2401 gnt_menu_add_item(GNT_MENU(menu), ggblist->accounts);