From 561ff0cba91b23fcb5c19793764fc2510fc4d366 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 13 May 2011 14:04:59 +0000 Subject: Implement connection dialog based on unix vncviewer. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4412 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- vncviewer/vncviewer.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'vncviewer/vncviewer.cxx') diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx index d9277e5d..8c145a85 100644 --- a/vncviewer/vncviewer.cxx +++ b/vncviewer/vncviewer.cxx @@ -49,6 +49,7 @@ #include "i18n.h" #include "parameters.h" #include "CConn.h" +#include "ServerDialog.h" #include "UserDialog.h" rfb::LogWriter vlog("main"); @@ -162,7 +163,7 @@ static void usage(const char *programName) int main(int argc, char** argv) { - char* vncServerName = 0; + const char* vncServerName = NULL; UserDialog dlg; const char englishAbout[] = N_("TigerVNC Viewer version %s\n" @@ -247,6 +248,12 @@ int main(int argc, char** argv) CSecurityTLS::msg = &dlg; #endif + if (vncServerName == NULL) { + vncServerName = ServerDialog::run(); + if ((vncServerName == NULL) || (vncServerName[0] == '\0')) + return 1; + } + CConn cc(vncServerName); while (!exitMainloop) { -- cgit v1.2.3