diff options
Diffstat (limited to 'plugins/Alarms/src')
| -rw-r--r-- | plugins/Alarms/src/alarm_win.cpp | 34 | ||||
| -rw-r--r-- | plugins/Alarms/src/alarms.cpp | 6 | ||||
| -rw-r--r-- | plugins/Alarms/src/frame.cpp | 10 | ||||
| -rw-r--r-- | plugins/Alarms/src/options.cpp | 6 | ||||
| -rw-r--r-- | plugins/Alarms/src/stdafx.h | 8 | 
5 files changed, 32 insertions, 32 deletions
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp index d211b0c43b..f39333767d 100644 --- a/plugins/Alarms/src/alarm_win.cpp +++ b/plugins/Alarms/src/alarm_win.cpp @@ -266,16 +266,16 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar  				#define AddItem(x) \
  					mii.wID++; \
 -					mii.dwTypeData = TranslateT(x); \
 +					mii.dwTypeData = TranslateW(x); \
  					mii.cch = ( UINT )mir_tstrlen(mii.dwTypeData); \
  					InsertMenuItem(hMenu, mii.wID, FALSE, &mii);
 -				AddItem(LPGEN("5 mins"));
 -				AddItem(LPGEN("15 mins"));
 -				AddItem(LPGEN("30 mins"));
 -				AddItem(LPGEN("1 hour"));
 -				AddItem(LPGEN("1 day"));
 -				AddItem(LPGEN("1 week"));
 +				AddItem(LPGENW("5 mins"));
 +				AddItem(LPGENW("15 mins"));
 +				AddItem(LPGENW("30 mins"));
 +				AddItem(LPGENW("1 hour"));
 +				AddItem(LPGENW("1 day"));
 +				AddItem(LPGENW("1 week"));
  				TPMPARAMS tpmp = { 0 };
  				tpmp.cbSize = sizeof(tpmp);
 @@ -350,31 +350,31 @@ int ReloadFonts(WPARAM, LPARAM)  int AlarmWinModulesLoaded(WPARAM, LPARAM)
  {
  	title_font_id.cbSize = sizeof(FontIDT);
 -	mir_tstrcpy(title_font_id.group, LPGENT("Alarms"));
 -	mir_tstrcpy(title_font_id.name, LPGENT("Title"));
 +	mir_tstrcpy(title_font_id.group, LPGENW("Alarms"));
 +	mir_tstrcpy(title_font_id.name, LPGENW("Title"));
  	mir_strcpy(title_font_id.dbSettingsGroup, MODULE);
  	mir_strcpy(title_font_id.prefix, "FontTitle");
 -	mir_tstrcpy(title_font_id.backgroundGroup, LPGENT("Alarms"));
 -	mir_tstrcpy(title_font_id.backgroundName, LPGENT("Background"));
 +	mir_tstrcpy(title_font_id.backgroundGroup, LPGENW("Alarms"));
 +	mir_tstrcpy(title_font_id.backgroundName, LPGENW("Background"));
  	title_font_id.flags = 0;
  	title_font_id.order = 0;
  	FontRegisterT(&title_font_id);
  	window_font_id.cbSize = sizeof(FontIDT);
 -	mir_tstrcpy(window_font_id.group, LPGENT("Alarms"));
 -	mir_tstrcpy(window_font_id.name, LPGENT("Window"));
 +	mir_tstrcpy(window_font_id.group, LPGENW("Alarms"));
 +	mir_tstrcpy(window_font_id.name, LPGENW("Window"));
  	mir_strcpy(window_font_id.dbSettingsGroup, MODULE);
  	mir_strcpy(window_font_id.prefix, "FontWindow");
 -	mir_tstrcpy(window_font_id.backgroundGroup, LPGENT("Alarms"));
 -	mir_tstrcpy(window_font_id.backgroundName, LPGENT("Background"));
 +	mir_tstrcpy(window_font_id.backgroundGroup, LPGENW("Alarms"));
 +	mir_tstrcpy(window_font_id.backgroundName, LPGENW("Background"));
  	window_font_id.flags = 0;
  	window_font_id.order = 1;
  	FontRegisterT(&window_font_id);
  	bk_colour_id.cbSize = sizeof(ColourIDT);
  	mir_strcpy(bk_colour_id.dbSettingsGroup, MODULE);
 -	mir_tstrcpy(bk_colour_id.group, LPGENT("Alarms"));
 -	mir_tstrcpy(bk_colour_id.name, LPGENT("Background"));
 +	mir_tstrcpy(bk_colour_id.group, LPGENW("Alarms"));
 +	mir_tstrcpy(bk_colour_id.name, LPGENW("Background"));
  	mir_strcpy(bk_colour_id.setting, "BkColour");
  	bk_colour_id.defcolour = GetSysColor(COLOR_3DFACE);
  	bk_colour_id.flags = 0;
 diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index facf4c926a..e5b80405c2 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -17,7 +17,7 @@ There is no warranty.  #define WMP_PAUSE	32808
  #define WMP_NEXT	0x497B
 -TCHAR szGamePrefix[] = COMMANDPREFIX;
 +wchar_t szGamePrefix[] = COMMANDPREFIX;
  CLIST_INTERFACE *pcli;
  HINSTANCE hInst;
 @@ -65,10 +65,10 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA  	return DefWindowProc(hWnd, message, wParam, lParam);
  }
 -void ShowPopup(MCONTACT hContact, const TCHAR *msg)
 +void ShowPopup(MCONTACT hContact, const wchar_t *msg)
  {
  	if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
 -		TCHAR *lpzContactName = (TCHAR *)pcli->pfnGetContactDisplayName(hContact, 0);
 +		wchar_t *lpzContactName = (wchar_t *)pcli->pfnGetContactDisplayName(hContact, 0);
  		POPUPDATAT ppd = { 0 };
  		ppd.lchContact = hContact; //Be sure to use a GOOD handle, since this will not be checked.
 diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 941f69cb2c..a010c5b19d 100644 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -138,7 +138,7 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar  			GetTextExtentPoint32(dis->hDC,alarm.szTitle,(int)mir_tstrlen(alarm.szTitle),&textSize);
 -			TCHAR buff[100];
 +			wchar_t buff[100];
  			if (min >= 60)
  				mir_sntprintf(buff, TranslateT("%dh %dm"), min / 60, min % 60);
  			else
 @@ -148,12 +148,12 @@ LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar  			if (textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
  				// need elipsis
 -				TCHAR titlebuff[512];
 +				wchar_t titlebuff[512];
  				size_t len = mir_tstrlen(alarm.szTitle);
  				if (len > 511) len = 511;
  				while(len > 0 && textSize.cx > (dis->rcItem.right - dis->rcItem.left) - (GetSystemMetrics(SM_CXSMICON) + 4) - timeSize.cx - 2 - 4) {
  					len--;
 -					_tcsncpy(titlebuff, alarm.szTitle, len);
 +					wcsncpy(titlebuff, alarm.szTitle, len);
  					titlebuff[len] = 0;
  					mir_tstrcat(titlebuff, L"...");
  					GetTextExtentPoint32(dis->hDC,titlebuff,(int)mir_tstrlen(titlebuff),&textSize);
 @@ -453,7 +453,7 @@ void FixMainMenu()  			Menu_EnableItem(hMenuShowReminders, false);
  		else
  			Menu_ModifyItem(hMenuShowReminders,
 -				ReminderFrameVisible() ? LPGENT("Hide reminders") : LPGENT("Show reminders"), INVALID_HANDLE_VALUE, 0);
 +				ReminderFrameVisible() ? LPGENW("Hide reminders") : LPGENW("Show reminders"), INVALID_HANDLE_VALUE, 0);
  	}
  }
 @@ -542,7 +542,7 @@ int CreateFrame()  		CreateServiceFunction(MODULE "/ShowHideReminders", ShowHideMenuFunc);
  		CMenuItem mi;
 -		mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Alarms"), 0);
 +		mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Alarms"), 0);
  		Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8A3C1906-4809-4EE8-A32A-858003A2AAA7");
  		SET_UID(mi, 0x27556ea9, 0xfa19, 0x4c2e, 0xb0, 0xc9, 0x48, 0x2, 0x5c, 0x17, 0xba, 0x5);
 diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp index 847f377ec5..d92f7a6685 100644 --- a/plugins/Alarms/src/options.cpp +++ b/plugins/Alarms/src/options.cpp @@ -26,7 +26,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP  {
  	ALARM *add_edit_alarm = (ALARM *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
  	SYSTEMTIME temp_time;
 -	TCHAR buff[MAX_PATH];
 +	wchar_t buff[MAX_PATH];
  	BOOL bChecked;
  	switch (msg) {
 @@ -43,7 +43,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP  		SendDlgItemMessage(hwndDlg, IDC_DAY, CB_SETCURSEL, 0, 0);
  		for (int i = 1; i <= 31; i++)
 -			SendDlgItemMessage(hwndDlg, IDC_DAYNUM, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)_itot(i, buff, 10));
 +			SendDlgItemMessage(hwndDlg, IDC_DAYNUM, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)_itow(i, buff, 10));
  		SendDlgItemMessage(hwndDlg, IDC_DAYNUM, CB_SETCURSEL, 0, 0);
 @@ -576,7 +576,7 @@ void AddMenuItem()  	CMenuItem mi;
  	if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
 -		mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Alarms"), mi.position);
 +		mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Alarms"), mi.position);
  		Menu_ConfigureItem(mi.root, MCI_OPT_UID, "24F03563-01BE-4118-8297-E94375A783E7");
  	}
 diff --git a/plugins/Alarms/src/stdafx.h b/plugins/Alarms/src/stdafx.h index ade5b17c78..c9d5be5729 100644 --- a/plugins/Alarms/src/stdafx.h +++ b/plugins/Alarms/src/stdafx.h @@ -35,14 +35,14 @@ extern HANDLE hTopToolbarButton;  typedef struct ALARM_tag {
  	unsigned short id;
 -	TCHAR *szTitle;
 -	TCHAR *szDesc;
 +	wchar_t *szTitle;
 +	wchar_t *szDesc;
  	Occurrence occurrence;
  	BOOL snoozer;
  	SYSTEMTIME time;
  	unsigned short action;
 -	TCHAR *szCommand;
 -	TCHAR *szCommandParams;
 +	wchar_t *szCommand;
 +	wchar_t *szCommandParams;
  	BYTE sound_num;
  	int flags;
  } ALARM;
  | 
