Add 'Reload' in application menu. Fixes atom/atom-shell#4.

This commit is contained in:
Cheng Zhao 2013-05-15 20:24:51 +08:00
parent 072ac8ba0b
commit 06142aa2e8
2 changed files with 30 additions and 2 deletions

View file

@ -1193,6 +1193,15 @@
<reference key="NSMixedImage" ref="909111550"/> <reference key="NSMixedImage" ref="909111550"/>
</object> </object>
<object class="NSMenuItem" id="885614672"> <object class="NSMenuItem" id="885614672">
<reference key="NSMenu" ref="466310130"/>
<string key="NSTitle">Reload</string>
<string key="NSKeyEquiv">r</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="229763992"/>
<reference key="NSMixedImage" ref="909111550"/>
</object>
<object class="NSMenuItem" id="502782526">
<reference key="NSMenu" ref="466310130"/> <reference key="NSMenu" ref="466310130"/>
<string key="NSTitle">Show Developer Tools</string> <string key="NSTitle">Show Developer Tools</string>
<string key="NSKeyEquiv">i</string> <string key="NSKeyEquiv">i</string>
@ -1904,9 +1913,17 @@
<object class="IBActionConnection" key="connection"> <object class="IBActionConnection" key="connection">
<string key="label">showDevTools:</string> <string key="label">showDevTools:</string>
<reference key="source" ref="1014"/> <reference key="source" ref="1014"/>
<reference key="destination" ref="502782526"/>
</object>
<int key="connectionID">805</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">reload:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="885614672"/> <reference key="destination" ref="885614672"/>
</object> </object>
<int key="connectionID">801</int> <int key="connectionID">806</int>
</object> </object>
<object class="IBConnectionRecord"> <object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection"> <object class="IBActionConnection" key="connection">
@ -2245,6 +2262,7 @@
<reference ref="237841660"/> <reference ref="237841660"/>
<reference ref="1058117013"/> <reference ref="1058117013"/>
<reference ref="885614672"/> <reference ref="885614672"/>
<reference ref="502782526"/>
</array> </array>
<reference key="parent" ref="586577488"/> <reference key="parent" ref="586577488"/>
</object> </object>
@ -2947,6 +2965,11 @@
<reference key="object" ref="885614672"/> <reference key="object" ref="885614672"/>
<reference key="parent" ref="466310130"/> <reference key="parent" ref="466310130"/>
</object> </object>
<object class="IBObjectRecord">
<int key="objectID">804</int>
<reference key="object" ref="502782526"/>
<reference key="parent" ref="466310130"/>
</object>
</array> </array>
</object> </object>
<dictionary class="NSMutableDictionary" key="flattenedProperties"> <dictionary class="NSMutableDictionary" key="flattenedProperties">
@ -3098,6 +3121,7 @@
<string key="791.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="791.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="798.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="798.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="799.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="799.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="804.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="81.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="82.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string> <string key="83.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -3107,7 +3131,7 @@
<nil key="activeLocalization"/> <nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/> <dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/> <nil key="sourceID"/>
<int key="maxID">803</int> <int key="maxID">806</int>
</object> </object>
<object class="IBClassDescriber" key="IBDocument.Classes"> <object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions"> <array class="NSMutableArray" key="referencedPartialClassDescriptions">

View file

@ -65,6 +65,10 @@
shell_ = shell; shell_ = shell;
} }
- (IBAction)reload:(id)sender {
shell_->GetWebContents()->GetController().ReloadIgnoringCache(false);
}
- (IBAction)showDevTools:(id)sender { - (IBAction)showDevTools:(id)sender {
shell_->OpenDevTools(); shell_->OpenDevTools();
} }