Rev 457: Hide revision number column if more than one branch was specified. in file:///data/jelmer/bzr-gtk/multi-heads/
Jelmer Vernooij
jelmer at samba.org
Fri Mar 28 19:12:29 GMT 2008
At file:///data/jelmer/bzr-gtk/multi-heads/
------------------------------------------------------------
revno: 457
revision-id: jelmer at samba.org-20080328191227-plxs0ycul23lkcmm
parent: jelmer at samba.org-20080327162729-eydrkliuspbqyu6x
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: multi-heads
timestamp: Fri 2008-03-28 20:12:27 +0100
message:
Hide revision number column if more than one branch was specified.
modified:
viz/branchwin.py branchwin.py-20051016222514-15fd120652fcf25c
=== modified file 'viz/branchwin.py'
--- a/viz/branchwin.py 2008-03-27 16:27:29 +0000
+++ b/viz/branchwin.py 2008-03-28 19:12:27 +0000
@@ -155,8 +155,16 @@
view_menu.add(view_menu_compact)
view_menu.add(gtk.SeparatorMenuItem())
- for (label, name) in [("Revision _Number", "revno"), ("_Date", "date")]:
- col = gtk.CheckMenuItem("Show " + label + " Column")
+ self.mnu_show_revno_column = gtk.CheckMenuItem("Show Revision _Number Column")
+ self.mnu_show_date_column = gtk.CheckMenuItem("Show _Date Column")
+
+ # Revision numbers are pointless if there are multiple branches
+ if len(self.start_revs) > 1:
+ self.mnu_show_revno_column.set_sensitive(False)
+ self.treeview.set_property('revno-column-visible', False)
+
+ for (col, name) in [(self.mnu_show_revno_column, "revno"),
+ (self.mnu_show_date_column, "date")]:
col.set_active(self.treeview.get_property(name + "-column-visible"))
col.connect('toggled', self._col_visibility_changed, name)
view_menu.add(col)
@@ -236,6 +244,7 @@
if option is not None:
self.treeview.set_property(col + '-column-visible', option == 'True')
+ self.treeview.set_property(col + '-column-visible', False)
self.treeview.show()
align = gtk.Alignment(0.0, 0.0, 1.0, 1.0)
More information about the bazaar-commits
mailing list