Find the MainMenu nib correctly
This commit is contained in:
parent
3d4491a468
commit
091357ad8e
1 changed files with 6 additions and 1 deletions
|
@ -13,6 +13,11 @@
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
|
std::string GetApplicationName() {
|
||||||
|
std::string name = brightray::MainApplicationBundlePath().BaseName().AsUTF8Unsafe();
|
||||||
|
return name.substr(0, name.length() - 4/*.app*/);
|
||||||
|
}
|
||||||
|
|
||||||
void AtomBrowserMainParts::PreMainMessageLoopStart() {
|
void AtomBrowserMainParts::PreMainMessageLoopStart() {
|
||||||
// Initialize locale setting.
|
// Initialize locale setting.
|
||||||
l10n_util::OverrideLocaleWithCocoaLocale();
|
l10n_util::OverrideLocaleWithCocoaLocale();
|
||||||
|
@ -26,7 +31,7 @@ void AtomBrowserMainParts::PreMainMessageLoopStart() {
|
||||||
base::FilePath frameworkPath = brightray::MainApplicationBundlePath()
|
base::FilePath frameworkPath = brightray::MainApplicationBundlePath()
|
||||||
.Append("Contents")
|
.Append("Contents")
|
||||||
.Append("Frameworks")
|
.Append("Frameworks")
|
||||||
.Append("Atom Framework.framework");
|
.Append(GetApplicationName() + " Framework.framework");
|
||||||
NSBundle* frameworkBundle = [NSBundle
|
NSBundle* frameworkBundle = [NSBundle
|
||||||
bundleWithPath:base::mac::FilePathToNSString(frameworkPath)];
|
bundleWithPath:base::mac::FilePathToNSString(frameworkPath)];
|
||||||
NSNib* mainNib = [[NSNib alloc] initWithNibNamed:@"MainMenu"
|
NSNib* mainNib = [[NSNib alloc] initWithNibNamed:@"MainMenu"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue