/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-22 15:01:53 UTC
  • mfrom: (256.4.1 gtk)
  • mto: This revision was merged to the branch mainline in revision 289.
  • Revision ID: garyvdm@gmail.com-20070922150153-zkqtq9gfj9d3pwrk
Merge viz changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        self.treeview.show()
88
88
 
89
89
        cell = gtk.CellRendererText()
90
 
        #cell.set_property("width-chars", 40)
91
 
        #cell.set_property("ellipsize", pango.ELLIPSIZE_END)
 
90
        cell.set_property("width-chars", 10)
 
91
        cell.set_property("ellipsize", pango.ELLIPSIZE_END)
92
92
        column = gtk.TreeViewColumn("Revision No")
93
93
        column.set_resizable(True)
94
94
        column.pack_start(cell, expand=True)
95
95
        column.add_attribute(cell, "text", treemodel.REVNO)
96
96
        self.treeview.append_column(column)
97
97
 
98
 
        cell = CellRendererGraph()
 
98
        self.graph_cell = CellRendererGraph()
99
99
        column = gtk.TreeViewColumn()
100
100
        column.set_resizable(True)
101
 
        column.pack_start(cell, expand=False)
102
 
        column.add_attribute(cell, "node", treemodel.NODE)
103
 
        column.add_attribute(cell, "in-lines", treemodel.LAST_LINES)
104
 
        column.add_attribute(cell, "out-lines", treemodel.LINES)
 
101
        column.pack_start(self.graph_cell, expand=False)
 
102
        column.add_attribute(self.graph_cell, "node", treemodel.NODE)
 
103
        column.add_attribute(self.graph_cell, "in-lines", treemodel.LAST_LINES)
 
104
        column.add_attribute(self.graph_cell, "out-lines", treemodel.LINES)
105
105
        self.treeview.append_column(column)
106
106
 
107
107
        cell = gtk.CellRendererText()
183
183
        gobject.idle_add(self.populate_model, start, maxnum)
184
184
 
185
185
    def populate_model(self, start, maxnum):
186
 
        (linegraphdata, index) = linegraph(self.branch,
187
 
                                           start,
188
 
                                           maxnum)
 
186
        (linegraphdata, index, columns_len) = linegraph(self.branch,
 
187
                                                        start,
 
188
                                                        maxnum)
189
189
        self.model = TreeModel(self.branch, linegraphdata)
 
190
        self.graph_cell.columns_len = columns_len
190
191
        self.index = index
191
192
        self.treeview.set_model(self.model)
192
193
    def _on_key_pressed(self, widget, event):