changeset 812:68c15f2c7d3f

updated for version 7.0c01
author vimboss
date Mon, 27 Mar 2006 20:58:26 +0000
parents d2c169a725c8
children bb5d1fa78352
files src/gui_mac.c src/gui_photon.c src/gui_w32.c src/version.h
diffstat 4 files changed, 48 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -1776,7 +1776,7 @@ gui_mac_doInGrowClick(Point where, Windo
     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 *theEv
     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;
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -392,7 +392,7 @@ gui_ph_handle_window_cb( PtWidget_t *wid
 	    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 };
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -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 @@ init_mouse_wheel(void)
 	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 @@ init_mouse_wheel(void)
 				  && ((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 hei
 			;
 
     /* 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,
--- a/src/version.h
+++ b/src/version.h
@@ -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 "