]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.069
- updated to 7.1.285
[packages/vim.git] / 7.1.069
1 To: vim-dev@vim.org
2 Subject: patch 7.1.069
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.069
11 Problem:    GTK GUI: When using confirm() without a default button there still
12             is a default choice.
13 Solution:   Ignore Enter and Space when there is no default button. (Chris
14             Lubinski)
15 Files:      src/gui_gtk.c
16
17
18 *** ../vim-7.1.068/src/gui_gtk.c        Mon May 14 19:35:51 2007
19 --- src/gui_gtk.c       Sat Aug 11 17:38:03 2007
20 ***************
21 *** 1630,1640 ****
22    */
23   /*ARGSUSED*/
24       static int
25 ! dlg_key_press_event(GtkWidget * widget, GdkEventKey * event, CancelData *data)
26   {
27 !     /* Ignore hitting Enter when there is no default button. */
28 !     if (data->ignore_enter && event->keyval == GDK_Return)
29         return TRUE;
30   
31       if (event->keyval != GDK_Escape && event->keyval != GDK_Return)
32         return FALSE;
33 --- 1630,1643 ----
34    */
35   /*ARGSUSED*/
36       static int
37 ! dlg_key_press_event(GtkWidget *widget, GdkEventKey *event, CancelData *data)
38   {
39 !     /* Ignore hitting Enter (or Space) when there is no default button. */
40 !     if (data->ignore_enter && (event->keyval == GDK_Return
41 !                                                    || event->keyval == ' '))
42         return TRUE;
43 +     else    /* A different key was pressed, return to normal behavior */
44 +       data->ignore_enter = FALSE;
45   
46       if (event->keyval != GDK_Escape && event->keyval != GDK_Return)
47         return FALSE;
48 ***************
49 *** 2223,2228 ****
50 --- 2226,2238 ----
51   dialog_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
52   {
53       DialogInfo *di = (DialogInfo *)data;
54
55 +     /* Ignore hitting Enter (or Space) when there is no default button. */
56 +     if (di->ignore_enter && (event->keyval == GDK_Return
57 +                                                    || event->keyval == ' '))
58 +       return TRUE;
59 +     else    /* A different key was pressed, return to normal behavior */
60 +       di->ignore_enter = FALSE;
61   
62       /* Close the dialog when hitting "Esc". */
63       if (event->keyval == GDK_Escape)
64 *** ../vim-7.1.068/src/version.c        Sun Aug 12 16:55:01 2007
65 --- src/version.c       Tue Aug 14 14:58:36 2007
66 ***************
67 *** 668,669 ****
68 --- 668,671 ----
69   {   /* Add new patch number below this line */
70 + /**/
71 +     69,
72   /**/
73
74 -- 
75 hundred-and-one symptoms of being an internet addict:
76 148. You find it easier to dial-up the National Weather Service
77      Weather/your_town/now.html than to simply look out the window.
78
79  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
80 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81 \\\        download, build and distribute -- http://www.A-A-P.org        ///
82  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.034993 seconds and 3 git commands to generate.