summaryrefslogtreecommitdiffstats
path: root/vncviewer/ServerDialog.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-05-16 12:04:43 +0000
committerPierre Ossman <ossman@cendio.se>2011-05-16 12:04:43 +0000
commitd463b57681c875f096e32250919e5a23f58a439a (patch)
treea2d94e3b5f45c75f3d52222edc65b9b7a3cc15ab /vncviewer/ServerDialog.cxx
parent2b006fd93177653cdb4ae87220265f52a34a0d65 (diff)
downloadtigervnc-d463b57681c875f096e32250919e5a23f58a439a.tar.gz
tigervnc-d463b57681c875f096e32250919e5a23f58a439a.zip
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
Diffstat (limited to 'vncviewer/ServerDialog.cxx')
-rw-r--r--vncviewer/ServerDialog.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/vncviewer/ServerDialog.cxx b/vncviewer/ServerDialog.cxx
index fab1448c..e65cbadb 100644
--- a/vncviewer/ServerDialog.cxx
+++ b/vncviewer/ServerDialog.cxx
@@ -23,6 +23,8 @@
#include <FL/fl_draw.H>
#include "ServerDialog.h"
+#include "OptionsDialog.h"
+#include "fltk_layout.h"
#include "i18n.h"
extern void about_vncviewer();
@@ -33,8 +35,7 @@ ServerDialog::ServerDialog()
int width;
Fl_Button *button;
- fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
- width = fl_width(_("VNC server:"));
+ width = gui_str_len(_("VNC server:"));
serverName = new Fl_Input(20 + width, 20, w() - 20*2 - width, 25, _("VNC server:"));
width = (w() - 20) / 4;
@@ -42,6 +43,9 @@ ServerDialog::ServerDialog()
button = new Fl_Button(20 + width*0, 20+25+20, width - 20, 27, _("About..."));
button->callback(this->handleAbout, this);
+ button = new Fl_Button(20 + width*1, 20+25+20, width - 20, 27, _("Options..."));
+ button->callback(this->handleOptions, this);
+
button = new Fl_Button(20 + width*2, 20+25+20, width - 20, 27, _("Cancel"));
button->callback(this->handleCancel, this);
@@ -83,6 +87,12 @@ void ServerDialog::handleAbout(Fl_Widget *widget, void *data)
}
+void ServerDialog::handleOptions(Fl_Widget *widget, void *data)
+{
+ OptionsDialog::showDialog();
+}
+
+
void ServerDialog::handleCancel(Fl_Widget *widget, void *data)
{
ServerDialog *dialog = (ServerDialog*)data;