Mercurial > libervia-backend
changeset 129:542682d67282
sortilege's easter egg reimplemented
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 14 Jul 2010 16:14:04 +0800 (2010-07-14) |
parents | 2240f34f6452 |
children | 5a88ad24ccc0 |
files | frontends/primitivus/primitivus |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/primitivus/primitivus Tue Jul 13 02:24:59 2010 +0800 +++ b/frontends/primitivus/primitivus Wed Jul 14 16:14:04 2010 +0800 @@ -97,6 +97,12 @@ print 'Entered debug mode' pdb.set_trace() + def write_log(self, log, file_name='/tmp/primitivus_log'): + #method to write log in a temporary file, useful for debugging + f=open(file_name, 'a') + f.write(log+"\n") + f.close() + def redraw(self): """redraw the screen""" self.loop.draw_screen() @@ -145,6 +151,16 @@ except AttributeError: #The main widget is not built (probably in Profile Manager) pass + elif input == 'window resize': + width,height = self.loop.screen_size + if height<=5 and width<=35: + if not 'save_main_widget' in dir(self): + self.save_main_widget = self.loop.widget + self.loop.widget = urwid.Filler(urwid.Text(_("Pleeeeasse, I can't even breathe !"))) + else: + if 'save_main_widget' in dir(self): + self.loop.widget = self.save_main_widget + del self.save_main_widget try: return self.menu.checkShortcuts(input) except AttributeError: