]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fileconf.cpp
Fixed gtk 1.2.x wxYield() problem (tested).
[wxWidgets.git] / src / common / fileconf.cpp
index cf8ad6879af2862b4cfc8079eacb2d6875254855..cc1567b4eeadc7cec1d39bde3a6ce930154b9e85 100644 (file)
@@ -198,15 +198,11 @@ void wxFileConfig::Init()
 wxFileConfig::wxFileConfig(const wxString& appName, const wxString& vendorName,
                            const wxString& strLocal, const wxString& strGlobal,
                            long style)
-            : wxConfigBase(appName, vendorName, strLocal, strGlobal, style),
+            : wxConfigBase(!appName && wxTheApp ? wxTheApp->GetAppName()
+                                                : appName,
+                           vendorName, strLocal, strGlobal, style),
               m_strLocalFile(strLocal), m_strGlobalFile(strGlobal)
 {
-  // Make up an application name if not supplied
-  if (appName.IsEmpty() && wxTheApp)
-  {
-    SetAppName(wxTheApp->GetAppName());
-  }
-
   // Make up names for files if empty
   if ( m_strLocalFile.IsEmpty() && (style & wxCONFIG_USE_LOCAL_FILE) )
   {
@@ -1108,7 +1104,7 @@ bool ConfigGroup::DeleteSubgroup(ConfigGroup *pGroup)
   // and subgroups of this sungroup
   nCount = pGroup->m_aSubgroups.Count();
   for ( size_t nGroup = 0; nGroup < nCount; nGroup++ ) {
-    pGroup->DeleteSubgroup(pGroup->m_aSubgroups[nGroup]);
+    pGroup->DeleteSubgroup(pGroup->m_aSubgroups[0]);
   }
 
   LineList *pLine = pGroup->m_pLine;