[gnome-commander] Fix for right mouse button selection not being precise



commit b9fac56c0325695a96c47df4ca787749df215561
Author: phan <phanyx o2 pl>
Date:   Thu Aug 12 20:38:13 2010 +0200

    Fix for right mouse button selection not being precise
    
    Selecting files/dirs via right mouse button held down was not precise - rows were being selected a little too soon, when selecting upwards and little too late, when selecting downwards. Removing lots of dark magic in on_motion_notify() resolves this problem.

 NEWS                       |    1 +
 doc/C/gnome-commander.xml  |    3 +++
 src/gnome-cmd-file-list.cc |   10 ++--------
 3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/NEWS b/NEWS
index c4b5518..8012d50 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ gnome-commander 1.4
 Bug fixes:
  * Fixed problem #617140 (GNOME Goal: Use accessor functions instead direct access)
  * Fixed Ubuntu problem #117226 (bookmarks unification)
+ * Fixed problem with right mouse button selection not being precise
 
 New features:
  * Support for tabs
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 4b45084..c0e53d7 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -7365,6 +7365,9 @@
                         <listitem>
                             <para>Fixed Ubuntu problem #117226 (bookmarks unification)</para>
                         </listitem>
+                        <listitem>
+                            <para>Fixed problem with right mouse button selection not being precise</para>
+                        </listitem>
                     </itemizedlist>
                 </para>
                 <para>New features:</para>
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index f4b5fcf..96827ca 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -1226,17 +1226,11 @@ static void on_motion_notify (GtkCList *clist, GdkEventMotion *event, GnomeCmdFi
 
     if (event->state & GDK_BUTTON3_MASK)
     {
-        gint row;
-        gint y;
-
-        y = event->y;
-        y -= (clist->column_title_area.height - GTK_CONTAINER (clist)->border_width);
-
-        row = gnome_cmd_clist_get_row (*fl, event->x, y);
+        gint row = gnome_cmd_clist_get_row (*fl, event->x, event->y);
 
         if (row != -1)
         {
-            GnomeCmdFile *f = fl->get_file_at_row(++row);
+            GnomeCmdFile *f = fl->get_file_at_row(row);
             if (f)
             {
                 fl->select_row(row);



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