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 / old / 5.5.035 < prev    next >
Encoding:
Internet Message Format  |  1999-10-30  |  5.3 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.5.035
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.5.035
  8. Problem:    GTK with XIM: Resizing with status area was messy, and
  9.         ":set guioptions+=b" didn't work.
  10. Solution:   Make status area a separate widget, but not a separate window.
  11.         (Chi-Deok Hwang)
  12. Files:        src/gui_gtk_f.c, src/gui_gtk_x11.c, src/multbyte.c
  13.  
  14.  
  15. *** ../vim-5.5.34/src/gui_gtk_f.c    Wed Sep 22 10:06:23 1999
  16. --- src/gui_gtk_f.c    Mon Oct 25 11:38:29 1999
  17. ***************
  18. *** 399,410 ****
  19.   
  20.       requisition->width = form->width;
  21.       requisition->height = form->height;
  22. - #ifdef USE_XIM
  23. -     /*
  24. -      * FIXME: This isn't the proper place to do this!
  25. -      */
  26. -     requisition->height += xim_get_status_area_height();
  27. - #endif
  28.   
  29.       tmp_list = form->children;
  30.   
  31. --- 399,404 ----
  32. ***************
  33. *** 798,807 ****
  34.       event.y = widget->allocation.y;
  35.       event.width = widget->allocation.width;
  36.       event.height = widget->allocation.height;
  37. - #ifdef USE_XIM
  38. -     event.height -= xim_get_status_area_height();
  39. - #endif
  40.   
  41.       gtk_widget_event (widget, (GdkEvent*) &event);
  42.   }
  43. --- 792,797 ----
  44. *** ../vim-5.5.34/src/gui_gtk_x11.c    Wed Sep 22 10:06:24 1999
  45. --- src/gui_gtk_x11.c    Sun Oct 31 15:16:39 1999
  46. ***************
  47. *** 1614,1619 ****
  48. --- 1614,1630 ----
  49.       /* Adjust input management behaviour to the capabilities of the new
  50.        * fontset */
  51.       xim_decide_input_style();
  52. +     if (xim_get_status_area_height())
  53. +     {
  54. +     /* Status area is required.  Just create the empty label so that
  55. +      * mainwin will allocate the extra space for status area. */
  56. +     GtkWidget *label = gtk_label_new("       ");
  57. +     gtk_widget_set_usize(label, 20, gui.char_height + 2);
  58. +     gtk_box_pack_end(GTK_BOX(GTK_BIN(gui.mainwin)->child), label,
  59. +                                  FALSE, FALSE, 0);
  60. +     gtk_widget_show(label);
  61. +     }
  62.   #endif
  63.   
  64.       /* Preserve the logical dimensions of the screen. */
  65. *** ../vim-5.5.34/src/multbyte.c    Wed Sep 22 10:06:25 1999
  66. --- src/multbyte.c    Mon Oct 25 11:44:15 1999
  67. ***************
  68. *** 397,415 ****
  69.           return;
  70.   
  71.       attr = xic_attr;
  72. -     widget = gui.drawarea;
  73.       attrmask = 0;
  74.       style = gdk_ic_get_style(xic);
  75.       if ((style & GDK_IM_STATUS_MASK) == GDK_IM_STATUS_AREA)
  76.       {
  77.           if (gui.fontset && gui.fontset->type == GDK_FONT_FONTSET)
  78.           {
  79.           gdk_window_get_size(widget->window, &width, &height);
  80.   
  81.           attrmask |= GDK_IC_STATUS_AREA;
  82. !         attr->status_area.x = gui.border_offset;
  83. !         attr->status_area.y = height - gui.char_height - gui.border_offset;
  84. !         attr->status_area.width = width - 2 * gui.border_offset;
  85.           attr->status_area.height = gui.char_height;
  86.           }
  87.       }
  88. --- 397,415 ----
  89.           return;
  90.   
  91.       attr = xic_attr;
  92.       attrmask = 0;
  93.       style = gdk_ic_get_style(xic);
  94.       if ((style & GDK_IM_STATUS_MASK) == GDK_IM_STATUS_AREA)
  95.       {
  96.           if (gui.fontset && gui.fontset->type == GDK_FONT_FONTSET)
  97.           {
  98. +         widget = gui.mainwin;
  99.           gdk_window_get_size(widget->window, &width, &height);
  100.   
  101.           attrmask |= GDK_IC_STATUS_AREA;
  102. !         attr->status_area.x = 0;
  103. !         attr->status_area.y = height - gui.char_height - 1;
  104. !         attr->status_area.width = width;
  105.           attr->status_area.height = gui.char_height;
  106.           }
  107.       }
  108. ***************
  109. *** 815,821 ****
  110.   
  111.       if (!gdk_im_ready())
  112.       {
  113. !     EMSG("Your GTK+ does not support XIM");
  114.       return;
  115.       }
  116.       if ((xic_attr = gdk_ic_attr_new()) != NULL)
  117. --- 815,821 ----
  118.   
  119.       if (!gdk_im_ready())
  120.       {
  121. !     EMSG("Input Method Server is not running");
  122.       return;
  123.       }
  124.       if ((xic_attr = gdk_ic_attr_new()) != NULL)
  125. ***************
  126. *** 828,834 ****
  127.       GtkWidget *widget = gui.drawarea;
  128.   
  129.       attr->style = xim_input_style;
  130. !     attr->client_window = widget->window;
  131.   
  132.       if ((colormap = gtk_widget_get_colormap(widget)) !=
  133.           gtk_widget_get_default_colormap())
  134. --- 828,834 ----
  135.       GtkWidget *widget = gui.drawarea;
  136.   
  137.       attr->style = xim_input_style;
  138. !     attr->client_window = gui.mainwin->window;
  139.   
  140.       if ((colormap = gtk_widget_get_colormap(widget)) !=
  141.           gtk_widget_get_default_colormap())
  142. ***************
  143. *** 871,883 ****
  144.           }
  145.           else
  146.           {
  147.           attrmask |= GDK_IC_STATUS_AREA_REQ;
  148. !         attr->status_area.x = gui.border_offset;
  149. !         attr->status_area.y = height - gui.char_height - gui.border_offset;
  150. !         attr->status_area.width = width - 2*gui.border_offset;
  151.           attr->status_area.height = gui.char_height;
  152.           attr->status_fontset = gui.fontset;
  153. -         attr->preedit_area.height -= gui.char_height;
  154.           }
  155.       }
  156.   #endif
  157. --- 871,883 ----
  158.           }
  159.           else
  160.           {
  161. +         gdk_window_get_size(gui.mainwin->window, &width, &height);
  162.           attrmask |= GDK_IC_STATUS_AREA_REQ;
  163. !         attr->status_area.x = 0;
  164. !         attr->status_area.y = height - gui.char_height - 1;
  165. !         attr->status_area.width = width;
  166.           attr->status_area.height = gui.char_height;
  167.           attr->status_fontset = gui.fontset;
  168.           }
  169.       }
  170.   #endif
  171. *** ../vim-5.5.34/src/version.c    Sun Oct 31 15:12:59 1999
  172. --- src/version.c    Sun Oct 31 15:14:03 1999
  173. ***************
  174. *** 420,420 ****
  175. --- 420,421 ----
  176.   {   /* Add new patch number below this line */
  177. +     35,
  178.  
  179. --
  180. hundred-and-one symptoms of being an internet addict:
  181. 32. You don't know what sex three of your closest friends are, because they
  182.     have neutral nicknames and you never bothered to ask.
  183.  
  184. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  185.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  186.