simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sun Aug 23 15:02:33 BST 2015


TL;DR:
  64b51dc GTK3 prep: refactor the layout calculation in Columns.
  e076959 Implement GTK3 height-for-width layout in Columns.
  80259e8 In GTK3, omit our GTK 1/2 workaround for wrapping labels.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-08-23 15:02:33

commit 64b51dcbbaa9a35243224fb74ad9a95ff60d5aff
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=64b51dcbbaa9a35243224fb74ad9a95ff60d5aff;hp=c3ef30c883e3657ff57679fb611f1f6ee6f33dba
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Aug 23 14:49:01 2015 +0100

    GTK3 prep: refactor the layout calculation in Columns.
    
    Previously, columns_size_request and columns_size_allocate would each
    loop over all the widgets doing computations for both width and
    height. Now I've separated out the width parts from the height parts,
    and moved both out into four new functions, so that the top-level
    columns_size_request and columns_size_allocate are just wrappers that
    call the new functions and plumb size and position information between
    them and GTK.
    
    Actual functionality should be unchanged by this patch.

 unix/gtkcols.c |  372 ++++++++++++++++++++++++++++++++++++--------------------
 unix/gtkcols.h |    1 +
 2 files changed, 243 insertions(+), 130 deletions(-)

commit e076959f6c1900af73271a27834e398a62d7332f
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=e076959f6c1900af73271a27834e398a62d7332f;hp=64b51dcbbaa9a35243224fb74ad9a95ff60d5aff
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Aug 23 14:50:47 2015 +0100

    Implement GTK3 height-for-width layout in Columns.
    
    Now that I've got the main calculation code separated from the GTK2
    size_request and size_allocate top-level methods, I can introduce a
    completely different set of GTK3 top-level methods, which run the same
    underlying calculations but based on different width and height
    information.
    
    So now we do proper height-for-width layout, as you can see if you
    flip the PuTTY config box to a pane with a wrapping label on it (e.g.
    Fonts or Logging) and resize the window horizontally. Where the GTK2
    config box just left the wrapped text label at its original size, and
    the GTK3 one before this change would reflow the text but without
    changing the label's height, now the text reflows and the controls
    below it move up and down when the number of lines of wrapped text
    changes.
    
    (As far as I'm concerned, that's a nice demo of GTK3's new abilities
    but not a critically important UI feature for this app. The more
    important point is that switching to the modern layout model removes
    one of the remaining uses of the deprecated gtk_widget_size_request.)

 unix/gtkcols.c |  201 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 189 insertions(+), 12 deletions(-)

commit 80259e85c2c24a18134f9490f65445f06d1aa3c3
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=80259e85c2c24a18134f9490f65445f06d1aa3c3;hp=e076959f6c1900af73271a27834e398a62d7332f
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Aug 23 15:01:07 2015 +0100

    In GTK3, omit our GTK 1/2 workaround for wrapping labels.
    
    Now we're properly implementing the GTK3 height-for-width layout
    model, this bodge is no longer necessary.

 unix/gtkdlg.c |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)



More information about the tartarus-commits mailing list