summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/URLQueue/MainController.pm14
1 files changed, 8 insertions, 6 deletions
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 {