simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Thu May 5 19:07:24 BST 2022


TL;DR:
  b5ab9014 Improve the align_next_to mechanism.
  22a80a23 GTK: change implementation of 100%-width editboxes.
  5ca78237 CA config box: add some align_next_to.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2022-05-05 19:07:24

commit b5ab90143a2df7ffcbae00a36b4db1367c07918f
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b5ab90143a2df7ffcbae00a36b4db1367c07918f;hp=a5717f5ac217fa14936af98f55e5be81971b8cc2
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon May 2 14:37:11 2022 +0100

    Improve the align_next_to mechanism.
    
    Various alignments I want to do in the host CA box have shown up
    deficiencies in this system, so I've reworked it a bit.
    
    Firstly, you can now specify more than two controls to be tied
    together with an align_next_to (e.g. multiple checkboxes alongside
    something else).
    
    Secondly, as well as forcing the controls to be the same height as
    each other, the layout algorithm will also move the later controls
    further _downward_, so that their top y positions also line up. Until
    now that hasn't been necessary, because they lined up already.
    
    In the GTK implementation of this via the Columns class, I've renamed
    'columns_force_same_height' to 'columns_align_next_to', and similarly
    for some of the internal fields, since the latter change makes the
    previous names a misnomer.
    
    In the Windows implementation, I found it most convenient to set this
    up by following a linked list of align_next_to fields backwards. But
    it won't always be convenient to initialise them that way, so I've
    also written a crude normaliser that will rewrite those links into a
    canonical form. But I only call that on Windows; it's unnecessary in
    GTK, where the Columns class provides plenty of per-widget extra
    storage so I just keep each alignment class as a circular list.

 dialog.h                  | 24 ++++++++++++++-----
 unix/columns.c            | 58 +++++++++++++++++++++++++++++++---------------
 unix/columns.h            | 10 ++++++--
 unix/dialog.c             | 19 ++++-----------
 utils/CMakeLists.txt      |  1 +
 utils/ctrlset_normalise.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++
 windows/controls.c        | 47 +++++++++++++++++++++++++------------
 7 files changed, 162 insertions(+), 56 deletions(-)

commit 22a80a234dcff892aece29042029f52b65f44292
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=22a80a234dcff892aece29042029f52b65f44292;hp=b5ab90143a2df7ffcbae00a36b4db1367c07918f
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon May 2 15:40:44 2022 +0100

    GTK: change implementation of 100%-width editboxes.
    
    Previously, in the code that instantiated the dialog.h portable
    control spec, an edit control with width=100 would be implemented as a
    small Columns object containing the label and the edit control atop
    each other. Now, instead, the two controls are placed separately into
    the containing Columns.
    
    Combined with the changes just made to the align_next_to system, this
    means that you can put buttons to the right of such an edit box and
    have them line up with the actual edit box, instead of trying to line
    up with the combination of the box and its label.
    
    (The Windows alignment system already identified the specific edit box
    control as the relevant one, so this was already working there.)

 unix/dialog.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

commit 5ca78237edf7873fdec01fb657c023d9777faf5d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5ca78237edf7873fdec01fb657c023d9777faf5d;hp=22a80a234dcff892aece29042029f52b65f44292
Author: Simon Tatham <anakin at pobox.com>
Date:   Thu May 5 18:07:09 2022 +0100

    CA config box: add some align_next_to.
    
    Now the RSA signature-type checkboxes should be aligned with their
    label; the 'Add' and 'Remove' buttons for wildcards should align with
    the edit box for entering a wildcard; and the 'Load from file' button
    for a public key aligns with the edit box for that.

 ssh/ca-config.c | 7 +++++++
 1 file changed, 7 insertions(+)



More information about the tartarus-commits mailing list