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

Modified Files:
        wxOptionsDlg.cpp 
Log Message:
use ConfigSourceLocal methods instead of MP_USE_CONFIG_FILE

Index: wxOptionsDlg.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxOptionsDlg.cpp,v
retrieving revision 1.423
retrieving revision 1.424
diff -b -u -2 -r1.423 -r1.424
--- wxOptionsDlg.cpp    5 Jul 2005 15:32:12 -0000       1.423
+++ wxOptionsDlg.cpp    5 Jul 2005 21:25:02 -0000       1.424
@@ -2254,5 +2254,5 @@
    CONFIG_NONE(), // separator
    CONFIG_NONE(), // help for config file setting
-   CONFIG_ENTRY(MP_USE_CONFIG_FILE),
+   CONFIG_NONE(), // config file itself
 #endif // OS_WIN
 };
@@ -4078,6 +4078,11 @@
 
 #ifdef OS_WIN
-      m_usingConfigFile =
-         !READ_CONFIG_TEXT(m_Profile, MP_USE_CONFIG_FILE).empty();
+      const String file = ConfigSourceLocal::GetFilePath();
+      m_usingConfigFile = !file.empty();
+      wxTextCtrl *text = wxDynamicCast(GetControl(ConfigField_SyncConfigFile),
+                                       wxTextCtrl);
+      wxCHECK_MSG( text, false, _T("where is the config file control?") );
+
+      text->SetValue(file);
 #endif // OS_WIN
    }
@@ -4111,5 +4116,10 @@
 
 #ifdef OS_WIN
-      String filenameConfig = READ_CONFIG_TEXT(m_Profile, MP_USE_CONFIG_FILE);
+      wxTextCtrl *text = wxDynamicCast(GetControl(ConfigField_SyncConfigFile),
+                                       wxTextCtrl);
+      String filenameConfig = text->GetValue();
+
+      ConfigSourceLocal::UseFile(filenameConfig);
+
       const int usingConfigFile = !filenameConfig.empty();
 
@@ -4942,10 +4952,12 @@
 
 
-   // first row is handled specially (under Unix it can't be edited)
+   // first row is handled specially as it can only be changed to indicate
+   // whether we should use registry or file under Win32 (and under Unix it
+   // can't be edited at all)
 #ifdef OS_WIN
-   mApplication->GetProfile()->writeEntry(MP_USE_CONFIG_FILE,
-                                          m_sources->GetCellValue(0, 
Col_Spec));
+   ConfigSourceLocal::UseFile(m_sources->GetCellValue(0, Col_Spec));
 #endif // OS_WIN
 
+
    // now enum all the other ones
    if ( rowsCount > 1 )



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to