Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.3rc1, 0.3, and 0.4rc1

hggtk/thgconfig: add separators between value types

Changeset e5d92b531b70

Parent ea005c994375

by Steve Borho

Changes to one file · Browse files at e5d92b531b70 Showing diff from parent ea005c994375 Diff from another changeset...

 
404
405
406
407
 
408
409
 
410
411
412
 
419
420
421
422
423
424
425
426
 
 
 
 
 
 
 
427
 
428
429
430
 
 
 
 
431
432
433
 
438
439
440
 
441
442
443
 
404
405
406
 
407
408
409
410
411
412
413
 
420
421
422
 
 
 
 
 
423
424
425
426
427
428
429
430
431
432
433
 
434
435
436
437
438
439
440
 
445
446
447
448
449
450
451
@@ -404,9 +404,10 @@
  vbox.pack_start(table, False, False, 2)     for row, (label, cpath, values, tooltip) in enumerate(info): - vlist = gtk.ListStore(str) + vlist = gtk.ListStore(str, bool)   combo = gtk.ComboBoxEntry(vlist, 0)   combo.connect("changed", self.dirty_event) + combo.set_row_separator_func(lambda model, iter: model[iter][1])   widgets.append(combo)     # Get currently configured value from this config file @@ -419,15 +420,21 @@
  values.append(name[4:])     currow = None - vlist.append([_unspecstr]) - for v in values: - vlist.append([v]) - if v == curvalue: - currow = len(vlist) - 1 + vlist.append([_unspecstr, False]) + if values: + vlist.append(['Suggested', True]) + for v in values: + vlist.append([v, False]) + if v == curvalue: + currow = len(vlist) - 1   if cpath in self.history: + separator = False   for v in self.history[cpath]:   if v in values: continue - vlist.append([v]) + if not separator: + vlist.append(['History', True]) + separator = True + vlist.append([v, False])   if v == curvalue:   currow = len(vlist) - 1   @@ -438,6 +445,7 @@
  else:   combo.set_active(currow)   +   lbl = gtk.Label(label + ':')   lbl.set_alignment(1.0, 0.0)   eventbox = gtk.EventBox()