]> 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)
committerLinn Mattsson <linma@cendio.se>
Tue, 22 Oct 2024 10:41:34 +0000 (12:41 +0200)
This happens if you've connected to a server using a Unix socket.

(cherry picked from commit 4236d0c644a7454ab7a955e837143a8fd0777c09)

vncviewer/ServerDialog.cxx

index 4d57b5fbb9ab1b98258ac4f50491349b61a47023..d8c6b6e840340b599317b5196a507d29f452559b 100644 (file)
@@ -40,6 +40,7 @@
 #include <rfb/LogWriter.h>
 
 #include "fltk/layout.h"
+#include "fltk/util.h"
 #include "ServerDialog.h"
 #include "OptionsDialog.h"
 #include "i18n.h"
@@ -137,7 +138,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, NULL);
   } catch (Exception& e) {
     vlog.error("%s", e.str());
     fl_alert(_("Unable to load the server history:\n\n%s"),