Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv23873/src/gui
Modified Files:
wxMDialogs.cpp
Log Message:
added a possibility to have Ok/Cancel dialogs
Index: wxMDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMDialogs.cpp,v
retrieving revision 1.372
retrieving revision 1.373
diff -b -u -2 -r1.372 -r1.373
--- wxMDialogs.cpp 18 May 2002 17:11:17 -0000 1.372
+++ wxMDialogs.cpp 15 Jun 2002 11:42:54 -0000 1.373
@@ -734,5 +734,5 @@
@param modal true to make messagebox modal
*/
-void
+bool
MDialog_Message(const char *message,
const wxWindow *parent,
@@ -744,20 +744,26 @@
// immediately
if ( wxPMessageBoxIsDisabled(configPath) )
- return;
+ return true;
CloseSplash();
NoBusyCursor noBC;
- wxPMessageBox
+ long style = GetMsgBoxStyle(wxOK | wxICON_INFORMATION);
+ if ( flags & M_DLG_DISABLE )
+ style |= wxPMSGBOX_DISABLE;
+ if ( flags & M_DLG_ALLOW_CANCEL )
+ style |= wxCANCEL;
+
+ return wxPMessageBox
(
configPath,
message,
String(M_TITLE_PREFIX) + title,
- GetMsgBoxStyle(wxOK | wxICON_INFORMATION) | (flags & M_DLG_DISABLE),
+ style,
GetDialogParent(parent)
- );
+ ) != wxCANCEL;
}
-void MDialog_Message(char const *message,
+bool MDialog_Message(char const *message,
const wxWindow *parent,
const MPersMsgBox *persMsg,
@@ -769,5 +775,5 @@
configPath = GetPersMsgBoxName(persMsg);
- MDialog_Message(message, parent, title,
+ return MDialog_Message(message, parent, title,
persMsg ? configPath.c_str() : NULL, flags);
}
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates