]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.279
- new
[packages/vim.git] / 7.3.279
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.279
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.279
11 Problem:    With GTK, when gvim is full-screen and a tab is opened and using a
12             specific monitor configuration the window is too big.
13 Solution:   Adjust the window size like on MS-Windows. (Yukihiro Nakadaira)
14 Files:      src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro
15
16
17 *** ../vim-7.3.278/src/gui.c    2011-06-26 04:48:56.000000000 +0200
18 --- src/gui.c   2011-08-10 17:40:31.000000000 +0200
19 ***************
20 *** 1407,1413 ****
21       if (!gui.shell_created)
22         return;
23   
24 ! #ifdef MSWIN
25       /* If not setting to a user specified size and maximized, calculate the
26        * number of characters that fit in the maximized window. */
27       if (!mustset && gui_mch_maximized())
28 --- 1407,1413 ----
29       if (!gui.shell_created)
30         return;
31   
32 ! #if defined(MSWIN) || defined(FEAT_GUI_GTK)
33       /* If not setting to a user specified size and maximized, calculate the
34        * number of characters that fit in the maximized window. */
35       if (!mustset && gui_mch_maximized())
36 *** ../vim-7.3.278/src/gui_gtk_x11.c    2011-06-26 04:48:56.000000000 +0200
37 --- src/gui_gtk_x11.c   2011-08-10 17:42:19.000000000 +0200
38 ***************
39 *** 3900,3905 ****
40 --- 3900,3920 ----
41   }
42   
43   /*
44 +  * Called when the font changed while the window is maximized.  Compute the
45 +  * new Rows and Columns.  This is like resizing the window.
46 +  */
47 +     void
48 + gui_mch_newfont()
49 + {
50 +     int w, h;
51
52 +     gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
53 +     w -= get_menu_tool_width();
54 +     h -= get_menu_tool_height();
55 +     gui_resize_shell(w, h);
56 + }
57
58 + /*
59    * Set the windows size.
60    */
61       void
62 ***************
63 *** 4409,4422 ****
64   
65       if (gui_mch_maximized())
66       {
67 -       int w, h;
68
69         /* Update lines and columns in accordance with the new font, keep the
70          * window maximized. */
71 !       gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
72 !       w -= get_menu_tool_width();
73 !       h -= get_menu_tool_height();
74 !       gui_resize_shell(w, h);
75       }
76       else
77       {
78 --- 4424,4432 ----
79   
80       if (gui_mch_maximized())
81       {
82         /* Update lines and columns in accordance with the new font, keep the
83          * window maximized. */
84 !       gui_mch_newfont();
85       }
86       else
87       {
88 *** ../vim-7.3.278/src/proto/gui_gtk_x11.pro    2010-08-15 21:57:28.000000000 +0200
89 --- src/proto/gui_gtk_x11.pro   2011-08-10 17:42:29.000000000 +0200
90 ***************
91 *** 20,25 ****
92 --- 20,26 ----
93   void gui_mch_set_winpos __ARGS((int x, int y));
94   int gui_mch_maximized __ARGS((void));
95   void gui_mch_unmaximize __ARGS((void));
96 + void gui_mch_newfont __ARGS((void));
97   void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
98   void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
99   void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
100 *** ../vim-7.3.278/src/version.c        2011-08-10 17:25:48.000000000 +0200
101 --- src/version.c       2011-08-10 17:43:22.000000000 +0200
102 ***************
103 *** 711,712 ****
104 --- 711,714 ----
105   {   /* Add new patch number below this line */
106 + /**/
107 +     279,
108   /**/
109
110 -- 
111 LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
112 ARTHUR:    No, that's Saint Ives.
113                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
114
115  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
116 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
117 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
118  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.081293 seconds and 3 git commands to generate.