Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from adobe/glenn/about-box
Browse files Browse the repository at this point in the history
Hook up about box
  • Loading branch information
RaymondLim committed Jun 15, 2012
2 parents d4020ec + 4b19988 commit cce7647
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 11 deletions.
8 changes: 8 additions & 0 deletions appshell/cefclient_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ - (void)sendEvent:(NSEvent*)event {
// Receives notifications from controls and the browser window. Will delete
// itself when done.
@interface ClientWindowDelegate : NSObject <NSWindowDelegate>
- (IBAction)showAbout:(id)sender;
#ifdef SHOW_TOOLBAR_UI
- (IBAction)goBack:(id)sender;
- (IBAction)goForward:(id)sender;
Expand All @@ -82,6 +83,13 @@ - (void)notifyDownloadError:(id)object;

@implementation ClientWindowDelegate

- (IBAction)showAbout:(id)sender {
if (g_handler.get() && g_handler->GetBrowserId()) {
g_handler->GetBrowser()->GetMainFrame()->ExecuteJavaScript(
"brackets.shellAPI.executeCommand('help.about')", "about:blank", 0);
}
}

#ifdef SHOW_TOOLBAR_UI
- (IBAction)goBack:(id)sender {
if (g_handler.get() && g_handler->GetBrowserId())
Expand Down
5 changes: 4 additions & 1 deletion appshell/cefclient_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
// Parse the menu selections:
switch (wmId) {
case IDM_ABOUT:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
if (browser) {
browser->GetMainFrame()->ExecuteJavaScript(
"brackets.shellAPI.executeCommand('help.about')", "about:blank", 0);
}
return 0;
case IDM_EXIT:
DestroyWindow(hWnd);
Expand Down
2 changes: 1 addition & 1 deletion appshell/mac/English.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* Localized versions of Info.plist keys */

NSHumanReadableCopyright = "© Chromium Embedded Framework Authors, 2010";
NSHumanReadableCopyright = "©Adobe Systems, Inc., 2012";
40 changes: 31 additions & 9 deletions appshell/mac/English.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="57"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -297,14 +298,6 @@
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">orderFrontStandardAboutPanel:</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">142</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">copy:</string>
Expand Down Expand Up @@ -369,6 +362,14 @@
</object>
<int key="connectionID">370</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">showAbout:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">440</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Expand Down Expand Up @@ -741,9 +742,30 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">439</int>
<int key="maxID">440</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">FirstResponder</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">showAbout:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">showAbout:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">showAbout:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
Expand Down

0 comments on commit cce7647

Please sign in to comment.