diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-05-13 14:04:59 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-05-13 14:04:59 +0000 |
commit | 561ff0cba91b23fcb5c19793764fc2510fc4d366 (patch) | |
tree | 0640a47879a5b763ad949df3709d3beb98f7030e /vncviewer/vncviewer.cxx | |
parent | f8c5ef62fccb3d5dccf71257dfe5d30dbb524f63 (diff) | |
download | tigervnc-561ff0cba91b23fcb5c19793764fc2510fc4d366.tar.gz tigervnc-561ff0cba91b23fcb5c19793764fc2510fc4d366.zip |
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
Diffstat (limited to 'vncviewer/vncviewer.cxx')
-rw-r--r-- | vncviewer/vncviewer.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
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) { |