aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-09-06 12:55:08 +0200
committerPierre Ossman <ossman@cendio.se>2024-09-06 12:55:08 +0200
commit4236d0c644a7454ab7a955e837143a8fd0777c09 (patch)
treeee2d6c5c43125b84580d67389f1a749e193a99c0
parent0e272178d1887b0ef0ccac61876c6f5e30fea22f (diff)
downloadtigervnc-4236d0c644a7454ab7a955e837143a8fd0777c09.tar.gz
tigervnc-4236d0c644a7454ab7a955e837143a8fd0777c09.zip
Handle server history with '/' in entries
This happens if you've connected to a server using a Unix socket.
-rw-r--r--vncviewer/ServerDialog.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vncviewer/ServerDialog.cxx b/vncviewer/ServerDialog.cxx
index f9e3ffb3..e401c519 100644
--- a/vncviewer/ServerDialog.cxx
+++ b/vncviewer/ServerDialog.cxx
@@ -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"),