Beispiel #1
0
def main():
    'constructor for your class instances'
    (options, args) = parse_options()

    # Run the application.
    if args:
        for arg in args:
            window = UberwriterWindow.UberwriterWindow()
            window.load_file(arg)
    else:
        window = UberwriterWindow.UberwriterWindow()
    window.show()
    Gtk.main()
Beispiel #2
0
    def do_activate(self, *args, **kwargs):
        # We only allow a single window and raise any existing ones
        if not self.window:
            # Windows are associated with the application
            # when the last one is closed the application shuts down
            # self.window = Window(application=self, title="UberWriter")
            self.window = UberwriterWindow.UberwriterWindow(self)
            if self.args:
                self.window.load_file(self.args[0])
            if self.options.experimental_features:
                self.window.use_experimental_features(True)

        self.window.present()