summaryrefslogtreecommitdiff
path: root/plugins/WhenWasIt
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 14:51:46 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-06-16 14:51:46 +0000
commit8617d7e00546f892c9084f7c382648b23d8bbb63 (patch)
tree2be51254236644b678418c1147f223a30e030bda /plugins/WhenWasIt
parent05c989e58aeffcfb59cebaca6797cb69dd25cb1e (diff)
another portion of "#ifdef Unicode" removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@447 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt')
-rw-r--r--plugins/WhenWasIt/dlg_handlers.cpp18
-rw-r--r--plugins/WhenWasIt/hooked_events.cpp8
-rw-r--r--plugins/WhenWasIt/notifiers.h7
-rw-r--r--plugins/WhenWasIt/services.cpp6
-rw-r--r--plugins/WhenWasIt/services.h8
-rw-r--r--plugins/WhenWasIt/utils.cpp8
6 files changed, 19 insertions, 36 deletions
diff --git a/plugins/WhenWasIt/dlg_handlers.cpp b/plugins/WhenWasIt/dlg_handlers.cpp
index 86b64effcc..e789b29d32 100644
--- a/plugins/WhenWasIt/dlg_handlers.cpp
+++ b/plugins/WhenWasIt/dlg_handlers.cpp
@@ -524,11 +524,9 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
case DOB_PROTOCOL:
{
DateTime_SetMonthCalColor(hDate, MCSC_TITLEBK, COLOR_PROTOCOL);
-#ifdef _UNICODE
+
_stprintf(buffer, TranslateT("%S protocol"), protocol);
-#else
- _stprintf(buffer, TranslateT("%s protocol"), protocol);
-#endif
+
szCurrentModuleTooltip = buffer;
@@ -652,11 +650,9 @@ TCHAR *GetBirthdayModule(int module, HANDLE hContact, TCHAR *birthdayModule, int
{
char protocol[512];
GetContactProtocol(hContact, protocol, sizeof(protocol));
-#ifdef _UNICODE
+
_sntprintf(birthdayModule, size, TranslateT("%S protocol"), protocol);
-#else
- _sntprintf(birthdayModule, size, TranslateT("%s protocol"), protocol);
-#endif
+
break;
}
@@ -793,11 +789,9 @@ int UpdateBirthdayEntry(HWND hList, HANDLE hContact, int entry, int bShowAll, in
item.lParam = (LPARAM) hContact;
GetContactProtocol(hContact, protocol, sizeof(protocol));
-#ifdef _UNICODE
+
MultiByteToWideChar(CP_ACP, MB_USEGLYPHCHARS, protocol, -1, buffer, maxSize);
-#else
- strcpy(buffer, protocol);
-#endif
+
item.pszText = buffer;
if (bAdd)
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp
index 41a956f1b1..4e3d1b4723 100644
--- a/plugins/WhenWasIt/hooked_events.cpp
+++ b/plugins/WhenWasIt/hooked_events.cpp
@@ -28,11 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define HOST "http://eblis.tla.ro/projects"
-#ifdef _UNICODE
- #define WHENWASIT_DATA "WhenWasIt%20unicode"
-#else
- #define WHENWASIT_DATA "WhenWasIt"
-#endif
+
+#define WHENWASIT_DATA "WhenWasIt%20unicode"
+
#if defined(WIN64) || defined(_WIN64)
#define WHENWASIT_VERSION_URL HOST "/miranda/WhenWasIt/updater/x64/WhenWasIt.html"
diff --git a/plugins/WhenWasIt/notifiers.h b/plugins/WhenWasIt/notifiers.h
index ff9f9fe229..db43ca55e1 100644
--- a/plugins/WhenWasIt/notifiers.h
+++ b/plugins/WhenWasIt/notifiers.h
@@ -21,13 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef M_WWI_NOTIFIERS_H
#define M_WWI_NOTIFIERS_H
-#ifdef _UNICODE
+
#define POPUPDATAT POPUPDATAW
#define PUAddPopUpT PUAddPopUpW
-#else
-#define POPUPDATAT POPUPDATAEX
-#define PUAddPopUpT PUAddPopUpEx
-#endif
+
#define BIRTHDAY_TODAY_SOUND "WWIBirthdayToday"
#define BIRTHDAY_NEAR_SOUND "WWIBirthdayNear"
diff --git a/plugins/WhenWasIt/services.cpp b/plugins/WhenWasIt/services.cpp
index 09edb81c80..adc06de7b5 100644
--- a/plugins/WhenWasIt/services.cpp
+++ b/plugins/WhenWasIt/services.cpp
@@ -388,11 +388,9 @@ int DoExport(TCHAR *fileName)
}
_ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), _T("Please do not edit this file by hand. Use the export function of WhenWasIt plugin.\n"));
_ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), _T("Warning! Please do not mix Unicode and Ansi exported birthday files. You should use the same version (Ansi/Unicode) of WhenWasIt that was used to export the info.\n"));
-#ifdef _UNICODE
+
_ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), _T("This file was exported with a Unicode version of WhenWasIt. Please only use a Unicode version of the plugin to import the birthdays.\n"));
-#else
- _ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), _T("This file was exported with an Ansi version of WhenWasIt. Please only use an Ansi version of the plugin to import the birthdays.\n"));
-#endif
+
HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
int year, month, day;
TCHAR *szHandle;
diff --git a/plugins/WhenWasIt/services.h b/plugins/WhenWasIt/services.h
index 47619acc26..4348077a54 100644
--- a/plugins/WhenWasIt/services.h
+++ b/plugins/WhenWasIt/services.h
@@ -30,15 +30,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define REFRESH_DETAILS_DELAY 3000
-#ifdef _UNICODE
+
#define BIRTHDAY_EXTENSION ".bdaysW"
#define BIRTHDAYS_EXPORT_FORMAT "%s@%S : %02d/%02d/%04d\n"
#define NOTFOUND_FORMAT "Could not find UID '%s [%S]' in current database, skipping"
-#else
-#define BIRTHDAY_EXTENSION ".bdays"
-#define BIRTHDAYS_EXPORT_FORMAT "%s@%s : %02d/%02d/%04d\n"
-#define NOTFOUND_FORMAT "Could not find UID '%s [%s]' in current database, skipping"
-#endif
+
extern int bShouldCheckBirthdays;
extern int bBirthdayFound;
diff --git a/plugins/WhenWasIt/utils.cpp b/plugins/WhenWasIt/utils.cpp
index 86dfc05c44..6bfbcd326e 100644
--- a/plugins/WhenWasIt/utils.cpp
+++ b/plugins/WhenWasIt/utils.cpp
@@ -174,9 +174,9 @@ TCHAR *GetContactName(HANDLE hContact, char *szProto)
ctInfo.szProto = proto;
}
ctInfo.dwFlag = CNF_DISPLAY;
-#ifdef _UNICODE
+
ctInfo.dwFlag += CNF_UNICODE;
-#endif
+
ctInfo.hContact = hContact;
//_debug_message("retrieving contact name for %d", hContact);
ret = CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) &ctInfo);
@@ -221,9 +221,9 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto)
ctInfo.cbSize = sizeof(ctInfo);
ctInfo.szProto = szProto;
ctInfo.dwFlag = CNF_UNIQUEID;
-#ifdef _UNICODE
+
ctInfo.dwFlag |= CNF_UNICODE;
-#endif
+
ctInfo.hContact = hContact;
ret = CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) &ctInfo);
TCHAR *buffer;