From dccb95f345f7a9c5aa785a19d1bfa3fdecd8f8e0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 23 Jul 2021 13:32:50 +0200 Subject: [PATCH] Expose reconnect setting in options dialog --- vncviewer/OptionsDialog.cxx | 8 ++++++++ vncviewer/OptionsDialog.h | 1 + vncviewer/parameters.cxx | 1 + 3 files changed, 10 insertions(+) diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx index 190d8aa3..66a12fd8 100644 --- a/vncviewer/OptionsDialog.cxx +++ b/vncviewer/OptionsDialog.cxx @@ -314,6 +314,7 @@ void OptionsDialog::loadOptions(void) /* Misc. */ sharedCheckbox->value(shared); + reconnectCheckbox->value(reconnectOnError); dotCursorCheckbox->value(dotWhenNoCursor); } @@ -431,6 +432,7 @@ void OptionsDialog::storeOptions(void) /* Misc. */ shared.setParam(sharedCheckbox->value()); + reconnectOnError.setParam(reconnectCheckbox->value()); dotWhenNoCursor.setParam(dotCursorCheckbox->value()); std::map::const_iterator iter; @@ -873,6 +875,12 @@ void OptionsDialog::createMiscPage(int tx, int ty, int tw, int th) _("Shared (don't disconnect other viewers)"))); ty += CHECK_HEIGHT + TIGHT_MARGIN; + reconnectCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty, + CHECK_MIN_WIDTH, + CHECK_HEIGHT, + _("Ask to reconnect on connection errors"))); + ty += CHECK_HEIGHT + TIGHT_MARGIN; + dotCursorCheckbox = new Fl_Check_Button(LBLRIGHT(tx, ty, CHECK_MIN_WIDTH, CHECK_HEIGHT, diff --git a/vncviewer/OptionsDialog.h b/vncviewer/OptionsDialog.h index dcba8136..03e51e22 100644 --- a/vncviewer/OptionsDialog.h +++ b/vncviewer/OptionsDialog.h @@ -136,6 +136,7 @@ protected: /* Misc. */ Fl_Check_Button *sharedCheckbox; + Fl_Check_Button *reconnectCheckbox; Fl_Check_Button *dotCursorCheckbox; }; diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx index c589a2f0..f19853f1 100644 --- a/vncviewer/parameters.cxx +++ b/vncviewer/parameters.cxx @@ -177,6 +177,7 @@ static VoidParameter* parameterArray[] = { &SecurityClient::secTypes, &emulateMiddleButton, &dotWhenNoCursor, + &reconnectOnError, &autoSelect, &fullColour, &lowColourLevel, -- 2.39.5