summaryrefslogtreecommitdiffstats
path: root/vncviewer/Viewport.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-05-16 12:18:08 +0000
committerPierre Ossman <ossman@cendio.se>2011-05-16 12:18:08 +0000
commit2eb1d11004ad23ffd1a044fca1cb96aa77bb42c9 (patch)
tree44c15a101929af1d2925dcefede9658efcb9a122 /vncviewer/Viewport.cxx
parentd463b57681c875f096e32250919e5a23f58a439a (diff)
downloadtigervnc-2eb1d11004ad23ffd1a044fca1cb96aa77bb42c9.tar.gz
tigervnc-2eb1d11004ad23ffd1a044fca1cb96aa77bb42c9.zip
Add connection information dialog based on the one in the unix viewer.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4417 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer/Viewport.cxx')
-rw-r--r--vncviewer/Viewport.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 74f9340f..3e829905 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -22,6 +22,7 @@
#include <string.h>
#include <FL/fl_draw.H>
+#include <FL/fl_ask.H>
#include <rfb/CMsgWriter.h>
#include <rfb/LogWriter.h>
@@ -54,7 +55,7 @@ static rfb::LogWriter vlog("Viewport");
// Menu constants
enum { ID_EXIT, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL,
- ID_REFRESH, ID_OPTIONS, ID_ABOUT, ID_DISMISS };
+ ID_REFRESH, ID_OPTIONS, ID_INFO, ID_ABOUT, ID_DISMISS };
Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_)
: Fl_Widget(0, 0, w, h), cc(cc_), frameBuffer(NULL), pixelTrans(NULL),
@@ -452,6 +453,7 @@ void Viewport::initContextMenu()
contextMenu->add(_("Refresh screen"), 0, NULL, (void*)ID_REFRESH, FL_MENU_DIVIDER);
contextMenu->add(_("Options..."), 0, NULL, (void*)ID_OPTIONS, 0);
+ contextMenu->add(_("Connection info..."), 0, NULL, (void*)ID_INFO, 0);
contextMenu->add(_("About TigerVNC viewer..."), 0, NULL, (void*)ID_ABOUT, FL_MENU_DIVIDER);
contextMenu->add(_("Dismiss menu"), 0, NULL, (void*)ID_DISMISS, 0);
@@ -503,6 +505,10 @@ void Viewport::popupContextMenu()
case ID_OPTIONS:
OptionsDialog::showDialog();
break;
+ case ID_INFO:
+ fl_message_title(_("VNC connection info"));
+ fl_message(cc->connectionInfo());
+ break;
case ID_ABOUT:
about_vncviewer();
break;