Revision: 4423
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4423&view=rev
Author: ossman_
Date: 2011-05-17 11:43:47 +0000 (Tue, 17 May 2011)
Log Message:
-----------
Make sure we can display all the possible dialog types the RFB core needs.
Modified Paths:
--------------
trunk/vncviewer/UserDialog.cxx
Modified: trunk/vncviewer/UserDialog.cxx
===================================================================
--- trunk/vncviewer/UserDialog.cxx 2011-05-17 09:39:07 UTC (rev 4422)
+++ trunk/vncviewer/UserDialog.cxx 2011-05-17 11:43:47 UTC (rev 4423)
@@ -79,8 +79,27 @@
bool UserDialog::showMsgBox(int flags, const char* title, const char* text)
{
+ // FLTK doesn't give us a flexible choice of the icon, so we ignore those
+ // bits for now.
+
+ // FIXME: Filter out % from input text
+
fl_message_title(title);
- fl_message(text);
+ switch (flags & 0xf) {
+ case M_OKCANCEL:
+ return fl_choice(text, NULL, fl_ok, fl_cancel) == 1;
+ case M_YESNO:
+ return fl_choice(text, NULL, fl_yes, fl_no) == 1;
+ case M_OK:
+ default:
+ if (((flags & 0xf0) == M_ICONERROR) ||
+ ((flags & 0xf0) == M_ICONWARNING))
+ fl_alert(text);
+ else
+ fl_message(text);
+ return true;
+ }
+
return false;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits