Skip to content

Commit

Permalink
1.8.5
Browse files Browse the repository at this point in the history
・Ctrl+Enterがアプリケーションに通るように、デフォルトのキー設定を一部変更しました。
 ・キー設定(文字)の「ひらがな」の「\cj」を削除し、キー設定(仮想キー)の「ひらがな」に「C\x4A」(Ctrl+J)を追加しました。
 ・キー設定(文字)の「*無効*」の「\cj」を削除し、キー設定(仮想キー)の「*無効*」に「C\x4A」(Ctrl+J)を追加しました。
 ・ちなみに、Ctrl+JとCtrl+Enterを文字として扱うと共にLF(0x0A)となってしまう為です。

・Windows 8 以降で、インストールしたときにコントロールパネルの入力方式のリストに自動で追加されるようにしました。
 ・ただし、入力方式のリストから削除しているユーザーについては、リストへの追加を手動で行う必要があります。

・SKK辞書取込処理ダイアログのスピンホイールをマーキースタイルなプログレスバーに変更しました。
  • Loading branch information
nathancorvussolis committed Mar 16, 2015
1 parent 6c4de7e commit 8b4e688
Show file tree
Hide file tree
Showing 19 changed files with 131 additions and 73 deletions.
6 changes: 3 additions & 3 deletions common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define VERSION_H

#define TEXTSERVICE_NAME L"CorvusSKK"
#define TEXTSERVICE_VER L"1.8.4"
#define TEXTSERVICE_VER L"1.8.5"

#ifndef _DEBUG
#define TEXTSERVICE_DESC TEXTSERVICE_NAME
Expand All @@ -14,7 +14,7 @@
//for resource
#define RC_AUTHOR "nathancorvussolis"
#define RC_PRODUCT "CorvusSKK"
#define RC_VERSION "1.8.4"
#define RC_VERSION_D 1,8,4,0
#define RC_VERSION "1.8.5"
#define RC_VERSION_D 1,8,5,0

