]> source.dussan.org Git - tigervnc.git/commitdiff
Handle server history with '/' in entries
authorPierre Ossman <ossman@cendio.se>
Fri, 6 Sep 2024 10:55:08 +0000 (12:55 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 6 Sep 2024 10:55:08 +0000 (12:55 +0200)
This happens if you've connected to a server using a Unix socket.

vncviewer/ServerDialog.cxx

index f9e3ffb3bbf2edec2de3d92a5ac33a758d833f25..e401c519bd6ee7531aa0798fdfa2441671848a8a 100644 (file)
@@ -41,6 +41,7 @@
 #include <rfb/util.h>
 
 #include "fltk/layout.h"
+#include "fltk/util.h"
 #include "ServerDialog.h"
 #include "OptionsDialog.h"
 #include "i18n.h"
@@ -138,7 +139,8 @@ void ServerDialog::run(const char* servername, char *newservername)
 
     dialog.serverName->clear();
     for(i = 0; i < dialog.serverHistory.size(); ++i)
-      dialog.serverName->add(dialog.serverHistory[i].c_str());
+      fltk_menu_add(dialog.serverName->menubutton(),
+                    dialog.serverHistory[i].c_str(), 0, nullptr);
   } catch (Exception& e) {
     vlog.error("%s", e.str());
     fl_alert(_("Unable to load the server history:\n\n%s"),