Three window level actions

Added three window level functions to MMAppController. These allow the
window to float on top, stay on bottom or revert back to normal status.

I have also added the commands to the Actions.plist. The commands were
added using the menu.vim file.
This commit is contained in:
Yousef El-Zebdeh
2017-01-05 02:40:56 +00:00
parent 6127f5c9eb
commit 263115a528
4 changed files with 36 additions and 0 deletions

View File

@@ -80,6 +80,9 @@ if has("gui_macvim")
an <silent> 9998.350 Window.Select\ Previous\ Tab :tabprevious<CR>
an 9998.360 Window.-SEP2- <Nop>
an <silent> 9998.370 Window.Bring\ All\ To\ Front <Nop>
an <silent> 9998.380 Window.Stay\ On\ Bottom <Nop>
an <silent> 9998.390 Window.Stay\ On\ Top <Nop>
an <silent> 9998.400 Window.Stay\ Level\ Normal <Nop>
endif
" Help menu
@@ -1255,6 +1258,9 @@ if has("gui_macvim")
macm Window.Select\ Next\ Tab key=<D-}>
macm Window.Select\ Previous\ Tab key=<D-{>
macm Window.Bring\ All\ To\ Front action=arrangeInFront:
macm Window.Stay\ On\ Bottom action=stayOnBottom:
macm Window.Stay\ On\ Top action=stayOnTop:
macm Window.Stay\ Level\ Normal action=stayLevelNormal:
macm Help.MacVim\ Help key=<D-?>
macm Help.MacVim\ Website action=openWebsite:

View File

@@ -72,5 +72,11 @@
<string></string>
<key>zoomAll:</key>
<string></string>
<key>stayOnBottom:</key>
<string></string>
<key>stayOnTop:</key>
<string></string>
<key>stayLevelNormal:</key>
<string></string>
</dict>
</plist>

View File

@@ -53,5 +53,8 @@
- (IBAction)openWebsite:(id)sender;
- (IBAction)showVimHelp:(id)sender;
- (IBAction)zoomAll:(id)sender;
- (IBAction)stayOnBottom:(id)sender;
- (IBAction)stayOnTop:(id)sender;
- (IBAction)stayLevelNormal:(id)sender;
@end

View File

@@ -1196,6 +1196,27 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
[NSApp makeWindowsPerform:@selector(performZoom:) inOrder:YES];
}
- (IBAction)stayOnBottom:(id)sender
{
ASLogDebug(@"Stay on bottom");
NSWindow *keyWindow = [NSApp keyWindow];
[keyWindow setLevel:kCGDesktopIconWindowLevel +1];
}
- (IBAction)stayOnTop:(id)sender
{
ASLogDebug(@"Stay on top");
NSWindow *keyWindow = [NSApp keyWindow];
[keyWindow setLevel:NSFloatingWindowLevel];
}
- (IBAction)stayLevelNormal:(id)sender
{
ASLogDebug(@"Stay level normal");
NSWindow *keyWindow = [NSApp keyWindow];
[keyWindow setLevel:NSNormalWindowLevel];
}
- (IBAction)coreTextButtonClicked:(id)sender
{
ASLogDebug(@"Toggle CoreText renderer");