summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2012-07-22 13:27:22 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2012-07-22 13:27:22 +0000
commitbdd0ec075f902844f174f4b0733f92642d446544 (patch)
tree9dcd037a8a83447890ef5110ad02ea95307eb6d7
parent5c5a5b5f3f56e973f33aaa373e80782c480d7523 (diff)
unicode
git-svn-id: http://svn.miranda-ng.org/main/trunk@1097 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/MyDetails/frame.cpp22
-rw-r--r--plugins/MyDetails/mydetails.cpp39
-rw-r--r--plugins/MyDetails/options.cpp6
3 files changed, 35 insertions, 32 deletions
diff --git a/plugins/MyDetails/frame.cpp b/plugins/MyDetails/frame.cpp
index a4ce6f2afc..e85fd8ff52 100644
--- a/plugins/MyDetails/frame.cpp
+++ b/plugins/MyDetails/frame.cpp
@@ -63,12 +63,12 @@ HANDLE hMenuShowHideFrame = 0;
#define FONT_LISTENING_TO 4
#define NUM_FONTS 5
-FontID font_id[NUM_FONTS];
+FontIDT font_id[NUM_FONTS];
HFONT hFont[NUM_FONTS];
COLORREF font_colour[NUM_FONTS];
// Defaults
-char *font_names[] = { "Nickname", "Protocol", "Status", "Status Message", "Listening To" };
+TCHAR *font_names[] = { LPGENT("Nickname"), LPGENT("Protocol"), LPGENT("Status"), LPGENT("Status Message"), LPGENT("Listening To") };
char font_sizes[] = { 13, 8, 8, 8, 8 };
BYTE font_styles[] = { DBFONTF_BOLD, 0, 0, DBFONTF_ITALIC, DBFONTF_ITALIC };
COLORREF font_colors[] = { RGB(0,0,0), RGB(0,0,0), RGB(0,0,0), RGB(150,150,150), RGB(150,150,150) };
@@ -222,8 +222,8 @@ int CreateFrame()
ZeroMemory(&font_id[i], sizeof(font_id[i]));
font_id[i].cbSize = sizeof(FontID);
- strncpy(font_id[i].group, Translate("My Details"), SIZEOF(font_id[i].group));
- strncpy(font_id[i].name, Translate(font_names[i]), SIZEOF(font_id[i].name));
+ _tcsncpy(font_id[i].group, LPGENT("My Details"), SIZEOF(font_id[i].group));
+ _tcsncpy(font_id[i].name, font_names[i], SIZEOF(font_id[i].name));
strncpy(font_id[i].dbSettingsGroup, MODULE_NAME, SIZEOF(font_id[i].dbSettingsGroup));
char tmp[128];
@@ -234,10 +234,10 @@ int CreateFrame()
font_id[i].deffontsettings.size = -MulDiv(font_sizes[i], GetDeviceCaps(hdc, LOGPIXELSY), 72);
font_id[i].deffontsettings.style = font_styles[i];
font_id[i].deffontsettings.charset = DEFAULT_CHARSET;
- strncpy(font_id[i].deffontsettings.szFace, "Tahoma", SIZEOF(font_id[i].deffontsettings.szFace));
+ _tcsncpy(font_id[i].deffontsettings.szFace, _T("Tahoma"), SIZEOF(font_id[i].deffontsettings.szFace));
font_id[i].order = i;
font_id[i].flags = FIDF_DEFAULTVALID;
- FontRegister(&font_id[i]);
+ FontRegisterT(&font_id[i]);
}
ReleaseDC(NULL, hdc);
@@ -266,11 +266,11 @@ int CreateFrame()
CLISTFrame Frame = {0};
Frame.cbSize = sizeof(Frame);
- Frame.name = Translate("My Details");
+ Frame.tname = LPGENT("My Details");
Frame.cbSize = sizeof(CLISTFrame);
Frame.hWnd = hwnd_frame;
Frame.align = alTop;
- Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED;
+ Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED | F_TCHAR;
Frame.height = 100;
frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -319,12 +319,12 @@ int CreateFrame()
CLISTMENUITEM menu = {0};
menu.cbSize=sizeof(menu);
- menu.flags = CMIM_ALL;
+ menu.flags = CMIF_TCHAR;
menu.popupPosition = -0x7FFFFFFF;
- menu.pszPopupName = Translate("My Details");
+ menu.ptszPopupName = LPGENT("My Details");
menu.position = 1; // 500010000
menu.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
- menu.pszName = Translate("Show My Details");
+ menu.ptszName = LPGENT("Show My Details");
menu.pszService= MODULE_NAME "/ShowHideMyDetails";
hMenuShowHideFrame = Menu_AddMainMenuItem(&menu);
diff --git a/plugins/MyDetails/mydetails.cpp b/plugins/MyDetails/mydetails.cpp
index 8081940619..4b34041cbb 100644
--- a/plugins/MyDetails/mydetails.cpp
+++ b/plugins/MyDetails/mydetails.cpp
@@ -155,11 +155,11 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
if (protocols->CanSetAvatars()) {
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = 0;
+ mi.flags = CMIF_TCHAR;
mi.popupPosition = 500050000;
- mi.pszPopupName = LPGEN("My Details");
+ mi.ptszPopupName = LPGENT("My Details");
mi.position = 100001;
- mi.pszName = LPGEN("Set My Avatar...");
+ mi.ptszName = LPGENT("Set My Avatar...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYAVATARUI, Menu_SetMyAvatarUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYAVATARUI;
Menu_AddMainMenuItem(&mi);
@@ -167,22 +167,22 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = 0;
+ mi.flags = CMIF_TCHAR;
mi.popupPosition = 500050000;
- mi.pszPopupName = LPGEN("My Details");
+ mi.ptszPopupName = LPGENT("My Details");
mi.position = 100002;
- mi.pszName = LPGEN("Set My Nickname...");
+ mi.ptszName = LPGENT("Set My Nickname...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYNICKNAMEUI, Menu_SetMyNicknameUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYNICKNAMEUI;
Menu_AddMainMenuItem(&mi);
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = 0;
+ mi.flags = CMIF_TCHAR;
mi.popupPosition = 500050000;
- mi.pszPopupName = LPGEN("My Details");
+ mi.ptszPopupName = LPGENT("My Details");
mi.position = 100003;
- mi.pszName = LPGEN("Set My Status Message...");
+ mi.ptszName = LPGENT("Set My Status Message...");
CreateServiceFunction("MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI, Menu_SetMyStatusMessageUI);
mi.pszService = "MENU_" MS_MYDETAILS_SETMYSTATUSMESSAGEUI;
Menu_AddMainMenuItem(&mi);
@@ -190,11 +190,11 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
// Set protocols to show frame
ZeroMemory(&mi,sizeof(mi));
mi.cbSize = sizeof(mi);
- mi.flags = 0;
+ mi.flags = CMIF_TCHAR;
mi.popupPosition = 500050000;
- mi.pszPopupName = LPGEN("My Details");
+ mi.ptszPopupName = LPGENT("My Details");
mi.position = 200001;
- mi.pszName = LPGEN("Show next protocol");
+ mi.ptszName = LPGENT("Show next protocol");
mi.pszService = MS_MYDETAILS_SHOWNEXTPROTOCOL;
Menu_AddMainMenuItem(&mi);
@@ -203,8 +203,9 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
if (CallService(MS_SKIN2_GETICON, 0, (LPARAM) "LISTENING_TO_ICON") == NULL) {
SKINICONDESC sid = {0};
sid.cbSize = sizeof(SKINICONDESC);
- sid.pszSection = LPGEN("Contact List");
- sid.pszDescription = LPGEN("Listening to");
+ sid.flags = SIDF_TCHAR;
+ sid.ptszSection = LPGENT("Contact List");
+ sid.ptszDescription = LPGENT("Listening to");
sid.pszName = "LISTENING_TO_ICON";
sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LISTENINGTO));
Skin_AddIcon(&sid);
@@ -212,8 +213,9 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
{
SKINICONDESC sid = {0};
sid.cbSize = sizeof(SKINICONDESC);
- sid.pszSection = LPGEN("My Details");
- sid.pszDescription = LPGEN("Previous protocol");
+ sid.flags = SIDF_TCHAR;
+ sid.ptszSection = LPGENT("My Details");
+ sid.ptszDescription = LPGENT("Previous protocol");
sid.pszName = "MYDETAILS_PREV_PROTOCOL";
sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LEFT_ARROW));
Skin_AddIcon(&sid);
@@ -221,8 +223,9 @@ static int MainInit(WPARAM wparam,LPARAM lparam)
{
SKINICONDESC sid = {0};
sid.cbSize = sizeof(SKINICONDESC);
- sid.pszSection = LPGEN("My Details");
- sid.pszDescription = LPGEN("Next protocol");
+ sid.flags = SIDF_TCHAR;
+ sid.ptszSection = LPGENT("My Details");
+ sid.ptszDescription = LPGENT("Next protocol");
sid.pszName = "MYDETAILS_NEXT_PROTOCOL";
sid.hDefaultIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_RIGHT_ARROW));
Skin_AddIcon(&sid);
diff --git a/plugins/MyDetails/options.cpp b/plugins/MyDetails/options.cpp
index 6506e4a59f..a4b722b241 100644
--- a/plugins/MyDetails/options.cpp
+++ b/plugins/MyDetails/options.cpp
@@ -145,9 +145,9 @@ int InitOptionsCallback(WPARAM wParam,LPARAM lParam)
odp.hInstance = hInst;
odp.pfnDlgProc = DlgProcOpts;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTS);
- odp.pszGroup = LPGEN("Customize");
- odp.pszTitle = LPGEN("My Details");
- odp.flags = ODPF_BOLDGROUPS;
+ odp.ptszGroup = LPGENT("Customize");
+ odp.ptszTitle = LPGENT("My Details");
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
Options_AddPage(wParam, &odp);
return 0;
}