| 2817 } |
2822 } |
| 2818 |
2823 |
| 2819 static void |
2824 static void |
| 2820 toggle_debug(void) |
2825 toggle_debug(void) |
| 2821 { |
2826 { |
| 2822 gboolean current_setting = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled"); |
|
| 2823 |
|
| 2824 if (!current_setting) |
|
| 2825 pidgin_set_toplevel(GTK_WINDOW(gtkblist->window)); |
|
| 2826 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/enabled", |
2827 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/debug/enabled", |
| 2827 !current_setting); |
2828 !purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled")); |
| 2828 } |
2829 } |
| 2829 |
2830 |
| 2830 static void |
|
| 2831 pidgin_blist_show_no_param_dialog(gpointer p1, GCallback p2, gpointer p3) |
|
| 2832 { |
|
| 2833 g_print("pidgin_blist_show_no_param_dialog: Entering\n"); |
|
| 2834 pidgin_set_toplevel(GTK_WINDOW(gtkblist->window)); |
|
| 2835 p2(); |
|
| 2836 } |
|
| 2837 |
2831 |
| 2838 /*************************************************** |
2832 /*************************************************** |
| 2839 * Crap * |
2833 * Crap * |
| 2840 ***************************************************/ |
2834 ***************************************************/ |
| 2841 |
|
| 2842 static GtkItemFactoryEntry blist_menu[] = |
2835 static GtkItemFactoryEntry blist_menu[] = |
| 2843 { |
2836 { |
| 2844 /* Buddies menu */ |
2837 /* Buddies menu */ |
| 2845 { N_("/_Buddies"), NULL, NULL, 0, "<Branch>", NULL }, |
2838 { N_("/_Buddies"), NULL, NULL, 0, "<Branch>", NULL }, |
| 2846 { N_("/Buddies/New Instant _Message..."), "<CTL>M", pidgin_blist_show_no_param_dialog, (guint)pidgin_dialogs_im, "<StockItem>", PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW }, |
2839 { N_("/Buddies/New Instant _Message..."), "<CTL>M", pidgin_dialogs_im, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW }, |
| 2847 { N_("/Buddies/Join a _Chat..."), "<CTL>C", pidgin_blist_show_no_param_dialog, (guint)pidgin_blist_joinchat_show, "<Item>", NULL }, |
2840 { N_("/Buddies/Join a _Chat..."), "<CTL>C", pidgin_blist_joinchat_show, 0, "<Item>", NULL }, |
| 2848 { N_("/Buddies/Get User _Info..."), "<CTL>I", pidgin_blist_show_no_param_dialog, (guint)pidgin_dialogs_info, "<StockItem>", PIDGIN_STOCK_TOOLBAR_USER_INFO }, |
2841 { N_("/Buddies/Get User _Info..."), "<CTL>I", pidgin_dialogs_info, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_USER_INFO }, |
| 2849 { N_("/Buddies/View User _Log..."), "<CTL>L", pidgin_blist_show_no_param_dialog, (guint)pidgin_dialogs_log, "<Item>", NULL }, |
2842 { N_("/Buddies/View User _Log..."), "<CTL>L", pidgin_dialogs_log, 0, "<Item>", NULL }, |
| 2850 { "/Buddies/sep1", NULL, NULL, 0, "<Separator>", NULL }, |
2843 { "/Buddies/sep1", NULL, NULL, 0, "<Separator>", NULL }, |
| 2851 { N_("/Buddies/Show _Offline Buddies"), NULL, pidgin_blist_edit_mode_cb, 1, "<CheckItem>", NULL }, |
2844 { N_("/Buddies/Show _Offline Buddies"), NULL, pidgin_blist_edit_mode_cb, 1, "<CheckItem>", NULL }, |
| 2852 { N_("/Buddies/Show _Empty Groups"), NULL, pidgin_blist_show_empty_groups_cb, 1, "<CheckItem>", NULL }, |
2845 { N_("/Buddies/Show _Empty Groups"), NULL, pidgin_blist_show_empty_groups_cb, 1, "<CheckItem>", NULL }, |
| 2853 { N_("/Buddies/Show Buddy _Details"), NULL, pidgin_blist_buddy_details_cb, 1, "<CheckItem>", NULL }, |
2846 { N_("/Buddies/Show Buddy _Details"), NULL, pidgin_blist_buddy_details_cb, 1, "<CheckItem>", NULL }, |
| 2854 { N_("/Buddies/Show Idle _Times"), NULL, pidgin_blist_show_idle_time_cb, 1, "<CheckItem>", NULL }, |
2847 { N_("/Buddies/Show Idle _Times"), NULL, pidgin_blist_show_idle_time_cb, 1, "<CheckItem>", NULL }, |
| 2855 { N_("/Buddies/_Sort Buddies"), NULL, NULL, 0, "<Branch>", NULL }, |
2848 { N_("/Buddies/_Sort Buddies"), NULL, NULL, 0, "<Branch>", NULL }, |
| 2856 { "/Buddies/sep2", NULL, NULL, 0, "<Separator>", NULL }, |
2849 { "/Buddies/sep2", NULL, NULL, 0, "<Separator>", NULL }, |
| 2857 { N_("/Buddies/_Add Buddy..."), "<CTL>B", pidgin_blist_show_no_param_dialog, (guint)pidgin_blist_add_buddy_cb, "<StockItem>", GTK_STOCK_ADD }, |
2850 { N_("/Buddies/_Add Buddy..."), "<CTL>B", pidgin_blist_add_buddy_cb, 0, "<StockItem>", GTK_STOCK_ADD }, |
| 2858 { N_("/Buddies/Add C_hat..."), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_blist_add_chat_cb, "<StockItem>", GTK_STOCK_ADD }, |
2851 { N_("/Buddies/Add C_hat..."), NULL, pidgin_blist_add_chat_cb, 0, "<StockItem>", GTK_STOCK_ADD }, |
| 2859 { N_("/Buddies/Add _Group..."), NULL, pidgin_blist_show_no_param_dialog, (guint)purple_blist_request_add_group, "<StockItem>", GTK_STOCK_ADD }, |
2852 { N_("/Buddies/Add _Group..."), NULL, purple_blist_request_add_group, 0, "<StockItem>", GTK_STOCK_ADD }, |
| 2860 { "/Buddies/sep3", NULL, NULL, 0, "<Separator>", NULL }, |
2853 { "/Buddies/sep3", NULL, NULL, 0, "<Separator>", NULL }, |
| 2861 { N_("/Buddies/_Quit"), "<CTL>Q", purple_core_quit, 0, "<StockItem>", GTK_STOCK_QUIT }, |
2854 { N_("/Buddies/_Quit"), "<CTL>Q", purple_core_quit, 0, "<StockItem>", GTK_STOCK_QUIT }, |
| 2862 |
2855 |
| 2863 /* Accounts menu */ |
2856 /* Accounts menu */ |
| 2864 { N_("/_Accounts"), NULL, NULL, 0, "<Branch>", NULL }, |
2857 { N_("/_Accounts"), NULL, NULL, 0, "<Branch>", NULL }, |
| 2865 { N_("/Accounts/Add\\/Edit"), "<CTL>A", pidgin_blist_show_no_param_dialog, (guint)pidgin_accounts_window_show, "<Item>", NULL }, |
2858 { N_("/Accounts/Add\\/Edit"), "<CTL>A", pidgin_accounts_window_show, 0, "<Item>", NULL }, |
| 2866 |
2859 |
| 2867 /* Tools */ |
2860 /* Tools */ |
| 2868 { N_("/_Tools"), NULL, NULL, 0, "<Branch>", NULL }, |
2861 { N_("/_Tools"), NULL, NULL, 0, "<Branch>", NULL }, |
| 2869 { N_("/Tools/Buddy _Pounces"), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_pounces_manager_show, "<Item>", NULL }, |
2862 { N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "<Item>", NULL }, |
| 2870 { N_("/Tools/Plu_gins"), "<CTL>U", pidgin_blist_show_no_param_dialog, (guint)pidgin_plugin_dialog_show, "<StockItem>", PIDGIN_STOCK_TOOLBAR_PLUGINS }, |
2863 { N_("/Tools/Plu_gins"), "<CTL>U", pidgin_plugin_dialog_show, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_PLUGINS }, |
| 2871 { N_("/Tools/Pr_eferences"), "<CTL>P", pidgin_blist_show_no_param_dialog, (guint)pidgin_prefs_show, "<StockItem>", GTK_STOCK_PREFERENCES }, |
2864 { N_("/Tools/Pr_eferences"), "<CTL>P", pidgin_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES }, |
| 2872 { N_("/Tools/Pr_ivacy"), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_privacy_dialog_show, "<Item>", NULL }, |
2865 { N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "<Item>", NULL }, |
| 2873 { "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL }, |
2866 { "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL }, |
| 2874 { N_("/Tools/_File Transfers"), "<CTL>T", pidgin_xfer_dialog_show, 0, "<Item>", NULL }, |
2867 { N_("/Tools/_File Transfers"), "<CTL>T", pidgin_xfer_dialog_show, 0, "<Item>", NULL }, |
| 2875 { N_("/Tools/R_oom List"), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_roomlist_dialog_show, "<Item>", NULL }, |
2868 { N_("/Tools/R_oom List"), NULL, pidgin_roomlist_dialog_show, 0, "<Item>", NULL }, |
| 2876 { N_("/Tools/System _Log"), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_syslog_show, "<Item>", NULL }, |
2869 { N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<Item>", NULL }, |
| 2877 { "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL }, |
2870 { "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL }, |
| 2878 { N_("/Tools/Mute _Sounds"), "<CTL>S", pidgin_blist_mute_sounds_cb, 0, "<CheckItem>", NULL }, |
2871 { N_("/Tools/Mute _Sounds"), "<CTL>S", pidgin_blist_mute_sounds_cb, 0, "<CheckItem>", NULL }, |
| 2879 /* Help */ |
2872 /* Help */ |
| 2880 { N_("/_Help"), NULL, NULL, 0, "<Branch>", NULL }, |
2873 { N_("/_Help"), NULL, NULL, 0, "<Branch>", NULL }, |
| 2881 { N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "<StockItem>", GTK_STOCK_HELP }, |
2874 { N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "<StockItem>", GTK_STOCK_HELP }, |
| 2882 { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL }, |
2875 { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL }, |
| 2883 #if GTK_CHECK_VERSION(2,6,0) |
2876 #if GTK_CHECK_VERSION(2,6,0) |
| 2884 { N_("/Help/_About"), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_dialogs_about, "<StockItem>", GTK_STOCK_ABOUT }, |
2877 { N_("/Help/_About"), NULL, pidgin_dialogs_about, 0, "<StockItem>", GTK_STOCK_ABOUT }, |
| 2885 #else |
2878 #else |
| 2886 { N_("/Help/_About"), NULL, pidgin_blist_show_no_param_dialog, (guint)pidgin_dialogs_about, "<Item>", NULL }, |
2879 { N_("/Help/_About"), NULL, pidgin_dialogs_about, 0, "<Item>", NULL }, |
| 2887 #endif |
2880 #endif |
| 2888 }; |
2881 }; |
| 2889 |
2882 |
| 2890 /********************************************************* |
2883 /********************************************************* |
| 2891 * Private Utility functions * |
2884 * Private Utility functions * |