示例#1
0
    def __init__(self):

        self.app = Gtk.Application.new(
            "org.application.test",
            Gio.ApplicationFlags(0),
        )
        self.app.connect("startup", self.on_app_startup)
        self.app.connect("activate", self.on_app_activate)
        self.app.connect("shutdown", self.on_app_shutdown)
示例#2
0
    def __init__(self):
        
        setproctitle.setproctitle("Application test")
        GLib.set_prgname("testapp") 
        
        self.app = Gtk.Application.new("org.application.test", Gio.ApplicationFlags(0))
        
        self.app.add_main_option_entries([
            self.create_option_entry("--version",
                                     description="Show version numbers and exit",
                                    ),
            self.create_option_entry("--setlabel",
                                     description="Set label widget",
                                     arg=GLib.OptionArg.STRING,
                                    ),
            self.create_option_entry("--bollocks",
                                     description="Additional test option - exit",
                                    ),
        ])

        self.app.connect("handle-local-options", self.on_local_option)
        self.app.connect("activate", self.on_app_activate)
 def __init__(self, *args, **kwargs):
     super().__init__(*args,
                      application_id=appid,
                      flags=Gio.ApplicationFlags(0),
                      **kwargs)
     self.window = None
示例#4
0
 def __init__(self):
     self.app = Gtk.Application.new("org.media.player",
                                    Gio.ApplicationFlags(0))
     self.app.connect("activate", self.on_app_activate)
示例#5
0
 def __init__(self):
     self.app = Gtk.Application.new('pl.jsph.hpgl-sender', Gio.ApplicationFlags(0))
     self.app.connect('activate', self.on_app_activate)
     self.app.connect('shutdown', self.on_app_shutdown)
     self.widgets = Widgets()