Logo Search packages:      
Sourcecode: gameclock version File versions  Download package

def gtkui::GameclockUI::refresh_current (   self )
refresh the active clock

this handler is ran periodically through a timeout signal to make sure that the current clock is updated

Definition at line 445 of file gtkui.py.

                             :
        """refresh the active clock
        
        this handler is ran periodically through a timeout signal to make sure that the current clock is updated
        """

        if isinstance(self.game, HourglassGame):
            p = self.game.first_clock
            while p:
                p.update()
                p = p.next
            self.refresh()
            return self.game.running()

        self.cur_clock.label.set_label(self.game.cur_clock.update())
        active = self.cur_clock.label.get_parent()
        if self.game.cur_clock.dead:
            active.modify_bg(gtk.STATE_NORMAL, active.get_colormap().alloc_color("red"))
        return self.game.running()


Generated by  Doxygen 1.6.0   Back to index