mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 20:27:49 +02:00
Adding link paths and rename AppDelegate.m -> AppDelegate.mm
This commit is contained in:
parent
e561a43e5d
commit
a9b2ec910c
2 changed files with 18 additions and 7 deletions
|
@ -8,6 +8,8 @@
|
|||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#include "Daemon.h"
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@property (strong, nonatomic) NSStatusItem *statusItem;
|
||||
|
@ -18,6 +20,8 @@
|
|||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
[self setupStatusItem];
|
||||
|
||||
Daemon.start();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
|
@ -25,7 +29,7 @@
|
|||
}
|
||||
|
||||
- (void)setupStatusItem {
|
||||
self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
|
||||
self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength];
|
||||
self.statusItem.button.image = [NSImage imageNamed:@"menuBarIcon"];
|
||||
|
||||
[self updateStatusItemMenu];
|
||||
|
@ -33,6 +37,7 @@
|
|||
|
||||
- (void)updateStatusItemMenu {
|
||||
NSMenu *menu = [[NSMenu alloc] init];
|
||||
[menu addItemWithTitle:@"Open console" action:@selector(openWebConsole:) keyEquivalent:@""];
|
||||
[menu addItemWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@""];
|
||||
self.statusItem.menu = menu;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue