From 4236d0c644a7454ab7a955e837143a8fd0777c09 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 6 Sep 2024 12:55:08 +0200 Subject: [PATCH] Handle server history with '/' in entries This happens if you've connected to a server using a Unix socket. --- vncviewer/ServerDialog.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 #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"), -- 2.39.5