Fix uberwriter not opening files from terminal or from file managers

Signed-off-by: somas95 <manuel.genoves@gmail.com>
gh-pages
somas95 2018-03-25 00:16:50 +01:00
parent 999b4bca43
commit 54c944c171
2 changed files with 13 additions and 9 deletions

View File

@ -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()

View File

@ -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()