sortilege's easter egg reimplemented
This commit is contained in:
parent
9fbbd52805
commit
ccea050bc5
1 changed files with 16 additions and 0 deletions
|
|
@ -97,6 +97,12 @@ class PrimitivusApp(QuickApp):
|
|||
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 @@ class PrimitivusApp(QuickApp):
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue