← Back to team overview

gtg team mailing list archive

[Merge] lp:~jonathan-barnoud/gtg/right_click into lp:gtg

 

Pititjo has proposed merging lp:~jonathan-barnoud/gtg/right_click into lp:gtg.

Requested reviews:
  Gtg developers (gtg)


The behaviour of right click in the task treeview is not consistent with the other gnome application.

If two task are selected and you right click on the third one, this third one is selected in addition of the two others and the action is applied to the three task.

This behaviour has been introduce after discussion in the bug #604293.

This branch change this behaviour. So with this patch, if two task are selected and you right click on a third one, the two first are unselected, the right clicked task is selected and the action is applied only to this one. It is the behaviour you can observe in nautilus, rhytmbox or some other applications in gnome.
-- 
https://code.launchpad.net/~jonathan-barnoud/gtg/right_click/+merge/32467
Your team Gtg developers is requested to review the proposed merge of lp:~jonathan-barnoud/gtg/right_click into lp:gtg.
=== modified file 'AUTHORS'
--- AUTHORS	2010-08-04 00:30:22 +0000
+++ AUTHORS	2010-08-12 16:42:45 +0000
@@ -69,3 +69,4 @@
 * Marko Kevac <marko@xxxxxxxxx>
 * Volodymyr Floreskul <exufer@xxxxxxxxx>
 * Jeff Oliver <kaiserfro@xxxxxxxxx>
+* Jonathan Barnoud <jonathan@xxxxxxxxxxx>

=== modified file 'CHANGELOG'
--- CHANGELOG	2010-08-04 00:30:22 +0000
+++ CHANGELOG	2010-08-12 16:42:45 +0000
@@ -4,6 +4,7 @@
     * Fixed bug with data consistency #579189, by Marko Kevac
     * Added samba bugzilla to the bugzilla plugin, by Jelmer Vernoij
     * Fixed bug #532392, a start date is later than a due date, by Volodymyr Floreskul
+    * Right click behaviour in the task treeview is now consistant with other GNOME applications, by Jonathan Barnoud
 
 2010-03-01 Getting Things GNOME! 0.2.2
     * Autostart on login, by Luca Invernizzi

=== modified file 'GTG/gtk/browser/browser.py'
--- GTG/gtk/browser/browser.py	2010-08-10 17:30:24 +0000
+++ GTG/gtk/browser/browser.py	2010-08-12 16:42:45 +0000
@@ -1041,10 +1041,11 @@
             if pthinfo is not None:
                 path, col, cellx, celly = pthinfo
                 selection = treeview.get_selection()
-                if selection.count_selected_rows() <= 0:
+                if selection.count_selected_rows() > 0 :
+                    if not selection.path_is_selected(path) :
+                        treeview.set_cursor(path, col, 0)
+                else :
                     treeview.set_cursor(path, col, 0)
-                else:
-                    selection.select_path(path)
                 treeview.grab_focus()
                 self.taskpopup.popup(None, None, None, event.button, time)
             return 1