Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

status: replace strikethrough with other cell attributes

use font scale to shrink rejected chunks, but leave them readable
set grey background

Changeset e52516742fe6

Parent 3dcd0d1e9500

by Steve Borho

Changes to one file · Browse files at e52516742fe6 Showing diff from parent 3dcd0d1e9500 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​status.py Stacked
 
340
341
342
343
344
345
 
 
346
 
 
 
 
 
 
 
 
 
 
 
 
 
347
348
349
350
351
352
 
 
353
354
355
 
340
341
342
 
 
 
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
@@ -340,16 +340,30 @@
  self.diff_tree.connect('button-release-event',   self._patch_button_release)   - diff_hunk_cell = gtk.CellRendererText() - diff_hunk_cell.set_property('cell-background', '#EEEEEE') - diffcol = gtk.TreeViewColumn('diff', diff_hunk_cell) + cell = gtk.CellRendererText() + diffcol = gtk.TreeViewColumn('diff', cell)   diffcol.set_resizable(True) + diffcol.add_attribute(cell, 'markup', DM_CHUNK_TEXT) + + # differentiate header chunks + cell.set_property('cell-background', '#EEEEEE') + diffcol.add_attribute(cell, 'cell_background_set', DM_HEADER_CHUNK) + + # Rejected hunks are given darker background, smaller font + cell.set_property('background', '#CCCCCC') + cell.set_property('scale', pango.SCALE_X_SMALL) + diffcol.add_attribute(cell, 'background-set', DM_REJECTED) + diffcol.add_attribute(cell, 'scale-set', DM_REJECTED) + #diffcol.add_attribute(cell, 'strikethrough', DM_REJECTED) +   self.diff_tree.append_column(diffcol)   self.filetree.get_selection().set_mode(gtk.SELECTION_MULTIPLE)   self.filetree.get_selection().connect('changed',   self._tree_selection_changed, False)   scroller.add(self.diff_tree)   + # This vbox left here in case we want to add widgets at + # the top of the diff pane again.   vbox = gtk.VBox()   vbox.pack_start(scroller, True, True, 2)