Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv3799/src/gui
Modified Files:
wxDialogLayout.cpp wxMsgCmdProc.cpp
Log Message:
added a possibility to not create the "Cancel" button in the
wxManuallyLaidOutDialog because the MIME structure dialog really doesn't need
it
Index: wxDialogLayout.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxDialogLayout.cpp,v
retrieving revision 1.87
retrieving revision 1.88
diff -b -u -2 -r1.87 -r1.88
--- wxDialogLayout.cpp 20 Jun 2002 18:12:11 -0000 1.87
+++ wxDialogLayout.cpp 4 Jul 2002 15:13:11 -0000 1.88
@@ -1030,13 +1030,18 @@
wxStaticBox *
wxManuallyLaidOutDialog::CreateStdButtonsAndBox(const wxString& boxTitle,
- bool noBox,
+ int flags,
int helpId)
{
wxLayoutConstraints *c;
- // first the 2 buttons in the bottom/right corner
+ // the buttons in the bottom/right corner
+
+ // we always have at least the [Ok] button
wxButton *btnOk = new wxButton(this, wxID_OK, _("OK"));
btnOk->SetDefault();
c = new wxLayoutConstraints;
+ if ( flags & StdBtn_NoCancel )
+ c->right.SameAs(this, wxRight, 2*LAYOUT_X_MARGIN);
+ else
c->left.SameAs(this, wxRight, -2*(LAYOUT_X_MARGIN + wBtn));
c->width.Absolute(wBtn);
@@ -1045,4 +1050,7 @@
btnOk->SetConstraints(c);
+ // and usually the [Cancel] one
+ if ( !(flags & StdBtn_NoCancel) )
+ {
wxButton *btnCancel = new wxButton(this, wxID_CANCEL, _("Cancel"));
c = new wxLayoutConstraints;
@@ -1052,7 +1060,8 @@
c->bottom.SameAs(this, wxBottom, LAYOUT_Y_MARGIN);
btnCancel->SetConstraints(c);
+ }
- // add a help button?
- if(helpId != -1)
+ // and, if we have a help id to invoke help, the [Help] one as well
+ if ( helpId != -1 )
{
wxButton *btnHelp = new wxButton(this, wxID_HELP, _("Help"));
@@ -1067,5 +1076,5 @@
// a box around all the other controls
- if ( noBox )
+ if ( flags & StdBtn_NoBox )
return NULL;
Index: wxMsgCmdProc.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMsgCmdProc.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -b -u -2 -r1.25 -r1.26
--- wxMsgCmdProc.cpp 28 Jun 2002 00:43:55 -0000 1.25
+++ wxMsgCmdProc.cpp 4 Jul 2002 15:13:11 -0000 1.26
@@ -407,5 +407,7 @@
// create controls
wxLayoutConstraints *c;
- m_box = CreateStdButtonsAndBox(""); // label will be set later
+
+ // label will be set later below
+ m_box = CreateStdButtonsAndBox("", StdBtn_NoCancel);
m_treectrl = new wxMIMETreeCtrl(this);
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates