Changeset 65fc0900


Ignore:
Timestamp:
Sep 17, 2002, 7:17:36 PM (19 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1583c90
Parents:
3a2daac
Message:
You can now use %me% in filters
The built-in personal filter is updated to do so
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r3a2daac r65fc0900  
    99        Added a debugging message indicating the result of topmsg
    1010          calculations
     11        You can now use %me% in filters
     12        The built-in personal filter is updated to do so
    1113       
    12141.2.3
  • filter.c

    r4b464a4 r65fc0900  
    1717  int i, error;
    1818  owl_filterelement *fe;
     19  char *regexstr;
    1920   
    2021  f->name=owl_strdup(name);
     
    2324  f->cachedmsgid=-1;
    2425  owl_list_create(&(f->fes));
    25 
     26 
    2627  /* first take arguments that have to come first */
    2728  /* set the color */
     
    3132    argv+=2;
    3233  }
    33 
     34 
    3435  /* then deal with the expression */
    3536  for (i=0; i<argc; i++) {
    3637    error=0;
    3738    fe=owl_malloc(sizeof(owl_filterelement));
    38 
     39   
    3940    /* all the 0 argument possibilities */
    4041    if (!strcmp(argv[i], "(")) {
     
    4849    } else if (!strcasecmp(argv[i], "not")) {
    4950      owl_filterelement_create_not(fe);
    50 
     51     
    5152    } else if (i==argc-1) {
    5253      error=1;
     
    6162          !strcasecmp(argv[i], "type") ||
    6263          !strcasecmp(argv[i], "direction")) {
    63         owl_filterelement_create_re(fe, argv[i], argv[i+1]);
     64        regexstr=owl_util_substitute(argv[i+1], "%me%", ZGetSender());
     65        owl_filterelement_create_re(fe, argv[i], regexstr);
     66        owl_free(regexstr);
    6467        i++;
    6568      } else {
  • help.c

    raa2f33b3 r65fc0900  
    5555     "    M-n           View zephyrs to selected conversation\n"
    5656     "    M-N           View zephyrs to selected converstaion by instance\n"
     57     "    V             Change to back to home view ('all' by default)\n"
    5758     "    v             Start a view command\n"
    5859     "\n"
  • owl.c

    r5145235 r65fc0900  
    136136  /* setup the default filters */
    137137  f=malloc(sizeof(owl_filter));
    138   owl_filter_init_fromstring(f, "personal", "( class ^message$ and instance ^personal$ ) or ( type ^admin$ and recipient .+ )"); /* fix to use admintype */
     138  owl_filter_init_fromstring(f, "personal", "class ^message$ and instance ^personal$ and ( recipient ^%me%$ or sender ^%me%$ )"); /* fix to use admintype */
    139139  owl_list_append_element(owl_global_get_filterlist(&g), f);
    140140
Note: See TracChangeset for help on using the changeset viewer.