summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-20 21:47:46 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-20 21:47:46 +0000
commit9b7ffb84428971f27a6b6e71ff927b2bf240fca3 (patch)
tree9061972c60aafa0dcd06863c7a2c35934db3b718
parentf383381b80a3220c9e3b67e86dae5f218b01e33e (diff)
fix for ODPF_DONTTRANSLATE flag in options
git-svn-id: http://svn.miranda-ng.org/main/trunk@2005 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp8
-rw-r--r--src/modules/options/options.cpp14
2 files changed, 14 insertions, 8 deletions
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index cd81b5410b..ad023adf50 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -1711,11 +1711,11 @@ void CLCPaint::_DrawStatusIcon( struct ClcContact * Drawing, struct ClcData *dat
int status = GetContactCachedStatus( Drawing->hContact );
if ( status < ID_STATUS_OFFLINE ) status = ID_STATUS_OFFLINE;
else if ( status>ID_STATUS_OUTTOLUNCH ) status = ID_STATUS_ONLINE;
- ske_ImageList_DrawEx( g_himlCListClc, HIWORD( iImage ), hdcMem,
- x, y, cx, cy, colorbg, colorfg, mode );
- if ( dat->drawOverlayedStatus&2 ) //draw overlay
+ ske_ImageList_DrawEx(g_himlCListClc, HIWORD( iImage ), hdcMem,
+ x, y, cx, cy, colorbg, colorfg, mode);
+ if (dat->drawOverlayedStatus & 2) //draw overlay
ske_ImageList_DrawEx( hAvatarOverlays, g_pStatusOverlayIcons[status-ID_STATUS_OFFLINE].listID, hdcMem,
- x, y, cx, cy, colorbg, colorfg, mode );
+ x, y, cx, cy, colorbg, colorfg, mode );
}
else
{
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index dbef784011..994a10735a 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -81,6 +81,12 @@ struct OptionsPageData
int offsetX;
int offsetY;
+
+ __forceinline TCHAR* getString(TCHAR *ptszStr)
+ { if (flags & ODPF_DONTTRANSLATE)
+ return ptszStr;
+ return TranslateTH(hLangpack, ptszStr);
+ }
};
struct OptionsDlgData
@@ -843,9 +849,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L
continue;
opd = dat->arOpd[i];
- TCHAR* ptszGroup = TranslateTH(opd->hLangpack, opd->ptszGroup);
- TCHAR* ptszTitle = TranslateTH(opd->hLangpack, opd->ptszTitle);
- TCHAR* ptszTab = TranslateTH(opd->hLangpack, opd->ptszTab);
+ TCHAR* ptszGroup = opd->getString(opd->ptszGroup);
+ TCHAR* ptszTitle = opd->getString(opd->ptszTitle);
+ TCHAR* ptszTab = opd->getString(opd->ptszTab);
tvis.hParent = NULL;
if (FilterInst != NULL) {
@@ -1105,7 +1111,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L
if ( lstrcmp(opd->ptszTitle, p->ptszTitle) || lstrcmpnull(opd->ptszGroup, p->ptszGroup))
continue;
- tie.pszText = TranslateTH(opd->hLangpack, opd->ptszTab);
+ tie.pszText = opd->getString(opd->ptszTab);
tie.lParam = i;
TabCtrl_InsertItem(hwndTab, pages, &tie);
if ( !lstrcmp(opd->ptszTab, p->ptszTab))