Exemple #1
0
 def destroy(self):
     """Destroys the application"""
     window_update(BEG_UPDATE)
     for w in self.windows:
         try:
             w.close()
             w.destroy()
         except:
             pass
             
     if self.menu is not None:
         _gem.menu_bar(self.menu,MENU_HIDE)
         
     window_update(END_UPDATE)
     _gem.appl_exit(self.id)
Exemple #2
0
 def set_menu(self,item,show=True):
     """Sets the application menu"""
     if type(item) is int:
         capsule = self.get_resource_address(R_OBJECT,item)
     else:
         capsule = item
     
     action = MENU_SHOW
     if type(show) is int:
         action = show
     elif not show:
         action = MENU_HIDE
     
     window_update(BEG_UPDATE)
     _gem.menu_bar(capsule, action)
     window_update(END_UPDATE)
     
     self.menu = capsule