Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable csinfo: make expander a style property

default to not using an expander

Changeset 9eaac1de86f9

Parent 421c2cf5fa5c

by Adrian Buehlmann

Changes to one file · Browse files at 9eaac1de86f9 Showing diff from parent 421c2cf5fa5c Diff from another changeset...

 
444
445
446
447
448
449
450
451
 
479
480
481
 
 
482
483
484
 
489
490
491
492
 
 
 
 
 
493
494
495
496
497
 
498
499
500
 
444
445
446
 
 
447
448
449
 
477
478
479
480
481
482
483
484
 
489
490
491
 
492
493
494
495
496
497
498
499
500
 
501
502
503
504
@@ -444,8 +444,6 @@
  # 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 @@ -479,6 +477,8 @@
  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() @@ -489,12 +489,16 @@
  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: