-
Notifications
You must be signed in to change notification settings - Fork 2
/
Unicron.py
29 lines (23 loc) · 875 Bytes
/
Unicron.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/python
# -*- coding: utf-8 -*-
from Cocoa import objc
from AppKit import NSApplication, NSWindowController
from PyObjCTools import AppHelper
from main import Unicron
class UnicronController(NSWindowController):
def windowDidLoad(self):
NSWindowController.windowDidLoad(self)
self.Unicron = Unicron()
@objc.IBAction
def openGithub_(self, sender):
import webbrowser
webbrowser.open('https://github.com/form-follows-function/unicron', new=2)
@objc.IBAction
def showPrefs_(self, sender):
self.Unicron.prefsWindow.open()
if __name__ == "__main__":
app = NSApplication.sharedApplication()
viewController = UnicronController.alloc().initWithWindowNibName_("MainMenu")
viewController.showWindow_(viewController)
app.activateIgnoringOtherApps_(True)
AppHelper.runEventLoop()