Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

設定データ読み込み処理において言語設定切り替え後にMRUエントリが無い場合は新規インストール後とみなし false を返すように変更 #620

Merged
merged 1 commit into from
Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions sakura_core/_main/CControlProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ bool CControlProcess::InitializeProcess()

/* 共有データのロード */
// 2007.05.19 ryoji 「設定を保存して終了する」オプション処理(sakuext連携用)を追加
TCHAR szIniFile[_MAX_PATH];
CShareData_IO::LoadShareData();
CFileNameManager::getInstance()->GetIniFileName( szIniFile, strProfileName.c_str() ); // 出力iniファイル名
if( !fexist(szIniFile) || CCommandLine::getInstance()->IsWriteQuit() ){

if( !CShareData_IO::LoadShareData() || CCommandLine::getInstance()->IsWriteQuit() ){
/* レジストリ項目 作成 */
CShareData_IO::SaveShareData();
if( CCommandLine::getInstance()->IsWriteQuit() ){
Expand Down
10 changes: 10 additions & 0 deletions sakura_core/env/CShareData_IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ void CShareData_IO::SaveShareData()
共有データの読み込み/保存 2

@param[in] bRead true: 読み込み / false: 書き込み
@return 設定データの読み込み/保存が成功したかどうか
@note 読み込みの場合、言語設定切り替え後にMRUエントリが無い場合は新規インストール後とみなし false を返す事で初期設定を適用させる

@date 2004-01-11 D.S.Koba CProfile変更によるコード簡略化
@date 2005-04-05 D.S.Koba 各セクションの入出力を関数として分離
Expand Down Expand Up @@ -125,6 +127,14 @@ bool CShareData_IO::ShareData_IO_2( bool bRead )
cProfile.IOProfileData( L"Common", L"szLanguageDll", MakeStringBufferT( pShareData->m_Common.m_sWindow.m_szLanguageDll ) );
CSelectLang::ChangeLang( pShareData->m_Common.m_sWindow.m_szLanguageDll );
pcShare->RefreshString();

// 新規インストール後の設定ファイルは言語設定しか存在しない
// MRUのエントリが無い場合は新規と判断
int _MRU_Counts = 0;
if (!cProfile.IOProfileData( LTEXT("MRU"), LTEXT("_MRU_Counts"), _MRU_Counts )){
// 言語設定の切り替えだけして false を返す事で初期設定を適用させる
return false;
}
}

// Feb. 12, 2006 D.S.Koba
Expand Down