Updating branch refs/heads/master
         to e21e9faf00e7df2d6193da8914b043dae1181390 (commit)
       from 35203c9b19d6a5333feddbaf8a8141bb06c40248 (commit)

commit e21e9faf00e7df2d6193da8914b043dae1181390
Author: Jannis Pohlmann <[email protected]>
Date:   Tue May 31 02:43:56 2011 +0200

    Unselect with click + control key.

 .../demo-code/custom-view/shortcut-row.vala        |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

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 dd20267..779648f 100644
--- a/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
+++ b/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
@@ -151,7 +151,13 @@ public class ShortcutRow : EventBox {
   }
 
   public override bool button_press_event (Gdk.EventButton event) {
-    set_state (StateType.SELECTED);
+    if (get_state () == StateType.SELECTED) {
+      if ((event.state & Gdk.ModifierType.CONTROL_MASK) != 0) {
+        set_state (StateType.NORMAL);
+      }
+    } else {
+      set_state (StateType.SELECTED);
+    }
     return true;
   }
 
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to