def icon_file(filename, staged=False, untracked=False): """Returns a file path representing a corresponding file path.""" if staged: if core.exists(filename): ifile = resources.icon('staged-item.png') else: ifile = resources.icon('removed.png') elif untracked: ifile = resources.icon('untracked.png') else: ifile = utils.file_icon(filename) return ifile
def icon_file(filename, staged=False, untracked=False): """Returns a file path representing a corresponding file path.""" exists = True if staged: exists = core.exists(filename) if exists: ifile = resources.icon("staged-item.png") else: ifile = resources.icon("removed.png") elif untracked: ifile = resources.icon("untracked.png") else: (ifile, exists) = utils.file_icon(filename) return (ifile, exists)