📄 filter-windows.c
字号:
/* TradeClient <http://tradeclient.sourceforge.net> * $Id: filter-windows.c,v 1.8 2001/03/20 22:19:33 ttabner Exp $ * * Copyright (C) 1999-2000 Bynari Inc. * Copyright (C) 2001 Project TradeClient * * LGPL * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Library General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library * General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */#include "puma.h"GtkWidget *create_rule_editor () { GtkWidget *rule_editor; GtkWidget *dialog_vbox1; GtkWidget *frame1; GtkWidget *table1; GtkWidget *label1; GtkWidget *combo1; GList *combo1_items = NULL; GtkWidget *search_target; GtkWidget *combo2; GList *combo2_items = NULL; GtkWidget *search_type; GtkWidget *label2; GtkWidget *combo3; GList *combo3_items = NULL; GtkWidget *action; GtkWidget *combo4; GList *combo4_items = NULL; GtkWidget *folder; GtkWidget *scrolledwindow1; GtkWidget *human_readable; GtkWidget *drawingarea1; GtkWidget *drawingarea2; GtkWidget *drawingarea3; GtkWidget *entry; GtkWidget *dialog_action_area1; GtkWidget *ok_button; GtkWidget *cancel_button; rule_editor = gtk_dialog_new (); gtk_widget_set_name (rule_editor, "rule_editor"); gtk_object_set_data (GTK_OBJECT (rule_editor), "rule_editor", rule_editor); gtk_window_set_title (GTK_WINDOW (rule_editor), _("Filter Rule Editor")); gtk_window_set_policy (GTK_WINDOW (rule_editor), TRUE, TRUE, FALSE); dialog_vbox1 = GTK_DIALOG (rule_editor)->vbox; gtk_widget_set_name (dialog_vbox1, "dialog_vbox1"); gtk_object_set_data (GTK_OBJECT (rule_editor), "dialog_vbox1", dialog_vbox1); gtk_widget_show (dialog_vbox1); frame1 = gtk_frame_new (NULL); gtk_widget_set_name (frame1, "frame1"); gtk_widget_ref (frame1); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "frame1", frame1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (dialog_vbox1), frame1, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame1), 2); table1 = gtk_table_new (4, 3, FALSE); gtk_widget_set_name (table1, "table1"); gtk_widget_ref (table1); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "table1", table1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (table1); gtk_container_add (GTK_CONTAINER (frame1), table1); gtk_container_set_border_width (GTK_CONTAINER (table1), 2); label1 = gtk_label_new (_(" If: ")); gtk_widget_set_name (label1, "label1"); gtk_widget_ref (label1); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "label1", label1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label1); gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); combo1 = gtk_combo_new (); gtk_widget_set_name (combo1, "combo1"); gtk_widget_ref (combo1); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "combo1", combo1, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo1); gtk_table_attach (GTK_TABLE (table1), combo1, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); combo1_items = g_list_append (combo1_items, _("Subject")); combo1_items = g_list_append (combo1_items, _("From")); combo1_items = g_list_append (combo1_items, _("Reply-To")); combo1_items = g_list_append (combo1_items, _("To")); combo1_items = g_list_append (combo1_items, _("Cc")); combo1_items = g_list_append (combo1_items, _("Bcc")); combo1_items = g_list_append (combo1_items, _("Message")); combo1_items = g_list_append (combo1_items, _("Keywords")); gtk_combo_set_popdown_strings (GTK_COMBO (combo1), combo1_items); g_list_free (combo1_items); search_target = GTK_COMBO (combo1)->entry; gtk_widget_set_name (search_target, "search_target"); gtk_widget_ref (search_target); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "search_target", search_target, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (search_target); gtk_entry_set_text (GTK_ENTRY (search_target), _("Subject")); combo2 = gtk_combo_new (); gtk_widget_set_name (combo2, "combo2"); gtk_widget_ref (combo2); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "combo2", combo2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo2); gtk_table_attach (GTK_TABLE (table1), combo2, 2, 3, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); combo2_items = g_list_append (combo2_items, _("Contains")); combo2_items = g_list_append (combo2_items, _("Does Not Contain")); combo2_items = g_list_append (combo2_items, _("Matches Exactly")); gtk_combo_set_popdown_strings (GTK_COMBO (combo2), combo2_items); g_list_free (combo2_items); search_type = GTK_COMBO (combo2)->entry; gtk_widget_set_name (search_type, "search_type"); gtk_widget_ref (search_type); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "search_type", search_type, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (search_type); gtk_entry_set_text (GTK_ENTRY (search_type), _("Contains")); label2 = gtk_label_new (_("Then")); gtk_widget_set_name (label2, "label2"); gtk_widget_ref (label2); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "label2", label2, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (label2); gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 2, 3, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); combo3 = gtk_combo_new (); gtk_widget_set_name (combo3, "combo3"); gtk_widget_ref (combo3); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "combo3", combo3, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo3); gtk_table_attach (GTK_TABLE (table1), combo3, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); combo3_items = g_list_append (combo3_items, _("Move Message to Folder")); combo3_items = g_list_append (combo3_items, _("Delete Message")); gtk_combo_set_popdown_strings (GTK_COMBO (combo3), combo3_items); g_list_free (combo3_items); action = GTK_COMBO (combo3)->entry; gtk_widget_set_name (action, "action"); gtk_widget_ref (action); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "action", action, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (action); gtk_entry_set_text (GTK_ENTRY (action), _("Move Message to Folder")); combo4 = gtk_combo_new (); gtk_widget_set_name (combo4, "combo4"); gtk_widget_ref (combo4); gtk_object_set_data_full (GTK_OBJECT (rule_editor), "combo4", combo4, (GtkDestroyNotify) gtk_widget_unref); gtk_widget_show (combo4); gtk_table_attach (GTK_TABLE (table1), combo4, 2, 3, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); combo4_items = g_list_append (combo4_items, _("Folder1")); combo4_items = g_list_append (combo4_items, _("Folder2")); combo4_items = g_list_append (combo4_items, _("Folder3"));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -