CHECK_MIN_WIDTH,
CHECK_HEIGHT,
_("Accept clipboard from server")));
+ acceptClipboardCheckbox->callback(handleClipboard, this);
ty += CHECK_HEIGHT + TIGHT_MARGIN;
#if !defined(WIN32) && !defined(__APPLE__)
CHECK_MIN_WIDTH,
CHECK_HEIGHT,
_("Send clipboard to server")));
+ sendClipboardCheckbox->callback(handleClipboard, this);
ty += CHECK_HEIGHT + TIGHT_MARGIN;
#if !defined(WIN32) && !defined(__APPLE__)
- sendPrimaryCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty,
+ sendPrimaryCheckbox = new Fl_Check_Button(LBLRIGHT(tx + INDENT, ty,
CHECK_MIN_WIDTH,
CHECK_HEIGHT,
_("Send primary selection as clipboard")));
}
}
+void OptionsDialog::handleClipboard(Fl_Widget *widget, void *data)
+{
+#if !defined(WIN32) && !defined(__APPLE__)
+ OptionsDialog *dialog = (OptionsDialog*)data;
+
+ if (dialog->acceptClipboardCheckbox->value())
+ dialog->setPrimaryCheckbox->activate();
+ else
+ dialog->setPrimaryCheckbox->deactivate();
+ if (dialog->sendClipboardCheckbox->value())
+ dialog->sendPrimaryCheckbox->activate();
+ else
+ dialog->sendPrimaryCheckbox->deactivate();
+#endif
+}
+
void OptionsDialog::handleCancel(Fl_Widget *widget, void *data)
{
OptionsDialog *dialog = (OptionsDialog*)data;
static void handleDesktopSize(Fl_Widget *widget, void *data);
+ static void handleClipboard(Fl_Widget *widget, void *data);
+
static void handleCancel(Fl_Widget *widget, void *data);
static void handleOK(Fl_Widget *widget, void *data);