home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.251 < prev    next >
Encoding:
Internet Message Format  |  2004-02-09  |  3.4 KB

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