simon-git: putty (master): Simon Tatham
Commits to Tartarus CVS repository.
tartarus-commits at lists.tartarus.org
Mon Aug 24 19:37:01 BST 2015
TL;DR:
a98b1cc Use new GTK3 API call for server-controlled window resize.
3e86aa1 Another GTK3 fix for GtkEntry width.
47ff8d0 Factor out columns_find_child() in the Columns class.
d507e99 New Columns method, columns_force_same_height().
22ed04d Use columns_force_same_height() for vertical centring.
afe2c35 Make string_width() work in GTK3.
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-24 19:37:01
commit a98b1cc03b4f6dd2d8fc42fd71008f113e484037
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=a98b1cc03b4f6dd2d8fc42fd71008f113e484037;hp=80259e85c2c24a18134f9490f65445f06d1aa3c3
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 24 18:59:13 2015 +0100
Use new GTK3 API call for server-controlled window resize.
gtk_window_resize_to_geometry() allows us to make use of the already-
set-up WM resize hints to immediately figure out how to resize the
window to a particular character cell size, and hence makes a much
simpler implementation of request_resize() than the previous hackery.
unix/gtkwin.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
commit 3e86aa1bc6566e703deac48d322791c23b3e49b2
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=3e86aa1bc6566e703deac48d322791c23b3e49b2;hp=a98b1cc03b4f6dd2d8fc42fd71008f113e484037
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 24 19:04:37 2015 +0100
Another GTK3 fix for GtkEntry width.
When I committed 5e738877b the other day, I missed another case of the
same thing in the file/font selector handling.
unix/gtkdlg.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
commit 47ff8d0bf0444e1c533d4bcfa5793395d22c40e6
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=47ff8d0bf0444e1c533d4bcfa5793395d22c40e6;hp=3e86aa1bc6566e703deac48d322791c23b3e49b2
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 24 19:12:29 2015 +0100
Factor out columns_find_child() in the Columns class.
This is an obviously reusable loop over cols->children looking for a
widget, which I'm about to use a couple more times so it seems worth
pulling it out into its own helper function.
unix/gtkcols.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
commit d507e99d2046e1af5e1c98f9b63638ba0e946098
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=d507e99d2046e1af5e1c98f9b63638ba0e946098;hp=47ff8d0bf0444e1c533d4bcfa5793395d22c40e6
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 24 19:23:32 2015 +0100
New Columns method, columns_force_same_height().
This forces two child widgets of a Columns to occupy the same amount
of vertical space, and if one is really shorter than the other,
vertically centres it in the extra space.
unix/gtkcols.c | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
unix/gtkcols.h | 2 ++
2 files changed, 46 insertions(+), 5 deletions(-)
commit 22ed04d00ef30f9713c8e7f6280a60ac78df943c
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=22ed04d00ef30f9713c8e7f6280a60ac78df943c;hp=d507e99d2046e1af5e1c98f9b63638ba0e946098
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 24 19:23:38 2015 +0100
Use columns_force_same_height() for vertical centring.
In cases where two controls sit alongside one another such as a label
alongside an edit box, I've previously been arranging for them to be
vertically centred by fiddling with the size request and alignment of
what I assume will be the shorter control. But now I've written
columns_force_same_height(), that's a much easier approach, and it's
also compatible with GTK3 without using a deprecated method; so this
change switches over all vertical centring to doing it that way.
Also, while I'm here, I noticed that the edit box and button of
CTRL_FILESELECT / CTRL_FONTSELECT were not vertically centred, and
since it's now really easy to make sure they are, I've added another
use of columns_force_same_height() there.
unix/gtkdlg.c | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)
commit afe2c355cf89216942240c58c701fde77a20a567
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=afe2c355cf89216942240c58c701fde77a20a567;hp=22ed04d00ef30f9713c8e7f6280a60ac78df943c
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 24 19:31:44 2015 +0100
Make string_width() work in GTK3.
This was another piece of code that determined text size by
instantiating a GtkLabel and asking for its size, which I had to fix
in gtkfont.c recently because that strategy doesn't work in GTK3.
Replaced the implementation of string_width() with a call to the
function I added in gtkfont.c, and now dialog boxes which depend on
that for their width measurement (e.g. the one in reallyclose()) don't
come out in silly sizes on GTK3 any more.
unix/gtkdlg.c | 8 +++-----
unix/gtkfont.c | 15 +++++++++------
unix/unix.h | 3 +++
3 files changed, 15 insertions(+), 11 deletions(-)
More information about the tartarus-commits
mailing list