simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sun Dec 17 17:17:58 GMT 2017
TL;DR:
1829719 Add a system of clipboard identifiers.
41aa675 Make gtkwin.c able to support multiple selections.
cd73482 Add a cross-platform clipboard called CLIP_LOCAL.
131a8e9 Ability to copy to multiple clipboards at once.
3d93724 GTK context menu options to copy/paste CLIPBOARD.
98fa733 Move char-class list box out into a new config panel.
0e7f088 Add GUI configuration for choice of clipboards.
018aa57 Tick off another two OS X todo items.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2017-12-17 17:17:58
commit 18297196391d1130a794654397552e8a4858b1cc
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=18297196391d1130a794654397552e8a4858b1cc;hp=9bff5595a279f2882768323e482287286ec44998
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Dec 9 12:00:13 2017 +0000
Add a system of clipboard identifiers.
This lays some groundwork for making PuTTY's cut and paste handling
more flexible in the area of which clipboard(s) it reads and writes,
if more than one is available on the system.
I've introduced a system of list macros which define an enumeration of
integer clipboard ids, some defined centrally in putty.h (at present
just a CLIP_NULL which never has any text in it, because that seems
like the sort of thing that will come in useful for configuring a
given copy or paste UI action to be ignored) and some defined per
platform. All the front end functions that copy and paste take a
clipboard id, and the Terminal structure is now configured at startup
to tell it which clipboard id it should paste from on a mouse click,
and which it should copy from on a selection.
However, I haven't actually added _real_ support for multiple X11
clipboards, in that the Unix front end supports a single CLIP_SYSTEM
regardless of whether it's in OS X or GTK mode. So this is currently a
NFC refactoring which does nothing but prepare the way for real
changes to come.
fuzzterm.c | 5 +++--
putty.h | 29 +++++++++++++++++++++++++----
terminal.c | 32 +++++++++++++++++++++++++-------
terminal.h | 3 +++
unix/gtkapp.c | 2 +-
unix/gtkwin.c | 36 +++++++++++++++++++++++++-----------
unix/unix.h | 7 +++++++
windows/windlg.c | 2 +-
windows/window.c | 28 ++++++++++++++++++++--------
windows/winstuff.h | 6 +++++-
10 files changed, 115 insertions(+), 35 deletions(-)
commit 41aa675a5b7ca1d5055e444ae7146fcc13b140c4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=41aa675a5b7ca1d5055e444ae7146fcc13b140c4;hp=18297196391d1130a794654397552e8a4858b1cc
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 10 10:23:39 2017 +0000
Make gtkwin.c able to support multiple selections.
All the data fields referring to the selection in 'struct gui_data'
have been pulled out into a separate structure of which there are now
multiple instances, and I've plumbed through what should be the right
pointers and integer ids to everywhere they should go. So now the GTK
front end defines CLIP_PRIMARY and CLIP_CLIPBOARD in place of the
temporary cop-out CLIP_SYSTEM from the previous commit, and copying
and pasting can be done via either one.
The defaults should be the same as before, except that now the non-Mac
versions of the GtkApplication front ends will access CLIP_PRIMARY in
response to most actions but the 'Paste' menu item will paste from
CLIP_CLIPBOARD. (That's mostly just as a demonstration that accessing
multiple clipboards even works.)
unix/gtkwin.c | 278 ++++++++++++++++++++++++++++++++++++----------------------
unix/unix.h | 18 +++-
2 files changed, 189 insertions(+), 107 deletions(-)
commit cd7348281b05398212214197622961ecbf0936c2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=cd7348281b05398212214197622961ecbf0936c2;hp=41aa675a5b7ca1d5055e444ae7146fcc13b140c4
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 10 14:53:55 2017 +0000
Add a cross-platform clipboard called CLIP_LOCAL.
This stores the last text selected in _this_ terminal, regardless of
whether any other application has since taken back whatever system
clipboard we also copied it to. It's written unconditionally whenever
text is selected in terminal.c.
The main purpose of this will be that it's also the place that you can
go and find the data you need to write to a system clipboard in
response to an explicit Copy operation. But it can also act as a data
source for pastes in its own right, so you can use it to implement an
intra-window private extra clipboard if that's useful. (OS X Terminal
has one of those, so _someone_ at least seems to like the idea.)
putty.h | 23 +++++++++++++++++------
terminal.c | 47 +++++++++++++++++++++++++++++++++++++++++------
terminal.h | 4 ++++
3 files changed, 62 insertions(+), 12 deletions(-)
commit 131a8e946898f0d3ea4bf28f4495685ab5a14731
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=131a8e946898f0d3ea4bf28f4495685ab5a14731;hp=cd7348281b05398212214197622961ecbf0936c2
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 10 15:45:45 2017 +0000
Ability to copy to multiple clipboards at once.
putty.h | 4 +--
terminal.c | 75 ++++++++++++++++++++++++++++++++++++--------------------
terminal.h | 3 ++-
unix/gtkwin.c | 6 +++--
windows/window.c | 8 ++++--
5 files changed, 63 insertions(+), 33 deletions(-)
commit 3d9372492dbd150c6ba43cf702304f5dbfbc995d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=3d9372492dbd150c6ba43cf702304f5dbfbc995d;hp=131a8e946898f0d3ea4bf28f4495685ab5a14731
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 10 16:25:54 2017 +0000
GTK context menu options to copy/paste CLIPBOARD.
unix/gtkwin.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
commit 98fa733a96f08cc4bead58560461266f9757264b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=98fa733a96f08cc4bead58560461266f9757264b;hp=3d9372492dbd150c6ba43cf702304f5dbfbc995d
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Dec 16 11:13:31 2017 +0000
Move char-class list box out into a new config panel.
This makes space in the Selection panel (at least on Windows; it
wasn't overfull on Unix) to add a new set of config options
controlling the mapping of UI actions to clipboards.
(A possible future advantage of having spare space in this new Words
panel is that there's room to add controls for context-sensitive
special-casing, e.g. I'd quite like ':' to be treated differently when
it appears as part of "http://".)
config.c | 10 ++++++++--
doc/config.but | 12 +++++++-----
2 files changed, 15 insertions(+), 7 deletions(-)
commit 0e7f0883a955545bb901d7506b362d0b5cdb149b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0e7f0883a955545bb901d7506b362d0b5cdb149b;hp=98fa733a96f08cc4bead58560461266f9757264b
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 10 17:16:50 2017 +0000
Add GUI configuration for choice of clipboards.
On all platforms, you can now configure which clipboard the mouse
pastes from, which clipboard Ctrl-Ins and Shift-Ins access, and which
Ctrl-Shift-C and Ctrl-Shift-V access. In each case, the options are:
- nothing at all
- a clipboard which is implicitly written by the act of mouse
selection (the PRIMARY selection on X, CLIP_LOCAL everywhere else)
- the standard clipboard written by explicit copy/paste UI actions
(CLIPBOARD on X, the unique system clipboard elsewhere).
Also, you can control whether selecting text with the mouse _also_
writes to the explicitly accessed clipboard.
The wording of the various messages changes between platforms, but the
basic UI shape is the same everywhere.
config.c | 47 ++++++++++++++++++++
doc/config.but | 62 +++++++++++++++++++++++++++
putty.h | 14 ++++++
settings.c | 49 +++++++++++++++++++++
unix/gtkwin.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++----
unix/unix.h | 26 ++++++++---
windows/window.c | 92 +++++++++++++++++++++++++++++++++++----
windows/winhelp.h | 2 +
windows/winstuff.h | 11 +++++
9 files changed, 405 insertions(+), 22 deletions(-)
commit 018aa5764505634e86df7c6eff6aae4ce98f6fe4
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=018aa5764505634e86df7c6eff6aae4ce98f6fe4;hp=0e7f0883a955545bb901d7506b362d0b5cdb149b
Author: Simon Tatham <anakin at pobox.com>
Date: Sun Dec 17 10:54:13 2017 +0000
Tick off another two OS X todo items.
I've done the general clipboard revamp, and also, since I added
Ctrl-Shift-{C,V} as a new pair of UI actions for copy and paste, I've
also fulfilled the requirement that there should be some method of
non-menu-based pasting that doesn't depend on a middle mouse button or
an Ins key.
I think the list of OS X missing features is now down to details of
the OS X GTK port _itself_, as opposed to structural issues in the
general code base.
unix/gtkapp.c | 13 -------------
1 file changed, 13 deletions(-)
More information about the tartarus-commits
mailing list