]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.0c01
authorBram Moolenaar <Bram@vim.org>
Mon, 27 Mar 2006 20:58:26 +0000 (20:58 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 27 Mar 2006 20:58:26 +0000 (20:58 +0000)
src/gui_mac.c
src/gui_photon.c
src/gui_w32.c
src/version.h

index d05fddb2a976acd47ef0e10b98836150833a7fed..0acc3dbce4ff70b70cb15408965cd2cff47c10ce 100644 (file)
@@ -1776,7 +1776,7 @@ gui_mac_doInGrowClick(Point where, WindowPtr whichWindow)
     newHeight = NewContentRect.bottom - NewContentRect.top;
     gui_resize_shell(newWidth, newHeight);
     gui_mch_set_bg_color(gui.back_pixel);
-    gui_set_shellsize(TRUE, FALSE);
+    gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
 }
 
 /*
@@ -1820,7 +1820,7 @@ gui_mac_doInZoomClick(EventRecord *theEvent, WindowPtr whichWindow)
     GetWindowBounds(whichWindow, kWindowContentRgn, &r);
     gui_resize_shell(r.right - r.left, r.bottom - r.top);
     gui_mch_set_bg_color(gui.back_pixel);
-    gui_set_shellsize(TRUE, FALSE);
+    gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
 }
 
 /*
@@ -3202,7 +3202,8 @@ gui_mch_set_shellsize(
     int                min_width,
     int                min_height,
     int                base_width,
-    int                base_height)
+    int                base_height,
+    int                direction)
 {
     CGrafPtr   VimPort;
     Rect       VimBound;
index fa7dc92fc1df548a00d79fe2ec4186d824026a71..f702c41bf74a640641fc13c558aa06d1464d75a9 100644 (file)
@@ -392,7 +392,7 @@ gui_ph_handle_window_cb( PtWidget_t *widget, void *data, PtCallbackInfo_t *info
            height -= (pg_margin_top + pg_margin_bottom);
 #endif
            gui_resize_shell( *width, *height );
-           gui_set_shellsize( FALSE, FALSE );
+           gui_set_shellsize( FALSE, FALSE, RESIZE_BOTH );
            is_ignore_draw = FALSE;
            PtEndFlux( gui.vimContainer );
            PtContainerRelease( gui.vimContainer );
@@ -825,7 +825,7 @@ gui_ph_handle_window_open(
        void *data,
        PtCallbackInfo_t *info )
 {
-    gui_set_shellsize( FALSE, TRUE );
+    gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
     return( Pt_CONTINUE );
 }
 
@@ -1660,7 +1660,8 @@ gui_mch_set_winpos(int x, int y)
 
     void
 gui_mch_set_shellsize(int width, int height,
-       int min_width, int min_height, int base_width, int base_height)
+       int min_width, int min_height, int base_width, int base_height,
+       int direction)
 {
     PhDim_t window_size = { width, height };
     PhDim_t min_size = { min_width, min_height };
index b25f50db9ba8e1b708edb92998b905da972a3a81..7a01d98732bb232f23fc69118cc179c700250c7c 100644 (file)
@@ -456,7 +456,7 @@ gui_mswin_get_menu_height(
     if (fix_window && menu_height != old_menu_height)
     {
        old_menu_height = menu_height;
-       gui_set_shellsize(FALSE, FALSE);
+       gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
     }
 
     return menu_height;
@@ -706,6 +706,29 @@ _WndProc(
        HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, _OnWindowPosChanged);
 #endif
 
+#ifdef FEAT_GUI_TABLINE
+       case WM_RBUTTONUP:
+       {
+           if (gui_mch_showing_tabline())
+           {
+               POINT pt;
+               RECT rect;
+
+               /*
+                * If the cursor is on the tabline, display the tab menu
+                */
+               GetCursorPos((LPPOINT)&pt);
+               GetWindowRect(s_textArea, &rect);
+               if (pt.y < rect.top)
+               {
+                   show_tabline_popup_menu();
+                   return 0;
+               }
+           }
+           return MyWindowProc(hwnd, uMsg, wParam, lParam);
+       }
+#endif
+
     case WM_QUERYENDSESSION:   /* System wants to go down. */
        gui_shell_closed();     /* Will exit when no changed buffers. */
        return FALSE;           /* Do NOT allow system to go down. */
@@ -797,6 +820,12 @@ _WndProc(
                                  && ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
                    send_tabline_event(TabCtrl_GetCurSel(s_tabhwnd) + 1);
                break;
+
+           case NM_RCLICK:
+               if (gui_mch_showing_tabline()
+                       && ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
+                   show_tabline_popup_menu();
+               break;
 # endif
            default:
 # ifdef FEAT_GUI_TABLINE
@@ -1375,7 +1404,8 @@ get_work_area(RECT *spi_rect)
 /*ARGSUSED*/
     void
 gui_mch_set_shellsize(int width, int height,
-       int min_width, int min_height, int base_width, int base_height)
+       int min_width, int min_height, int base_width, int base_height,
+       int direction)
 {
     RECT       workarea_rect;
     int                win_width, win_height;
@@ -1413,16 +1443,17 @@ gui_mch_set_shellsize(int width, int height,
                        ;
 
     /* if the window is going off the screen, move it on to the screen */
-    if (win_xpos + win_width > workarea_rect.right)
+    if ((direction & RESIZE_HOR) && win_xpos + win_width > workarea_rect.right)
        win_xpos = workarea_rect.right - win_width;
 
-    if (win_xpos < workarea_rect.left)
+    if ((direction & RESIZE_HOR) && win_xpos < workarea_rect.left)
        win_xpos = workarea_rect.left;
 
-    if (win_ypos + win_height > workarea_rect.bottom)
+    if ((direction & RESIZE_VERT)
+                             && win_ypos + win_height > workarea_rect.bottom)
        win_ypos = workarea_rect.bottom - win_height;
 
-    if (win_ypos < workarea_rect.top)
+    if ((direction & RESIZE_VERT) && win_ypos < workarea_rect.top)
        win_ypos = workarea_rect.top;
 
     /* When the taskbar is placed on the left or top of the screen,
index ce5ff07dea565c02e6c822fb0bd852754ae73866..3b06de99af3d79df1f7a1ae1a008a89a8f71ee98 100644 (file)
@@ -35,6 +35,6 @@
  */
 #define VIM_VERSION_NODOT      "vim70c"
 #define VIM_VERSION_SHORT      "7.0c"
-#define VIM_VERSION_MEDIUM     "7.0c BETA"
-#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0c BETA (2006 Mar 27)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0c BETA (2006 Mar 27, compiled "
+#define VIM_VERSION_MEDIUM     "7.0c01 BETA"
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0c01 BETA (2006 Mar 27)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0c01 BETA (2006 Mar 27, compiled "