summaryrefslogtreecommitdiff
path: root/plugins/LangMan
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 17:42:08 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 17:42:08 +0000
commit5975b2d0903bd5df128d55e20cd27d7c13b4e46c (patch)
tree6696492511c591fa8bf3b65a64864245caa3e7c2 /plugins/LangMan
parent8617d7e00546f892c9084f7c382648b23d8bbb63 (diff)
another portion of "#ifdef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@448 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/LangMan')
-rw-r--r--plugins/LangMan/langpack.cpp6
-rw-r--r--plugins/LangMan/options.cpp10
-rw-r--r--plugins/LangMan/version.h4
3 files changed, 6 insertions, 14 deletions
diff --git a/plugins/LangMan/langpack.cpp b/plugins/LangMan/langpack.cpp
index 0f05c61a30..0f783e0bbe 100644
--- a/plugins/LangMan/langpack.cpp
+++ b/plugins/LangMan/langpack.cpp
@@ -217,11 +217,9 @@ static BOOL LoadPackData(LANGPACK_INFO *pack, BOOL fEnabledPacks, const char *ps
if (GetLocaleInfoA(pack->Locale, LOCALE_IDEFAULTANSICODEPAGE, line, 6))
pack->codepage = (WORD)atoi(line); /* CP_ACP on error */
/* language */
-#if defined(_UNICODE)
+
MultiByteToWideChar(pack->codepage, 0, szLanguageA, -1, pack->szLanguage, SIZEOF(pack->szLanguage));
-#else
- lstrcpyA(pack->szLanguage, szLanguageA); /* buffer safe */
-#endif
+
/* ensure the pack always has a language name */
if (!pack->szLanguage[0] && !GetLocaleInfo(pack->Locale, LOCALE_SENGLANGUAGE, pack->szLanguage, SIZEOF(pack->szLanguage))) {
TCHAR *p;
diff --git a/plugins/LangMan/options.cpp b/plugins/LangMan/options.cpp
index 740790a8a9..a0c6aa70e0 100644
--- a/plugins/LangMan/options.cpp
+++ b/plugins/LangMan/options.cpp
@@ -197,15 +197,13 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const LANGPACK_INFO *pac
lstrcpy(szSearch, wfd.cFileName); /* buffer safe */
p = _tcsrchr(szSearch, _T('.'));
if (p!=NULL) *p = _T('\0');
-#if defined(_UNICODE)
+
{ char cFileNameA[MAX_PATH];
cFileNameA[0] = '\0';
WideCharToMultiByte(CP_ACP, 0, szSearch, -1, cFileNameA, sizeof(cFileNameA), NULL, NULL);
if (IsPluginIncluded(pack, cFileNameA)) continue;
}
-#else
- if (IsPluginIncluded(pack, szSearch)) continue;
-#endif
+
/* friendly name of the plugin */
mir_sntprintf(szSearch, SIZEOF(szSearch), _T("%s\\Plugins\\%s"), szDir, wfd.cFileName);
hModule = GetModuleHandle(szSearch);
@@ -530,11 +528,11 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return TRUE;
}
break;
-#if defined(_UNICODE)
+
case WM_NOTIFYFORMAT:
SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, NFR_UNICODE);
return TRUE;
-#endif
+
case WM_NOTIFY:
{ NMHDR *nmhdr = (NMHDR*)lParam;
switch(nmhdr->idFrom) {
diff --git a/plugins/LangMan/version.h b/plugins/LangMan/version.h
index 296ad97e87..69dae65ae4 100644
--- a/plugins/LangMan/version.h
+++ b/plugins/LangMan/version.h
@@ -32,8 +32,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define USERAGENT_VERSION "1.0.2.3"
#endif
-#if defined(_UNICODE)
#define PLUGIN_WEBSITE "http://addons.miranda-im.org/details.php?action = viewfile&id = 3003"
-#else
- #define PLUGIN_WEBSITE "http://addons.miranda-im.org/details.php?action = viewfile&id = 3002"
-#endif