Changeset 04b16f8
- Timestamp:
- May 22, 2010, 10:37:26 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 98d7757
- Parents:
- 5aa33fd
- git-author:
- Nelson Elhage <nelhage@mit.edu> (05/21/10 16:46:40)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/22/10 22:37:26)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
global.c
r0881cdd r04b16f8 1043 1043 g->interrupted = 0; 1044 1044 } 1045 1046 void owl_global_setup_default_filters(owl_global *g) 1047 { 1048 int i; 1049 static const struct { 1050 const char *name; 1051 const char *desc; 1052 } filters[] = { 1053 { "personal", 1054 "private ^true$ and ( not type ^zephyr$ or " 1055 "( class ^message and ( instance ^personal$ or instance ^urgent$ ) ) )" }, 1056 { "trash", 1057 "class ^mail$ or opcode ^ping$ or type ^admin$ or ( not login ^none$ )" }, 1058 { "wordwrap", "not ( type ^admin$ or type ^zephyr$ )" }, 1059 { "ping", "opcode ^ping$" }, 1060 { "auto", "opcode ^auto$" }, 1061 { "login", "not login ^none$" }, 1062 { "reply-lockout", "class ^noc or class ^mail$" }, 1063 { "out", "direction ^out$" }, 1064 { "aim", "type ^aim$" }, 1065 { "zephyr", "type ^zephyr$" }, 1066 { "none", "false" }, 1067 { "all", "true" }, 1068 { NULL, NULL } 1069 }; 1070 1071 owl_function_debugmsg("startup: creating default filters"); 1072 1073 for (i = 0; filters[i].name != NULL; i++) 1074 owl_global_add_filter(g, owl_filter_new_fromstring(filters[i].name, 1075 filters[i].desc)); 1076 } -
owl.c
r3687413 r04b16f8 149 149 } 150 150 151 static void owl_setup_default_filters(void)152 {153 int i;154 static const struct {155 const char *name;156 const char *desc;157 } filters[] = {158 { "personal",159 "isprivate ^true$ and ( not type ^zephyr$ or ( class ^message ) )" },160 { "trash",161 "class ^mail$ or opcode ^ping$ or type ^admin$ or ( not login ^none$ )" },162 { "wordwrap", "not ( type ^admin$ or type ^zephyr$ )" },163 { "ping", "opcode ^ping$" },164 { "auto", "opcode ^auto$" },165 { "login", "not login ^none$" },166 { "reply-lockout", "class ^noc or class ^mail$" },167 { "out", "direction ^out$" },168 { "aim", "type ^aim$" },169 { "zephyr", "type ^zephyr$" },170 { "none", "false" },171 { "all", "true" },172 { NULL, NULL }173 };174 175 owl_function_debugmsg("startup: creating default filters");176 177 for (i = 0; filters[i].name != NULL; i++)178 owl_global_add_filter(&g, owl_filter_new_fromstring(filters[i].name,179 filters[i].desc));180 }181 151 182 152 /* … … 563 533 owl_global_complete_setup(&g); 564 534 565 owl_ setup_default_filters();535 owl_global_setup_default_filters(&g); 566 536 567 537 /* set the current view */ -
tester.c
r5aa33fd r04b16f8 43 43 } 44 44 owl_global_complete_setup(&g); 45 owl_global_setup_default_filters(&g); 46 47 owl_view_create(owl_global_get_current_view(&g), "main", 48 owl_global_get_filter(&g, "all"), 49 owl_global_get_style_by_name(&g, "default")); 45 50 46 51 if (argc > 1) {
Note: See TracChangeset
for help on using the changeset viewer.