[gnome-clocks] Switch to context mode on right click.



commit 98fc009bf313d975395f3eb4de3c78ddeb588c43
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Feb 24 16:06:23 2013 +0100

    Switch to context mode on right click.
    
    Right clicking on an item should automatically activate selection.
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=694263.

 src/widgets.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/widgets.vala b/src/widgets.vala
index 4724886..4aacd19 100644
--- a/src/widgets.vala
+++ b/src/widgets.vala
@@ -274,6 +274,11 @@ public class IconView : Gtk.IconView {
     public override bool button_press_event (Gdk.EventButton event) {
         var path = get_path_at_pos ((int) event.x, (int) event.y);
         if (path != null) {
+            // On right click, swicth to selection mode automatically
+            if (event.button == Gdk.BUTTON_SECONDARY) {
+                mode = Mode.SELECTION;
+            }
+
             if (mode == Mode.SELECTION) {
                 var store = (Gtk.ListStore) model;
                 Gtk.TreeIter i;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]