]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/scorefil.cpp
removed dll export declaration for wxCStrData: it's unneeded because the class is...
[wxWidgets.git] / demos / forty / scorefil.cpp
index f85ec62988cd79366496e70dde5724ed0c1f2f48..83c2e6e45b6ebb9fb24d3058b55f954921f6e6a6 100644 (file)
 
 ScoreFile::ScoreFile(const wxString& appName)
 {
-#if 0
-    wxString filename;
-    m_configFilename << "/usr/local/share/" << appName << ".scores";
-    if (access(m_configFilename, F_OK) == 0)
-    {
-        if (access(m_configFilename, R_OK | W_OK) != 0)
-        {
-            // file is not r/w - use local file instead
-            m_configFilename = wxFileConfig::GetLocalFileName(appName);
-        }
-    }
-    else
-    {
-        int fd = creat(m_configFilename, 0666);
-
-        if (fd < 0)
-        {
-            // failed to create file - use local file instead
-            m_configFilename = wxFileConfig::GetLocalFileName(appName);
-        }
-        else
-        {
-            // ensure created file has rw-rw-rw permissions
-            close(fd);
-        }
-    }
-#endif
-
     m_config = new wxConfig(appName, _T("wxWidgets"), appName, wxEmptyString,
                                 wxCONFIG_USE_LOCAL_FILE);  // only local
 }
@@ -68,11 +40,6 @@ ScoreFile::ScoreFile(const wxString& appName)
 ScoreFile::~ScoreFile()
 {
     delete m_config;
-#ifdef __WXGTK__
-    // ensure score file has rw-rw-rw permissions
-    // (wxFileConfig sets them to rw-------)
-    chmod(m_configFilename, 0666);
-#endif
 }