Commit ce51f36e authored by Guillaume Seguin's avatar Guillaume Seguin

Handle OSX MacOpenFile and MacOpenURL events

parent c1eeb7b2
...@@ -1536,10 +1536,23 @@ class PronterWindow(MainWindow, pronsole.pronsole): ...@@ -1536,10 +1536,23 @@ class PronterWindow(MainWindow, pronsole.pronsole):
bdl_float = [float(value) if value else defaults[i] for i, value in enumerate(bdl)] bdl_float = [float(value) if value else defaults[i] for i, value in enumerate(bdl)]
return bdl_float return bdl_float
class PronterApp(wx.App):
mainwindow = None
def __init__(self, *args, **kwargs):
super(PronterApp, self).__init__(*args, **kwargs)
self.mainwindow = PronterWindow()
self.mainwindow.Show()
def MacOpenFile(self, filename):
self.mainwindow.do_load(filename)
def MacOpenURL(self, url):
self.mainwindow.do_load(url)
if __name__ == '__main__': if __name__ == '__main__':
app = wx.App(False) app = PronterApp(False)
main = PronterWindow()
main.Show()
try: try:
app.MainLoop() app.MainLoop()
except KeyboardInterrupt: except KeyboardInterrupt:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment