Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14312/src/gui
Modified Files:
wxMDialogs.cpp
Log Message:
corrected licence dialog layout
Index: wxMDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMDialogs.cpp,v
retrieving revision 1.432
retrieving revision 1.433
diff -b -u -2 -r1.432 -r1.433
--- wxMDialogs.cpp 7 Jun 2006 14:07:58 -0000 1.432
+++ wxMDialogs.cpp 6 Aug 2006 20:02:01 -0000 1.433
@@ -2147,8 +2147,8 @@
-class wxLicenseDialog : public wxOptionsPageSubdialog
+class wxLicenseDialog : public wxManuallyLaidOutDialog
{
public:
- wxLicenseDialog(Profile *profile, wxWindow *parent);
+ wxLicenseDialog(wxWindow *parent);
private:
@@ -2156,9 +2156,7 @@
};
-wxLicenseDialog::wxLicenseDialog(Profile *profile, wxWindow *parent)
- : wxOptionsPageSubdialog(profile,
- parent,
- _("Mahogany Licensing Conditions"),
- _T("LicensingDialog"))
+wxLicenseDialog::wxLicenseDialog(wxWindow *parent)
+ : wxManuallyLaidOutDialog(parent,
+ _("Mahogany Licensing Conditions"))
{
wxStaticBox *box = CreateStdButtonsAndBox(_("Licensing Conditions"), FALSE,
@@ -2166,8 +2164,8 @@
wxHtmlWindow *license = new wxHtmlWindow(this);
- wxMemoryFSHandler::AddFile(_T("splash.png"),
- mApplication->GetIconManager()->
- GetBitmap(_T("Msplash")),
- wxBITMAP_TYPE_PNG);
+ wxBitmap bmp(mApplication->GetIconManager()-> GetBitmap(_T("Msplash")));
+ const int w = bmp.Ok() ? bmp.GetWidth() : 400;
+
+ wxMemoryFSHandler::AddFile(_T("splash.png"), bmp, wxBITMAP_TYPE_PNG);
license->SetPage("<body text=#000000 bgcolor=#ffffff>"
@@ -2180,18 +2178,18 @@
wxLayoutConstraints *c = new wxLayoutConstraints;
- c->left.SameAs(box, wxLeft, 2*LAYOUT_X_MARGIN);
- c->top.SameAs(box, wxTop, 6*LAYOUT_Y_MARGIN);
- c->right.SameAs(box, wxRight, 2*LAYOUT_X_MARGIN);
- c->bottom.SameAs(box, wxBottom, 6*LAYOUT_Y_MARGIN);
+ c->left.SameAs(box, wxLeft, LAYOUT_X_MARGIN);
+ c->top.SameAs(box, wxTop, 4*LAYOUT_Y_MARGIN);
+ c->right.SameAs(box, wxRight, LAYOUT_X_MARGIN);
+ c->bottom.SameAs(box, wxBottom, 2*LAYOUT_Y_MARGIN);
license->SetConstraints(c);
wxButton *button = (wxButton *) FindWindow(wxID_OK);
- button->SetLabel(_("Accept"));
+ button->SetLabel(_("&Accept"));
button = (wxButton *) FindWindow(wxID_CANCEL);
- button->SetLabel(_("Reject"));
+ button->SetLabel(_("&Reject"));
SetAutoLayout(TRUE);
- SetDefaultSize(400, 400, FALSE /* not minimal */);
+ SetDefaultSize(w + 12*LAYOUT_X_MARGIN, (3*w)/2);
}
@@ -2200,5 +2198,5 @@
bool ShowLicenseDialog(wxWindow *parent)
{
- wxLicenseDialog dlg(mApplication->GetProfile(), parent);
+ wxLicenseDialog dlg(parent);
return dlg.ShowModal() == wxID_OK;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates