Beispiel #1
0
 def go_back(self):
     name = self.root.current
     if name == 'ScreenMain':
         pause_app()
     else:
         self.root.transition.direction = 'right'
         self.root.current = 'ScreenMain'
Beispiel #2
0
 def go_back_in_history(self):
     try:
         scr = self._navigation_higherarchy.pop()
         if scr.name == 'ScreenSchedule':
             from utils import pause_app
             pause_app()
             return
         scr = self._navigation_higherarchy[-1]
         self.load_screen(scr.name, manager=scr.manager, store_back=False)
     except IndexError:
         # at root of app. Pause it.
         from utils import pause_app
         pause_app()
Beispiel #3
0
def go_back_in_history():
    app = App.get_running_app()
    try:
        scr = app._navigation_higherarchy.pop()
        if scr.name == 'ScreenSchedule':
            # we are at top of Nav higherarchy
            from utils import pause_app
            pause_app()
            return

        # we are not at root of Nav higherarchy
        scr = app._navigation_higherarchy[-1]
        load_screen(scr.name, manager=scr.manager, store_back=False)
    except IndexError:
        # check if current screen is schedule screen?
        if app.navigation_manager.current == 'ScreenSchedule':
            # at root of app. Pause it.
            from utils import pause_app
            pause_app()
            return
        app.navigation_manager.current = 'ScreenSchedule'
Beispiel #4
0
    def go_back_in_history(self):
        try:
            # check webbbrowser
            # if webbrowser._opened:
            #     webbrowser.close()
            #     return
            # go back to previous screen
            # first pop current screen
            scr = self._navigation_higherarchy.pop()
            if scr.name == 'ScreenSchedule':
                # we are at top of Nav higherarchy
                from utils import pause_app
                pause_app()
                return

            # we are not at root of Nav higherarchy
            scr = self._navigation_higherarchy[-1]
            self.load_screen(scr.name, manager=scr.manager, store_back=False)
        except IndexError:
            # at root of app. Pause it.
            from utils import pause_app
            pause_app()
def go_back_in_history():
    app = App.get_running_app()
    from utils import pause_app
    try:
        scr = app._navigation_higherarchy.pop()
        if scr.name == 'ScreenSchedule':
            # we are at top of Nav higherarchy
            pause_app()
            return

        # we are not at root of Nav higherarchy
        scr = app._navigation_higherarchy[-1]
        load_screen(
            scr.name,
            manager=scr.manager,
            store_back=False)
    except (IndexError, ScreenManagerException):
        # check if current screen is schedule screen?
        if app.navigation_manager.current == 'ScreenSchedule':
            pause_app()
            return
        load_screen("ScreenSchedule", manager=app.navigation_manager)