diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-27 20:58:26 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-27 20:58:26 +0000 |
commit | afa24990b344e199abe1391fac7181defcd0c244 (patch) | |
tree | d516436e09300951fe2497008528a7042babed8d | |
parent | 2e2a2815e5c8274bf2e2d9b383707f1c2eee08bb (diff) | |
download | vim-afa24990b344e199abe1391fac7181defcd0c244.zip |
updated for version 7.0c01
-rw-r--r-- | src/gui_mac.c | 7 | ||||
-rw-r--r-- | src/gui_photon.c | 7 | ||||
-rw-r--r-- | src/gui_w32.c | 43 | ||||
-rw-r--r-- | src/version.h | 6 |
4 files changed, 48 insertions, 15 deletions
diff --git a/src/gui_mac.c b/src/gui_mac.c index d05fddb2a..0acc3dbce 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -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; diff --git a/src/gui_photon.c b/src/gui_photon.c index fa7dc92fc..f702c41bf 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -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 }; diff --git a/src/gui_w32.c b/src/gui_w32.c index b25f50db9..7a01d9873 100644 --- 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 @@ _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, diff --git a/src/version.h b/src/version.h index ce5ff07de..3b06de99a 100644 --- 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 " |