aboutsummaryrefslogtreecommitdiff
path: root/src/prefs_filter_edit.h
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-06 10:21:29 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-12-06 10:21:29 +0000
commit86b47d52bda9ab8c81819cff34b9bf9ab4aeb213 (patch)
tree69a2aa3b42f518ea88a871b948eb00d9ac388b80 /src/prefs_filter_edit.h
parentdc71689abdd6aead311ee368a0fca00de8c4088e (diff)
made CondHBox / ActionHBox related APIs public.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@804 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/prefs_filter_edit.h')
-rw-r--r--src/prefs_filter_edit.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/src/prefs_filter_edit.h b/src/prefs_filter_edit.h
index c7e91d2d..3382aa8a 100644
--- a/src/prefs_filter_edit.h
+++ b/src/prefs_filter_edit.h
@@ -20,9 +20,122 @@
#ifndef __PREFS_FILTER_EDIT_H__
#define __PREFS_FILTER_EDIT_H__
+#include <gtk/gtkwidget.h>
+
#include "filter.h"
+typedef enum
+{
+ PF_COND_HEADER,
+ PF_COND_TO_OR_CC,
+ PF_COND_ANY_HEADER,
+ PF_COND_BODY,
+ PF_COND_CMD_TEST,
+ PF_COND_SIZE,
+ PF_COND_AGE,
+ PF_COND_ACCOUNT,
+ PF_COND_EDIT_HEADER,
+ PF_COND_SEPARATOR,
+ PF_COND_NONE
+} CondMenuType;
+
+typedef enum
+{
+ PF_MATCH_CONTAIN,
+ PF_MATCH_NOT_CONTAIN,
+ PF_MATCH_EQUAL,
+ PF_MATCH_NOT_EQUAL,
+ PF_MATCH_REGEX,
+ PF_MATCH_NOT_REGEX,
+ PF_MATCH_NONE
+} MatchMenuType;
+
+typedef enum
+{
+ PF_SIZE_LARGER,
+ PF_SIZE_SMALLER
+} SizeMatchType;
+
+typedef enum
+{
+ PF_AGE_LONGER,
+ PF_AGE_SHORTER
+} AgeMatchType;
+
+typedef enum
+{
+ PF_ACTION_MOVE,
+ PF_ACTION_COPY,
+ PF_ACTION_NOT_RECEIVE,
+ PF_ACTION_DELETE,
+ PF_ACTION_EXEC,
+ PF_ACTION_EXEC_ASYNC,
+ PF_ACTION_MARK,
+ PF_ACTION_COLOR_LABEL,
+ PF_ACTION_MARK_READ,
+ PF_ACTION_FORWARD,
+ PF_ACTION_FORWARD_AS_ATTACHMENT,
+ PF_ACTION_REDIRECT,
+ PF_ACTION_STOP_EVAL,
+ PF_ACTION_SEPARATOR,
+ PF_ACTION_NONE
+} ActionMenuType;
+
+typedef struct _CondHBox {
+ GtkWidget *hbox;
+
+ GtkWidget *cond_type_optmenu;
+ GtkWidget *match_type_optmenu;
+ GtkWidget *size_match_optmenu;
+ GtkWidget *age_match_optmenu;
+ GtkWidget *key_entry;
+ GtkWidget *spin_btn;
+ GtkWidget *label;
+
+ GtkWidget *del_btn;
+ GtkWidget *add_btn;
+
+ CondMenuType cur_type;
+ gchar *cur_header_name;
+} CondHBox;
+
+typedef struct _ActionHBox {
+ GtkWidget *hbox;
+
+ GtkWidget *action_type_optmenu;
+ GtkWidget *label;
+ GtkWidget *folder_entry;
+ GtkWidget *cmd_entry;
+ GtkWidget *address_entry;
+ GtkWidget *clabel_optmenu;
+
+ GtkWidget *folder_sel_btn;
+
+ GtkWidget *action_type_menu_items[PF_ACTION_NONE];
+
+ GtkWidget *del_btn;
+ GtkWidget *add_btn;
+} ActionHBox;
+
+
FilterRule *prefs_filter_edit_open (FilterRule *rule,
const gchar *header);
+CondHBox *prefs_filter_edit_cond_hbox_create (void);
+ActionHBox *prefs_filter_edit_action_hbox_create (void);
+
+void prefs_filter_edit_cond_hbox_set (CondHBox *hbox,
+ FilterCond *cond);
+void prefs_filter_edit_action_hbox_set (ActionHBox *hbox,
+ FilterAction *action);
+
+void prefs_filter_edit_cond_hbox_select (CondHBox *hbox,
+ CondMenuType type,
+ const gchar *header_name);
+
+void prefs_filter_edit_set_cond_hbox_widgets (CondHBox *hbox,
+ CondMenuType type);
+void prefs_filter_edit_set_action_hbox_widgets (ActionHBox *hbox,
+ ActionMenuType type);
+
#endif /* __PREFS_FILTER_EDIT_H__ */