diff options
-rw-r--r-- | Makefile.PL | 9 | ||||
-rw-r--r-- | lib/URLQueue/MainController.pm | 14 | ||||
-rw-r--r-- | script/URLQueue.pl | 4 | ||||
-rw-r--r-- | share/stock_book_blue.png | bin | 0 -> 1220 bytes | |||
-rw-r--r-- | share/stock_book_green.png | bin | 0 -> 1228 bytes | |||
-rw-r--r-- | share/stock_book_open.png | bin | 0 -> 1304 bytes | |||
-rw-r--r-- | share/stock_book_red.png | bin | 0 -> 1239 bytes | |||
-rw-r--r-- | share/stock_book_yellow.png | bin | 0 -> 1223 bytes |
8 files changed, 17 insertions, 10 deletions
diff --git a/Makefile.PL b/Makefile.PL index d1a1a73..b090229 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,17 +1,24 @@ use ExtUtils::MakeMaker; +use File::ShareDir::Install; + +install_share 'share'; WriteMakefile( NAME => 'URLQueue', VERSION => '1.0', AUTHOR => 'dakkar <dakkar@thenautilus.net>', PREREQ_PM => { - 'Gnome2' => 0, + 'Gtk2' => 0, 'Gtk2::GladeXML::Simple' => 0, 'Path::Class' => 0, 'URI::Find' => 0, 'URI::Title' => 0, 'Email::Send' => 0, 'MIME::EncWords' => 1, + 'File::ShareDir' => 0, }, EXE_FILES => [ 'script/URLQueue.pl' ], ); + +package MY; +use File::ShareDir::Install qw(postamble); diff --git a/lib/URLQueue/MainController.pm b/lib/URLQueue/MainController.pm index 0a793f0..9d4cd5b 100644 --- a/lib/URLQueue/MainController.pm +++ b/lib/URLQueue/MainController.pm @@ -8,6 +8,7 @@ use URI::Title; use Email::Send; use Encode; use MIME::EncWords; +use File::ShareDir 'dist_file'; use POSIX 'strftime'; sub new { @@ -23,6 +24,7 @@ sub new { [qw(default copy move link private ask)], ); $self->{input}->drag_dest_set_target_list($target_list); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_green.png')); $self->{glade_dir}=$params{glade_dir}; @@ -35,7 +37,7 @@ sub drag_motion { $context->status($context->suggested_action,$time); if (!$self->{_dragging}) { - $self->{input}->set_from_stock('gnome-stock-book-open','large-toolbar'); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_open.png')); $self->{_dragging}=1; } @@ -46,7 +48,7 @@ sub drag_leave { my ($self, $widget, $context, $time) = @_; if ($self->{_dragging}) { - $self->{input}->set_from_stock('gnome-stock-book-green','large-toolbar'); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_green.png')); $self->{_dragging}=0; } @@ -57,7 +59,7 @@ sub drag_drop { my ($self, $widget, $context, $x, $y, $time) = @_; if (my $atom=$context->targets) { - $self->{input}->set_from_stock('gnome-stock-book-yellow','large-toolbar'); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_yellow.png')); $self->{_dragging}=0; $widget->drag_get_data($context, $atom, $time); return 1; @@ -95,7 +97,7 @@ sub button_release { my ($self,$widget,$event)=@_; if ($event->button==2) { - $self->{input}->set_from_stock('gnome-stock-book-yellow','large-toolbar'); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_yellow.png')); my $clipboard=Gtk2::Clipboard->get(Gtk2::Gdk->SELECTION_PRIMARY); $clipboard->request_text(sub{$self->handle_text($_[1])}); @@ -143,7 +145,7 @@ sub handle_text { $self->send_email($title,$text); - $self->{input}->set_from_stock('gnome-stock-book-green','large-toolbar'); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_green.png')); } sub handle_uris { @@ -165,7 +167,7 @@ sub handle_uris { } $self->send_email($title,$body); - $self->{input}->set_from_stock('gnome-stock-book-green','large-toolbar'); + $self->{input}->set_from_file(dist_file('URLQueue','stock_book_green.png')); } sub send_email { diff --git a/script/URLQueue.pl b/script/URLQueue.pl index 516167d..835c6ec 100644 --- a/script/URLQueue.pl +++ b/script/URLQueue.pl @@ -1,11 +1,9 @@ #!/usr/bin/perl use strict; use warnings; -use Gnome2; +use Gtk2 -init; use URLQueue::MainController; -Gnome2::Program->init('URLQueue','1.0'); - my $main_controller=URLQueue::MainController->new(); $main_controller->run; diff --git a/share/stock_book_blue.png b/share/stock_book_blue.png Binary files differnew file mode 100644 index 0000000..3eb2b85 --- /dev/null +++ b/share/stock_book_blue.png diff --git a/share/stock_book_green.png b/share/stock_book_green.png Binary files differnew file mode 100644 index 0000000..31ecf14 --- /dev/null +++ b/share/stock_book_green.png diff --git a/share/stock_book_open.png b/share/stock_book_open.png Binary files differnew file mode 100644 index 0000000..802f771 --- /dev/null +++ b/share/stock_book_open.png diff --git a/share/stock_book_red.png b/share/stock_book_red.png Binary files differnew file mode 100644 index 0000000..b288678 --- /dev/null +++ b/share/stock_book_red.png diff --git a/share/stock_book_yellow.png b/share/stock_book_yellow.png Binary files differnew file mode 100644 index 0000000..8969ab7 --- /dev/null +++ b/share/stock_book_yellow.png |