def exit(self):
     ind=self.lb.current()
     cu=self.all[ind][0]
     if cu.endswith(':'):
         base=cu
     else:
         base=os.path.basename(cu)
     path=os.path.dirname(cu)
     if path.endswith('\\'):
         path=path[:-1]
     if cu.endswith(':'):
         path='None'
     if ui.query(u'sure to quit?', 'query'):
         ui.app.focus=None
         ini=file(self.pre+'ini.ini', 'w')
         if self.lastpath:
             ini.write(self.screen+'\n'+str(self.system)+'\n'+str(self.lastpath)+'\n'+self.font_type+'\n'+self.color_type+'\n'+self.pw.encode('base64').strip()+'\n'+path+'\n'+base)
         else:
             ini.write(self.screen+'\n'+str(self.system)+'\n'+str(self.lastpath)+'\n'+self.font_type+'\n'+self.color_type+'\n'+self.pw.encode('base64').strip()+'\nNone\nNone')
         e32.ao_yield()
         ini.close()
         sys.setdefaultencoding(default)
         miso.compress_all_heaps()
         self.lock.signal()
         ui.app.set_exit()
Example #2
0
 def compress(self):
     if miso_import:
         try:
             miso.compress_all_heaps()
             #appuifw.note(u"Co")
         except:
             pass
     else:
         pass
 def refresh(self, var):
     try:
         if var:
             ind=self.lb.current()
             obj=self.all[ind][0]
             base=os.path.basename(obj)
             path=os.path.dirname(obj)
             if path.endswith('\\'):
                 path=path[:-1]
             if obj.endswith(':'):
                 path, base='None', obj
             e32.ao_yield()
             miso.compress_all_heaps()
             return self.run(path, base)
     except: return 1
 def compress(self):
     old=sysinfo.free_ram()
     miso.compress_all_heaps()
     new=sysinfo.free_ram()
     dif=(new-old)/1024
     return ui.note(str(dif)+u' kbyte(s) released')