[cheese/three-point-oh] Right clicking outside a selection in thumbview now selects the newly clicked item.



commit a5ca550e72078cfad7b2662bf299b46d33efc79f
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Mon Jul 12 20:57:54 2010 +0530

    Right clicking outside a selection in thumbview now selects the newly clicked item.

 src/cheese-window.vala |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 599f97f..5c2be46 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -92,15 +92,22 @@ public class Cheese.MainWindow : Gtk.Window
     if (path == null)
       return false;
 
+    if (!thumb_view.path_is_selected (path))
+    {
+      thumb_view.unselect_all ();
+      thumb_view.select_path (path);
+      thumb_view.set_cursor (path, null, false);
+    }
+
     if (event.type == Gdk.EventType.BUTTON_PRESS)
     {
       if (event.button == 3)
       {
-        popup_menu.popup (null, iconview, null, event.button, event.time);
+        popup_menu.popup (null, thumb_view, null, event.button, event.time);
       }
     }
     else
-    if (event.type == Gdk.EventType .2BUTTON _PRESS)
+    if (event.type == Gdk.EventType.2BUTTON_PRESS)
     {
       on_file_open (null);
     }



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