Changeset 5d365f6


Ignore:
Timestamp:
Feb 21, 2004, 2:20:59 PM (17 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:
e22f27c
Parents:
5ca5f8e
Message:
The 'personalbell' variable can now be set to 'on' 'off' or the name
of a filter to match against
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r5ca5f8e r5d365f6  
    332.1.5-pre-1
    44        Added a licence
     5        The 'personalbell' variable can now be set to 'on' 'off' or
     6          the name of a filter to match against
    57       
    682.1.4
  • owl.c

    r5ca5f8e r5d365f6  
    522522
    523523      /* ring the bell if it's a personal */
    524       if (owl_global_is_personalbell(&g) &&
    525           !owl_message_is_loginout(m) &&
    526           !owl_message_is_mail(m) &&
    527           owl_message_is_private(m)) {
    528         owl_function_beep();
    529       }
     524      if (!strcmp(owl_global_get_personalbell(&g), "on")) {
     525          if (!owl_message_is_loginout(m) &&
     526              !owl_message_is_mail(m) &&
     527              owl_message_is_private(m)) {
     528            owl_function_beep();
     529          }
     530      } else if (!strcmp(owl_global_get_personalbell(&g), "off")) {
     531        /* do nothing */
     532      } else {
     533        f=owl_global_get_filter(&g, owl_global_get_personalbell(&g));
     534        if (f && owl_filter_message_match(f, m)) {
     535          owl_function_beep();
     536        }
     537      }
     538
    530539
    531540      /* if it matches the alert filter, do the alert action */
  • variable.c

    r4357be8 r5d365f6  
    5757static owl_variable variables_to_init[] = {
    5858
    59   OWLVAR_BOOL( "personalbell" /* %OwlVarStub */, 0,
    60                "ring the terminal bell when personal messages are received",
    61                "" ),
     59  OWLVAR_STRING( "personalbell" /* %OwlVarStub */, "off",
     60                 "ring the terminal bell when personal messages are received\n",
     61                 "Can be set to 'on', 'off', or the name of a filter which\n"
     62                 "messages need to match in order to ring the bell"),
    6263
    6364  OWLVAR_BOOL( "bell" /* %OwlVarStub */, 1,
Note: See TracChangeset for help on using the changeset viewer.