#endif
8 changes: 4 additions & 4 deletions imcrvcnf/DlgProcKeyMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static const struct {
{IDC_EDIT_CONV_CHAR, ValueKeyMapConvChar, L"\\cq"},
{IDC_EDIT_JLATIN, ValueKeyMapJLatin, L"L"},
{IDC_EDIT_ASCII, ValueKeyMapAscii, L"l"},
{IDC_EDIT_JMODE, ValueKeyMapJMode, L"\\cj"},
{IDC_EDIT_JMODE, ValueKeyMapJMode, L""},
{IDC_EDIT_ABBREV, ValueKeyMapAbbrev, L"/"},
{IDC_EDIT_AFFIX, ValueKeyMapAffix, L"<|>"},
{IDC_EDIT_NEXT_CAND, ValueKeyMapNextCand, L"\\x20|\\cn"},
Expand All @@ -29,7 +29,7 @@ static const struct {
{IDC_EDIT_CANCEL, ValueKeyMapCancel, L"\\cg|\\x1B"},
{IDC_EDIT_BACK, ValueKeyMapBack, L"\\ch"},
{IDC_EDIT_DELETE, ValueKeyMapDelete, L"\\cd|\\x7F"},
{IDC_EDIT_VOID, ValueKeyMapVoid, L"\\cj"},
{IDC_EDIT_VOID, ValueKeyMapVoid, L""},
{IDC_EDIT_LEFT, ValueKeyMapLeft, L"\\cb"},
{IDC_EDIT_UP, ValueKeyMapUp, L"\\ca"},
{IDC_EDIT_RIGHT, ValueKeyMapRight, L"\\cf"},
Expand All @@ -41,7 +41,7 @@ static const struct {
{IDC_EDIT_CONV_CHAR, ValueKeyMapConvChar, L""},
{IDC_EDIT_JLATIN, ValueKeyMapJLatin, L""},
{IDC_EDIT_ASCII, ValueKeyMapAscii, L""},
{IDC_EDIT_JMODE, ValueKeyMapJMode, L""},
{IDC_EDIT_JMODE, ValueKeyMapJMode, L"C\\x4A"},
{IDC_EDIT_ABBREV, ValueKeyMapAbbrev, L""},
{IDC_EDIT_AFFIX, ValueKeyMapAffix, L""},
{IDC_EDIT_NEXT_CAND, ValueKeyMapNextCand, L""},
Expand All @@ -56,7 +56,7 @@ static const struct {
{IDC_EDIT_CANCEL, ValueKeyMapCancel, L""},
{IDC_EDIT_BACK, ValueKeyMapBack, L""},
{IDC_EDIT_DELETE, ValueKeyMapDelete, L"\\x2E"},
{IDC_EDIT_VOID, ValueKeyMapVoid, L""},
{IDC_EDIT_VOID, ValueKeyMapVoid, L"C\\x4A"},
{IDC_EDIT_LEFT, ValueKeyMapLeft, L"\\x25"},
{IDC_EDIT_UP, ValueKeyMapUp, L"\\x26"},
{IDC_EDIT_RIGHT, ValueKeyMapRight, L"\\x27"},
Expand Down
16 changes: 1 addition & 15 deletions imcrvcnf/PropertyConfDictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,17 +360,14 @@ void MakeSKKDicWaitThread(void *p)

INT_PTR CALLBACK DlgProcSKKDic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
LPCWSTR pw[] = {L"", L"", L"", L""};
static int ipw = 0;

switch(message)
{
case WM_INITDIALOG:
SkkDicInfo.cancel = FALSE;
SkkDicInfo.hr = S_FALSE;
SkkDicInfo.child = hDlg;
_beginthread(MakeSKKDicWaitThread, 0, NULL);
SetTimer(hDlg, IDC_STATIC_DIC_PW, 1000, NULL);
SendMessage(GetDlgItem(hDlg, IDC_PROGRESS_DIC_MAKE), PBM_SETMARQUEE, TRUE, 0);
return TRUE;
case WM_CTLCOLORDLG:
case WM_CTLCOLORSTATIC:
Expand All @@ -384,17 +381,6 @@ INT_PTR CALLBACK DlgProcSKKDic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
SkkDicInfo.cancel = TRUE;
}
break;
case WM_TIMER:
SetDlgItemTextW(hDlg, IDC_STATIC_DIC_PW, pw[ipw]);
if(++ipw >= _countof(pw))
{
ipw = 0;
}
return TRUE;
case WM_DESTROY:
KillTimer(hDlg, IDC_STATIC_DIC_PW);
ipw = 0;
return TRUE;
default:
break;
}
Expand Down
2 changes: 1 addition & 1 deletion imcrvcnf/imcrvcnf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
}

icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
icex.dwICC = ICC_LISTVIEW_CLASSES | ICC_TAB_CLASSES;
icex.dwICC = ICC_LISTVIEW_CLASSES | ICC_TAB_CLASSES | ICC_PROGRESS_CLASS;
InitCommonControlsEx(&icex);

CreateProperty(hInstance);
Expand Down
Binary file modified imcrvcnf/imcrvcnf.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion imcrvcnf/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define IDC_BUTTON_SKK_DIC_DOWN 1005
#define IDC_BUTTON_SKK_DIC_MAKE 1006
#define IDD_DIALOG_SKK_DIC_MAKE 1021
#define IDC_STATIC_DIC_PW 1022
#define IDC_PROGRESS_DIC_MAKE 1022
#define IDC_BUTTON_ABORT_DIC_MAKE 1023
#define IDC_CHECKBOX_SKKSRV 1051
#define IDC_RADIO_EUC 1052
Expand Down
5 changes: 2 additions & 3 deletions imcrvtip/FnConfigure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,8 @@ void CTextService::_InitFont()
{
hr = _pDWFactory->CreateTextFormat(cx_fontname, NULL,
static_cast<DWRITE_FONT_WEIGHT>(cx_fontweight),
cx_fontitalic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL,
DWRITE_FONT_STRETCH_NORMAL,
(FLOAT)MulDiv(cx_fontpoint, dpi, 72), L"ja-jp", &_pDWTF);
(cx_fontitalic ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL),
DWRITE_FONT_STRETCH_NORMAL, (FLOAT)MulDiv(cx_fontpoint, dpi, 72), L"JPN", &_pDWTF);
}

if(hr == S_OK)
Expand Down
76 changes: 63 additions & 13 deletions imcrvtip/Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,31 @@ BOOL RegisterProfiles()
HRESULT hr = E_FAIL;
WCHAR fileName[MAX_PATH];

ITfInputProcessorProfiles *pInputProcessProfiles;
if(CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pInputProcessProfiles)) == S_OK)
ITfInputProcessorProfileMgr *pInputProcessorProfilesMgr;
if(CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pInputProcessorProfilesMgr)) == S_OK)
{
if(pInputProcessProfiles->Register(c_clsidTextService) == S_OK)
{
GetModuleFileNameW(g_hInst, fileName, _countof(fileName));
GetModuleFileNameW(g_hInst, fileName, _countof(fileName));

hr = pInputProcessProfiles->AddLanguageProfile(c_clsidTextService, TEXTSERVICE_LANGID,
c_guidProfile, TextServiceDesc, -1, fileName, -1, TEXTSERVICE_ICON_INDEX);
}
SafeRelease(&pInputProcessProfiles);
hr = pInputProcessorProfilesMgr->RegisterProfile(c_clsidTextService, TEXTSERVICE_LANGID, c_guidProfile,
TextServiceDesc, (ULONG)wcslen(TextServiceDesc), fileName, (ULONG)wcslen(fileName),
TEXTSERVICE_ICON_INDEX, NULL, 0, TRUE, 0);

SafeRelease(&pInputProcessorProfilesMgr);
}

