⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.c

📁 The major functionality added in this release includes: - Rootless mode in X11 - Widget Templt
💻 C
📖 第 1 页 / 共 4 页
字号:
static voidmenu_loadperl_callback (struct session *sess, void *data2, char *file){	if (file)	{		char *buf = malloc (strlen (file) + 7);		sprintf (buf, "/LOAD %s", file);		free (file);		handle_command (buf, sess, FALSE, FALSE);		free (buf);	}}static voidmenu_loadperl (void){	gtkutil_file_req (_("Select a Perl script to load"), menu_loadperl_callback,							menu_sess, 0, FALSE);}static voidmenu_unloadall (void){	cmd_unloadall (menu_sess, 0, 0, 0);}static voidmenu_perllist (void){	handle_command ("/scpinfo", menu_sess, FALSE, FALSE);}#else#define menu_perllist 0#define menu_unloadall 0#define menu_loadperl 0#endif#ifdef USE_PLUGINstatic voidmenu_loadplugin_callback (struct session *sess, void *data2, char *file){	if (file)	{		char *buf = malloc (strlen (file) + 10);		sprintf (buf, "/LOADDLL %s", file);		free (file);		handle_command (buf, sess, FALSE, FALSE);		free (buf);	}}static voidmenu_loadplugin (void){	gtkutil_file_req (_("Select a Plugin to load"), menu_loadplugin_callback,							menu_sess, 0, FALSE);}static voidmenu_pluginlist (void){	module_glist (menu_sess);}static voidmenu_unloadallplugins (void){	module_unload (0, menu_sess);}#else#define menu_unloadallplugins 0#define menu_pluginlist 0#define menu_loadplugin 0#endif#ifdef USE_PYTHONstatic voidmenu_loadpython_callback (struct session *sess, void *data2, char *file){	if (file)	{		char *buf = malloc (strlen (file) + 8);		sprintf (buf, "/pload %s", file);		free (file);		handle_command (buf, sess, FALSE, FALSE);		free (buf);	}}static voidmenu_loadpython (void){	gtkutil_file_req (_("Select a Python script to load"),							menu_loadpython_callback, menu_sess, 0, FALSE);}static voidmenu_pythonlist (void){	handle_command ("/plist", menu_sess, FALSE, FALSE);}#else#define menu_pythonlist 0#define menu_loadpython 0#endif#define usercommands_help  _("User Commands - Special codes:\n\n"\                           "%c  =  current channel\n"\									"%m  =  machine info\n"\                           "%n  =  your nick\n"\									"%t  =  time/date\n"\                           "%v  =  x-chat version ("VERSION")\n"\                           "%2  =  word 2\n"\                           "%3  =  word 3\n"\                           "&2  =  word 2 to the end of line\n"\                           "&3  =  word 3 to the end of line\n\n"\                           "eg:\n"\                           "/cmd john hello\n\n"\                           "%2 would be \042john\042\n"\                           "&2 would be \042john hello\042.")#define ulpopup_help       _("Userlist Popup - Special codes:\n\n"\                           "%c  =  current channel\n"\                           "%h  =  selected nick's hostname\n"\									"%m  =  machine info\n"\                           "%n  =  your nick\n"\                           "%s  =  selected nick\n"\									"%t  =  time/date\n")#define ulbutton_help       _("Userlist Buttons - Special codes:\n\n"\                           "%a  =  all selected nicks\n"\                           "%c  =  current channel\n"\                           "%h  =  selected nick's hostname\n"\									"%m  =  machine info\n"\                           "%n  =  your nick\n"\                           "%s  =  selected nick\n"\									"%t  =  time/date\n")#define dlgbutton_help      _("Dialog Buttons - Special codes:\n\n"\                           "%a  =  all selected nicks\n"\                           "%c  =  current channel\n"\                           "%h  =  selected nick's hostname\n"\									"%m  =  machine info\n"\                           "%n  =  your nick\n"\                           "%s  =  selected nick\n"\									"%t  =  time/date\n")#define ctcp_help          _("CTCP Replies - Special codes:\n\n"\                           "%d  =  data (the whole ctcp)\n"\									"%m  =  machine info\n"\                           "%s  =  nick who sent the ctcp\n"\                           "%t  =  time/date\n"\                           "%2  =  word 2\n"\                           "%3  =  word 3\n"\                           "&2  =  word 2 to the end of line\n"\                           "&3  =  word 3 to the end of line\n\n")#define url_help           _("URL Handlers - Special codes:\n\n"\                           "%s  =  the URL string\n\n"\                           "Putting a ! infront of the command\n"\                           "indicates it should be sent to a\n"\                           "shell instead of X-Chat")static voidmenu_usercommands (void){	editlist_gui_open (command_list, _("X-Chat: User Defined Commands"),							 "commands", "commands.conf", usercommands_help);}static voidmenu_ulpopup (void){	editlist_gui_open (popup_list, _("X-Chat: Userlist Popup menu"), "popup",							 "popup.conf", ulpopup_help);}static voidmenu_rpopup (void){	editlist_gui_open (replace_list, _("X-Chat: Replace"), "replace",							 "replace.conf", 0);}static voidmenu_usermenu (void){	editlist_gui_open (usermenu_list, _("X-Chat: User menu"), "usermenu",							 "usermenu.conf", 0);}static voidmenu_urlhandlers (void){	editlist_gui_open (urlhandler_list, _("X-Chat: URL Handlers"), "urlhandlers",							 "urlhandlers.conf", url_help);}static voidmenu_evtpopup (void){	pevent_dialog_show ();}static voidmenu_keypopup (void){	key_dialog_show ();}static voidmenu_ulbuttons (void){	editlist_gui_open (button_list, _("X-Chat: Userlist buttons"), "buttons",							 "buttons.conf", ulbutton_help);}static voidmenu_dlgbuttons (void){	editlist_gui_open (dlgbutton_list, _("X-Chat: Dialog buttons"), "dlgbuttons",							 "dlgbuttons.conf", dlgbutton_help);}static voidmenu_ctcpguiopen (void){	editlist_gui_open (ctcp_list, _("X-Chat: CTCP Replies"), "ctcpreply",							 "ctcpreply.conf", ctcp_help);}static voidmenu_reload (void){	char *buf = malloc (strlen (default_file ()) + 12);	load_config ();	sprintf (buf, "%s reloaded.", default_file ());	fe_message (buf, FALSE);	free (buf);}static voidmenu_autorejoin (GtkWidget *wid, gpointer none){	prefs.autorejoin = !prefs.autorejoin;}static voidmenu_autoreconnect (GtkWidget *wid, gpointer none){	prefs.autoreconnect = !prefs.autoreconnect;}static voidmenu_autoreconnectonfail (GtkWidget *wid, gpointer none){	prefs.autoreconnectonfail = !prefs.autoreconnectonfail;}static voidmenu_autodialog (GtkWidget *wid, gpointer none){	if (GTK_CHECK_MENU_ITEM (wid)->active)		prefs.autodialog = 1;	else		prefs.autodialog = 0;}static voidmenu_autodccchat (GtkWidget *wid, gpointer none){	prefs.autodccchat = !prefs.autodccchat;}static voidmenu_saveexit (GtkWidget *wid, gpointer none){	prefs.autosave = !prefs.autosave;}static voidmenu_docs (GtkWidget *wid, gpointer none){	goto_url ("http://xchat.org/docs.html");}static voidmenu_webpage (GtkWidget *wid, gpointer none){	goto_url ("http://xchat.org");}static voidmenu_dcc_recv_win (GtkWidget *wid, gpointer none){	fe_dcc_open_recv_win (FALSE);}static voidmenu_dcc_send_win (GtkWidget *wid, gpointer none){	fe_dcc_open_send_win (FALSE);}static voidmenu_dcc_chat_win (GtkWidget *wid, gpointer none){	fe_dcc_open_chat_win (FALSE);}#ifdef USE_GNOME#include "../pixmaps/win.xpm"static GnomeUIInfo xchatmenu[] = {	{	 GNOME_APP_UI_ITEM,	 N_("Server List.."), 0,	 menu_open_server_list, 0, 0,	 GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_BOOK_RED,	 0, 0, 0},	GNOMEUIINFO_SEPARATOR,	{	 GNOME_APP_UI_ITEM,	 N_("New Server Tab.."), 0,	 menu_newserver_tab, 0, 0,	 GNOME_APP_PIXMAP_DATA, win_xpm,	 0, 0, 0},	{	 GNOME_APP_UI_ITEM,	 N_("New Server Window.."), 0,	 menu_newserver_window, 0, 0,	 GNOME_APP_PIXMAP_DATA, win_xpm,	 0, 0, 0},	{	 GNOME_APP_UI_ITEM,	 N_("New Channel Tab.."), 0,	 menu_newchannel_tab, 0, 0,	 GNOME_APP_PIXMAP_DATA, win_xpm,	 0, 0, 0},	{	 GNOME_APP_UI_ITEM,	 N_("New Channel Window.."), 0,	 menu_newchannel_window, 0, 0,	 GNOME_APP_PIXMAP_DATA, win_xpm,	 0, 0, 0},	GNOMEUIINFO_SEPARATOR,#ifdef USE_ZVT	{	 GNOME_APP_UI_ITEM,	 N_("New Shell Tab.."), 0,	 menu_newshell_tab, 0, 0,	 GNOME_APP_PIXMAP_DATA, win_xpm,	 0, 0, 0},#else	{	 GNOME_APP_UI_ITEM,	 N_("New Shell Tab.."), 0,	 0, 0, 0,	 GNOME_APP_PIXMAP_DATA, win_xpm,	 0, 0, 0},#endif	GNOMEUIINFO_SEPARATOR,	{	 GNOME_APP_UI_ITEM,	 N_("Close"), 0,	 menu_close, 0, 0,	 GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CLOSE,	 0, 0, 0},	GNOMEUIINFO_SEPARATOR,	{	 GNOME_APP_UI_ITEM,	 N_("Quit"), 0,	 xchat_exit, 0, 0,	 GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_QUIT,	 'Q', GDK_MOD1_MASK, 0},	GNOMEUIINFO_END};static GnomeUIInfo windowsmenu[] = {	{	 GNOME_APP_UI_ITEM,	 N_("Channel List Window.."), 0,	 menu_chanlist, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("File Send Window.."), 0,	 menu_dcc_send_win, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("File Receive Window.."), 0,	 menu_dcc_recv_win, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("DCC Chat Window.."), 0,	 menu_dcc_chat_win, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("Raw Log Window.."), 0,	 menu_rawlog, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("URL Grabber Window.."), 0,	 url_opengui, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("Notify List Window.."), 0,	 (menucallback) notify_opengui, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	{	 GNOME_APP_UI_ITEM,	 N_("Ban List Window.."), 0,	 (menucallback) menu_banlist, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	},	{	 GNOME_APP_UI_ITEM,	 N_("Ignore Window.."), 0,	 ignore_gui_open, 0, 0, GNOME_APP_PIXMAP_DATA, win_xpm,	 },	GNOMEUIINFO_SEPARATOR,	{	 GNOME_APP_UI_ITEM,	 N_("Flush Buffer"), 0,	 menu_flushbuffer, 0, 0,	 GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_CLEAR,	 'L', GDK_CONTROL_MASK, 0},	{	 GNOME_APP_UI_ITEM,	 N_("Search Buffer.."), 0,	 menu_search, 0, 0,	 GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SEARCH,	 0, 0, 0},	{	 GNOME_APP_UI_ITEM,	 N_("Save Buffer.."), 0,	 menu_savebuffer, 0, 0, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE, 0,	 0, 0},	GNOMEUIINFO_END};static GnomeUIInfo usermodesmenu[] = {	{	 GNOME_APP_UI_TOGGLEITEM,	 N_("Invisible"), 0,	 menu_invisible, 0, 0, 0, 0, 0, 0, 0},	{	 GNOME_APP_UI_TOGGLEITEM,	 N_("Receive Wallops"), 0,	 menu_wallops, 0, 0, GNOME_APP_PIXMAP_NONE, 0, 0, 0, 0},	{	 GNOME_APP_UI_TOGGLEITEM,	 N_("Receive Server Notices"), 0,	 menu_servernotice, 0, 0, 0, 0, 0, 0, 0},	GNOMEUIINFO_SEPARATOR,	{	 GNOME_APP_UI_TOGGLEITEM,	 N_("Marked Away"), 0,	 menu_away, 0, 0, GNOME_APP_PIXMAP_NONE, 0, 'A', GDK_MOD1_MASK, 0},	GNOMEUIINFO_SEPARATOR,	{	 GNOME_APP_UI_TOGGLEITEM,	 N_("Auto Rejoin on Kick"), 0,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -