# HG changeset patch
# User Adrian Buehlmann <[email protected]>
# Date 1256033676 -7200
# Branch stable
# Node ID f7349fe5b16bca785b7571edb0bbdfdbcf67b9f6
# Parent 2cf8c6ef716b0a1005a351d848b17d3a29b3a8e9
csinfo: make expander a style property
default to not using an expander
diff --git a/tortoisehg/hgtk/csinfo.py b/tortoisehg/hgtk/csinfo.py
--- a/tortoisehg/hgtk/csinfo.py
+++ b/tortoisehg/hgtk/csinfo.py
@@ -402,8 +402,6 @@ class SummaryPanel(SummaryBase, gtk.Fram
# layout table for contents
self.table = gtklib.LayoutTable(ypad=1, headopts={'weight': 'bold'})
- self.expander.add(self.table)
-
def update(self, target=None, style=None, custom=None, repo=None):
if not SummaryBase.update(self, target, custom, repo):
return False # cannot update
@@ -437,6 +435,8 @@ class SummaryPanel(SummaryBase, gtk.Fram
sel = self.csstyle.get('selectable', False)
assert isinstance(sel, bool)
+ use_expander = self.csstyle.get('expander', False)
+
# build info
first = True
self.table.clear_rows()
@@ -447,12 +447,16 @@ class SummaryPanel(SummaryBase, gtk.Fram
if isinstance(markups, basestring):
markups = (markups,)
if markups and not self.get_child():
- self.add(self.expander)
+ if use_expander:
+ self.add(self.expander)
+ self.expander.add(self.table)
+ else:
+ self.add(self.table)
for text in markups:
body = gtk.Label()
body.set_selectable(sel)
body.set_markup(text)
- if first:
+ if use_expander and first:
self.expander.set_label_widget(body)
first = False
else:
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop