示例#1
0
    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)
示例#2
0
    def process_dbus(self):
        self.bus.receive_one()

        BaseApp.run(self)
示例#3
0
    def run(self):
        self.status_bar.ui.recreate_surface()
        self.status_bar.ui.layout()
        self.status_bar.ui.dirty()

        BaseApp.run(self)
示例#4
0
 def stop(self, **args):
     self.stop_time = time.time()
     print "exec time", self.stop_time - self.start_time
     BaseApp.stop(self)
示例#5
0
 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
示例#6
0
 def run(self):
     self.start_time = time.time()
     BaseApp.run(self)
示例#7
0
    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)
示例#8
0
 def __init__(self, double_buf=False, **kwargs):
     BaseApp.__init__(self, **kwargs)
     self.double_buf = double_buf
示例#9
0
 def run(self):
     self.window.ui.recreate_surface()
     self.window.ui.layout()
     self.window.ui.dirty()
     BaseApp.run(self)
示例#10
0
    def init(self):
        BaseApp.init(self)

        self.window = TestWindow(self)