diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/src/jabber.cpp | 36 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_frame.cpp | 20 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_userinfo.cpp | 4 |
3 files changed, 29 insertions, 31 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 10c241f13e..83b90a0e95 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -121,39 +121,39 @@ static int OnModulesLoaded(WPARAM, LPARAM) }
// init fontservice for info frame
- FontID fontid = {0};
+ FontIDT fontid = {0};
fontid.cbSize = sizeof(fontid);
- strcpy(fontid.group, "Jabber");
- strcpy(fontid.dbSettingsGroup, GLOBAL_SETTING_MODULE);
- strcpy(fontid.backgroundGroup, "Jabber");
- strcpy(fontid.backgroundName,"Background");
+ _tcsncpy(fontid.group, LPGENT("Jabber"), SIZEOF(fontid.group));
+ strncpy(fontid.dbSettingsGroup, GLOBAL_SETTING_MODULE, SIZEOF(fontid.dbSettingsGroup));
+ _tcsncpy(fontid.backgroundGroup, _T("Jabber"), SIZEOF(fontid.backgroundGroup));
+ _tcsncpy(fontid.backgroundName,_T("Background"), SIZEOF(fontid.backgroundName));
fontid.flags = FIDF_DEFAULTVALID;
fontid.deffontsettings.charset = DEFAULT_CHARSET;
fontid.deffontsettings.colour = GetSysColor(COLOR_WINDOWTEXT);
fontid.deffontsettings.size = -11;
- lstrcpyA(fontid.deffontsettings.szFace, "MS Shell Dlg");
+ lstrcpyn(fontid.deffontsettings.szFace, _T("MS Shell Dlg"), SIZEOF(fontid.deffontsettings.szFace));
fontid.deffontsettings.style = 0;
- strcpy(fontid.name, LPGEN("Frame title"));
- strcpy(fontid.prefix, "fntFrameTitle");
+ _tcsncpy(fontid.name, LPGENT("Frame title"), SIZEOF(fontid.name));
+ strncpy(fontid.prefix, "fntFrameTitle", SIZEOF(fontid.prefix));
fontid.deffontsettings.style = DBFONTF_BOLD;
- FontRegister(&fontid);
+ FontRegisterT(&fontid);
- strcpy(fontid.name, LPGEN("Frame text"));
- strcpy(fontid.prefix, "fntFrameClock");
+ _tcsncpy(fontid.name, LPGENT("Frame text"), SIZEOF(fontid.name));
+ strncpy(fontid.prefix, "fntFrameClock", SIZEOF(fontid.prefix));
fontid.deffontsettings.style = 0;
- FontRegister(&fontid);
+ FontRegisterT(&fontid);
- ColourID colourid = {0};
+ ColourIDT colourid = {0};
colourid.cbSize = sizeof(colourid);
- strcpy(colourid.group, "Jabber");
- strcpy(colourid.dbSettingsGroup, GLOBAL_SETTING_MODULE);
+ _tcsncpy(colourid.group, _T("Jabber"), SIZEOF(colourid.group));
+ strncpy(colourid.dbSettingsGroup, GLOBAL_SETTING_MODULE, SIZEOF(colourid.dbSettingsGroup));
- strcpy(colourid.name, "Background");
- strcpy(colourid.setting, "clFrameBack");
+ _tcsncpy(colourid.name, _T("Background"), SIZEOF(colourid.name));
+ strncpy(colourid.setting, "clFrameBack", SIZEOF(colourid.setting));
colourid.defcolour = GetSysColor(COLOR_WINDOW);
- ColourRegister(&colourid);
+ ColourRegisterT(&colourid);
// Init extra icons
hExtraActivity = ExtraIcon_Register("activity", LPGEN("Jabber Activity"), "jabber_dancing");
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index a8da3a449f..045a136910 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -241,23 +241,23 @@ void CJabberInfoFrame::ReloadFonts() {
LOGFONT lfFont;
- FontID fontid = {0};
+ FontIDT fontid = {0};
fontid.cbSize = sizeof(fontid);
- lstrcpyA(fontid.group, "Jabber");
- lstrcpyA(fontid.name, "Frame title");
- m_clTitle = CallService(MS_FONT_GET, (WPARAM)&fontid, (LPARAM)&lfFont);
+ lstrcpyn(fontid.group, _T("Jabber"), SIZEOF(fontid.group));
+ lstrcpyn(fontid.name, _T("Frame title"), SIZEOF(fontid.name));
+ m_clTitle = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lfFont);
DeleteObject(m_hfntTitle);
m_hfntTitle = CreateFontIndirect(&lfFont);
- lstrcpyA(fontid.name, "Frame text");
- m_clText = CallService(MS_FONT_GET, (WPARAM)&fontid, (LPARAM)&lfFont);
+ lstrcpyn(fontid.name, _T("Frame text"), SIZEOF(fontid.name));
+ m_clText = CallService(MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)&lfFont);
DeleteObject(m_hfntText);
m_hfntText = CreateFontIndirect(&lfFont);
- ColourID colourid = {0};
+ ColourIDT colourid = {0};
colourid.cbSize = sizeof(colourid);
- lstrcpyA(colourid.group, "Jabber");
- lstrcpyA(colourid.name, "Background");
- m_clBack = CallService(MS_COLOUR_GET, (WPARAM)&colourid, 0);
+ lstrcpyn(colourid.group, _T("Jabber"), SIZEOF(colourid.group));
+ lstrcpyn(colourid.name, _T("Background"), SIZEOF(colourid.name));
+ m_clBack = CallService(MS_COLOUR_GETT, (WPARAM)&colourid, 0);
UpdateSize();
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 715bcb0578..9b3c4e8afb 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -655,9 +655,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP if (item != NULL) {
if (item->photoFileName) {
photoInfo->ppro->Log("Showing picture from %S", item->photoFileName);
- char* p = mir_t2a(item->photoFileName);
- photoInfo->hBitmap = (HBITMAP) CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)p);
- mir_free(p);
+ photoInfo->hBitmap = (HBITMAP) CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)item->photoFileName);
FIP->FI_Premultiply(photoInfo->hBitmap);
ShowWindow(GetDlgItem(hwndDlg, IDC_SAVE), SW_SHOW);
}
|