simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sat Sep 26 14:22:51 BST 2015


TL;DR:
  854fae8 Fix combining character handling in Pango.
  3c7557d Visually distinguish charset headings in GTK3 unifontsel.
  777f38e Bring the gtkask.c test main() up to date.
  9458377 Don't defer displaying the prompt label in gtkask.
  81152e5 Add some missing GTK focus-in event handlers.
  9a3b743 Remove a couple of outdated FIXME comments.
  46b7cb6 Permit the config box treeview to be keyboard-selected.
  291cbfc Fix GTK keyboard-shortcut focusing of CTRL_LISTBOX.
  612534a Make sure Escape in a message box always does something.
  10d3b73 Make sure Escape terminates the About box.
  1bdeff7 Widen the GTK askalg() message box.
  acff0a6 Set GTK3 as the default, and stop marking it unfinished.

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-09-26 14:22:51

commit 854fae843b4b524208a5635ce7c2500ecaff3bbc
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=854fae843b4b524208a5635ce7c2500ecaff3bbc;hp=431f8db86278836adbe63dba7d1ab25fb94b616d
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 10:18:53 2015 +0100

    Fix combining character handling in Pango.
    
    The top-level loop in gtkwin.c which draws text was expecting that the
    right way to draw a printing character plus combining characters was
    to overprint them one by one on top of each other. This is an OK
    assumption for X bitmap fonts, but in Pango, it works very badly -
    most obviously because asking Pango to display a combining char on its
    own causes it to print a dotted circle representing the base char, but
    also because surely there will be character combinations where Pango
    wants to do something more sophisticated than just printing them each
    at a standard offset, and it would be a shame not to let it.
    
    So I've moved the previous overprinting loop down into the x11font
    subclass of the unifont mechanism. The top-level gtkwin.c drawing code
    now calls a new method unifont_draw_combining, which in the X11 case
    does the same loop as before, but in the Pango case, just passes a
    whole base+combinings string to Pango in one go and lets it do the
    best job it can.

 unix/gtkfont.c |  186 +++++++++++++++++++++++++++++++++++++++++++-------------
 unix/gtkfont.h |    6 ++
 unix/gtkwin.c  |   17 ++++--
 3 files changed, 164 insertions(+), 45 deletions(-)

commit 3c7557dcd00819a28585c372da3f16b8c5f131f8
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=3c7557dcd00819a28585c372da3f16b8c5f131f8;hp=854fae843b4b524208a5635ce7c2500ecaff3bbc
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 10:42:02 2015 +0100

    Visually distinguish charset headings in GTK3 unifontsel.
    
    When displaying a server-side font, the unified font selector's
    font-style list box contains some lines which are character-set
    headings, and others which are actually selectable font styles. We tag
    the former with the "sensitive"=FALSE attribute, to prevent them from
    responding to clicks. In GTK2, this also made them visually distinct
    from the normal lines, by greying them out; in GTK3 it makes no visual
    difference.
    
    The simplest solution is to bold those lines, hinting that they're
    sort of section headings. That looks OK in GTK2 as well, so I've done
    it unconditionally.

 unix/gtkfont.c |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

commit 777f38e4913f7e2ed54d87cb3f4acb4dafab2d1d
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=777f38e4913f7e2ed54d87cb3f4acb4dafab2d1d;hp=3c7557dcd00819a28585c372da3f16b8c5f131f8
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 10:53:32 2015 +0100

    Bring the gtkask.c test main() up to date.
    
    I changed the prototype of gtk_askpass_main() since I last tried to
    compile that standalone test program.

 unix/gtkask.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 945837727580fbbbe615e5791e1e681c60501150
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=945837727580fbbbe615e5791e1e681c60501150;hp=777f38e4913f7e2ed54d87cb3f4acb4dafab2d1d
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 11:09:20 2015 +0100

    Don't defer displaying the prompt label in gtkask.
    
    The previous sequence of events was that I would display the window
    synchronously (via gtk_widget_show_now), so that I knew it was
    actually on the screen and realised as an X window, and then I'd grab
    the keyboard, and once the keyboard was grabbed, connect up the
    keyboard event handlers and display the prompt.
    
    I have to assume that deferring the display of the 'enter the
    passphrase' prompt until the keyboard handlers were set up was
    intended as some sort of 'not misleading the user' measure - don't
    tell them to start typing until we're actually ready to start typing.
    But unfortunately it has the side effect that the window is displayed
    at a much smaller size before the prompt label appears, and centred on
    the screen according to _that_ size - and then we display the prompt
    label and the window resizes and is now off-centre. So I think it's
    better not to try to be clever, and just make the window come up at
    the right size initially.
    
    (Actually, it looks as if nothing in the window is actually drawn
    until that whole init function is finished anyway, so the prompt label
    _already_ doesn't get physically displayed too early. So the whole
    idea was pointless in the first place!)

 unix/gtkask.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 81152e5f3811b8da3b9f8ce280245942141d8da2
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=81152e5f3811b8da3b9f8ce280245942141d8da2;hp=945837727580fbbbe615e5791e1e681c60501150
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 11:48:21 2015 +0100

    Add some missing GTK focus-in event handlers.
    
    Fixes a behaviour which I intended all along but apparently didn't
    work before on GTK: if you start PuTTY, _select_ a saved session in
    the list box but don't hit Load, and then just hit Open, then it will
    be implicitly loaded and run for you, as a special case to save you an
    extra button-press.
    
    This depends on noticing that the saved-sessions list box last had the
    focus, for which I need my widget_focus() handler to be called for
    basically all config widgets so that I can track what _did_ last have
    focus. Unfortunately, I missed a couple out.

 unix/gtkdlg.c |    5 +++++
 1 file changed, 5 insertions(+)

