]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.291
- removed conflict with 6.2.259
[packages/vim.git] / 6.2.291
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.291 (extra)
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.291 (extra)
11 Problem:    Mac: the plus button and close button don't do anything.
12 Solution:   Make the plus button maximize the window and the close button
13             close Vim. (Eckehard Berns)
14 Files:      src/gui.c, src/gui_mac.c
15
16
17 *** ../vim-6.2.290/src/gui.c    Fri Feb 20 22:14:29 2004
18 --- src/gui.c   Tue Feb 24 20:42:34 2004
19 ***************
20 *** 572,578 ****
21   }
22   
23   #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
24 !       || defined(FEAT_GUI_PHOTON) || defined(PROTO)
25   /*
26    * Called when the GUI shell is closed by the user.  If there are no changed
27    * files Vim exits, otherwise there will be a dialog to ask the user what to
28 --- 572,578 ----
29   }
30   
31   #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11) || defined(FEAT_GUI_MSWIN) \
32 !       || defined(FEAT_GUI_PHOTON) || defined(FEAT_GUI_MAC) || defined(PROTO)
33   /*
34    * Called when the GUI shell is closed by the user.  If there are no changed
35    * files Vim exits, otherwise there will be a dialog to ask the user what to
36 *** ../vim-6.2.290/src/gui_mac.c        Wed Feb 25 12:54:47 2004
37 --- src/gui_mac.c       Wed Feb 25 13:04:47 2004
38 ***************
39 *** 1831,1837 ****
40       };
41   #endif
42   
43 ! };
44   
45   /*
46    * ------------------------------------------------------------
47 --- 1831,1885 ----
48       };
49   #endif
50   
51 ! }
52
53 ! /*
54 !  * Handle the click in the zoom box
55 !  */
56 ! #ifdef USE_CARBONIZED
57 !     static void
58 ! gui_mac_doInZoomClick(theEvent, whichWindow)
59 !     EventRecord       *theEvent;
60 !     WindowPtr whichWindow;
61 ! {
62 !     Rect      r;
63 !     Point     p;
64 !     short     thePart;
65
66 !     /* ideal width is current */
67 !     p.h = Columns * gui.char_width + 2 * gui.border_offset;
68 !     if (gui.which_scrollbars[SBAR_LEFT])
69 !       p.h += gui.scrollbar_width;
70 !     if (gui.which_scrollbars[SBAR_RIGHT])
71 !       p.h += gui.scrollbar_width;
72 !     /* ideal height is as heigh as we can get */
73 !     p.v = 15 * 1024;
74
75 !     thePart = IsWindowInStandardState(whichWindow, &p, &r)
76 !                                                      ? inZoomIn : inZoomOut;
77
78 !     if (!TrackBox(whichWindow, theEvent->where, thePart))
79 !       return;
80
81 !     /* use returned width */
82 !     p.h = r.right - r.left;
83 !     /* adjust returned height */
84 !     p.v = r.bottom - r.top - 2 * gui.border_offset;
85 !     if (gui.which_scrollbars[SBAR_BOTTOM])
86 !       p.v -= gui.scrollbar_height;
87 !     p.v -= p.v % gui.char_height;
88 !     p.v += 2 * gui.border_width;
89 !     if (gui.which_scrollbars[SBAR_BOTTOM]);
90 !       p.v += gui.scrollbar_height;
91
92 !     ZoomWindowIdeal(whichWindow, thePart, &p);
93
94 !     GetWindowBounds(whichWindow, kWindowContentRgn, &r);
95 !     gui_resize_shell(r.right - r.left, r.bottom - r.top);
96 !     gui_mch_set_bg_color(gui.back_pixel);
97 !     gui_set_shellsize(TRUE, FALSE);
98 ! }
99 ! #endif /* defined(USE_CARBONIZED) */
100   
101   /*
102    * ------------------------------------------------------------
103 ***************
104 *** 2184,2193 ****
105             gui_mac_doInGrowClick (theEvent->where, whichWindow);
106             break;
107   
108 !       case (inGoAway):  /* TODO */
109         case (inZoomIn):
110         case (inZoomOut):
111 !           /* For now the window doesn't have a GoAway and Zoom */
112             break;
113       }
114   }
115 --- 2232,2247 ----
116             gui_mac_doInGrowClick (theEvent->where, whichWindow);
117             break;
118   
119 !       case (inGoAway):
120 !           if (TrackGoAway(whichWindow, theEvent->where))
121 !               gui_shell_closed();
122 !           break;
123
124         case (inZoomIn):
125         case (inZoomOut):
126 ! #ifdef USE_CARBONIZED
127 !           gui_mac_doInZoomClick(theEvent, whichWindow);
128 ! #endif
129             break;
130       }
131   }
132 ***************
133 *** 2861,2868 ****
134       SetRect (&windRect, 300, 40, 300+80*7 + 16, 40+24*11);
135   #endif
136   
137 !     gui.VimWindow = NewCWindow(nil, &windRect, "\pgVim on Macintosh", true, documentProc,
138 !                       (WindowPtr) -1L, false, 0);
139       InstallReceiveHandler((DragReceiveHandlerUPP)receiveHandler,
140             gui.VimWindow, NULL);
141   #ifdef USE_CARBONIZED
142 --- 2915,2927 ----
143       SetRect (&windRect, 300, 40, 300+80*7 + 16, 40+24*11);
144   #endif
145   
146 !     gui.VimWindow = NewCWindow(nil, &windRect, "\pgVim on Macintosh", true,
147 ! #ifdef USE_CARBONIZED
148 !                       zoomDocProc,
149 ! #else
150 !                       documentProc,
151 ! #endif
152 !                       (WindowPtr)-1L, true, 0);
153       InstallReceiveHandler((DragReceiveHandlerUPP)receiveHandler,
154             gui.VimWindow, NULL);
155   #ifdef USE_CARBONIZED
156 *** ../vim-6.2.290/src/version.c        Wed Feb 25 12:54:47 2004
157 --- src/version.c       Wed Feb 25 13:11:49 2004
158 ***************
159 *** 639,640 ****
160 --- 639,642 ----
161   {   /* Add new patch number below this line */
162 + /**/
163 +     291,
164   /**/
165
166 -- 
167 Did you hear about the new 3 million dollar West Virginia State Lottery?
168 The winner gets 3 dollars a year for a million years.
169
170  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
171 ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
172 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
173  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 0.110347 seconds and 3 git commands to generate.