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.
diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx
index f112a52..55a366f 100644
--- a/vncviewer/OptionsDialog.cxx
+++ b/vncviewer/OptionsDialog.cxx
@@ -263,6 +263,9 @@
 
   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 @@
   /* 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 @@
                                                          _("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,