summaryrefslogtreecommitdiff
path: root/src/modules/skin
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 14:13:45 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-15 14:13:45 +0000
commit4aa6229698b946e52ce19018aaf13f8b92fb168e (patch)
tree29334e8c5ee492a80f11a97fedab2373b8fbb392 /src/modules/skin
parent5e8e561a80d1ac9ca1c2f1c3d388105733ed4e4e (diff)
another portion of "#ifsef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@426 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/skin')
-rw-r--r--src/modules/skin/hotkeys.cpp24
-rw-r--r--src/modules/skin/sounds.cpp13
2 files changed, 12 insertions, 25 deletions
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp
index 018411d7a1..64987b4aa4 100644
--- a/src/modules/skin/hotkeys.cpp
+++ b/src/modules/skin/hotkeys.cpp
@@ -170,20 +170,16 @@ static INT_PTR svcHotkeyRegister(WPARAM wParam, LPARAM lParam)
return 0;
THotkeyItem *item = ( THotkeyItem* )mir_alloc(sizeof(THotkeyItem));
- #if defined( _UNICODE )
- DWORD dwFlags = ( desc->cbSize >= sizeof(HOTKEYDESC)) ? desc->dwFlags : 0;
- if ( dwFlags & HKD_UNICODE ) {
- item->ptszSection = mir_tstrdup( desc->ptszSection );
- item->ptszDescription = mir_tstrdup( desc->ptszDescription );
- }
- else {
- item->ptszSection = mir_a2u( desc->pszSection );
- item->ptszDescription = mir_a2u( desc->pszDescription );
- }
- #else
- item->ptszSection = mir_tstrdup( desc->pszSection );
- item->ptszDescription = mir_tstrdup( desc->pszDescription );
- #endif
+ DWORD dwFlags = ( desc->cbSize >= sizeof(HOTKEYDESC)) ? desc->dwFlags : 0;
+ if ( dwFlags & HKD_UNICODE ) {
+ item->ptszSection = mir_tstrdup( desc->ptszSection );
+ item->ptszDescription = mir_tstrdup( desc->ptszDescription );
+ }
+ else {
+ item->ptszSection = mir_a2u( desc->pszSection );
+ item->ptszDescription = mir_a2u( desc->pszDescription );
+ }
+
item->ptszSection_tr = TranslateTS(item->ptszSection);
item->ptszDescription_tr = TranslateTS(item->ptszDescription);
item->allowSubHotkeys = TRUE;
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index d9fb7fbb8e..fad684a80a 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -57,7 +57,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM, LPARAM lParam)
SoundItem* item = &soundList[soundCount++];
item->name = mir_strdup( ssd->pszName );
item->tempFile = NULL;
- #if defined( _UNICODE )
+
TCHAR* ptszDefaultFile;
if ( dwFlags & SSDF_UNICODE ) {
item->description = mir_tstrdup( TranslateTS( ssd->ptszDescription ));
@@ -77,16 +77,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM, LPARAM lParam)
DBFreeVariant(&dbv);
mir_free( ptszDefaultFile );
}
- #else
- item->description = mir_tstrdup( TranslateTS( ssd->pszDescription ));
- item->section = mir_tstrdup( TranslateTS( ssd->cbSize != SKINSOUNDDESC_SIZE_V1 && ssd->pszSection != NULL ? ssd->pszSection : "Other" ));
- if ( ssd->pszDefaultFile ) {
- if ( DBGetContactSettingString(NULL, "SkinSounds", item->name, &dbv))
- DBWriteContactSettingString(NULL, "SkinSounds", item->name, ssd->pszDefaultFile);
- else
- DBFreeVariant(&dbv);
- }
- #endif
+
return 0;
}