App-TimeTracker-Gtk2TrayIcon

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

Changes
INSTALL
LICENSE
MANIFEST
META.json
META.yml
README
bin/tracker_gtk_trayicon.pl
dist.ini
lib/App/TimeTracker/Gtk2TrayIcon.pm
share/busy.png
share/lazy.png
t/00-load.t
t/it_lives.t

lib/App/TimeTracker/Gtk2TrayIcon.pm  view on Meta::CPAN

use App::TimeTracker::Data::Task;
use Gtk2::TrayIcon;
use FindBin qw($Bin);
use File::ShareDir qw(dist_file);

sub init {
    my ($class, $run) = @_;
    my $storage_location = App::TimeTracker::Proto->new->home;

    my $lazy =
        -e 'share/lazy.png'
        ? 'share/lazy.png'
        : dist_file( 'App-TimeTracker-Gtk2TrayIcon', 'lazy.png' );
    my $busy =
        -e 'share/busy.png'
        ? 'share/busy.png'
        : dist_file( 'App-TimeTracker-Gtk2TrayIcon', 'busy.png' );
    Gtk2->init;
    my $img      = Gtk2::Image->new_from_file($lazy);
    my $window   = Gtk2::TrayIcon->new(__PACKAGE__);
    my $eventbox = Gtk2::EventBox->new;
    $eventbox->add($img);

    my $current;
    my $t = AnyEvent->timer(
        after    => 0,
        interval => 5,



( run in 1.199 second using v1.01-cache-2.11-cpan-df04353d9ac )