[Pkg-bazaar-commits] ./bzr-gtk/unstable r438: Update window titles
Aaron Bentley
aaron at aaronbentley.com
Fri Apr 10 07:50:18 UTC 2009
------------------------------------------------------------
revno: 438
committer: Aaron Bentley <aaron at aaronbentley.com>
branch nick: bzr-gtk
timestamp: Tue 2008-03-04 18:03:39 +0000
message:
Update window titles
modified:
__init__.py
annotate/gannotate.py
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2008-02-27 05:23:50 +0000
+++ b/__init__.py 2008-03-04 18:03:39 +0000
@@ -306,7 +306,6 @@
window = GAnnotateWindow(all, plain)
window.connect("destroy", lambda w: gtk.main_quit())
- window.set_title(path + " - gannotate")
config = GAnnotateConfig(window)
window.show()
br.lock_read()
=== modified file 'annotate/gannotate.py'
--- a/annotate/gannotate.py 2008-03-04 16:56:23 +0000
+++ b/annotate/gannotate.py 2008-03-04 18:03:39 +0000
@@ -113,6 +113,9 @@
self.annoview.set_model(self.annomodel)
self.annoview.grab_focus()
+ my_revno = self.dotted.get(self.revision_id, 'current')
+ title = '%s (%s) - gannotate' % (self.tree.id2path(file_id), my_revno)
+ self.set_title(title)
def jump_to_line(self, lineno):
if lineno > len(self.annomodel) or lineno < 1:
@@ -238,7 +241,7 @@
self._search.show_for('line')
self._search.set_target(self.annoview, LINE_NUM_COL)
- def row_diff(self, tv, path, tvc):
+ def line_diff(self, tv, path, tvc):
row = path[0]
revision = self.annotations[row]
repository = self.branch.repository
@@ -253,7 +256,7 @@
tree2 = repository.revision_tree(NULL_REVISION)
from bzrlib.plugins.gtk.diff import DiffWindow
window = DiffWindow()
- window.set_diff("Diff for row %d" % (row+1), tree1, tree2)
+ window.set_diff("Diff for line %d" % (row+1), tree1, tree2)
window.set_file(tree1.id2path(self.file_id))
window.show()
@@ -263,7 +266,7 @@
tv.set_rules_hint(False)
tv.connect("cursor-changed", self._activate_selected_revision)
tv.show()
- tv.connect("row-activated", self.row_diff)
+ tv.connect("row-activated", self.line_diff)
cell = gtk.CellRendererText()
cell.set_property("xalign", 1.0)
More information about the Pkg-bazaar-commits
mailing list