diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2012-08-21 15:26:14 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2012-08-21 15:26:14 +0000 |
commit | 23e8be15f5c5e0dc5c064253e3fa6bc4dbd2c506 (patch) | |
tree | bbed6482d19168a61a40ee9fbc8fb6763aab1604 /plugins/Rate | |
parent | 260cf26dec30e33ae3c7c6a91fccc0b4b43b8ce4 (diff) |
unicode config for Rate plugin
git-svn-id: http://svn.miranda-ng.org/main/trunk@1515 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Rate')
-rw-r--r-- | plugins/Rate/rate_10.vcxproj | 8 | ||||
-rw-r--r-- | plugins/Rate/src/commonheaders.h | 14 | ||||
-rw-r--r-- | plugins/Rate/src/main.cpp | 10 | ||||
-rw-r--r-- | plugins/Rate/src/options.cpp | 54 |
4 files changed, 40 insertions, 46 deletions
diff --git a/plugins/Rate/rate_10.vcxproj b/plugins/Rate/rate_10.vcxproj index 8d70796c49..3308db2b17 100644 --- a/plugins/Rate/rate_10.vcxproj +++ b/plugins/Rate/rate_10.vcxproj @@ -25,21 +25,21 @@ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/plugins/Rate/src/commonheaders.h b/plugins/Rate/src/commonheaders.h index 9fde7034e0..2637e8f42b 100644 --- a/plugins/Rate/src/commonheaders.h +++ b/plugins/Rate/src/commonheaders.h @@ -29,12 +29,6 @@ #define _CRT_SECURE_NO_WARNINGS
-//needed by m_utils.h
-#include <stdio.h>
-
-// needed by m_icolib.h > r9256
-#include <stddef.h>
-
//Miranda API headers
#include <windows.h>
#include <win2k.h>
@@ -61,15 +55,15 @@ static const int DefaultSlot = EXTRA_ICON_PROTO; static struct
{
- char* szDescr;
+ TCHAR* szDescr;
char* szName;
int defIconID;
HANDLE hIconLibItem;
} iconList[] =
{
- { LPGEN( "Rate high" ), "rate_high", IDI_RATEHI },
- { LPGEN( "Rate medium" ), "rate_medium", IDI_RATEME },
- { LPGEN( "Rate low" ), "rate_low", IDI_RATELO },
+ { LPGENT( "Rate high" ), "rate_high", IDI_RATEHI },
+ { LPGENT( "Rate medium" ), "rate_medium", IDI_RATEME },
+ { LPGENT( "Rate low" ), "rate_low", IDI_RATELO },
};
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index 1fce96c918..8fe42060f1 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -171,13 +171,13 @@ static void init_icolib (void) SKINICONDESC sid = {0};
sid.cbSize = sizeof(sid);
- sid.pszSection = Translate("Contact Rate");
- sid.pszDefaultFile = szFile;
- sid.flags = SIDF_PATH_TCHAR;
+ sid.ptszSection = LPGENT("Contact Rate");
+ sid.ptszDefaultFile = szFile;
+ sid.flags = SIDF_ALL_TCHAR;
for (int i = 0; i < SIZEOF(iconList); i++ ) {
sid.pszName = iconList[i].szName;
- sid.pszDescription = iconList[i].szDescr;
+ sid.ptszDescription = iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
iconList[i].hIconLibItem = Skin_AddIcon(&sid);
}
@@ -220,7 +220,7 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) {
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- if (wParam != NULL && !lstrcmp(cws->szModule,"CList") && !lstrcmp(cws->szSetting,"Rate"))
+ if (wParam != NULL && !lstrcmpA(cws->szModule,"CList") && !lstrcmpA(cws->szSetting,"Rate"))
setExtaIcon((HANDLE)wParam, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal);
return 0;
diff --git a/plugins/Rate/src/options.cpp b/plugins/Rate/src/options.cpp index d6088aa691..bd8c3a228e 100644 --- a/plugins/Rate/src/options.cpp +++ b/plugins/Rate/src/options.cpp @@ -55,32 +55,32 @@ enum { clist_nicer
};
-const char *szAdvancedIconsModern[] = {
- "E-mail",
- "Web page",
- "Phone/SMS",
- "Advanced #1",
- "Advanced #2",
- "Advanced #3",
- "Client",
- "Advanced #4",
- "Protocol",
- "Visibility/Chat activity"
+const TCHAR *szAdvancedIconsModern[] = {
+ LPGENT("E-mail"),
+ LPGENT("Web page"),
+ LPGENT("Phone/SMS"),
+ LPGENT("Advanced #1"),
+ LPGENT("Advanced #2"),
+ LPGENT("Advanced #3"),
+ LPGENT("Client"),
+ LPGENT("Advanced #4"),
+ LPGENT("Protocol"),
+ LPGENT("Visibility/Chat activity")
};
//const int cAdvancedIconsModern = sizeof(szAdvancedIconsModern) / sizeof(szAdvancedIconsModern[0]);
-const char *szAdvancedIconsNicer[] = {
- "Reserved",
- "E-mail",
- "Homepage",
- "Telephone",
- "Advanced #1",
- "Advanced #2",
- "Client",
- "Advanced #3",
- "Advanced #4",
- "Reserved #1",
- "Reserved #2"
+const TCHAR *szAdvancedIconsNicer[] = {
+ LPGENT("Reserved"),
+ LPGENT("E-mail"),
+ LPGENT("Homepage"),
+ LPGENT("Telephone"),
+ LPGENT("Advanced #1"),
+ LPGENT("Advanced #2"),
+ LPGENT("Client"),
+ LPGENT("Advanced #3"),
+ LPGENT("Advanced #4"),
+ LPGENT("Reserved #1"),
+ LPGENT("Reserved #2")
};
//const int cAdvancedIconsNicer = sizeof(szAdvancedIconsNicer) / sizeof(szAdvancedIconsNicer[0]);
@@ -138,7 +138,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (usedClist != clist_none) {
for (int i = 0; i < cAdvancedIcons; i++)
{
- SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_ADDSTRING, 0, (LPARAM) Translate( usedClist==clist_modern ? szAdvancedIconsModern[i] : szAdvancedIconsNicer[i]));
+ SendMessage(GetDlgItem(hwndDlg, IDC_ADVICON), CB_ADDSTRING, 0, (LPARAM) TranslateTS( usedClist==clist_modern ? szAdvancedIconsModern[i] : szAdvancedIconsNicer[i]));
}
if (usedClist == clist_modern )
@@ -210,11 +210,11 @@ int onOptInitialise(WPARAM wParam, LPARAM lParam) OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = g_hInst;
- odp.pszGroup = LPGEN("Contact List");
- odp.pszTitle = LPGEN("Rate");
+ odp.ptszGroup = LPGENT("Contact List");
+ odp.ptszTitle = LPGENT("Rate");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_RATE_OPT);
odp.pfnDlgProc = DlgProcOptions;
- odp.flags = ODPF_BOLDGROUPS;
+ odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR;
Options_AddPage(wParam, &odp);
return 0;
|