[Xfce4-commits] <design:master> Disable the cancel icon; start working on DND.

Jannis Pohlmann noreply at xfce.org
Sat Jun 4 18:42:01 CEST 2011


Updating branch refs/heads/master
         to 3763909decd1065b9fe5211a3c92198526df72f2 (commit)
       from 29617ffd374b19089bf74bf6fdb735ceb185d45e (commit)

commit 3763909decd1065b9fe5211a3c92198526df72f2
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sat Jun 4 18:41:41 2011 +0200

    Disable the cancel icon; start working on DND.

 .../shortcuts-pane/demo-code/custom-view/Makefile  |    5 ++++-
 .../demo-code/custom-view/mockup.vala              |   14 +++++++++++++-
 .../demo-code/custom-view/shortcut-row.vala        |   18 +++++++++---------
 3 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/thunar/shortcuts-pane/demo-code/custom-view/Makefile b/thunar/shortcuts-pane/demo-code/custom-view/Makefile
index f5640cb..62aab09 100644
--- a/thunar/shortcuts-pane/demo-code/custom-view/Makefile
+++ b/thunar/shortcuts-pane/demo-code/custom-view/Makefile
@@ -1,7 +1,10 @@
 VALA_FLAGS  = 
 VALA_FLAGS += --pkg gtk+-2.0
 
-VALA_FILES  = mockup.vala shortcuts-view.vala shortcut-row.vala
+VALA_FILES  = mockup.vala \
+							shortcuts-view.vala \
+							shortcut-row.vala \
+							drag-source.vala
 
 default:
 	valac $(VALA_FLAGS) $(VALA_FILES) && ./mockup
diff --git a/thunar/shortcuts-pane/demo-code/custom-view/mockup.vala b/thunar/shortcuts-pane/demo-code/custom-view/mockup.vala
index 5a44325..77a7484 100644
--- a/thunar/shortcuts-pane/demo-code/custom-view/mockup.vala
+++ b/thunar/shortcuts-pane/demo-code/custom-view/mockup.vala
@@ -37,10 +37,14 @@ int main (string[] args) {
   window.add (frame);
   frame.show ();
 
+  var box = new VBox (false, 6);
+  frame.add (box);
+  box.show ();
+
   var scrollwin = new ScrolledWindow (null, null);
   scrollwin.set_shadow_type (ShadowType.ETCHED_IN);
   scrollwin.set_policy (PolicyType.AUTOMATIC, PolicyType.AUTOMATIC);
-  frame.add (scrollwin);
+  box.add (scrollwin);
   scrollwin.show ();
 
   var viewport = new Viewport (null, null);
@@ -51,6 +55,14 @@ int main (string[] args) {
   viewport.add (view);
   view.show ();
 
+  var local_file = new DragSource ("file:///home/jannis/foo.txt");
+  box.pack_start (local_file, false, true, 0);
+  local_file.show ();
+
+  var remote_uri = new DragSource ("sftp://xfce.org/home/jannis/bar.txt");
+  box.pack_start (remote_uri, false, true, 0);
+  remote_uri.show ();
+
   window.show ();
 
   Gtk.main ();
diff --git a/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala b/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
index ff988bd..0ef1b6f 100644
--- a/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
+++ b/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
@@ -73,11 +73,11 @@ public class ShortcutRow : EventBox {
     button.set_no_show_all (true);
     box.pack_start (button, false, true, 0);
 
-    button.enter.connect (() => {
-      if (spinner.active) {
-        button.set_image (cancel_icon);
-      }
-    });
+    //button.enter.connect (() => {
+    //  if (spinner.active) {
+    //    button.set_image (cancel_icon);
+    //  }
+    //});
 
     button.leave.connect (() => {
       if (spinner.active) {
@@ -125,11 +125,11 @@ public class ShortcutRow : EventBox {
     Gdk.ModifierType state;
     get_current_event_state (out state);
 
-    if ((state & Gdk.ModifierType.BUTTON1_MASK) != 0) {
-      button.set_image (cancel_icon);
-    } else {
+    //if ((state & Gdk.ModifierType.BUTTON1_MASK) != 0) {
+    //  button.set_image (cancel_icon);
+    //} else {
       button.set_image (spinner);
-    }
+    //}
 
     spinner.start ();
 



More information about the Xfce4-commits mailing list