Commit e2b42488 authored by Louis des Landes's avatar Louis des Landes Committed by Kai Willadsen

Add states to version control (bgo#701970)

parent 002647fa
......@@ -81,6 +81,7 @@ class DiffTreeStore(Gtk.TreeStore):
(unk_fg, italic, normal, None), # STATE_EMPTY
(new_fg, roman, bold, None), # STATE_NEW
(mod_fg, roman, bold, None), # STATE_MODIFIED
(mod_fg, roman, normal, None), # STATE_RENAMED
(con_fg, roman, bold, None), # STATE_CONFLICT
(del_fg, roman, bold, True), # STATE_REMOVED
(del_fg, roman, bold, True), # STATE_MISSING
......@@ -97,6 +98,7 @@ class DiffTreeStore(Gtk.TreeStore):
(None, None , None, None), # EMPTY
("text-x-generic", "folder", new_fg, None), # NEW
("text-x-generic", "folder", mod_fg, None), # MODIFIED
("text-x-generic", "folder", mod_fg, None), # RENAMED
("text-x-generic", "folder", con_fg, None), # CONFLICT
("text-x-generic", "folder", del_fg, None), # REMOVED
("text-x-generic", "folder", unk_fg, unk_fg), # MISSING
......
......@@ -30,12 +30,12 @@ from meld.conf import _
# ignored, new, normal, ignored changes,
# error, placeholder, vc added
# vc modified, vc conflict, vc removed
# vc modified, vc renamed, vc conflict, vc removed
# locally removed, end
(STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE,
STATE_ERROR, STATE_EMPTY, STATE_NEW,
STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED,
STATE_MISSING, STATE_NONEXIST, STATE_MAX) = list(range(13))
STATE_MODIFIED, STATE_RENAMED, STATE_CONFLICT, STATE_REMOVED,
STATE_MISSING, STATE_NONEXIST, STATE_MAX) = list(range(14))
# VC conflict types
(CONFLICT_MERGED, CONFLICT_BASE, CONFLICT_LOCAL,
......@@ -69,6 +69,7 @@ class Entry(object):
STATE_EMPTY: "",
STATE_NEW: _("Newly added"),
STATE_MODIFIED: _("Modified"),
STATE_RENAMED: _("Renamed"),
STATE_CONFLICT: "<b>%s</b>" % _("Conflict"),
STATE_REMOVED: _("Removed"),
STATE_MISSING: _("Missing"),
......@@ -93,11 +94,11 @@ class Entry(object):
class Dir(Entry):
def __init__(self, path, name, state):
def __init__(self, path, name, state, options=None):
Entry.__init__(self, path, name, state)
self.isdir = 1
self.rev = ""
self.options = ""
self.options = options
class File(Entry):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment