summaryrefslogtreecommitdiff
path: root/lib/URLQueue/MainController.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/URLQueue/MainController.pm')
-rw-r--r--lib/URLQueue/MainController.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/URLQueue/MainController.pm b/lib/URLQueue/MainController.pm
index a40c922..d6fe05a 100644
--- a/lib/URLQueue/MainController.pm
+++ b/lib/URLQueue/MainController.pm
@@ -78,8 +78,6 @@ sub drag_data_received {
warn "What is $info??";
}
- $self->{input}->set_from_stock('gnome-stock-book-green','large-toolbar');
-
return 1;
}
@@ -99,6 +97,7 @@ sub button_release {
$self->{input}->set_from_stock('gnome-stock-book-yellow','large-toolbar');
my $clipboard=Gtk2::Clipboard->get(Gtk2::Gdk->SELECTION_PRIMARY);
$clipboard->request_text(sub{$self->handle_text($_[1])});
+
return 1;
}
@@ -132,14 +131,18 @@ sub handle_text {
}
}
- my ($title)=($text =~ m{ \A ^ (.*?) $}smx);
+ my ($title)=($text =~ m{ \A ^ (.+?) $}smx);
for ($title,$text) {
s{\A \s+}{}smx;
s{\s+ \z}{}smx;
}
+ $title = 'URLQueue paste' if $title eq '';
+
$self->send_email($title,$text);
+
+ $self->{input}->set_from_stock('gnome-stock-book-green','large-toolbar');
}
sub handle_uris {