summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@luxion>2007-06-07 18:58:32 +0000
committerdakkar <dakkar@luxion>2007-06-07 18:58:32 +0000
commit57a587bdd93e17fa6c6268d016f2a7a22e85bec0 (patch)
tree93cdf3f6451addbf5f80154b1c98ed16377d5309
parentritocchi per l'articolo (diff)
downloadURLQueue-57a587bdd93e17fa6c6268d016f2a7a22e85bec0.tar.gz
URLQueue-57a587bdd93e17fa6c6268d016f2a7a22e85bec0.tar.bz2
URLQueue-57a587bdd93e17fa6c6268d016f2a7a22e85bec0.zip
icona cambia-colore, piĆ¹ carino (abbiamo perso ^V)
git-svn-id: svn://luxion/repos/URLQueue/trunk@252 fcb26f47-9200-0410-b104-b98ab5b095f3
-rw-r--r--lib/URLQueue/MainController.pm20
-rw-r--r--lib/URLQueue/main.glade73
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 @@
<glade-interface>
<widget class="GtkWindow" id="main">
+ <property name="width_request">50</property>
+ <property name="height_request">50</property>
<property name="visible">True</property>
<property name="title" translatable="yes">URLQueue</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
@@ -11,9 +13,10 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
+ <property name="icon_name">stock_bookmark</property>
<property name="decorated">False</property>
<property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
+ <property name="skip_pager_hint">True</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_UTILITY</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
@@ -21,63 +24,19 @@
<signal name="destroy" handler="quit" last_modification_time="Mon, 04 Jun 2007 17:51:09 GMT"/>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkImage" id="input">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="input">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">False</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">False</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- <signal name="drag_data_received" handler="drag_data_received" last_modification_time="Mon, 04 Jun 2007 17:51:18 GMT"/>
- <signal name="drag_motion" handler="drag_motion" last_modification_time="Mon, 04 Jun 2007 17:57:55 GMT"/>
- <signal name="drag_drop" handler="drag_drop" last_modification_time="Mon, 04 Jun 2007 17:58:09 GMT"/>
- <signal name="paste_clipboard" handler="paste_clipboard" last_modification_time="Mon, 04 Jun 2007 18:14:43 GMT"/>
- <signal name="button_release_event" handler="button_release" last_modification_time="Mon, 04 Jun 2007 18:16:41 GMT"/>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkStatusbar" id="status">
- <property name="visible">True</property>
- <property name="has_resize_grip">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <property name="icon_size">4</property>
+ <property name="icon_name">stock_book_green</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <signal name="drag_data_received" handler="drag_data_received" last_modification_time="Thu, 07 Jun 2007 18:43:05 GMT"/>
+ <signal name="drag_motion" handler="drag_motion" last_modification_time="Thu, 07 Jun 2007 18:43:30 GMT"/>
+ <signal name="drag_drop" handler="drag_drop" last_modification_time="Thu, 07 Jun 2007 18:43:41 GMT"/>
+ <signal name="drag_leave" handler="drag_leave" last_modification_time="Thu, 07 Jun 2007 18:44:15 GMT"/>
+ <signal name="button_release_event" handler="button_release" last_modification_time="Thu, 07 Jun 2007 18:44:51 GMT"/>
</widget>
</child>
</widget>