• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revision66e40876590bca973973b6aae208a14cb428c266 (tree)
Zeit2007-06-19 23:29:43
Autorvimboss
Commitervimboss

Log Message

updated for version 7.1-007

Ändern Zusammenfassung

Diff

diff -r f12d38ee49de -r 66e40876590b src/gui.h
--- a/src/gui.h Tue Jun 19 13:36:52 2007 +0000
+++ b/src/gui.h Tue Jun 19 14:29:43 2007 +0000
@@ -460,7 +460,6 @@
460460 WindowPtr VimWindow;
461461 MenuHandle MacOSHelpMenu; /* Help menu provided by the MacOS */
462462 int MacOSHelpItems; /* Nr of help-items supplied by MacOS */
463- int MacOSHaveCntxMenu; /* Contextual menu available */
464463 WindowPtr wid; /* Window id of text area */
465464 int visibility; /* Is window partially/fully obscured? */
466465 #endif
diff -r f12d38ee49de -r 66e40876590b src/gui_mac.c
--- a/src/gui_mac.c Tue Jun 19 13:36:52 2007 +0000
+++ b/src/gui_mac.c Tue Jun 19 14:29:43 2007 +0000
@@ -1676,13 +1676,12 @@
16761676 /* TODO: NEEDED? */
16771677 clickIsPopup = FALSE;
16781678
1679- if ((gui.MacOSHaveCntxMenu) && (mouse_model_popup()))
1680- if (IsShowContextualMenuClick(theEvent))
1681- {
1682- vimMouseButton = MOUSE_RIGHT;
1683- vimModifiers &= ~MOUSE_CTRL;
1684- clickIsPopup = TRUE;
1685- }
1679+ if (mouse_model_popup() && IsShowContextualMenuClick(theEvent))
1680+ {
1681+ vimMouseButton = MOUSE_RIGHT;
1682+ vimModifiers &= ~MOUSE_CTRL;
1683+ clickIsPopup = TRUE;
1684+ }
16861685
16871686 /* Is it a double click ? */
16881687 dblClick = ((theEvent->when - lastMouseTick) < GetDblTime());
@@ -1920,24 +1919,19 @@
19201919 WindowPtr whichWindow;
19211920
19221921 whichWindow = (WindowPtr) event->message;
1923- if ((event->modifiers) & activeFlag)
1924- /* Activate */
1925- gui_focus_change(TRUE);
1926- else
1922+ /* Dim scrollbars */
1923+ if (whichWindow == gui.VimWindow)
19271924 {
1928- /* Deactivate */
1929- gui_focus_change(FALSE);
1930-/* DON'T KNOW what the code below was doing
1931- found in the deactivate clause, but the
1932- clause writing TRUE into in_focus (BUG)
1933- */
1934-
1935-#if 0 /* Removed by Dany as per above June 2001 */
1936- a_bool = false;
1937- SetPreserveGlyph(a_bool);
1938- SetOutlinePreferred(a_bool);
1939-#endif
1925+ ControlRef rootControl;
1926+ GetRootControl(gui.VimWindow, &rootControl);
1927+ if ((event->modifiers) & activeFlag)
1928+ ActivateControl(rootControl);
1929+ else
1930+ DeactivateControl(rootControl);
19401931 }
1932+
1933+ /* Activate */
1934+ gui_focus_change((event->modifiers) & activeFlag);
19411935 }
19421936
19431937
@@ -2559,16 +2553,15 @@
25592553 OSErr error;
25602554
25612555 /* Handle contextual menu right now (if needed) */
2562- if (gui.MacOSHaveCntxMenu)
2563- if (IsShowContextualMenuClick(event))
2564- {
2556+ if (IsShowContextualMenuClick(event))
2557+ {
25652558 # if 0
2566- gui_mac_handle_contextual_menu(event);
2559+ gui_mac_handle_contextual_menu(event);
25672560 # else
2568- gui_mac_doMouseDownEvent(event);
2561+ gui_mac_doMouseDownEvent(event);
25692562 # endif
2570- return;
2571- }
2563+ return;
2564+ }
25722565
25732566 /* Handle normal event */
25742567 switch (event->what)
@@ -2782,14 +2775,6 @@
27822775 (void) InstallAEHandlers();
27832776 #endif
27842777
2785- if (Gestalt(gestaltContextualMenuAttr, &gestalt_rc) == noErr)
2786- gui.MacOSHaveCntxMenu = BitTst(&gestalt_rc, 31-gestaltContextualMenuTrapAvailable);
2787- else
2788- gui.MacOSHaveCntxMenu = false;
2789-
2790- if (gui.MacOSHaveCntxMenu)
2791- gui.MacOSHaveCntxMenu = (InitContextualMenus()==noErr);
2792-
27932778 pomme = NewMenu(256, "\p\024"); /* 0x14= = Apple Menu */
27942779
27952780 AppendMenu(pomme, "\pAbout VIM");
@@ -2941,6 +2926,7 @@
29412926 #ifdef USE_CARBONKEYHANDLER
29422927 EventHandlerRef keyEventHandlerRef;
29432928 #endif
2929+ ControlRef rootControl;
29442930
29452931 if (Gestalt(gestaltSystemVersion, &gMacSystemVersion) != noErr)
29462932 gMacSystemVersion = 0x1000; /* TODO: Default to minimum sensible value */
@@ -2954,15 +2940,6 @@
29542940 (void) InstallAEHandlers();
29552941 #endif
29562942
2957- /* Ctrl click */
2958- if (Gestalt(gestaltContextualMenuAttr, &gestalt_rc) == noErr)
2959- gui.MacOSHaveCntxMenu = BitTst(&gestalt_rc, 31-gestaltContextualMenuTrapAvailable);
2960- else
2961- gui.MacOSHaveCntxMenu = false;
2962-
2963- if (gui.MacOSHaveCntxMenu)
2964- gui.MacOSHaveCntxMenu = (InitContextualMenus()==noErr);
2965-
29662943 pomme = NewMenu(256, "\p\024"); /* 0x14= = Apple Menu */
29672944
29682945 AppendMenu(pomme, "\pAbout VIM");
@@ -2981,6 +2958,7 @@
29812958 gui.VimWindow = NewCWindow(nil, &windRect, "\pgVim on Macintosh", true,
29822959 zoomDocProc,
29832960 (WindowPtr)-1L, true, 0);
2961+ CreateRootControl(gui.VimWindow, &rootControl);
29842962 InstallReceiveHandler((DragReceiveHandlerUPP)receiveHandler,
29852963 gui.VimWindow, NULL);
29862964 SetPortWindowPort(gui.VimWindow);
diff -r f12d38ee49de -r 66e40876590b src/version.c
--- a/src/version.c Tue Jun 19 13:36:52 2007 +0000
+++ b/src/version.c Tue Jun 19 14:29:43 2007 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 7,
671+/**/
670672 6,
671673 /**/
672674 5,
Show on old repository browser