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

Commit ba500be

Browse files
committed
Merge pull request #6 from adobe/glenn/about-box
Hook up about box
2 parents 7b17e25 + aab3910 commit ba500be

File tree

4 files changed

+44
-11
lines changed

4 files changed

+44
-11
lines changed

appshell/cefclient_mac.mm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ - (void)sendEvent:(NSEvent*)event {
6767
// Receives notifications from controls and the browser window. Will delete
6868
// itself when done.
6969
@interface ClientWindowDelegate : NSObject <NSWindowDelegate>
70+
- (IBAction)showAbout:(id)sender;
7071
#ifdef SHOW_TOOLBAR_UI
7172
- (IBAction)goBack:(id)sender;
7273
- (IBAction)goForward:(id)sender;
@@ -82,6 +83,13 @@ - (void)notifyDownloadError:(id)object;
8283

8384
@implementation ClientWindowDelegate
8485

86+
- (IBAction)showAbout:(id)sender {
87+
if (g_handler.get() && g_handler->GetBrowserId()) {
88+
g_handler->GetBrowser()->GetMainFrame()->ExecuteJavaScript(
89+
"brackets.shellAPI.executeCommand('help.about')", "about:blank", 0);
90+
}
91+
}
92+
8593
#ifdef SHOW_TOOLBAR_UI
8694
- (IBAction)goBack:(id)sender {
8795
if (g_handler.get() && g_handler->GetBrowserId())

appshell/cefclient_win.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
349349
// Parse the menu selections:
350350
switch (wmId) {
351351
case IDM_ABOUT:
352-
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
352+
if (browser) {
353+
browser->GetMainFrame()->ExecuteJavaScript(
354+
"brackets.shellAPI.executeCommand('help.about')", "about:blank", 0);
355+
}
353356
return 0;
354357
case IDM_EXIT:
355358
DestroyWindow(hWnd);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
/* Localized versions of Info.plist keys */
22

3-
NSHumanReadableCopyright = "© Chromium Embedded Framework Authors, 2010";
3+
NSHumanReadableCopyright = "©Adobe Systems, Inc., 2012";

appshell/mac/English.lproj/MainMenu.xib

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
</object>
1313
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
1414
<bool key="EncodedWithXMLCoder">YES</bool>
15+
<integer value="57"/>
1516
</object>
1617
<object class="NSArray" key="IBDocument.PluginDependencies">
1718
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -297,14 +298,6 @@
297298
</object>
298299
<int key="connectionID">39</int>
299300
</object>
300-
<object class="IBConnectionRecord">
301-
<object class="IBActionConnection" key="connection">
302-
<string key="label">orderFrontStandardAboutPanel:</string>
303-
<reference key="source" ref="1021"/>
304-
<reference key="destination" ref="238522557"/>
305-
</object>
306-
<int key="connectionID">142</int>
307-
</object>
308301
<object class="IBConnectionRecord">
309302
<object class="IBActionConnection" key="connection">
310303
<string key="label">copy:</string>
@@ -369,6 +362,14 @@
369362
</object>
370363
<int key="connectionID">370</int>
371364
</object>
365+
<object class="IBConnectionRecord">
366+
<object class="IBActionConnection" key="connection">
367+
<string key="label">showAbout:</string>
368+
<reference key="source" ref="1014"/>
369+
<reference key="destination" ref="238522557"/>
370+
</object>
371+
<int key="connectionID">440</int>
372+
</object>
372373
</object>
373374
<object class="IBMutableOrderedSet" key="objectRecords">
374375
<object class="NSArray" key="orderedObjects">
@@ -741,9 +742,30 @@
741742
</object>
742743
</object>
743744
<nil key="sourceID"/>
744-
<int key="maxID">439</int>
745+
<int key="maxID">440</int>
745746
</object>
746747
<object class="IBClassDescriber" key="IBDocument.Classes">
748+
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
749+
<bool key="EncodedWithXMLCoder">YES</bool>
750+
<object class="IBPartialClassDescription">
751+
<string key="className">FirstResponder</string>
752+
<object class="NSMutableDictionary" key="actions">
753+
<string key="NS.key.0">showAbout:</string>
754+
<string key="NS.object.0">id</string>
755+
</object>
756+
<object class="NSMutableDictionary" key="actionInfosByName">
757+
<string key="NS.key.0">showAbout:</string>
758+
<object class="IBActionInfo" key="NS.object.0">
759+
<string key="name">showAbout:</string>
760+
<string key="candidateClassName">id</string>
761+
</object>
762+
</object>
763+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
764+
<string key="majorKey">IBUserSource</string>
765+
<string key="minorKey"/>
766+
</object>
767+
</object>
768+
</object>
747769
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
748770
<bool key="EncodedWithXMLCoder">YES</bool>
749771
<object class="IBPartialClassDescription">

0 commit comments

Comments
 (0)