Changeset 7cc1092 for perl/lib/BarnOwl


Ignore:
Timestamp:
May 23, 2010, 12:48:40 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
9e88fa7
Parents:
89ab5c8 (diff), 5d1324f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merge branch 'style-undef'
Location:
perl/lib/BarnOwl
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • perl/lib/BarnOwl/Message/Generic.pm

    ree183be r5d1324f  
    66use base qw( BarnOwl::Message );
    77
     8sub body { "" }
     9
    810
    9111;
  • perl/lib/BarnOwl/Style/Default.pm

    r0fe69d2 r08544e0  
    3232    my $m = shift;
    3333    return $m->is_personal && $m->direction eq "in";
     34}
     35
     36sub maybe {
     37    my $x = shift;
     38    return defined($x) ? $x : "";
    3439}
    3540
     
    99104            $header .= ' / ' . $self->humanize($m->subcontext, 1);
    100105        }
    101         $header .= ' / @b{' . $m->pretty_sender . '}';
     106        $header .= ' / @b{' . maybe($m->pretty_sender) . '}';
    102107    }
    103108
  • perl/lib/BarnOwl/Hooks.pm

    rb30c256 r3aa0522  
    7979our %EXPORT_TAGS = (all => [@EXPORT_OK]);
    8080
     81use BarnOwl::MainLoopCompatHook;
     82
    8183our $startup = BarnOwl::Hook->new;
    8284our $shutdown = BarnOwl::Hook->new;
    8385our $receiveMessage = BarnOwl::Hook->new;
    8486our $newMessage = BarnOwl::Hook->new;
    85 our $mainLoop = BarnOwl::Hook->new;
     87our $mainLoop = BarnOwl::MainLoopCompatHook->new;
    8688our $getBuddyList = BarnOwl::Hook->new;
    8789our $getQuickstart = BarnOwl::Hook->new;
     
    162164    }
    163165   
     166    $mainLoop->check_owlconf();
    164167    $startup->run(0);
    165168    BarnOwl::startup() if *BarnOwl::startup{CODE};
     
    186189   
    187190    BarnOwl::new_msg($m) if *BarnOwl::new_msg{CODE};
    188 }
    189 
    190 sub _mainloop_hook {
    191     $mainLoop->run;
    192     BarnOwl::mainloop_hook() if *BarnOwl::mainloop_hook{CODE};
    193191}
    194192
  • perl/lib/BarnOwl/Timer.pm

    ree183be r8d16e58  
    2121}
    2222
     23sub stop {
     24    my $self = shift;
     25    if(defined($self->{timer})) {
     26        BarnOwl::Internal::remove_timer($self->{timer});
     27        undef $self->{timer};
     28    }
     29}
     30
    2331sub do_callback {
    2432    my $self = shift;
     
    2836sub DESTROY {
    2937    my $self = shift;
    30     if(defined($self->{timer})) {
    31         BarnOwl::Internal::remove_timer($self->{timer});
    32     }
     38    $self->stop;
    3339}
    3440
Note: See TracChangeset for help on using the changeset viewer.