]>
Commit | Line | Data |
---|---|---|
05649561 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.251 | |
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 6.2.251 | |
11 | Problem: GTK: The 'v' flag in 'guioptions' doesn't work. (Steve Hall) | |
12 | Order of buttons is reversed for GTK 2.2.4. Don't always get | |
13 | focus back after handling a dialog. | |
14 | Solution: Make buttons appear vertically when desired. Reverse the order in | |
15 | which buttons are added to a dialog. Move mouse pointer around | |
16 | when the dialog is done and we don't have focus. | |
17 | Files: src/gui_gtk.c | |
18 | ||
19 | ||
20 | *** ../vim-6.2.250/src/gui_gtk.c Fri Feb 6 19:31:57 2004 | |
21 | --- src/gui_gtk.c Mon Feb 9 17:43:19 2004 | |
22 | *************** | |
23 | *** 2025,2030 **** | |
24 | --- 2025,2044 ---- | |
25 | button_string = vim_strsave(button_string); /* must be writable */ | |
26 | if (button_string == NULL) | |
27 | return; | |
28 | + | |
29 | + /* Check 'v' flag in 'guioptions': vertical button placement. */ | |
30 | + if (vim_strchr(p_go, GO_VERTICAL) != NULL) | |
31 | + { | |
32 | + GtkWidget *vbutton_box; | |
33 | + | |
34 | + vbutton_box = gtk_vbutton_box_new(); | |
35 | + gtk_widget_show(vbutton_box); | |
36 | + gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->vbox), | |
37 | + vbutton_box, TRUE, FALSE, 0); | |
38 | + /* Overrule the "action_area" value, hopefully this works... */ | |
39 | + GTK_DIALOG(dialog)->action_area = vbutton_box; | |
40 | + } | |
41 | + | |
42 | /* | |
43 | * Yes this is ugly, I don't particularly like it either. But doing it | |
44 | * this way has the compelling advantage that translations need not to | |
45 | *************** | |
46 | *** 2037,2044 **** | |
47 | /* | |
48 | * Yes, the buttons are in reversed order to match the GNOME 2 desktop | |
49 | * environment. Don't hit me -- it's all about consistency. | |
50 | */ | |
51 | ! for (index = n_buttons; index > 0; --index) | |
52 | { | |
53 | char *label; | |
54 | char_u *label8; | |
55 | --- 2051,2060 ---- | |
56 | /* | |
57 | * Yes, the buttons are in reversed order to match the GNOME 2 desktop | |
58 | * environment. Don't hit me -- it's all about consistency. | |
59 | + * Well, apparently somebody changed his mind: with GTK 2.2.4 it works the | |
60 | + * other way around... | |
61 | */ | |
62 | ! for (index = 1; index <= n_buttons; ++index) | |
63 | { | |
64 | char *label; | |
65 | char_u *label8; | |
66 | *************** | |
67 | *** 2165,2170 **** | |
68 | --- 2181,2199 ---- | |
69 | CONVERT_FROM_UTF8_FREE(text); | |
70 | } | |
71 | gtk_widget_destroy(dialog); | |
72 | + } | |
73 | + | |
74 | + /* Terrible hack: When the text area still has focus when we remove the | |
75 | + * dialog, somehow gvim loses window focus. This is with "point to type" | |
76 | + * in the KDE 3.1 window manager. Warp the mouse pointer to outside the | |
77 | + * window and back to avoid that. */ | |
78 | + if (!gui.in_focus) | |
79 | + { | |
80 | + int x, y; | |
81 | + | |
82 | + gdk_window_get_pointer(gui.drawarea->window, &x, &y, NULL); | |
83 | + gui_mch_setmouse(-100, -100); | |
84 | + gui_mch_setmouse(x, y); | |
85 | } | |
86 | ||
87 | return response > 0 ? response : 0; | |
88 | *** ../vim-6.2.250/src/version.c Tue Feb 10 19:38:20 2004 | |
89 | --- src/version.c Tue Feb 10 19:39:56 2004 | |
90 | *************** | |
91 | *** 639,640 **** | |
92 | --- 639,642 ---- | |
93 | { /* Add new patch number below this line */ | |
94 | + /**/ | |
95 | + 251, | |
96 | /**/ | |
97 | ||
98 | -- | |
99 | I AM THANKFUL... | |
100 | ...for the clothes that fit a little too snug because it | |
101 | means I have more than enough to eat. | |
102 | ||
103 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
104 | /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
105 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
106 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |