diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-19 08:02:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-19 08:02:41 +0000 |
commit | 08dc125be616458112368e7154b29d5d23f1126e (patch) | |
tree | 1c27ef9b8525f45913c19bb6f4c18a31b6593749 /plugins/StatusPlugins/StartupStatus/profiles.cpp | |
parent | a63798c1b60eeb77352323ad4545630cdc5458f2 (diff) |
Unicode in status message plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@1033 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus/profiles.cpp')
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/profiles.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index dbf7ebec82..3cb20918f8 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -183,7 +183,7 @@ INT_PTR GetProfileCount(WPARAM wParam, LPARAM lParam) return count;
}
-char *GetStatusMessage(int profile, char *szProto)
+TCHAR *GetStatusMessage(int profile, char *szProto)
{
char dbSetting[80];
DBVARIANT dbv;
@@ -191,10 +191,10 @@ char *GetStatusMessage(int profile, char *szProto) for ( int i=0; i < pceCount; i++ ) {
if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) {
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
- if (!DBGetContactSetting(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
- pce[i].msg = ( char* )realloc(pce[i].msg, strlen(dbv.pszVal)+1);
+ if (!DBGetContactSettingTString(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
+ pce[i].msg = ( TCHAR* )realloc(pce[i].msg, sizeof(TCHAR)*(_tcslen(dbv.ptszVal)+1));
if (pce[i].msg != NULL) {
- strcpy(pce[i].msg, dbv.pszVal);
+ _tcscpy(pce[i].msg, dbv.ptszVal);
}
DBFreeVariant(&dbv);
}
@@ -215,8 +215,8 @@ char *GetStatusMessage(int profile, char *szProto) pce[pceCount].szProto = _strdup(szProto);
pce[pceCount].msg = NULL;
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
- if (!DBGetContactSetting(NULL, MODULENAME, dbSetting, &dbv)) {
- pce[pceCount].msg = _strdup(dbv.pszVal);
+ if (!DBGetContactSettingTString(NULL, MODULENAME, dbSetting, &dbv)) {
+ pce[pceCount].msg = _tcsdup(dbv.ptszVal);
DBFreeVariant(&dbv);
}
pceCount += 1;
|