]> source.dussan.org Git - tigervnc.git/commitdiff
Expose reconnect setting in options dialog
authorPierre Ossman <ossman@cendio.se>
Fri, 23 Jul 2021 11:32:50 +0000 (13:32 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 23 Jul 2021 11:32:50 +0000 (13:32 +0200)
vncviewer/OptionsDialog.cxx
vncviewer/OptionsDialog.h
vncviewer/parameters.cxx

index 190d8aa32729f25e016a3c35d803398d63dfae83..66a12fd85c37cd2d0ecd7276c14450ea5e8012fe 100644 (file)
@@ -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<OptionsCallback*, void*>::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,
index dcba813684f6f4ec56aac90fe7facc45cd5e1423..03e51e228ea82a0c0dcd017cdf97d531681232e1 100644 (file)
@@ -136,6 +136,7 @@ protected:
 
   /* Misc. */
   Fl_Check_Button *sharedCheckbox;
+  Fl_Check_Button *reconnectCheckbox;
   Fl_Check_Button *dotCursorCheckbox;
 };
 
index c589a2f09c4d23e8a5a2a957409d17dd81cfa5fb..f19853f1b196a330019bdf68c9073417602bc019 100644 (file)
@@ -177,6 +177,7 @@ static VoidParameter* parameterArray[] = {
   &SecurityClient::secTypes,
   &emulateMiddleButton,
   &dotWhenNoCursor,
+  &reconnectOnError,
   &autoSelect,
   &fullColour,
   &lowColourLevel,