Changes in / [73ba824:315babf]


Ignore:
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    re0473d2 rb8bf727  
    243243  f=owl_malloc(sizeof(owl_filter));
    244244  owl_filter_init_fromstring(f, "personal", "isprivate ^true$ and ( not type ^zephyr$"
    245                              " or ( class ^message and"
    246                              " ( instance ^personal$ or instance ^urgent$ ) ) )");
     245                             " or ( class ^message  ) )");
    247246  owl_list_append_element(owl_global_get_filterlist(&g), f);
    248247
  • perl/modules/IRC/lib/BarnOwl/Message/IRC.pm

    rf79d6a2 rdfaa47d  
    7070sub context {shift->{network};}
    7171sub subcontext {shift->{recipient};}
     72sub personal_context {"on " . shift->{network};}
    7273
    7374sub long_sender {shift->{from} || ""};
  • perl/modules/Jabber/lib/BarnOwl/Message/Jabber.pm

    r9375f8c rcdaf294  
    5050sub subcontext {
    5151    return shift->subject || "";
     52}
     53
     54sub personal_context {
     55    my $self = shift;
     56    if ($self->is_incoming) {
     57        return "to " . $self->to;
     58    } else {
     59        return "from " . $self->from;
     60    }
    5261}
    5362
  • perlwrap.pm

    r2b6de9d rdfaa47d  
    390390sub pretty_sender    { return shift->sender; }
    391391sub pretty_recipient { return shift->recipient; }
     392
     393# Override if you want a context (instance, network, etc.) on personals
     394sub personal_context { return ""; }
    392395
    393396sub delete {
     
    584587    my ($m) = @_;
    585588    return ((lc($m->class) eq "message")
    586             && (lc($m->instance) eq "personal")
    587589            && $m->is_private);
    588590}
     
    601603    my ($m) = @_;
    602604    return strip_realm($m->recipient);
     605}
     606
     607sub personal_context {
     608    my ($m) = @_;
     609    if (lc($m->instance) eq "personal") {
     610        return "";
     611    } else {
     612        return "-i " . $m->instance;
     613    }
    603614}
    604615
     
    10231034    my $header;
    10241035    if ( $m->is_personal ) {
     1036        my $personal_context = $m->personal_context;
     1037        $personal_context = ' [' . $personal_context . ']' if $personal_context;
     1038
    10251039        if ( $m->direction eq "out" ) {
    1026             $header = ucfirst $m->type . " sent to " . $m->pretty_recipient;
     1040            $header = ucfirst $m->type . $personal_context . " sent to " . $m->pretty_recipient;
    10271041        } else {
    1028             $header = ucfirst $m->type . " from " . $m->pretty_sender;
     1042            $header = ucfirst $m->type . $personal_context . " from " . $m->pretty_sender;
    10291043        }
    10301044    } else {
Note: See TracChangeset for help on using the changeset viewer.