Exemplo n.º 1
0
	def __go_up(self):
		from gio import File
		gfile = File(self.__folder_uri).get_parent()
		if not gfile: return False
		from gobject import idle_add
		idle_add(self.__manager.emit, "generate-uris", gfile.get_uri())
		return False
Exemplo n.º 2
0
def show_path(path):
	"""Open local @path with default viewer"""
	from gio import File
	# Implemented using gtk.show_uri
	gfile = File(path)
	if not gfile:
		return
	url = gfile.get_uri()
	show_url(url)
Exemplo n.º 3
0
def show_path(path):
    """Open local @path with default viewer"""
    from gio import File
    # Implemented using gtk.show_uri
    gfile = File(path)
    if not gfile:
        return
    url = gfile.get_uri()
    show_url(url)
    def find_project_root(self, path):
        f = File(path)
        project_files = (".git", ".ropeproject", ".bzr", ".hg", ".scribes_project")
        while True:
            if any(f.get_child(r).query_exists() for r in project_files):
                return f.get_uri()

            p = f.get_parent()
            if p:
                f = p
            else:
                return path
    def find_project_root(self, path):
        f = File(path)
        project_files = ('.git', '.ropeproject', '.bzr', '.hg',
                         '.scribes_project')
        while True:
            if any(f.get_child(r).query_exists() for r in project_files):
                return f.get_uri()

            p = f.get_parent()
            if p:
                f = p
            else:
                return path