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: support multiple results of markup text

Changeset 7e541486a82b

Parent 6d913723eea7

by Yuki KODAMA

Changes to one file · Browse files at 7e541486a82b Showing diff from parent 6d913723eea7 Diff from another changeset...

 
331
332
333
334
335
 
 
 
 
 
 
336
337
338
 
377
378
379
380
381
382
 
 
 
 
 
 
383
384
385
 
331
332
333
 
 
334
335
336
337
338
339
340
341
342
 
381
382
383
 
 
 
384
385
386
387
388
389
390
391
392
@@ -331,8 +331,12 @@
  # build info   self.table.clear_rows()   for item in contents: - text = self.get_markup(item) - if text: + markups = self.get_markup(item) + if not markups: + continue + if isinstance(markups, basestring): + markups = (markups,) + for text in markups:   body = gtk.Label()   body.set_markup(text)   self.table.add_row(self.get_label(item), body) @@ -377,9 +381,12 @@
  # fetch required data   data = {}   for item in items: - text = self.get_markup(item) - if text: - data[item] = text + markups = self.get_markup(item) + if not markups: + continue + if isinstance(markups, basestring): + markups = (markups,) + data[item] = ', '.join(markups)   if len(data) == 0:   continue   # insert data & append to label