# HG changeset patch # User Adrian Buehlmann <adr...@cadifra.com> # Date 1255904039 -7200 # Branch stable # Node ID b587315e680ca0aadccc58581d4adf3c4b5fb4d9 # Parent fd23092a4ca02dc1dce38548c2f3e26ef5ab1e49 csinfo: add expander
TODO: In history viewer, if no cset has been selected yet, *two" expander (-) widgets are shown. I couldn't figure out yet why. diff --git a/tortoisehg/hgtk/csinfo.py b/tortoisehg/hgtk/csinfo.py --- a/tortoisehg/hgtk/csinfo.py +++ b/tortoisehg/hgtk/csinfo.py @@ -396,9 +396,14 @@ class SummaryPanel(SummaryBase, gtk.Fram self.set_shadow_type(gtk.SHADOW_NONE) self.csstyle = style + self.expander = gtk.Expander() + self.expander.set_expanded(True) + self.add(self.expander) + # layout table for contents self.table = gtklib.LayoutTable(ypad=1, headopts={'weight': 'bold'}) - self.add(self.table) + + self.expander.add(self.table) def update(self, target=None, style=None, custom=None, repo=None): if not SummaryBase.update(self, target, custom, repo): @@ -434,6 +439,7 @@ class SummaryPanel(SummaryBase, gtk.Fram assert isinstance(sel, bool) # build info + first = True self.table.clear_rows() for item in contents: markups = self.get_markup(item) @@ -443,9 +449,13 @@ class SummaryPanel(SummaryBase, gtk.Fram markups = (markups,) for text in markups: body = gtk.Label() + body.set_selectable(sel) body.set_markup(text) - body.set_selectable(sel) - self.table.add_row(self.get_label(item), body) + if first: + self.expander.set_label_widget(body) + first = False + else: + self.table.add_row(self.get_label(item), body) self.show_all() return True ------------------------------------------------------------------------------ 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 Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop