summaryrefslogtreecommitdiff
path: root/src/modules/clist
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/clist')
-rw-r--r--src/modules/clist/clc.cpp2
-rw-r--r--src/modules/clist/clisttray.cpp2
-rw-r--r--src/modules/clist/clui.cpp80
3 files changed, 42 insertions, 42 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index e438e4d7b3..087cc34e30 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -58,7 +58,7 @@ HMENU fnBuildGroupPopupMenu( struct ClcGroup* group )
HMENU hGroupMenu = GetSubMenu(hMenu, 2);
RemoveMenu(hMenu, 2, MF_BYPOSITION);
DestroyMenu(hMenu);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hGroupMenu, 0);
+ TranslateMenu(hGroupMenu);
CheckMenuItem(hGroupMenu, POPUP_GROUPHIDEOFFLINE, group->hideOffline ? MF_CHECKED : MF_UNCHECKED);
return hGroupMenu;
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp
index 50707c5de7..8480c6026b 100644
--- a/src/modules/clist/clisttray.cpp
+++ b/src/modules/clist/clisttray.cpp
@@ -788,7 +788,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
POINT pt;
HMENU hMainMenu = LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT));
HMENU hMenu = GetSubMenu(hMainMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hMenu, 0);
+ TranslateMenu(hMenu);
ZeroMemory(&mi, sizeof(mi));
mi.cbSize = MENUITEMINFO_V4_SIZE;
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp
index d5bceade30..8f128e7c25 100644
--- a/src/modules/clist/clui.cpp
+++ b/src/modules/clist/clui.cpp
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
- Copyright 2000-2010 Miranda ICQ/IM project,
+ Copyright 2000-2010 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -179,8 +179,8 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
{
//see notes about deleting contacts on PF1_SERVERCLIST servers in m_protosvc.h
UINT_PTR action;
-
- if (DBGetContactSettingByte(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) &&
+
+ if (DBGetContactSettingByte(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) &&
!(GetKeyState(VK_SHIFT)&0x8000) )
// Ask user for confirmation, and if the contact should be archived (hidden, not deleted)
action = DialogBoxParam(hMirandaInst, MAKEINTRESOURCE(IDD_DELETECONTACT), (HWND) lParam, AskForConfirmationDlgProc, wParam);
@@ -205,8 +205,8 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
// Set a flag so we remember to delete the contact when the protocol goes online the next time
DBWriteContactSettingByte((HANDLE) wParam, "CList", "Delete", 1);
- MessageBox( NULL,
- TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
+ MessageBox( NULL,
+ TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
TranslateT("Delete Contact"), MB_OK);
return 0;
} } }
@@ -292,7 +292,7 @@ int LoadCLUIModule(void)
wndclass.hIconSm = NULL;
RegisterClassEx(&wndclass);
- wndclass.style = CS_HREDRAW | CS_VREDRAW | ((IsWinVerXPPlus() &&
+ wndclass.style = CS_HREDRAW | CS_VREDRAW | ((IsWinVerXPPlus() &&
DBGetContactSettingByte(NULL, "CList", "WindowShadow", 0) == 1) ? CS_DROPSHADOW : 0);
wndclass.lpfnWndProc = ContactListWndProc;
wndclass.cbClsExtra = 0;
@@ -304,7 +304,7 @@ int LoadCLUIModule(void)
wndclass.lpszMenuName = MAKEINTRESOURCE(IDR_CLISTMENU);
wndclass.lpszClassName = _T(MIRANDACLASS);
wndclass.hIconSm = LoadSkinIcon(SKINICON_OTHER_MIRANDA);
- RegisterClassEx(&wndclass);
+ RegisterClassEx(&wndclass);
if (DBGetContactSettingTString(NULL, "CList", "TitleText", &dbv))
lstrcpyn(titleText, _T(MIRANDANAME), SIZEOF( titleText ));
@@ -322,13 +322,13 @@ int LoadCLUIModule(void)
Utils_AssertInsideScreen(&pos);
cli.hwndContactList = CreateWindowEx(
- (DBGetContactSettingByte(NULL, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW),
- _T(MIRANDACLASS),
- titleText,
+ (DBGetContactSettingByte(NULL, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW),
+ _T(MIRANDACLASS),
+ titleText,
WS_POPUPWINDOW | WS_THICKFRAME | WS_CLIPCHILDREN |
- (DBGetContactSettingByte(NULL, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? WS_CAPTION | WS_SYSMENU |
- (DBGetContactSettingByte(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? 0 : WS_MINIMIZEBOX) : 0),
- pos.left, pos.top, pos.right - pos.left, pos.bottom - pos.top,
+ (DBGetContactSettingByte(NULL, "CLUI", "ShowCaption", SETTING_SHOWCAPTION_DEFAULT) ? WS_CAPTION | WS_SYSMENU |
+ (DBGetContactSettingByte(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT) ? 0 : WS_MINIMIZEBOX) : 0),
+ pos.left, pos.top, pos.right - pos.left, pos.bottom - pos.top,
NULL, NULL, cli.hInst, NULL);
if (DBGetContactSettingByte(NULL, "CList", "OnDesktop", 0)) {
@@ -350,8 +350,8 @@ int LoadCLUIModule(void)
ShowWindow(cli.hwndContactList, SW_SHOW);
else if (state == SETTING_STATE_MINIMIZED)
ShowWindow(cli.hwndContactList, SW_SHOWMINIMIZED);
- SetWindowPos(cli.hwndContactList,
- DBGetContactSettingByte(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST,
+ SetWindowPos(cli.hwndContactList,
+ DBGetContactSettingByte(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
}
{
@@ -455,12 +455,12 @@ void fnDrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, HICON eventIcon)
#define M_CREATECLC (WM_USER+1)
LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- if (msg == uMsgProcessProfile)
+ if (msg == uMsgProcessProfile)
{
TCHAR profile[MAX_PATH];
int rc;
// wParam = (ATOM)hProfileAtom, lParam = 0
- if (GlobalGetAtomName((ATOM) wParam, profile, SIZEOF(profile)))
+ if (GlobalGetAtomName((ATOM) wParam, profile, SIZEOF(profile)))
{
TCHAR *pfd = Utils_ReplaceVarsT(_T("%miranda_userdata%\\%miranda_profilename%.dat"));
rc = lstrcmpi(profile, pfd) == 0;
@@ -503,7 +503,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return DefWindowProc(hwnd, msg, wParam, lParam);
}
case WM_CREATE:
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) GetMenu(hwnd), 0);
+ TranslateMenu(GetMenu(hwnd));
DrawMenuBar(hwnd);
//create the status wnd
@@ -527,7 +527,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return FALSE;
case M_CREATECLC:
- cli.hwndContactTree = CreateWindow( CLISTCONTROL_CLASS, _T(""),
+ cli.hwndContactTree = CreateWindow( CLISTCONTROL_CLASS, _T(""),
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
| CLS_CONTACTLIST
| (DBGetContactSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? CLS_USEGROUPS : 0)
@@ -584,17 +584,17 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
rcStatus.top = rcStatus.bottom = 0;
SetWindowPos(cli.hwndContactTree, NULL, 0, 0, rect.right, rect.bottom - (rcStatus.bottom - rcStatus.top), SWP_NOZORDER);
}
- if (wParam == SIZE_MINIMIZED)
+ if (wParam == SIZE_MINIMIZED)
{
- if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) ||
- DBGetContactSettingByte(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT))
+ if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) ||
+ DBGetContactSettingByte(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT))
{
ShowWindow(hwnd, SW_HIDE);
DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_HIDDEN);
}
else
DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
-
+
if (MySetProcessWorkingSetSize != NULL && DBGetContactSettingByte(NULL, "CList", "DisableWorkingSet", 1))
MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
}
@@ -711,7 +711,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
thisTick = GetTickCount();
if (thisTick >= startTick + 200)
break;
- setLayeredWindowAttributes(hwnd, RGB(0, 0, 0),
+ setLayeredWindowAttributes(hwnd, RGB(0, 0, 0),
(BYTE) (sourceAlpha + (destAlpha - sourceAlpha) * (int) (thisTick - startTick) / 200), LWA_ALPHA);
}
setLayeredWindowAttributes(hwnd, RGB(0, 0, 0), (BYTE) destAlpha, LWA_ALPHA);
@@ -741,15 +741,15 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case SC_MINIMIZE:
case SC_CLOSE:
- if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) ||
- DBGetContactSettingByte(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT))
+ if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) ||
+ DBGetContactSettingByte(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT))
{
ShowWindow(hwnd, SW_HIDE);
DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_HIDDEN);
if (MySetProcessWorkingSetSize != NULL && DBGetContactSettingByte(NULL, "CList", "DisableWorkingSet", 1))
MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
-
+
return 0;
}
else if (wParam == SC_CLOSE)
@@ -813,7 +813,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (wParam == SPI_SETWORKAREA && (GetWindowLongPtr(hwnd, GWL_STYLE) & (WS_VISIBLE | WS_MINIMIZE)) == WS_VISIBLE &&
!CallService(MS_CLIST_DOCKINGISDOCKED, 0, 0))
{
- RECT rc;
+ RECT rc;
GetWindowRect(hwnd, &rc);
if (Utils_AssertInsideScreen(&rc) == 1)
MoveWindow(hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE);
@@ -882,7 +882,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
maxHeight = DBGetContactSettingByte(NULL, "CLUI", "MaxSizeHeight", 75);
GetWindowRect(hwnd, &rcWindow);
GetWindowRect(cli.hwndContactTree, &rcTree);
-
+
SystemParametersInfo(SPI_GETWORKAREA, 0, &rcWorkArea, FALSE);
if (MyMonitorFromWindow)
{
@@ -906,7 +906,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (rcWindow.bottom > rcWorkArea.bottom)
rcWindow.bottom = rcWorkArea.bottom;
}
- SetWindowPos(hwnd, 0, rcWindow.left, rcWindow.top, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top,
+ SetWindowPos(hwnd, 0, rcWindow.left, rcWindow.top, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top,
SWP_NOZORDER | SWP_NOACTIVATE);
break;
}
@@ -953,9 +953,9 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
int mcnt = GetMenuItemCount(hMenu);
for (int i=0; i<mcnt; ++i) {
HMENU hMenus = GetSubMenu(hMenu, i);
- if (hMenus && cpnl++ == nPanel) {
- hMenu = hMenus;
- break;
+ if (hMenus && cpnl++ == nPanel) {
+ hMenu = hMenus;
+ break;
}
}
}
@@ -972,7 +972,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
int pos = LOWORD(wParam);
POINT pt;
GetCursorPos(&pt);
- if ((pos == 0 || pos == 1) && (HIWORD(wParam) & MF_POPUP) &&
+ if ((pos == 0 || pos == 1) && (HIWORD(wParam) & MF_POPUP) &&
(!(HIWORD(wParam) & MF_MOUSESELECT) || MenuItemFromPoint(hwnd, cli.hMenuMain, pt) != -1)) {
MENUITEMINFO mii = { 0 };
mii.cbSize = MENUITEMINFO_V4_SIZE;
@@ -1003,11 +1003,11 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (PtInRect(&rc, pt)) {
HMENU hMenu;
hMenu = GetSubMenu(LoadMenu(cli.hInst, MAKEINTRESOURCE(IDR_CONTEXT)), 1);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hMenu, 0);
- CheckMenuItem(hMenu, POPUP_HIDEOFFLINE,
+ TranslateMenu(hMenu);
+ CheckMenuItem(hMenu, POPUP_HIDEOFFLINE,
DBGetContactSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, POPUP_HIDEOFFLINEROOT, SendMessage(cli.hwndContactTree, CLM_GETHIDEOFFLINEROOT, 0, 0) ? MF_CHECKED : MF_UNCHECKED);
- CheckMenuItem(hMenu, POPUP_HIDEEMPTYGROUPS,
+ CheckMenuItem(hMenu, POPUP_HIDEEMPTYGROUPS,
GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, POPUP_DISABLEGROUPS, GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS ? MF_UNCHECKED : MF_CHECKED);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
@@ -1047,13 +1047,13 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
x = dis->rcItem.left;
if (showOpts & 1) {
HICON hIcon = LoadSkinProtoIcon(szProto, status);
- DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - g_IconHeight) >> 1, hIcon,
+ DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - g_IconHeight) >> 1, hIcon,
g_IconWidth, g_IconHeight, 0, NULL, DI_NORMAL);
IconLib_ReleaseIcon(hIcon, 0);
if ( Proto_IsAccountLocked( Proto_GetAccount( szProto ))) {
hIcon = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hIcon != NULL) {
- DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - g_IconHeight) >> 1, hIcon,
+ DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - g_IconHeight) >> 1, hIcon,
g_IconWidth, g_IconHeight, 0, NULL, DI_NORMAL);
IconLib_ReleaseIcon(hIcon, 0);
}