Example #1
0
    def on_path(self, instance, path):
        #print "ONPATH"
        try:
            self.remove_widget(self.davbar)
        except:
            pass
        self.gen_actionbar()

        self.pathgroup = ActionGroup(text="Path")
        self.actionview.add_widget(self.pathgroup)

        seq = os.path.abspath(normpath(path)).split(os.sep)
        splitpath = []

        if platform != "win":
            splitpath.append("/")

        for i in seq:
            if i != "":
                splitpath.append(i)

        for i in splitpath:
            if i != "":
                btn = ActionButton(text=i,
                                   on_press=hide_keyboard,
                                   on_release=self.navigate)
                btn.path = os.path.normpath(
                    os.sep.join(splitpath[:splitpath.index(i) + 1]))
                self.pathgroup.add_widget(btn)
Example #2
0
    def on_path(self, instance, path):
        #print "ONPATH"
        try:
            self.remove_widget(self.davbar)
        except:
            pass
        self.gen_actionbar()

        self.pathgroup = ActionGroup(text="Path")
        self.actionview.add_widget(self.pathgroup)

        seq = os.path.abspath(normpath(path)).split(os.sep)
        splitpath = []

        if platform != "win":
            splitpath.append("/")

        for i in seq:
            if i != "":
                splitpath.append(i)

        for i in splitpath:
            if i != "":
                btn = ActionButton(text=i, on_press=hide_keyboard, on_release=self.navigate)
                btn.path = os.path.normpath(os.sep.join(splitpath[:splitpath.index(i)+1]))
                self.pathgroup.add_widget(btn)