From b5fe64e5a68edb20010744bcb65c3bb4d43af597 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Mon, 22 Oct 2012 19:07:16 +0000 Subject: fixed toolbar button git-svn-id: http://svn.miranda-ng.org/main/trunk@2049 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/OpenFolder/src/openFolder.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'plugins/OpenFolder/src') diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp index 012996c659..46129468cd 100644 --- a/plugins/OpenFolder/src/openFolder.cpp +++ b/plugins/OpenFolder/src/openFolder.cpp @@ -55,6 +55,7 @@ static int ToptoolBarHook(WPARAM wParam, LPARAM lParam) static int ModulesLoaded(WPARAM wParam, LPARAM lParam) { + HookEvent(ME_TTB_MODULELOADED,ToptoolBarHook); TCHAR szFile[MAX_PATH]; GetModuleFileName( hInst, szFile, MAX_PATH ); @@ -65,20 +66,21 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) SKINICONDESC sid = { 0 }; sid.cbSize = sizeof( SKINICONDESC ); sid.ptszDefaultFile = szFile; - sid.flags = SIDF_PATH_TCHAR; + sid.flags = SIDF_ALL_TCHAR; sid.cx = sid.cy = 16; - sid.pszSection = LPGEN("Open Folder"); + sid.ptszSection = LPGENT("Open Folder"); sid.pszName = szSettingName; - sid.pszDescription = LPGEN("Open Folder"); + sid.ptszDescription = LPGENT("Open Folder"); sid.iDefaultIndex = -IDI_FOLDER; hIconOpenFolder = Skin_AddIcon(&sid); // hotkeys service (0.8+) HOTKEYDESC hotkey = { 0 }; hotkey.cbSize = sizeof( hotkey ); - hotkey.pszName = LPGEN("Open Folder"); - hotkey.pszDescription = LPGEN("Open Folder"); - hotkey.pszSection = "Main"; + hotkey.dwFlags = HKD_TCHAR; + hotkey.pszName = "Open Folder"; + hotkey.ptszDescription = LPGENT("Open Folder"); + hotkey.ptszSection = LPGENT("Main"); hotkey.pszService = MS_OPENFOLDER_OPEN; hotkey.DefHotKey = MAKEWORD( 'O', HOTKEYF_SHIFT | HOTKEYF_ALT ); Hotkey_Register(&hotkey); @@ -86,9 +88,9 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { 0 }; mi.cbSize = sizeof( mi ); mi.position = 0x7FFFFFFF; - mi.flags = CMIF_ICONFROMICOLIB; + mi.flags = CMIF_ICONFROMICOLIB|CMIF_TCHAR; mi.icolibItem = hIconOpenFolder; - mi.pszName = LPGEN("Open Folder"); + mi.ptszName = LPGENT("Open Folder"); mi.pszService = MS_OPENFOLDER_OPEN; Menu_AddMainMenuItem(&mi); return 0; -- cgit v1.2.3