return (hr == S_OK);
}

void UnregisterProfiles()
{
ITfInputProcessorProfiles *pInputProcessProfiles;
if(CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pInputProcessProfiles)) == S_OK)
HRESULT hr = E_FAIL;

ITfInputProcessorProfileMgr *pInputProcessorProfilesMgr;
if(CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pInputProcessorProfilesMgr)) == S_OK)
{
pInputProcessProfiles->Unregister(c_clsidTextService);
SafeRelease(&pInputProcessProfiles);
hr = pInputProcessorProfilesMgr->UnregisterProfile(c_clsidTextService, TEXTSERVICE_LANGID, c_guidProfile, TF_URP_ALLPROFILES);

SafeRelease(&pInputProcessorProfilesMgr);
}
}

Expand Down Expand Up @@ -181,3 +183,51 @@ void UnregisterServer()

SHDeleteKeyW(HKEY_CLASSES_ROOT, szInfoKey);
}

BOOL InstallLayoutOrTip(DWORD dwFlags)
{
typedef BOOL (WINAPI *PTF_INSTALLLAYOUTORTIP)(LPCWSTR psz, DWORD dwFlags);

BOOL bRet = FALSE;
WCHAR fileNameInputDLL[MAX_PATH];

if(SHGetFolderPathW(NULL, CSIDL_SYSTEM, NULL, SHGFP_TYPE_CURRENT, fileNameInputDLL) != S_OK)
{
return FALSE;
}

wcsncat_s(fileNameInputDLL, L"\\input.dll", _TRUNCATE);

HMODULE hInputDLL = LoadLibraryW(fileNameInputDLL);

if(hInputDLL != NULL)
{
PTF_INSTALLLAYOUTORTIP pfnInstallLayoutOrTip =
(PTF_INSTALLLAYOUTORTIP)GetProcAddress(hInputDLL, "InstallLayoutOrTip");

if(pfnInstallLayoutOrTip != NULL)
{
WCHAR clsid[CLSID_STRLEN + 1];
WCHAR guidprofile[CLSID_STRLEN + 1];
WCHAR profilelist[7 + CLSID_STRLEN * 2 + 1];

if(StringFromGUID2(c_clsidTextService, clsid, _countof(clsid)) == 0)
{
return FALSE;
}

if(StringFromGUID2(c_guidProfile, guidprofile, _countof(guidprofile)) == 0)
{
return FALSE;
}

_snwprintf_s(profilelist, _TRUNCATE, L"0x%04X:%s%s", TEXTSERVICE_LANGID, clsid, guidprofile);

bRet = (*pfnInstallLayoutOrTip)(profilelist, dwFlags);
}

FreeLibrary(hInputDLL);
}

return bRet;
}
12 changes: 12 additions & 0 deletions imcrvtip/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ void UnregisterCategories();
BOOL RegisterServer();
void UnregisterServer();

