Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Quit on close
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Nov 30, 2015
1 parent beb2fe7 commit 66066bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion macosx/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

static NSString * const MGLMapboxAccessTokenDefaultsKey = @"MGLMapboxAccessToken";

@interface AppDelegate () <NSSharingServicePickerDelegate, NSMenuDelegate, MGLMapViewDelegate>
@interface AppDelegate () <NSApplicationDelegate, NSSharingServicePickerDelegate, NSMenuDelegate, MGLMapViewDelegate>

@property (weak) IBOutlet NSWindow *window;
@property (weak) IBOutlet MGLMapView *mapView;
Expand Down Expand Up @@ -391,6 +391,12 @@ - (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem {
return NO;
}

#pragma mark NSApplicationDelegate methods

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
return YES;
}

#pragma mark NSSharingServicePickerDelegate methods

- (NS_ARRAY_OF(NSSharingService *) *)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker sharingServicesForItems:(NSArray *)items proposedSharingServices:(NS_ARRAY_OF(NSSharingService *) *)proposedServices {
Expand Down
6 changes: 5 additions & 1 deletion macosx/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="-3" userLabel="Application">
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="z9N-Fm-MUP"/>
</connections>
</customObject>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate">
<connections>
<outlet property="mapView" destination="v1Z-oA-oHU" id="70S-xO-QIP"/>
Expand Down

0 comments on commit 66066bd

Please sign in to comment.