• R/O
  • HTTP
  • SSH
  • HTTPS

yamy: Commit

source code repository of yamy


Commit MetaInfo

Revision90b42d5268ddf18789020f657535037028f5fc25 (tree)
Time2009-08-30 01:04:11
AuthorU-i7\gimy <gimy@user...>
CommiterU-i7\gimy

Log Message

enable retry to escape NLS keys only on fail by timeout

Change Summary

Incremental Difference

--- a/mayu.cpp
+++ b/mayu.cpp
@@ -481,12 +481,23 @@ private:
481481
482482 case WM_APP_escapeNLSKeysFailed:
483483 if (i_lParam) {
484+ int ret;
485+
484486 This->m_log << _T("escape NLS keys done code=") << i_wParam << std::endl;
485- if (i_wParam != YAMY_SUCCESS && i_wParam != YAMY_ERROR_RETRY_INJECTION_SUCCESS) {
486- int ret = This->errorDialogWithCode(IDS_escapeNlsKeysFailed, i_wParam, MB_RETRYCANCEL | MB_ICONSTOP);
487+ switch (i_wParam) {
488+ case YAMY_SUCCESS:
489+ case YAMY_ERROR_RETRY_INJECTION_SUCCESS:
490+ // escape NLS keys success
491+ break;
492+ case YAMY_ERROR_TIMEOUT_INJECTION:
493+ ret = This->errorDialogWithCode(IDS_escapeNlsKeysRetry, i_wParam, MB_RETRYCANCEL | MB_ICONSTOP);
487494 if (ret == IDRETRY) {
488495 This->m_fixScancodeMap.escape(true);
489496 }
497+ break;
498+ default:
499+ This->errorDialogWithCode(IDS_escapeNlsKeysFailed, i_wParam, MB_OK);
500+ break;
490501 }
491502 } else {
492503 This->m_log << _T("restore NLS keys done with code=") << i_wParam << std::endl;
--- a/mayu.rc
+++ b/mayu.rc
@@ -245,7 +245,8 @@ BEGIN
245245 IDS_readFromHomeDirectory "(ホームディレクトリから)"
246246 IDS_cannotInvoke "%s を起動できません(0x%08x)"
247247 IDS_cannotPermitStandardUser "標準ユーザへの許可に失敗しました(エラーコード=%d)"
248- IDS_escapeNlsKeysFailed "NLSキーのエスケープに失敗しました(エラーコード=%d) 再試行しますか?"
248+ IDS_escapeNlsKeysFailed "NLSキーのエスケープに失敗しました(エラーコード=%d)"
249+ IDS_escapeNlsKeysRetry "NLSキーのエスケープに失敗しました(エラーコード=%d) 再試行しますか?"
249250 END
250251
251252 STRINGTABLE DISCARDABLE
@@ -491,7 +492,8 @@ BEGIN
491492 IDS_readFromHomeDirectory "(from home directory)"
492493 IDS_cannotInvoke "can't invoke %s(0x%08x)"
493494 IDS_cannotPermitStandardUser "failed to permit standard user(error code=%d)"
494- IDS_escapeNlsKeysFailed "failed to escape NLS keys(error code=%d), retry?"
495+ IDS_escapeNlsKeysFailed "failed to escape NLS keys(error code=%d)"
496+ IDS_escapeNlsKeysRetry "failed to escape NLS keys(error code=%d), retry?"
495497 END
496498
497499 STRINGTABLE DISCARDABLE
--- a/mayurc.h
+++ b/mayurc.h
@@ -30,6 +30,7 @@
3030 #define IDS_cannotInvoke 30
3131 #define IDS_cannotPermitStandardUser 31
3232 #define IDS_escapeNlsKeysFailed 32
33+#define IDS_escapeNlsKeysRetry 33
3334 #define IDC_CURSOR_target 101
3435 #define IDD_DIALOG_editSetting 102
3536 #define IDD_DIALOG_investigate 103
Show on old repository browser