mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.1-007
This commit is contained in:
@@ -460,7 +460,6 @@ typedef struct Gui
|
|||||||
WindowPtr VimWindow;
|
WindowPtr VimWindow;
|
||||||
MenuHandle MacOSHelpMenu; /* Help menu provided by the MacOS */
|
MenuHandle MacOSHelpMenu; /* Help menu provided by the MacOS */
|
||||||
int MacOSHelpItems; /* Nr of help-items supplied by MacOS */
|
int MacOSHelpItems; /* Nr of help-items supplied by MacOS */
|
||||||
int MacOSHaveCntxMenu; /* Contextual menu available */
|
|
||||||
WindowPtr wid; /* Window id of text area */
|
WindowPtr wid; /* Window id of text area */
|
||||||
int visibility; /* Is window partially/fully obscured? */
|
int visibility; /* Is window partially/fully obscured? */
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1676,8 +1676,7 @@ gui_mac_doInContentClick(EventRecord *theEvent, WindowPtr whichWindow)
|
|||||||
/* TODO: NEEDED? */
|
/* TODO: NEEDED? */
|
||||||
clickIsPopup = FALSE;
|
clickIsPopup = FALSE;
|
||||||
|
|
||||||
if ((gui.MacOSHaveCntxMenu) && (mouse_model_popup()))
|
if (mouse_model_popup() && IsShowContextualMenuClick(theEvent))
|
||||||
if (IsShowContextualMenuClick(theEvent))
|
|
||||||
{
|
{
|
||||||
vimMouseButton = MOUSE_RIGHT;
|
vimMouseButton = MOUSE_RIGHT;
|
||||||
vimModifiers &= ~MOUSE_CTRL;
|
vimModifiers &= ~MOUSE_CTRL;
|
||||||
@@ -1920,24 +1919,19 @@ gui_mac_doActivateEvent(EventRecord *event)
|
|||||||
WindowPtr whichWindow;
|
WindowPtr whichWindow;
|
||||||
|
|
||||||
whichWindow = (WindowPtr) event->message;
|
whichWindow = (WindowPtr) event->message;
|
||||||
if ((event->modifiers) & activeFlag)
|
/* Dim scrollbars */
|
||||||
/* Activate */
|
if (whichWindow == gui.VimWindow)
|
||||||
gui_focus_change(TRUE);
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/* Deactivate */
|
ControlRef rootControl;
|
||||||
gui_focus_change(FALSE);
|
GetRootControl(gui.VimWindow, &rootControl);
|
||||||
/* DON'T KNOW what the code below was doing
|
if ((event->modifiers) & activeFlag)
|
||||||
found in the deactivate clause, but the
|
ActivateControl(rootControl);
|
||||||
clause writing TRUE into in_focus (BUG)
|
else
|
||||||
*/
|
DeactivateControl(rootControl);
|
||||||
|
|
||||||
#if 0 /* Removed by Dany as per above June 2001 */
|
|
||||||
a_bool = false;
|
|
||||||
SetPreserveGlyph(a_bool);
|
|
||||||
SetOutlinePreferred(a_bool);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Activate */
|
||||||
|
gui_focus_change((event->modifiers) & activeFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2559,7 +2553,6 @@ gui_mac_handle_event(EventRecord *event)
|
|||||||
OSErr error;
|
OSErr error;
|
||||||
|
|
||||||
/* Handle contextual menu right now (if needed) */
|
/* Handle contextual menu right now (if needed) */
|
||||||
if (gui.MacOSHaveCntxMenu)
|
|
||||||
if (IsShowContextualMenuClick(event))
|
if (IsShowContextualMenuClick(event))
|
||||||
{
|
{
|
||||||
# if 0
|
# if 0
|
||||||
@@ -2782,14 +2775,6 @@ gui_mch_prepare(int *argc, char **argv)
|
|||||||
(void) InstallAEHandlers();
|
(void) InstallAEHandlers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (Gestalt(gestaltContextualMenuAttr, &gestalt_rc) == noErr)
|
|
||||||
gui.MacOSHaveCntxMenu = BitTst(&gestalt_rc, 31-gestaltContextualMenuTrapAvailable);
|
|
||||||
else
|
|
||||||
gui.MacOSHaveCntxMenu = false;
|
|
||||||
|
|
||||||
if (gui.MacOSHaveCntxMenu)
|
|
||||||
gui.MacOSHaveCntxMenu = (InitContextualMenus()==noErr);
|
|
||||||
|
|
||||||
pomme = NewMenu(256, "\p\024"); /* 0x14= = Apple Menu */
|
pomme = NewMenu(256, "\p\024"); /* 0x14= = Apple Menu */
|
||||||
|
|
||||||
AppendMenu(pomme, "\pAbout VIM");
|
AppendMenu(pomme, "\pAbout VIM");
|
||||||
@@ -2941,6 +2926,7 @@ gui_mch_init(void)
|
|||||||
#ifdef USE_CARBONKEYHANDLER
|
#ifdef USE_CARBONKEYHANDLER
|
||||||
EventHandlerRef keyEventHandlerRef;
|
EventHandlerRef keyEventHandlerRef;
|
||||||
#endif
|
#endif
|
||||||
|
ControlRef rootControl;
|
||||||
|
|
||||||
if (Gestalt(gestaltSystemVersion, &gMacSystemVersion) != noErr)
|
if (Gestalt(gestaltSystemVersion, &gMacSystemVersion) != noErr)
|
||||||
gMacSystemVersion = 0x1000; /* TODO: Default to minimum sensible value */
|
gMacSystemVersion = 0x1000; /* TODO: Default to minimum sensible value */
|
||||||
@@ -2954,15 +2940,6 @@ gui_mch_init(void)
|
|||||||
(void) InstallAEHandlers();
|
(void) InstallAEHandlers();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Ctrl click */
|
|
||||||
if (Gestalt(gestaltContextualMenuAttr, &gestalt_rc) == noErr)
|
|
||||||
gui.MacOSHaveCntxMenu = BitTst(&gestalt_rc, 31-gestaltContextualMenuTrapAvailable);
|
|
||||||
else
|
|
||||||
gui.MacOSHaveCntxMenu = false;
|
|
||||||
|
|
||||||
if (gui.MacOSHaveCntxMenu)
|
|
||||||
gui.MacOSHaveCntxMenu = (InitContextualMenus()==noErr);
|
|
||||||
|
|
||||||
pomme = NewMenu(256, "\p\024"); /* 0x14= = Apple Menu */
|
pomme = NewMenu(256, "\p\024"); /* 0x14= = Apple Menu */
|
||||||
|
|
||||||
AppendMenu(pomme, "\pAbout VIM");
|
AppendMenu(pomme, "\pAbout VIM");
|
||||||
@@ -2981,6 +2958,7 @@ gui_mch_init(void)
|
|||||||
gui.VimWindow = NewCWindow(nil, &windRect, "\pgVim on Macintosh", true,
|
gui.VimWindow = NewCWindow(nil, &windRect, "\pgVim on Macintosh", true,
|
||||||
zoomDocProc,
|
zoomDocProc,
|
||||||
(WindowPtr)-1L, true, 0);
|
(WindowPtr)-1L, true, 0);
|
||||||
|
CreateRootControl(gui.VimWindow, &rootControl);
|
||||||
InstallReceiveHandler((DragReceiveHandlerUPP)receiveHandler,
|
InstallReceiveHandler((DragReceiveHandlerUPP)receiveHandler,
|
||||||
gui.VimWindow, NULL);
|
gui.VimWindow, NULL);
|
||||||
SetPortWindowPort(gui.VimWindow);
|
SetPortWindowPort(gui.VimWindow);
|
||||||
|
@@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
7,
|
||||||
/**/
|
/**/
|
||||||
6,
|
6,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user