7
7
__author__ = "Gary van der Merwe <garyvdm@gmail.com>"
10
from gi.repository import Gtk
11
from gi.repository import GObject
12
12
from xml.sax.saxutils import escape
14
14
from bzrlib.config import parse_username
37
class TreeModel(gtk.GenericTreeModel):
37
class TreeModel(Gtk.TreeStore):
39
39
def __init__ (self, branch, line_graph_data):
40
gtk.GenericTreeModel.__init__(self)
40
Gtk.TreeStore.__init__(self)
41
41
self.revisions = {}
42
42
self.branch = branch
43
43
self.repository = branch.repository
56
56
self.tags[revid] = [tag]
58
58
def on_get_flags(self):
59
return gtk.TREE_MODEL_LIST_ONLY
59
return Gtk.TREE_MODEL_LIST_ONLY
61
61
def on_get_n_columns(self):
64
64
def on_get_column_type(self, index):
65
if index == REVID: return gobject.TYPE_STRING
66
if index == NODE: return gobject.TYPE_PYOBJECT
67
if index == LINES: return gobject.TYPE_PYOBJECT
68
if index == LAST_LINES: return gobject.TYPE_PYOBJECT
69
if index == REVNO: return gobject.TYPE_STRING
70
if index == SUMMARY: return gobject.TYPE_STRING
71
if index == MESSAGE: return gobject.TYPE_STRING
72
if index == COMMITTER: return gobject.TYPE_STRING
73
if index == TIMESTAMP: return gobject.TYPE_STRING
74
if index == REVISION: return gobject.TYPE_PYOBJECT
75
if index == PARENTS: return gobject.TYPE_PYOBJECT
76
if index == CHILDREN: return gobject.TYPE_PYOBJECT
77
if index == TAGS: return gobject.TYPE_PYOBJECT
78
if index == AUTHORS: return gobject.TYPE_STRING
65
if index == REVID: return GObject.TYPE_STRING
66
if index == NODE: return GObject.TYPE_PYOBJECT
67
if index == LINES: return GObject.TYPE_PYOBJECT
68
if index == LAST_LINES: return GObject.TYPE_PYOBJECT
69
if index == REVNO: return GObject.TYPE_STRING
70
if index == SUMMARY: return GObject.TYPE_STRING
71
if index == MESSAGE: return GObject.TYPE_STRING
72
if index == COMMITTER: return GObject.TYPE_STRING
73
if index == TIMESTAMP: return GObject.TYPE_STRING
74
if index == REVISION: return GObject.TYPE_PYOBJECT
75
if index == PARENTS: return GObject.TYPE_PYOBJECT
76
if index == CHILDREN: return GObject.TYPE_PYOBJECT
77
if index == TAGS: return GObject.TYPE_PYOBJECT
78
if index == AUTHORS: return GObject.TYPE_STRING
80
80
def on_get_iter(self, path):
81
# XXX sinzui 2011-08-12: maybe path.get_indices()[0]?
83
84
def on_get_path(self, rowref):