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

Modified Files:
        wxMFolderDialogs.cpp 
Log Message:
use correct config source for saving folder properties

Index: wxMFolderDialogs.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMFolderDialogs.cpp,v
retrieving revision 1.192
retrieving revision 1.193
diff -b -u -2 -r1.192 -r1.193
--- wxMFolderDialogs.cpp        6 Jul 2005 22:00:49 -0000       1.192
+++ wxMFolderDialogs.cpp        9 Jul 2005 23:50:39 -0000       1.193
@@ -177,12 +177,4 @@
    }
 
-   // unimplemented default ctor for DECLARE_DYNAMIC_CLASS
-   wxFolderBaseDialog() { }
-
-protected:
-   // return TRUE if the Ok/Apply buttons should be enabled (depending on the
-   // state of the other controls)
-   bool ShouldEnableOk() const;
-
    // base class pure virtual - return the profile we're working with
    virtual Profile *GetProfile() const
@@ -200,4 +192,12 @@
    }
 
+   // unimplemented default ctor for DECLARE_DYNAMIC_CLASS
+   wxFolderBaseDialog() { }
+
+protected:
+   // return TRUE if the Ok/Apply buttons should be enabled (depending on the
+   // state of the other controls)
+   bool ShouldEnableOk() const;
+
    // tell all notebook pages (except the first one) which profile we're
    // working with
@@ -2295,9 +2295,8 @@
 
    // 0th step: verify if the settings are self-consistent
-   {
        wxFolderBaseDialog *dlg = GET_PARENT_OF_CLASS(this, wxFolderBaseDialog);
+   CHECK( dlg, false, _T("folder page should be in folder dialog!") );
        if (folderType == MF_FILE && dlg->GetFolderName() == _T("INBOX"))
            folderType = MF_INBOX;
-   }
 
    // is the folder name valid?
@@ -2427,7 +2426,4 @@
    // 1st step: create the folder in the MFolder sense. For this we need only
    // the name and the type
-   wxFolderBaseDialog *dlg = GET_PARENT_OF_CLASS(this, wxFolderBaseDialog);
-
-   CHECK( dlg, false, _T("folder page should be in folder dialog!") );
 
    // FIXME instead of this `if' we should have a virtual function in the
@@ -2451,4 +2447,8 @@
    CHECK( folder, false, _T("must have folder by this point") );
 
+   Profile_obj profileDlg(dlg->GetProfile());
+   ConfigSource * const config = profileDlg->GetConfigSourceForWriting();
+   folder->SetConfigSourceForWriting(config);
+
    // 2nd step: put what we can in MFolder
    folder->SetComment(m_comment->GetValue());
@@ -2460,4 +2460,6 @@
    m_profile->DecRef();
    m_profile = Profile::CreateProfile(fullname);
+   CHECK( m_profile, false, _T("profile creation shouldn't fail") );
+   m_profile->SetConfigSourceForWriting(config);
 
    // some flags are not set from here, keep their existing value



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to