def init(self): BaseApp.init(self) self.bus = SessionBus() self.add_fd_handler("read", self.bus, self.process_dbus) self.bus.request_name("org.yahiko.status_bar") screen = self.conn.setup.roots[self.conn.pref_screen] self.status_bar = StatusBar(self, screen, self.user_config)
def process_dbus(self): self.bus.receive_one() BaseApp.run(self)
def run(self): self.status_bar.ui.recreate_surface() self.status_bar.ui.layout() self.status_bar.ui.dirty() BaseApp.run(self)
def stop(self, **args): self.stop_time = time.time() print "exec time", self.stop_time - self.start_time BaseApp.stop(self)
def __init__(self, config_path=None, **kwargs): BaseApp.__init__(self, **kwargs) if config_path: self.user_config = sxmain.load_user_config(config_path) else: self.user_config = None
def run(self): self.start_time = time.time() BaseApp.run(self)
def init(self): BaseApp.init(self) screen = self.conn.setup.roots[self.conn.pref_screen] self.term = YahikoTerm(self, screen, double_buf=self.double_buf)
def __init__(self, double_buf=False, **kwargs): BaseApp.__init__(self, **kwargs) self.double_buf = double_buf
def run(self): self.window.ui.recreate_surface() self.window.ui.layout() self.window.ui.dirty() BaseApp.run(self)
def init(self): BaseApp.init(self) self.window = TestWindow(self)