commit 9a3b74326071edde1cae699af9b7b85adec1de82
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=9a3b74326071edde1cae699af9b7b85adec1de82;hp=81152e5f3811b8da3b9f8ce280245942141d8da2
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 12:59:26 2015 +0100

    Remove a couple of outdated FIXME comments.
    
    I had originally planned to implement a Compose-type key locally in
    GTK PuTTY, as I did in Windows PuTTY. But in fact we've done this for
    some time by delegating to the GTK IM system, which is a far better
    idea anyway. So there's no point any more having the FIXME comment
    that mentions Compose keys.
    
    Also, there was a comment worrying about what I was going to do about
    double-width characters in Pango, which is long since sorted out.

 unix/gtkwin.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

commit 46b7cb6edb9e8218d65b33ddca8db45fca13535e
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=46b7cb6edb9e8218d65b33ddca8db45fca13535e;hp=9a3b74326071edde1cae699af9b7b85adec1de82
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 13:12:25 2015 +0100

    Permit the config box treeview to be keyboard-selected.
    
    I'd failed to set the widget field in its shortcut structure, leading
    to an annoying GTK warning log message and no useful UI action when
    Alt-G was pressed in the config box.

 unix/gtkdlg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 291cbfc369851b4efb515c44338c9d4aabe9c3e3
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=291cbfc369851b4efb515c44338c9d4aabe9c3e3;hp=46b7cb6edb9e8218d65b33ddca8db45fca13535e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 13:22:49 2015 +0100

    Fix GTK keyboard-shortcut focusing of CTRL_LISTBOX.
    
    I had put an entire piece of code into win_key_press's SHORTCUT_UCTRL
    handler to carefully handle all the different kinds of list box
    control and do something sensible with each one, and then I just went
    and used a generic SHORTCUT_FOCUS type shortcut instead of actually
    _calling_ all that carefully prepared code.
    
    Now selecting (say) the character-classes list box in the Selection
    panel using its Alt-e shortcut works; also, shortcut-selecting a popup
    menu such as the ones in the Bugs panel causes the menu to pop up,
    which I think is nicer than what previously happened.

 unix/gtkdlg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit 612534a4b42aacdc35a9b786915156f558ef359a
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=612534a4b42aacdc35a9b786915156f558ef359a;hp=291cbfc369851b4efb515c44338c9d4aabe9c3e3
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 13:57:12 2015 +0100

    Make sure Escape in a message box always does something.
    
    The askalg() dialog, and several one-button things like the licence
    box, have no button labelled 'cancel'. But in all cases we do want
    Escape to terminate the box, with as negative an answer as is
    available. So now we assign the 'iscancel' flag to any button whose
    numeric value is the smallest of the ones given as input to
    messagebox().
    
    (In a one-button box, this leads to isdefault and iscancel _both_
    being set for that button. That's fine; it works.)

 unix/gtkdlg.c |   28 ++++++++++++++++++++++++----
 1 file changed, 24 insertions(+), 4 deletions(-)

commit 10d3b73d339a177f9fba680bc9aae70c77d2a3bb
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=10d3b73d339a177f9fba680bc9aae70c77d2a3bb;hp=612534a4b42aacdc35a9b786915156f558ef359a
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 14:09:27 2015 +0100

    Make sure Escape terminates the About box.
    
    I think it only did so in GTK2 by virtue of the About box being a
    GtkDialog. But in GTK3 I've abandoned GtkDialog for not being flexible
    enough, so I have to process the Escape key myself.

 unix/gtkdlg.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

commit 1bdeff715c9b8c79ec5dc021b5aca403f575f1ae
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=1bdeff715c9b8c79ec5dc021b5aca403f575f1ae;hp=10d3b73d339a177f9fba680bc9aae70c77d2a3bb
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 14:13:56 2015 +0100

    Widen the GTK askalg() message box.
    
    In GTK3, the line 'Continue with connection?' got wrapped (in spite of
    my attempt to enforce via string_width() that it didn't - probably a
    few pixels were needed on top of that for various padding and
    furniture) so it looked even sillier. But it looked a bit narrow to be
    sensible even in GTK2, so the simplest answer is just to widen it
    considerably.

 unix/gtkdlg.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit acff0a6fa3c5eaa505422b1861efc93b948ede5b
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=acff0a6fa3c5eaa505422b1861efc93b948ede5b;hp=1bdeff715c9b8c79ec5dc021b5aca403f575f1ae
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Sep 26 14:17:51 2015 +0100

    Set GTK3 as the default, and stop marking it unfinished.
    
    Today I've gone through the whole GTK front end, doing a manual test
    of every piece of code that I either remembered having had to fiddle
    with for GTK3, or suddenly realised I _should_ have fiddled with. I've
    fixed all the bugs arising from that exercise; and what with that, the
    fact that the new Cairo image surface strategy makes server-side font
    handling _faster_ in GTK3 than in GTK2, and the fact that GTK3 also
    supports the shiny new smooth scrolling system for touchpads, I
    suddenly think that the GTK3 build is now at least as good as GTK2.
    
    So I've switched the configure script over to picking it by default if
    it can, and I've also removed the 'unfinished and experimental'
    warning if you select it. I for one will now start using GTK3 PuTTY
    and pterm for my day-to-day work.

 configure.ac |   31 +++++++++----------------------
 1 file changed, 9 insertions(+), 22 deletions(-)



More information about the tartarus-commits mailing list