Initial options dialog (read-only) loosly based on the Unix vncviewer.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4416 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index 6a6e983..74f9340 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -35,6 +35,7 @@
 
 #include "Viewport.h"
 #include "CConn.h"
+#include "OptionsDialog.h"
 #include "i18n.h"
 #include "parameters.h"
 #include "keysym2ucs.h"
@@ -53,7 +54,7 @@
 // Menu constants
 
 enum { ID_EXIT, ID_CTRL, ID_ALT, ID_MENUKEY, ID_CTRLALTDEL,
-       ID_REFRESH, ID_ABOUT, ID_DISMISS };
+       ID_REFRESH, ID_OPTIONS, 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),
@@ -450,6 +451,7 @@
 
   contextMenu->add(_("Refresh screen"), 0, NULL, (void*)ID_REFRESH, FL_MENU_DIVIDER);
 
+  contextMenu->add(_("Options..."), 0, NULL, (void*)ID_OPTIONS, 0);
   contextMenu->add(_("About TigerVNC viewer..."), 0, NULL, (void*)ID_ABOUT, FL_MENU_DIVIDER);
 
   contextMenu->add(_("Dismiss menu"), 0, NULL, (void*)ID_DISMISS, 0);
@@ -498,6 +500,9 @@
   case ID_REFRESH:
     cc->refreshFramebuffer();
     break;
+  case ID_OPTIONS:
+    OptionsDialog::showDialog();
+    break;
   case ID_ABOUT:
     about_vncviewer();
     break;