From 57a587bdd93e17fa6c6268d016f2a7a22e85bec0 Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 7 Jun 2007 18:58:32 +0000 Subject: icona cambia-colore, più carino (abbiamo perso ^V) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://luxion/repos/URLQueue/trunk@252 fcb26f47-9200-0410-b104-b98ab5b095f3 --- lib/URLQueue/MainController.pm | 20 ++++++++++++ lib/URLQueue/main.glade | 73 +++++++++--------------------------------- 2 files changed, 36 insertions(+), 57 deletions(-) diff --git a/lib/URLQueue/MainController.pm b/lib/URLQueue/MainController.pm index 1e4dd04..2705b59 100644 --- a/lib/URLQueue/MainController.pm +++ b/lib/URLQueue/MainController.pm @@ -32,6 +32,22 @@ sub drag_motion { $context->status($context->suggested_action,$time); + if (!$self->{_dragging}) { + $self->{input}->set('icon-name'=>'stock_book_open'); + $self->{_dragging}=1; + } + + return 1; +} + +sub drag_leave { + my ($self, $widget, $context, $time) = @_; + + if ($self->{_dragging}) { + $self->{input}->set('icon-name'=>'stock_book_green'); + $self->{_dragging}=0; + } + return 1; } @@ -39,6 +55,7 @@ sub drag_drop { my ($self, $widget, $context, $x, $y, $time) = @_; if (my $atom=$context->targets) { + $self->{input}->set('icon-name'=>'stock_book_yellow'); $widget->drag_get_data($context, $atom, $time); return 1; } @@ -59,6 +76,8 @@ sub drag_data_received { warn "What is $info??"; } + $self->{input}->set('icon-name'=>'stock_book_green'); + return 1; } @@ -75,6 +94,7 @@ sub button_release { my ($self,$widget,$event)=@_; if ($event->button==2) { + $self->{input}->set('icon-name'=>'stock_book_yellow'); my $clipboard=Gtk2::Clipboard->get(Gtk2::Gdk->SELECTION_PRIMARY); $clipboard->request_text(sub{$self->handle_text($_[1])}); return 1; diff --git a/lib/URLQueue/main.glade b/lib/URLQueue/main.glade index 616d274..bde7b30 100644 --- a/lib/URLQueue/main.glade +++ b/lib/URLQueue/main.glade @@ -4,6 +4,8 @@ + 50 + 50 True URLQueue GTK_WINDOW_TOPLEVEL @@ -11,9 +13,10 @@ False True False + stock_bookmark False False - False + True GDK_WINDOW_TYPE_HINT_UTILITY GDK_GRAVITY_NORTH_WEST True @@ -21,63 +24,19 @@ - + True - False - 0 - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - False - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - - - - - - 0 - True - True - - - - - - True - False - - - 0 - False - False - - + 4 + stock_book_green + 0.5 + 0.5 + 0 + 0 + + + + + -- cgit v1.2.3