Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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)