📄 interface.c
字号:
menubar1_uiinfo[3].widget, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_ref (help1_menu_uiinfo[0].widget); gtk_object_set_data_full (GTK_OBJECT (app1), "about1", help1_menu_uiinfo[0].widget, (GtkDestroyNotify) gtk_widget_unref); toolbar1 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH); gtk_widget_ref (toolbar1); gtk_object_set_data_full (GTK_OBJECT (app1), "toolbar1", toolbar1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (toolbar1); gnome_app_add_toolbar (GNOME_APP (app1), GTK_TOOLBAR (toolbar1), "toolbar1", GNOME_DOCK_ITEM_BEH_EXCLUSIVE, GNOME_DOCK_TOP, 1, 0, 0); gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1); gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar1), 16); gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_SPACE_LINE); gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar1), GTK_RELIEF_NONE); tmp_toolbar_icon = gnome_stock_pixmap_widget (app1, GNOME_STOCK_PIXMAP_SAVE); button_save = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Save"), _("Save Output"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (button_save); gtk_object_set_data_full (GTK_OBJECT (app1), "button_save", button_save, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_save); tmp_toolbar_icon = gnome_stock_pixmap_widget (app1, GNOME_STOCK_PIXMAP_SAVE_AS); button_saveas = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Save As"), _("Save Output As"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (button_saveas); gtk_object_set_data_full (GTK_OBJECT (app1), "button_saveas", button_saveas, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_saveas); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar1)); tmp_toolbar_icon = gnome_stock_pixmap_widget (app1, GNOME_STOCK_PIXMAP_COPY); button_copy = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Copy"), _("Copy Selected Text"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (button_copy); gtk_object_set_data_full (GTK_OBJECT (app1), "button_copy", button_copy, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_copy); tmp_toolbar_icon = gnome_stock_pixmap_widget (app1, GNOME_STOCK_PIXMAP_PASTE); button_paste = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Paste"), _("Paste Clipboard Text"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (button_paste); gtk_object_set_data_full (GTK_OBJECT (app1), "button_paste", button_paste, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_paste); gtk_toolbar_append_space (GTK_TOOLBAR (toolbar1)); tmp_toolbar_icon = gnome_stock_pixmap_widget (app1, GNOME_STOCK_PIXMAP_PRINT); button_print = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_CHILD_BUTTON, NULL, _("Print"), _("Print Output"), NULL, tmp_toolbar_icon, NULL, NULL); gtk_widget_ref (button_print); gtk_object_set_data_full (GTK_OBJECT (app1), "button_print", button_print, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_print); notebook1 = gtk_notebook_new (); gtk_widget_ref (notebook1); gtk_object_set_data_full (GTK_OBJECT (app1), "notebook1", notebook1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (notebook1); gnome_app_set_contents (GNOME_APP (app1), notebook1); gtk_container_set_border_width (GTK_CONTAINER (notebook1), 5); table9 = gtk_table_new (1, 2, FALSE); gtk_widget_ref (table9); gtk_object_set_data_full (GTK_OBJECT (app1), "table9", table9, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table9); gtk_container_add (GTK_CONTAINER (notebook1), table9); frame16 = gtk_frame_new (_("Operation")); gtk_widget_ref (frame16); gtk_object_set_data_full (GTK_OBJECT (app1), "frame16", frame16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame16); gtk_table_attach (GTK_TABLE (table9), frame16, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame16), 5); vbuttonbox3 = gtk_vbutton_box_new (); gtk_widget_ref (vbuttonbox3); gtk_object_set_data_full (GTK_OBJECT (app1), "vbuttonbox3", vbuttonbox3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbuttonbox3); gtk_container_add (GTK_CONTAINER (frame16), vbuttonbox3); gtk_button_box_set_layout (GTK_BUTTON_BOX (vbuttonbox3), GTK_BUTTONBOX_SPREAD); gtk_button_box_set_spacing (GTK_BUTTON_BOX (vbuttonbox3), 0); gtk_button_box_set_child_size (GTK_BUTTON_BOX (vbuttonbox3), 30, 27); gtk_button_box_set_child_ipadding (GTK_BUTTON_BOX (vbuttonbox3), 8, 0); button_ifconfig = gtk_button_new_with_label (_("Show Active\nConnections")); gtk_widget_ref (button_ifconfig); gtk_object_set_data_full (GTK_OBJECT (app1), "button_ifconfig", button_ifconfig, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_ifconfig); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_ifconfig); GTK_WIDGET_SET_FLAGS (button_ifconfig, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_ifconfig, _("netstat --inet"), NULL); button_netstat = gtk_button_new_with_label (_("Network\nStatus")); gtk_widget_ref (button_netstat); gtk_object_set_data_full (GTK_OBJECT (app1), "button_netstat", button_netstat, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_netstat); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_netstat); GTK_WIDGET_SET_FLAGS (button_netstat, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_netstat, _("netstat"), NULL); button_lpq = gtk_button_new_with_label (_("Printer\nQueue")); gtk_widget_ref (button_lpq); gtk_object_set_data_full (GTK_OBJECT (app1), "button_lpq", button_lpq, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_lpq); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_lpq); GTK_WIDGET_SET_FLAGS (button_lpq, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_lpq, _("lpq"), NULL); button_df = gtk_button_new_with_label (_("Show Free\nDisk Space")); gtk_widget_ref (button_df); gtk_object_set_data_full (GTK_OBJECT (app1), "button_df", button_df, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_df); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_df); GTK_WIDGET_SET_FLAGS (button_df, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_df, _("df"), NULL); button_env = gtk_button_new_with_label (_("Show Env\nVariables")); gtk_widget_ref (button_env); gtk_object_set_data_full (GTK_OBJECT (app1), "button_env", button_env, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_env); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_env); GTK_WIDGET_SET_FLAGS (button_env, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_env, _("env"), NULL); button_path = gtk_button_new_with_label (_("Show\nUser Path")); gtk_widget_ref (button_path); gtk_object_set_data_full (GTK_OBJECT (app1), "button_path", button_path, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_path); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_path); GTK_WIDGET_SET_FLAGS (button_path, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_path, _("$PATH"), NULL); button_alias = gtk_button_new_with_label (_("Show\nUser Stats")); gtk_widget_ref (button_alias); gtk_object_set_data_full (GTK_OBJECT (app1), "button_alias", button_alias, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (button_alias); gtk_container_add (GTK_CONTAINER (vbuttonbox3), button_alias); GTK_WIDGET_SET_FLAGS (button_alias, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, button_alias, _("w"), NULL); frame17 = gtk_frame_new (_("Result")); gtk_widget_ref (frame17); gtk_object_set_data_full (GTK_OBJECT (app1), "frame17", frame17, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame17); gtk_table_attach (GTK_TABLE (table9), frame17, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (frame17), 5); vbox13 = gtk_vbox_new (FALSE, 5); gtk_widget_ref (vbox13); gtk_object_set_data_full (GTK_OBJECT (app1), "vbox13", vbox13, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox13); gtk_container_add (GTK_CONTAINER (frame17), vbox13); gtk_container_set_border_width (GTK_CONTAINER (vbox13), 5); scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_ref (scrolledwindow6); gtk_object_set_data_full (GTK_OBJECT (app1), "scrolledwindow6", scrolledwindow6, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (scrolledwindow6); gtk_box_pack_start (GTK_BOX (vbox13), scrolledwindow6, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); text_wsutils = gtk_text_new (NULL, NULL); gtk_widget_ref (text_wsutils); gtk_object_set_data_full (GTK_OBJECT (app1), "text_wsutils", text_wsutils, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (text_wsutils); gtk_container_add (GTK_CONTAINER (scrolledwindow6), text_wsutils); hbox10 = gtk_hbox_new (FALSE, 5); gtk_widget_ref (hbox10); gtk_object_set_data_full (GTK_OBJECT (app1), "hbox10", hbox10, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox10); gtk_box_pack_start (GTK_BOX (vbox13), hbox10, FALSE, TRUE, 0); checkbutton16 = gtk_check_button_new_with_label (_("Clear Screen Each Time")); gtk_widget_ref (checkbutton16); gtk_object_set_data_full (GTK_OBJECT (app1), "checkbutton16", checkbutton16, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (checkbutton16); gtk_box_pack_start (GTK_BOX (hbox10), checkbutton16, TRUE, TRUE, 0); checkbutton17 = gtk_check_button_new_with_label (_("Use Fixed Font")); gtk_widget_ref (checkbutton17); gtk_object_set_data_full (GTK_OBJECT (app1), "checkbutton17", checkbutton17, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (checkbutton17); gtk_box_pack_start (GTK_BOX (hbox10), checkbutton17, TRUE, TRUE, 0); checkbutton18 = gtk_check_button_new_with_label (_("Insert Dividers Between Results")); gtk_widget_ref (checkbutton18); gtk_object_set_data_full (GTK_OBJECT (app1), "checkbutton18", checkbutton18, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (checkbutton18); gtk_box_pack_start (GTK_BOX (hbox10), checkbutton18, TRUE, TRUE, 0); label1 = gtk_label_new (_("Workstation Utils")); gtk_widget_ref (label1); gtk_object_set_data_full (GTK_OBJECT (app1), "label1", label1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label1); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label1); vbox4 = gtk_vbox_new (FALSE, 0); gtk_widget_ref (vbox4); gtk_object_set_data_full (GTK_OBJECT (app1), "vbox4", vbox4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (vbox4); gtk_container_add (GTK_CONTAINER (notebook1), vbox4); frame7 = gtk_frame_new (_("Network Operation / Host")); gtk_widget_ref (frame7); gtk_object_set_data_full (GTK_OBJECT (app1), "frame7", frame7, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame7); gtk_box_pack_start (GTK_BOX (vbox4), frame7, FALSE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame7), 5); hbox4 = gtk_hbox_new (FALSE, 5); gtk_widget_ref (hbox4); gtk_object_set_data_full (GTK_OBJECT (app1), "hbox4", hbox4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (hbox4); gtk_container_add (GTK_CONTAINER (frame7), hbox4); gtk_container_set_border_width (GTK_CONTAINER (hbox4), 5); combo3 = gtk_combo_new (); gtk_widget_ref (combo3); gtk_object_set_data_full (GTK_OBJECT (app1), "combo3", combo3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo3); gtk_box_pack_start (GTK_BOX (hbox4), combo3, FALSE, FALSE, 0); combo3_items = g_list_append (combo3_items, (gpointer) _("ping")); combo3_items = g_list_append (combo3_items, (gpointer) _("whois")); combo3_items = g_list_append (combo3_items, (gpointer) _("nslookup")); combo3_items = g_list_append (combo3_items, (gpointer) _("host")); combo3_items = g_list_append (combo3_items, (gpointer) _("dig")); combo3_items = g_list_append (combo3_items, (gpointer) _("traceroute")); combo3_items = g_list_append (combo3_items, (gpointer) _("finger"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -