Mercurial > getan
changeset 131:3d5232dad59a
Add methods to reset the ProjectList footer
When going back from the move state ist must be possible to restore the old
footer entry in the ProjectList. The footer may be overriden by the move state
to select a project. In this case the old entry should be restored instead of
showing a blank footer.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 31 Oct 2012 09:53:57 +0100 |
parents | dc60bc616395 |
children | 3b2a64542555 |
files | getan/view.py |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/view.py Wed Oct 31 09:51:55 2012 +0100 +++ b/getan/view.py Wed Oct 31 09:53:57 2012 +0100 @@ -229,10 +229,19 @@ tmp = proj._get_time() if tmp and type(tmp) == int: total += tmp - self.set_footer_text(" All projects: %s %s" + self.set_footer_info("All projects: %s %s" % (proj.mode[1], human_time(total)), "project_footer") + def set_footer_info(self, text, attr): + logger.debug("ProjectList: set_footer_info to '%s'" % text) + self._footer_info = (text, attr) + self.set_footer_text(text, attr, False) + + def reset_footer(self): + logger.debug("ProjectList: reset_footer to '%s'" % self._footer_info[0]) + self.set_footer_text(*self._footer_info) + def update(self): logger.debug("ProjectList: update focused project row now.") self.rows[self.focused].update()