From 2f261839b60692e33d0e160344d0d636d49c90ba Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 27 Jul 2016 14:23:31 +0000 Subject: less TCHARs git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StatusPlugins/StartupStatus/options.cpp | 20 ++++++++++---------- plugins/StatusPlugins/StartupStatus/profiles.cpp | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'plugins/StatusPlugins/StartupStatus') diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 389b7a4d66..31d8324e22 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -156,16 +156,16 @@ static wchar_t* GetLinkDescription(TSettingsList& protoSettings) result.Append(status); } - return mir_tstrndup(result, result.GetLength()); + return mir_wstrndup(result, result.GetLength()); } HRESULT CreateLink(TSettingsList& protoSettings) { wchar_t savePath[MAX_PATH]; if (SHGetSpecialFolderPath(NULL, savePath, 0x10, FALSE)) - wcsncat_s(savePath, SHORTCUT_FILENAME, _countof(savePath) - mir_tstrlen(savePath)); + wcsncat_s(savePath, SHORTCUT_FILENAME, _countof(savePath) - mir_wstrlen(savePath)); else - mir_sntprintf(savePath, L".\\%s", SHORTCUT_FILENAME); + mir_snwprintf(savePath, L".\\%s", SHORTCUT_FILENAME); // Get a pointer to the IShellLink interface. IShellLink *psl; @@ -324,12 +324,12 @@ static INT_PTR CALLBACK StartupStatusOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wPa } else { wchar_t text[128]; - mir_sntprintf(text, TranslateT("size: %d x %d"), + mir_snwprintf(text, TranslateT("size: %d x %d"), db_get_dw(NULL, MODULE_CLIST, SETTING_WIDTH, 0), db_get_dw(NULL, MODULE_CLIST, SETTING_HEIGHT, 0)); SetDlgItemText(hwndDlg, IDC_CURWINSIZE, text); - mir_sntprintf(text, TranslateT("loc: %d x %d"), + mir_snwprintf(text, TranslateT("loc: %d x %d"), db_get_dw(NULL, MODULE_CLIST, SETTING_XPOS, 0), db_get_dw(NULL, MODULE_CLIST, SETTING_YPOS, 0)); SetDlgItemText(hwndDlg, IDC_CURWINLOC, text); @@ -529,9 +529,9 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP if ( GetProfile(i, ar) == -1) { /* create an empty profile */ if (i == defProfile) - ppo->tszName = mir_tstrdup( TranslateT("default")); + ppo->tszName = mir_wstrdup( TranslateT("default")); else - ppo->tszName = mir_tstrdup( TranslateT("unknown")); + ppo->tszName = mir_wstrdup( TranslateT("unknown")); } else { for (int j=0; j < ar.getCount(); j++) @@ -541,9 +541,9 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP ppo->tszName = db_get_tsa(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME)); if (ppo->tszName == NULL) { if (i == defProfile) - ppo->tszName = mir_tstrdup( TranslateT("default")); + ppo->tszName = mir_wstrdup( TranslateT("default")); else - ppo->tszName = mir_tstrdup( TranslateT("unknown")); + ppo->tszName = mir_wstrdup( TranslateT("unknown")); } ppo->createTtb = db_get_b(NULL, MODULENAME, OptName(i, SETTING_CREATETTBBUTTON), 0); ppo->showDialog = db_get_b(NULL, MODULENAME, OptName(i, SETTING_SHOWCONFIRMDIALOG), 0); @@ -665,7 +665,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP break; PROFILEOPTIONS* ppo = new PROFILEOPTIONS; - ppo->tszName = mir_tstrdup(tszName); + ppo->tszName = mir_wstrdup(tszName); ppo->ps = GetCurrentProtoSettings(); arProfiles.insert(ppo); diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index d370e53999..6cb631e3cb 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -139,9 +139,9 @@ wchar_t *GetStatusMessage(int profile, char *szProto) if ((pce[i].profile == profile) && (!mir_strcmp(pce[i].szProto, szProto))) { mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db - pce[i].msg = (wchar_t*)realloc(pce[i].msg, sizeof(wchar_t)*(mir_tstrlen(dbv.ptszVal) + 1)); + pce[i].msg = (wchar_t*)realloc(pce[i].msg, sizeof(wchar_t)*(mir_wstrlen(dbv.ptszVal) + 1)); if (pce[i].msg != NULL) { - mir_tstrcpy(pce[i].msg, dbv.ptszVal); + mir_wstrcpy(pce[i].msg, dbv.ptszVal); } db_free(&dbv); } -- cgit v1.2.3