4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
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.
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
25 button_string = vim_strsave(button_string); /* must be writable */
26 if (button_string == NULL)
29 + /* Check 'v' flag in 'guioptions': vertical button placement. */
30 + if (vim_strchr(p_go, GO_VERTICAL) != NULL)
32 + GtkWidget *vbutton_box;
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;
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
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.
51 ! for (index = n_buttons; index > 0; --index)
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...
62 ! for (index = 1; index <= n_buttons; ++index)
69 CONVERT_FROM_UTF8_FREE(text);
71 gtk_widget_destroy(dialog);
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. */
82 + gdk_window_get_pointer(gui.drawarea->window, &x, &y, NULL);
83 + gui_mch_setmouse(-100, -100);
84 + gui_mch_setmouse(x, y);
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
93 { /* Add new patch number below this line */
100 ...for the clothes that fit a little too snug because it
101 means I have more than enough to eat.
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 ///