forked from Mirrors/apostrophe
Fix uberwriter not opening files from terminal or from file managers
Signed-off-by: somas95 <manuel.genoves@gmail.com>gh-pages
parent
999b4bca43
commit
54c944c171
|
@ -49,17 +49,20 @@ def parse_options():
|
|||
def main():
|
||||
'constructor for your class instances'
|
||||
(options, args) = parse_options()
|
||||
|
||||
# TODO: all the parsing is unused.
|
||||
# We want to allow multiple windows
|
||||
|
||||
# Run the application.
|
||||
# ~ if args:
|
||||
# ~ for arg in args:
|
||||
# ~ window = UberwriterWindow.UberwriterWindow()
|
||||
# ~ window.load_file(arg)
|
||||
# ~ else:
|
||||
# ~ window = UberwriterWindow.UberwriterWindow()
|
||||
# ~ if options.experimental_features:
|
||||
# ~ window.use_experimental_features(True)
|
||||
app = AppWindow.Application()
|
||||
|
||||
if args:
|
||||
for arg in args:
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
if options.experimental_features:
|
||||
window.use_experimental_features(True)
|
||||
|
||||
app.run(sys.argv)
|
||||
|
||||
#Gtk.main()
|
||||
|
|
|
@ -136,6 +136,7 @@ class Application(Gtk.Application):
|
|||
# when the last one is closed the application shuts down
|
||||
# self.window = Window(application=self, title="UberWriter")
|
||||
self.window = UberwriterWindow.UberwriterWindow(application=self, title="UberWriter")
|
||||
self.window.load_file(sys.argv[1])
|
||||
|
||||
self.window.present()
|
||||
|
||||
|
|
Loading…
Reference in New Issue