/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to viz/branchwin.py

  • Committer: Gary van der Merwe
  • Date: 2007-09-05 10:33:53 UTC
  • mto: (256.2.37 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070905103353-a9cea7kx7tr54cbk
Show Revision No in tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
        scrollwin.add(self.treeview)
81
81
        self.treeview.show()
82
82
 
 
83
        cell = gtk.CellRendererText()
 
84
        #cell.set_property("width-chars", 40)
 
85
        #cell.set_property("ellipsize", pango.ELLIPSIZE_END)
 
86
        column = gtk.TreeViewColumn("Revision No")
 
87
        column.set_resizable(True)
 
88
        column.pack_start(cell, expand=True)
 
89
        column.add_attribute(cell, "text", 9)
 
90
        self.treeview.append_column(column)
 
91
 
83
92
        cell = CellRendererGraph()
84
93
        column = gtk.TreeViewColumn()
85
94
        column.set_resizable(True)
172
181
                                   gobject.TYPE_PYOBJECT,
173
182
                                   gobject.TYPE_PYOBJECT,
174
183
                                   gobject.TYPE_PYOBJECT,
175
 
                                   str, str, str)
 
184
                                   str, str, str, str)
176
185
        self.set_title(branch.nick + " - bzrk")
177
186
        gobject.idle_add(self.populate_model, start, maxnum)
178
187
 
184
193
        self.revisions = revisions
185
194
        
186
195
        last_lines = []
187
 
        for (index,(revision, node, lines, parents, children)) in enumerate( \
188
 
                linegraphdata):
 
196
        for (index,(revision,
 
197
                    node,
 
198
                    lines,
 
199
                    parents,
 
200
                    children,
 
201
                    revno_sequence)) in enumerate(linegraphdata):
189
202
            # FIXME: at this point we should be able to show the graph order
190
203
            # and lines with no message or commit data - and then incrementally
191
204
            # fill the timestamp, committer etc data as desired.
196
209
                timestamp = format_date(revision.timestamp, revision.timezone)
197
210
            else:
198
211
                timestamp = None
199
 
            self.model.append([revision, node, last_lines, lines,
200
 
                               parents, children, 
201
 
                               message, revision.committer, timestamp])
 
212
            revno_string = ".".join(["%d" % (revno) for revno in revno_sequence])
 
213
            
 
214
            self.model.append([revision,
 
215
                               node,
 
216
                               last_lines,
 
217
                               lines,
 
218
                               parents,
 
219
                               children, 
 
220
                               message,
 
221
                               revision.committer,
 
222
                               timestamp,
 
223
                               revno_string])
202
224
            last_lines = lines
203
225
        self.treeview.set_model(self.model)
204
226