From f862c2e8f4a783b74b3b813c95101e4e4427893b Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 29 Mar 2016 14:15:38 +0200 Subject: Add option to set primary selection for cut text Previously the incoming clipboard was unconditionally set to both the PRIMARY and CLIPBOARD selection. This isn't always what the user want, so make it configurable. --- vncviewer/OptionsDialog.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'vncviewer/OptionsDialog.cxx') diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx index f112a529..55a366f1 100644 --- a/vncviewer/OptionsDialog.cxx +++ b/vncviewer/OptionsDialog.cxx @@ -263,6 +263,9 @@ void OptionsDialog::loadOptions(void) viewOnlyCheckbox->value(viewOnly); acceptClipboardCheckbox->value(acceptClipboard); +#if !defined(WIN32) && !defined(__APPLE__) + setPrimaryCheckbox->value(setPrimary); +#endif sendClipboardCheckbox->value(sendClipboard); #if !defined(WIN32) && !defined(__APPLE__) sendPrimaryCheckbox->value(sendPrimary); @@ -373,6 +376,9 @@ void OptionsDialog::storeOptions(void) /* Input */ viewOnly.setParam(viewOnlyCheckbox->value()); acceptClipboard.setParam(acceptClipboardCheckbox->value()); +#if !defined(WIN32) && !defined(__APPLE__) + setPrimary.setParam(setPrimaryCheckbox->value()); +#endif sendClipboard.setParam(sendClipboardCheckbox->value()); #if !defined(WIN32) && !defined(__APPLE__) sendPrimary.setParam(sendPrimaryCheckbox->value()); @@ -696,6 +702,14 @@ void OptionsDialog::createInputPage(int tx, int ty, int tw, int th) _("Accept clipboard from server"))); ty += CHECK_HEIGHT + TIGHT_MARGIN; +#if !defined(WIN32) && !defined(__APPLE__) + setPrimaryCheckbox = new Fl_Check_Button(LBLRIGHT(tx + INDENT, ty, + CHECK_MIN_WIDTH, + CHECK_HEIGHT, + _("Also set primary selection"))); + ty += CHECK_HEIGHT + TIGHT_MARGIN; +#endif + sendClipboardCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty, CHECK_MIN_WIDTH, CHECK_HEIGHT, -- cgit v1.2.3