BOOL InstallLayoutOrTip(DWORD dwFlags);

static LONG g_cRefDll = 0;

class CClassFactory : public IClassFactory
Expand Down Expand Up @@ -139,11 +141,21 @@ STDAPI DllRegisterServer(void)
return E_FAIL;
}

if(IsVersion62AndOver())
{
InstallLayoutOrTip(0);
}

return S_OK;
}

STDAPI DllUnregisterServer(void)
{
if(IsVersion62AndOver())
{
InstallLayoutOrTip(ILOT_UNINSTALL);
}

UnregisterProfiles();
UnregisterCategories();
UnregisterServer();
Expand Down
11 changes: 11 additions & 0 deletions imcrvtip/imcrvtip.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,15 @@ extern const IID IID_ITfFnGetPreferredTouchKeyboardLayout;

#endif //(_WIN32_WINNT < 0x0603)

//InstallLayoutOrTip Flags

#define ILOT_UNINSTALL 0x00000001
#define ILOT_DEFPROFILE 0x00000002
#define ILOT_DEFUSER4 0x00000004
#define ILOT_SYSLOCALE 0x00000008
#define ILOT_NOLOCALETOENUMERATE 0x00000010
#define ILOT_NOAPPLYTOCURRENTSESSION 0x00000020
#define ILOT_CLEANINSTALL 0x00000040
#define ILOT_DISABLED 0x00000080

#endif //IMCRVTIP_H
14 changes: 7 additions & 7 deletions installer/README.TXT
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

==============================================================================
CorvusSKK version 1.8.4
CorvusSKK version 1.8.5

https://code.google.com/p/corvus-skk/
https://github.com/nathancorvussolis/corvusskk
[email protected]
==============================================================================

Expand Down Expand Up @@ -129,7 +129,7 @@
UTF-16(LE, BOMあり)のSKK辞書フォーマットとなっています。

ユーザー辞書を編集する際は、ログオンユーザー権限で動作しているサーバープロセス
(imcrvmgr.exe)をタクスマネージャなどで終了させた状態で行なって下さい
(imcrvmgr.exe)をタスクマネージャなどで終了させた状態で行なって下さい

編集後、以下のいずれかの操作を行うとサーバープロセスが自動的に起動します。
・IME OFF → ON
Expand Down Expand Up @@ -299,7 +299,7 @@
|| || || ひらがなカタカナ→半角カタカナ変換、abbrev→全角英数字変換
|| 全英 || L || 全英モード
|| ASCII || l || アスキーモード
|| ひらがな || Ctrl+j || ひらがなモード
|| ひらがな || || ひらがなモード
|| abbrev || / || abbrevモード
|| 接辞 || < > || 接頭辞・接尾辞
|| 次候補 || Space Ctrl+n || 辞書検索開始、次候補
Expand All @@ -314,7 +314,7 @@
|| 取消 || Ctrl+g Ctrl+[(Escape) ||
|| 後退 || Ctrl+h(BS) ||
|| 削除 || Ctrl+d DEL(Ctrl+BS) ||
|| *無効* || Ctrl+j || アプリケーション側に非通知、辞書登録の確定無効
|| *無効* || || アプリケーション側に非通知、辞書登録の確定無効
|| 左移動 || Ctrl+b ||
|| 先頭移動 || Ctrl+a ||
|| 右移動 || Ctrl+f ||
Expand All @@ -331,7 +331,7 @@
|| || || ひらがなカタカナ→半角カタカナ変換、abbrev→全角英数字変換
|| 全英 || || 全英モード
|| ASCII || || アスキーモード
|| ひらがな || || ひらがなモード
|| ひらがな || Ctrl+0x4A (Ctrl+j) || ひらがなモード
|| abbrev || || abbrevモード
|| 接辞 || || 接頭辞・接尾辞
|| 次候補 || || 辞書検索開始、次候補
Expand All @@ -346,7 +346,7 @@
|| 取消 || ||
|| 後退 || ||
|| 削除 || 0x2E (Delete) ||
|| *無効* || || アプリケーション側に非通知、辞書登録の確定無効
|| *無効* || Ctrl+0x4A (Ctrl+j) || アプリケーション側に非通知、辞書登録の確定無効
|| 左移動 || 0x25 (カーソル左) ||
|| 先頭移動 || 0x26 (カーソル上) ||
|| 右移動 || 0x27 (カーソル右) ||
Expand Down
8 changes: 4 additions & 4 deletions installer/config-sample/config - act.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<key name="convchar" value="\cq" />
<key name="jlatin" value="L" />
<key name="ascii" value="l" />
<key name="jmode" value="\cj" />
<key name="jmode" value="" />
<key name="abbrev" value="/" />
<key name="affix" value="&lt;|>" />
<key name="nextcand" value="\x20|\cn" />
Expand All @@ -108,7 +108,7 @@
<key name="cancel" value="\cg|\x1B" />
<key name="back" value="\ch" />
<key name="delete" value="\cd|\x7F" />
<key name="void" value="\cj" />
<key name="void" value="" />
<key name="left" value="\cb" />
<key name="up" value="\ca" />
<key name="right" value="\cf" />
Expand All @@ -120,7 +120,7 @@
<key name="convchar" value="" />
<key name="jlatin" value="" />
<key name="ascii" value="" />
<key name="jmode" value="" />
<key name="jmode" value="C\x4A" />
<key name="abbrev" value="" />
<key name="affix" value="" />
<key name="nextcand" value="" />
Expand All @@ -135,7 +135,7 @@
<key name="cancel" value="" />
<key name="back" value="" />
<key name="delete" value="\x2E" />
<key name="void" value="" />
<key name="void" value="C\x4A" />
<key name="left" value="\x25" />
<key name="up" value="\x26" />
<key name="right" value="\x27" />
Expand Down
8 changes: 4 additions & 4 deletions installer/config-sample/config - azik-jpkbd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<key name="convchar" value="\cq" />
<key name="jlatin" value="L" />
<key name="ascii" value="l" />
<key name="jmode" value="\cj" />
<key name="jmode" value="" />
<key name="abbrev" value="/" />
<key name="affix" value="&lt;|>" />
<key name="nextcand" value="\x20|\cn" />
Expand All @@ -110,7 +110,7 @@
<key name="cancel" value="\cg|\x1B" />
<key name="back" value="\ch" />
<key name="delete" value="\cd|\x7F" />
<key name="void" value="\cj" />
<key name="void" value="" />
<key name="left" value="\cb" />
<key name="up" value="\ca" />
<key name="right" value="\cf" />
Expand All @@ -122,7 +122,7 @@
<key name="convchar" value="" />
<key name="jlatin" value="" />
<key name="ascii" value="" />
<key name="jmode" value="" />
<key name="jmode" value="C\x4A" />
<key name="abbrev" value="" />
<key name="affix" value="" />
<key name="nextcand" value="" />
Expand All @@ -137,7 +137,7 @@
<key name="cancel" value="" />
<key name="back" value="" />
<key name="delete" value="\x2E" />
<key name="void" value="" />
<key name="void" value="C\x4A" />
<key name="left" value="\x25" />
<key name="up" value="\x26" />
<key name="right" value="\x27" />
Expand Down
Loading

0 comments on commit 8b4e688

Please sign in to comment.