Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4315/src/gui

Modified Files:
        wxWizards.cpp 
Log Message:
fixed layout of folder creation wizard; fixed assert due to passing MF_ILLEGAL 
to CanHaveSubfolders()

Index: wxWizards.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxWizards.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -b -u -2 -r1.50 -r1.51
--- wxWizards.cpp       16 Jan 2006 20:32:28 -0000      1.50
+++ wxWizards.cpp       12 Feb 2006 23:19:27 -0000      1.51
@@ -45,4 +45,5 @@
 #include "MFolder.h"
 
+#include <wx/sizer.h>
 #include <wx/wizard.h>
 
@@ -253,6 +254,6 @@
 {
    wxSize sizeLabel = text->GetSize();
-   wxSize sizePage = ((wxWizard *)GetParent())->GetPageSize();
-//   wxSize sizePage = ((wxWizard *)GetParent())->GetSize();
+//   wxSize sizePage = ((wxWizard *)GetParent())->GetPageSize();
+   wxSize sizePage = ((wxWizard *)GetParent())->GetClientSize();
    wxCoord y = sizeLabel.y + 2*LAYOUT_Y_MARGIN;
 
@@ -279,5 +280,8 @@
 MWizard::Run()
 {
-   return RunWizard(GetPageById(GetFirstPageId()));
+   wxWizardPage * const pageFirst = GetPageById(GetFirstPageId());
+   GetPageAreaSizer()->Add(pageFirst);
+
+   return RunWizard(pageFirst);
 }
 
@@ -1392,7 +1396,8 @@
    ), params->m_Name.c_str());
 
-   MFolderType ftype = MF_ILLEGAL; // init it to suppress compiler warnings
-   if ( CanHaveSubfolders(params->m_FolderType, params->m_FolderFlags, &ftype)
-        && ftype != MF_ILLEGAL )
+   MFolderType ftype = params->m_FolderType;
+   if ( ftype != MF_ILLEGAL &&
+         CanHaveSubfolders(ftype, params->m_FolderFlags, &ftype) &&
+            ftype != MF_ILLEGAL )
    {
       // TODO propose to add all subfolders to the created entry from here



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to