2008-01-19 00:53:44 +00:00
|
|
|
#!/usr/bin/env pythonw
|
2008-01-19 00:53:41 +00:00
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
Entry point for OpenLP wx.App
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
import wx
|
|
|
|
|
|
|
|
import mainframe
|
|
|
|
|
|
|
|
|
|
|
|
class OpenLP(wx.PySimpleApp):
|
|
|
|
def OnInit(self):
|
2008-03-04 00:12:12 +00:00
|
|
|
frame = mainframe.MainFrame(None, title="openlp.org")
|
2008-01-19 00:53:41 +00:00
|
|
|
frame.Show()
|
|
|
|
|
|
|
|
import sys
|
|
|
|
for f in sys.argv[1:]:
|
|
|
|
self.OpenFileMessage(f)
|
|
|
|
|
|
|
|
return True;
|
|
|
|
|
|
|
|
|
|
|
|
def OpenFileMessage(self, filename):
|
|
|
|
|
|
|
|
# TODO: OOS loading here
|
|
|
|
# rename function, too
|
|
|
|
|
|
|
|
dlg = wx.MessageDialog(None,
|
|
|
|
"This app was just asked to open:\n%s\n"%filename,
|
|
|
|
"File Opened", wx.OK|wx.ICON_INFORMATION)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
app = OpenLP()
|
|
|
|
app.MainLoop()
|
|
|
|
|
|
|
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80
|