Skip to content

Commit

Permalink
Fixed missing reopen
Browse files Browse the repository at this point in the history
  • Loading branch information
superhighfives committed Jan 4, 2021
1 parent b5a563b commit f187432
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Pika.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@
CODE_SIGN_ENTITLEMENTS = Pika/Pika.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"Pika/Preview Content\"";
DEVELOPMENT_TEAM = TGHU37N6EX;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -440,7 +441,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.0.1;
MARKETING_VERSION = 0.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.superhighfives.Pika;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -455,6 +456,7 @@
CODE_SIGN_ENTITLEMENTS = Pika/Pika.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"Pika/Preview Content\"";
DEVELOPMENT_TEAM = TGHU37N6EX;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -465,7 +467,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.0.1;
MARKETING_VERSION = 0.0.2;
PRODUCT_BUNDLE_IDENTIFIER = com.superhighfives.Pika;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
7 changes: 7 additions & 0 deletions Pika/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
}

func applicationShouldHandleReopen(_: NSApplication, hasVisibleWindows: Bool) -> Bool {
if !hasVisibleWindows {
pikaWindow.makeKeyAndOrderFront(self)
}
return true
}

func showMainWindow() {
pikaWindow.makeKeyAndOrderFront(nil)
NSApp.activate(ignoringOtherApps: true)
Expand Down
6 changes: 3 additions & 3 deletions Pika/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -30,9 +30,9 @@
<string>Copyright © 2020 Charlie Gleason, under the MIT License</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>SUPublicEDKey</key>
<string>+hHTCW8zfGxSQeowmFxlZzE4N/fxolLQRpA7zLlzBvk=</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUPublicEDKey</key>
<string>+hHTCW8zfGxSQeowmFxlZzE4N/fxolLQRpA7zLlzBvk=</string>
</dict>
</plist>

0 comments on commit f187432

Please sign in to comment.