Ejemplo n.º 1
0
    def refresh(self, reload=0):
        menu = self.menustack[-1]

        if not isinstance(menu, Menu):
            # Do not draw if there are any children
            if self.children:
                return False
            return menu.refresh()

        # We need to unmount devices but only at the top menu
        if len(self.menustack) == 1:
            if self.menustack[-1].umount_all == 1:
                util.umount_all()

        if reload:
            if menu.reload_func:
                reload = menu.reload_func()
                if reload:
                    self.menustack[-1] = reload
            if self.force_page_rebuild:
                self.force_page_rebuild = False
                self.rebuild_page()
            self.init_page()
        
        skin.draw('menu', self, self.menustack[-1], self.screen_transition)
        self.screen_transition = skin.TRANSITION_NONE
Ejemplo n.º 2
0
 def run_action(self, action):
     try:
         action.post_conf(self.state)
         action.run()
     except Exception:
         util.umount_all(self.state.mount_points)
         raise
Ejemplo n.º 3
0
    def refresh(self, reload=0):
        menu = self.menustack[-1]

        if not isinstance(menu, Menu):
            # Do not draw if there are any children
            if self.children:
                return False
            return menu.refresh()

        # We need to unmount devices but only at the top menu
        if len(self.menustack) == 1:
            if self.menustack[-1].umount_all == 1:
                util.umount_all()

        if reload:
            if menu.reload_func:
                reload = menu.reload_func()
                if reload:
                    self.menustack[-1] = reload
            if self.force_page_rebuild:
                self.force_page_rebuild = False
                self.rebuild_page()
            self.init_page()

        skin.draw('menu', self, self.menustack[-1], self.screen_transition)
        self.screen_transition = skin.TRANSITION_NONE
Ejemplo n.º 4
0
    def refresh(self, reload=0):
        menu = self.menustack[-1]

        if not isinstance(menu, Menu):
            # Do not draw if there are any children
            if self.children:
                return False

            return skin.draw(menu.type, menu)

        if self.menustack[-1].umount_all == 1:
            util.umount_all()

        if reload:
            if menu.reload_func:
                reload = menu.reload_func()
                if reload:
                    self.menustack[-1] = reload
            if self.force_page_rebuild:
                self.force_page_rebuild = False
                self.rebuild_page()
            self.init_page()

        skin.draw('menu', self, self.menustack[-1])
Ejemplo n.º 5
0
 def chroot_failure(self):
     util.umount_all(self.istate.mount_points)