Permalink
Browse files

Update Help menu

Add "MacVim Help" item with <D-?> key equivalent, as well as a
"MacVim Website" item which opens up the MacVim website in the user's
default browser.
  • Loading branch information...
1 parent 3292e01 commit 472eda54f611d7cd6b3e84137c0a1319c4804bb6 @b4winckler committed Mar 21, 2008
Showing with 19 additions and 1 deletion.
  1. +2 −0 src/MacVim/Actions.plist
  2. +1 −0 src/MacVim/MMAppController.h
  3. +8 −0 src/MacVim/MMAppController.m
  4. +8 −1 src/MacVim/gvimrc
@@ -24,6 +24,8 @@
<string></string>
<key>newWindow:</key>
<string></string>
+ <key>openWebsite:</key>
+ <string></string>
<key>orderFrontCharacterPalette:</key>
<string></string>
<key>orderFrontFontPanel:</key>
@@ -31,5 +31,6 @@
- (IBAction)fontSizeUp:(id)sender;
- (IBAction)fontSizeDown:(id)sender;
- (IBAction)orderFrontPreferencePanel:(id)sender;
+- (IBAction)openWebsite:(id)sender;
@end
@@ -41,6 +41,8 @@
static NSTimeInterval MMRequestTimeout = 5;
static NSTimeInterval MMReplyTimeout = 5;
+static NSString *MMWebsiteString = @"http://code.google.com/p/macvim/";
+
#pragma options align=mac68k
typedef struct
@@ -578,6 +580,12 @@ - (IBAction)orderFrontPreferencePanel:(id)sender
[[MMPreferenceController sharedPrefsWindowController] showWindow:self];
}
+- (IBAction)openWebsite:(id)sender
+{
+ [[NSWorkspace sharedWorkspace] openURL:
+ [NSURL URLWithString:MMWebsiteString]];
+}
+
- (byref id <MMFrontendProtocol>)
connectBackend:(byref in id <MMBackendProtocol>)backend
pid:(int)pid
View
@@ -1,7 +1,7 @@
" System gvimrc file for MacVim
"
" Maintainer: Bjorn Winckler <bjorn.winckler@gmail.com>
-" Last Change: Thu Mar 6 2008
+" Last Change: Fri Mar 21 2008
"
" This is a work in progress. If you feel so inclined, please help me improve
" this file.
@@ -87,6 +87,11 @@ an 9900.360 Window.-SEP2- <Nop>
an <silent> 9900.370 Window.Bring\ All\ To\ Front :maca arrangeInFront:<CR>
+" Help menu
+an 9999.1 Help.MacVim\ Help :h gui_mac<CR>
+an <silent> 9999.2 Help.MacVim\ Website :maca openWebsite:<CR>
+an 9999.3 Help.-sep0- <Nop>
+
"
" Toolbar
@@ -228,6 +233,8 @@ macmenukey Window.Toggle\ Full\ Screen\ Mode <D-F>
macmenukey Window.Previous\ Tab <D-{>
macmenukey Window.Next\ Tab <D-}>
+macmenukey Help.MacVim\ Help <D-?>
+
" Restore the previous value of 'cpoptions'.
let &cpo = s:cpo_save

0 comments on commit 472eda5

Please sign in to comment.