/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 annotate/gannotate.py

  • Committer: Aaron Bentley
  • Date: 2008-03-04 18:03:39 UTC
  • Revision ID: aaron@aaronbentley.com-20080304180339-5is215gbue9ff3tu
Update window titles

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
 
114
114
        self.annoview.set_model(self.annomodel)
115
115
        self.annoview.grab_focus()
 
116
        my_revno = self.dotted.get(self.revision_id, 'current')
 
117
        title = '%s (%s) - gannotate' % (self.tree.id2path(file_id), my_revno)
 
118
        self.set_title(title)
116
119
 
117
120
    def jump_to_line(self, lineno):
118
121
        if lineno > len(self.annomodel) or lineno < 1:
238
241
        self._search.show_for('line')
239
242
        self._search.set_target(self.annoview, LINE_NUM_COL)
240
243
 
241
 
    def row_diff(self, tv, path, tvc):
 
244
    def line_diff(self, tv, path, tvc):
242
245
        row = path[0]
243
246
        revision = self.annotations[row]
244
247
        repository = self.branch.repository
253
256
                tree2 = repository.revision_tree(NULL_REVISION)
254
257
        from bzrlib.plugins.gtk.diff import DiffWindow
255
258
        window = DiffWindow()
256
 
        window.set_diff("Diff for row %d" % (row+1), tree1, tree2)
 
259
        window.set_diff("Diff for line %d" % (row+1), tree1, tree2)
257
260
        window.set_file(tree1.id2path(self.file_id))
258
261
        window.show()
259
262
 
263
266
        tv.set_rules_hint(False)
264
267
        tv.connect("cursor-changed", self._activate_selected_revision)
265
268
        tv.show()
266
 
        tv.connect("row-activated", self.row_diff)
 
269
        tv.connect("row-activated", self.line_diff)
267
270
 
268
271
        cell = gtk.CellRendererText()
269
272
        cell.set_property("xalign", 1.0)