コード例 #1
0
ファイル: FileHistory.cpp プロジェクト: Marlinc/0ad
void FileHistory::Save(wxConfigBase& config)
{
	wxString old = config.GetPath();
	config.SetPath(m_configSubdir);
	wxFileHistory::Save(config);
	config.SetPath(old);
}
コード例 #2
0
void FileHistory::LoadFromSubDir(wxConfigBase& config)
{
	wxString old = config.GetPath();
	config.SetPath(m_configSubdir);
	Load(config);
	config.SetPath(old);
}
コード例 #3
0
ファイル: steopts.cpp プロジェクト: Abyss116/luaplus51-all
void wxSTEditorOptions::SaveFileConfig(wxConfigBase &config)
{
    const wxString oldpath = config.GetPath();
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    config.Write(configPath+wxT("/LastDir"), GetDefaultFilePath());

    config.SetPath(configPath);
    fileHistory->Save(config);
    config.SetPath(oldpath);
}
コード例 #4
0
ファイル: steopts.cpp プロジェクト: Abyss116/luaplus51-all
void wxSTEditorOptions::LoadFileConfig( wxConfigBase &config)
{
    const wxString oldpath = config.GetPath();
    wxFileHistory *fileHistory = GetFileHistory();
    if (!fileHistory)
        return;

    wxString configPath = FixConfigPath(GetConfigPath(STE_OPTION_CFGPATH_FILEHISTORY), false);
    wxString value, key = configPath+wxT("/LastDir");
    if (config.Read(key, &value) && wxDirExists(value))
        SetDefaultFilePath(value);

    config.SetPath(configPath);
    fileHistory->Load(config);
    config.SetPath(oldpath);
}