32 lines
614 B
Python
32 lines
614 B
Python
from ..Application import Application
|
|
|
|
import gi
|
|
gi.require_version('Gtk', '3.0')
|
|
|
|
from gi.repository import Gtk
|
|
|
|
class DesktopApplication(Application):
|
|
|
|
def __init__(self, application_id : str):
|
|
Application.__init__(self)
|
|
|
|
self.app = Gtk.Application(application_id=application_id)
|
|
self.app.connect("activate", self.activate)
|
|
self.app.connect("startup", self.startup)
|
|
|
|
def before_start_internal(self):
|
|
pass
|
|
|
|
def before_stop_internal(self):
|
|
pass
|
|
|
|
def _start_internal(self):
|
|
self.app.run()
|
|
|
|
def _stop_internal(self):
|
|
exit(0)
|
|
|
|
def activate(self, args):
|
|
pass
|
|
def startup(self, args):
|
|
pass |