diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-26 08:09:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-26 08:09:32 +0000 |
commit | 14b3e00732b7f8b23c3e194815a9a0d3a6f2723f (patch) | |
tree | 9499fbd9f587dae601c2c94dc6ded57ea839b45a /src | |
parent | 3bf8dd214686baa698ec98c16d49f320d6f4eee8 (diff) |
absolutely useless service MS_CLUI_GETCAPS removed as pre-kernel clist atavism
git-svn-id: http://svn.miranda-ng.org/main/trunk@16766 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdclist/src/clistopts.cpp | 53 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/cluiservices.cpp | 12 | ||||
-rw-r--r-- | src/mir_app/src/extraicons.cpp | 11 |
4 files changed, 8 insertions, 74 deletions
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 5b7c53569f..c0cd03b652 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -45,7 +45,6 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)HookEventMessage(ME_DB_CONTACT_SETTINGCHANGED, hwndDlg, WM_USER + 1));
- CheckDlgButton(hwndDlg, IDC_ONTOP, db_get_b(NULL, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE,
db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_HIDEEMPTYGROUPS,
@@ -60,28 +59,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_get_b(NULL, "CList", "SortByProto", SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CONFIRMDELETE,
db_get_b(NULL, "CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE,
- db_get_b(NULL, "CList", "AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- {
- DWORD caps = CallService(MS_CLUI_GETCAPS, CLUICAPS_FLAGS1, 0);
- if (!(caps & CLUIF_HIDEEMPTYGROUPS))
- ShowWindow(GetDlgItem(hwndDlg, IDC_HIDEEMPTYGROUPS), SW_HIDE);
- if (!(caps & CLUIF_DISABLEGROUPS))
- ShowWindow(GetDlgItem(hwndDlg, IDC_DISABLEGROUPS), SW_HIDE);
- if (caps & CLUIF_HASONTOPOPTION)
- ShowWindow(GetDlgItem(hwndDlg, IDC_ONTOP), SW_HIDE);
- if (caps & CLUIF_HASAUTOHIDEOPTION) {
- ShowWindow(GetDlgItem(hwndDlg, IDC_AUTOHIDE), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_STAUTOHIDESECS), SW_HIDE);
- }
- }
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0,
- MAKELONG(db_get_w(NULL, "CList", "HideTime", SETTING_HIDETIME_DEFAULT), 0));
+
CheckDlgButton(hwndDlg, IDC_ONECLK,
db_get_b(NULL, "CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ALWAYSSTATUS,
@@ -146,10 +124,6 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP return TRUE;
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_AUTOHIDE) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIME), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_HIDETIMESPIN), IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- }
if (LOWORD(wParam) == IDC_DONTCYCLE || LOWORD(wParam) == IDC_CYCLE || LOWORD(wParam) == IDC_MULTITRAY) {
EnableWindow(GetDlgItem(hwndDlg, IDC_PRIMARYSTATUS), IsDlgButtonChecked(hwndDlg, IDC_DONTCYCLE));
EnableWindow(GetDlgItem(hwndDlg, IDC_CYCLETIME), IsDlgButtonChecked(hwndDlg, IDC_CYCLE));
@@ -161,11 +135,11 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP EnableWindow(GetDlgItem(hwndDlg, IDC_BLINKSPIN), BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEBLINK));
EnableWindow(GetDlgItem(hwndDlg, IDC_STMSDELAY), BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEBLINK));
}
- if ((LOWORD(wParam) == IDC_HIDETIME || LOWORD(wParam) == IDC_CYCLETIME) && HIWORD(wParam) != EN_CHANGE)
+ if (LOWORD(wParam) == IDC_CYCLETIME && HIWORD(wParam) != EN_CHANGE)
break;
if (LOWORD(wParam) == IDC_PRIMARYSTATUS && HIWORD(wParam) != CBN_SELCHANGE)
break;
- if ((LOWORD(wParam) == IDC_HIDETIME || LOWORD(wParam) == IDC_CYCLETIME) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
+ if (LOWORD(wParam) == IDC_CYCLETIME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
if (LOWORD(wParam) == IDC_BLINKTIME && HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())
return 0; // dont make apply enabled during buddy set crap
@@ -178,25 +152,8 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
db_set_b(NULL, "CList", "HideOffline", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE));
- {
- DWORD caps = CallService(MS_CLUI_GETCAPS, CLUICAPS_FLAGS1, 0);
- if (caps & CLUIF_HIDEEMPTYGROUPS)
- db_set_b(NULL, "CList", "HideEmptyGroups",
- (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS));
- if (caps & CLUIF_DISABLEGROUPS)
- db_set_b(NULL, "CList", "UseGroups", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS));
- if (!(caps & CLUIF_HASONTOPOPTION)) {
- db_set_b(NULL, "CList", "OnTop", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONTOP));
- SetWindowPos(pcli->hwndContactList,
- IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE);
- }
- if (!(caps & CLUIF_HASAUTOHIDEOPTION)) {
- db_set_b(NULL, "CList", "AutoHide", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- db_set_w(NULL, "CList", "HideTime",
- (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
- }
- }
+ db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS));
+ db_set_b(NULL, "CList", "UseGroups", (BYTE)!IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS));
g_bSortByStatus = IsDlgButtonChecked(hwndDlg, IDC_SORTBYSTATUS);
g_bSortByProto = IsDlgButtonChecked(hwndDlg, IDC_SORTBYPROTO);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index f3367d4234..5797b2a9c7 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -420,11 +420,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, static void ResetCList(HWND hwndDlg)
{
- if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)FALSE, 0);
- else
- SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)TRUE, 0);
-
+ SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETHIDEEMPTYGROUPS, 1, 0);
}
diff --git a/src/mir_app/src/cluiservices.cpp b/src/mir_app/src/cluiservices.cpp index 2dfe87b2be..416dbdfb13 100644 --- a/src/mir_app/src/cluiservices.cpp +++ b/src/mir_app/src/cluiservices.cpp @@ -85,23 +85,11 @@ static INT_PTR ListEndRebuild(WPARAM, LPARAM) return 0;
}
-static INT_PTR GetCaps(WPARAM wParam, LPARAM)
-{
- switch (wParam) {
- case CLUICAPS_FLAGS1:
- return CLUIF_HIDEEMPTYGROUPS | CLUIF_DISABLEGROUPS | CLUIF_HASONTOPOPTION | CLUIF_HASAUTOHIDEOPTION;
- case CLUICAPS_FLAGS2:
- return MAKELONG(EXTRA_ICON_COUNT,1);
- }
- return 0;
-}
-
void LoadCluiServices(void)
{
CreateServiceFunction(MS_CLUI_GROUPADDED, GroupAdded);
CreateServiceFunction(MS_CLUI_LISTBEGINREBUILD, ListBeginRebuild);
CreateServiceFunction(MS_CLUI_LISTENDREBUILD, ListEndRebuild);
- CreateServiceFunction(MS_CLUI_GETCAPS, GetCaps);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_app/src/extraicons.cpp b/src/mir_app/src/extraicons.cpp index d033358426..f6ef9ac916 100644 --- a/src/mir_app/src/extraicons.cpp +++ b/src/mir_app/src/extraicons.cpp @@ -46,9 +46,6 @@ LIST<BaseExtraIcon> registeredExtraIcons(10); BOOL clistRebuildAlreadyCalled = FALSE;
BOOL clistApplyAlreadyCalled = FALSE;
-int clistFirstSlot = 0;
-int clistSlotCount = 0;
-
// Functions ////////////////////////////////////////////////////////////////////////////
int InitOptionsCallback(WPARAM wParam, LPARAM lParam);
@@ -62,7 +59,7 @@ int ModulesLoaded(WPARAM, LPARAM) int GetNumberOfSlots()
{
- return clistSlotCount;
+ return EXTRA_ICON_COUNT;
}
int ConvertToClistSlot(int slot)
@@ -70,7 +67,7 @@ int ConvertToClistSlot(int slot) if (slot < 0)
return slot;
- return clistFirstSlot + slot;
+ return slot+1;
}
int ExtraImage_ExtraIDToColumnNum(int extra)
@@ -508,10 +505,6 @@ static IconItem iconList[] = void LoadExtraIconsModule()
{
- DWORD ret = CallService(MS_CLUI_GETCAPS, CLUICAPS_FLAGS2, 0);
- clistFirstSlot = HIWORD(ret);
- clistSlotCount = LOWORD(ret);
-
// Services
CreateServiceFunction(MS_CLIST_EXTRA_ADD_ICON, svcExtraIcon_Add);
|