aboutsummaryrefslogtreecommitdiffstats
path: root/packages/gtk+/gtk+-2.6.1/single-click.patch
blob: 21adb9b7b0fdcfe381ce4b07e810e7f41da3ce47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -urNd ../gtk+-2.4.4-r7/gtk+-2.4.4/gtk/gtkcalendar.c gtk+-2.4.4/gtk/gtkcalendar.c
--- ../gtk+-2.4.4-r7/gtk+-2.4.4/gtk/gtkcalendar.c	2004-07-10 05:02:10.000000000 +0100
+++ gtk+-2.4.4/gtk/gtkcalendar.c	2004-09-18 12:41:28.000000000 +0100
@@ -1026,9 +1026,8 @@
       private_data->drag_start_y = y;
 
       gtk_calendar_select_and_focus_day (calendar, day);
-    }
-  else if (event->type == GDK_2BUTTON_PRESS)
-    {
+
+	  // Double-click action follows
       private_data->in_drag = 0;
       if (day_month == MONTH_CURRENT)
 	g_signal_emit (calendar,
diff -urNd ../gtk+-2.4.4-r7/gtk+-2.4.4/gtk/gtktreeview.c gtk+-2.4.4/gtk/gtktreeview.c
--- ../gtk+-2.4.4-r7/gtk+-2.4.4/gtk/gtktreeview.c	2004-07-10 05:02:11.000000000 +0100
+++ gtk+-2.4.4/gtk/gtktreeview.c	2004-09-18 13:49:23.000000000 +0100
@@ -2180,7 +2180,8 @@
       tree_view->priv->focus_column = column;
 
       /* decide if we edit */
-      if (event->type == GDK_BUTTON_PRESS && event->button == 1 &&
+      /* Changed from button 1 to 2 so as not to conflict with the single-click activation */
+      if (event->type == GDK_BUTTON_PRESS && event->button == 2 &&
 	  !(event->state & gtk_accelerator_get_default_mod_mask ()))
 	{
 	  GtkTreePath *anchor;
@@ -2305,16 +2306,13 @@
       /* Test if a double click happened on the same row. */
       if (event->button == 1)
         {
-          /* We also handle triple clicks here, because a user could have done
-           * a first click and a second double click on different rows.
+          /* Replaced double/triple click with single-click for PDAs.
            */
-          if ((event->type == GDK_2BUTTON_PRESS
-               || event->type == GDK_3BUTTON_PRESS)
-              && tree_view->priv->last_button_press)
+          if (event->type == GDK_BUTTON_PRESS)
             {
               GtkTreePath *lsc;
 
-              lsc = gtk_tree_row_reference_get_path (tree_view->priv->last_button_press);
+              lsc = gtk_tree_row_reference_get_path (tree_view->priv->cursor);
 
               if (lsc)
                 {