From 14b3e00732b7f8b23c3e194815a9a0d3a6f2723f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Apr 2016 08:09:32 +0000 Subject: 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 --- include/delphi/m_clui.inc | 45 +---------------------- include/m_clui.h | 28 --------------- plugins/Clist_blind/src/clistopts.cpp | 55 ++++------------------------- plugins/Clist_nicer/src/clcpaint.cpp | 1 - plugins/Clist_nicer/src/clistevents.cpp | 1 - plugins/Clist_nicer/src/clistmod.cpp | 25 +------------ plugins/Clist_nicer/src/clistopts.cpp | 27 ++------------ plugins/Clist_nicer/src/clisttray.cpp | 2 -- plugins/Clist_nicer/src/clui.cpp | 3 -- plugins/Clist_nicer/src/cluiservices.cpp | 2 -- plugins/Clist_nicer/src/init.cpp | 3 -- plugins/Clist_nicer/src/stdafx.h | 2 ++ plugins/Clist_nicer/src/viewmodes.cpp | 1 - plugins/ContactsPlus/src/send.cpp | 2 +- plugins/Scriver/src/msgoptions.cpp | 2 +- plugins/TabSRMM/src/generic_msghandlers.cpp | 10 ++---- plugins/TabSRMM/src/msgoptions.cpp | 2 +- plugins/TipperYM/src/options.cpp | 6 +--- plugins/TooltipNotify/src/TooltipNotify.cpp | 7 ++-- plugins/Variables/src/help.cpp | 6 +--- protocols/IcqOscarJ/src/icq_uploadui.cpp | 3 +- src/core/stdclist/src/clistopts.cpp | 53 +++------------------------ src/core/stdmsg/src/msgoptions.cpp | 6 +--- src/mir_app/src/cluiservices.cpp | 12 ------- src/mir_app/src/extraicons.cpp | 11 ++---- 25 files changed, 30 insertions(+), 285 deletions(-) diff --git a/include/delphi/m_clui.inc b/include/delphi/m_clui.inc index 10af8c8c29..bb7bd26f7b 100644 --- a/include/delphi/m_clui.inc +++ b/include/delphi/m_clui.inc @@ -66,46 +66,6 @@ const } MS_CLUI_LISTENDREBUILD:PAnsiChar = 'CLUI/ListEndRebuild'; - { - wParam : CLUICAPS_* - lParam : 0 - Affect : Gets a load of capabilites for the loaded CLUI, see notes - Returns: the requested value, 0 of wParam is unknown -- - if this service is not implemented it is assumed all return - values will be 0. - Version: v0.1.2.1+ - } -{ - CLUIF2_PLUGININFO = 1; // returns pointer to plugininfo - CLUIF2_CLISTTYPE = 2; // the genaration of list in chronologic - // modern layered return 0x07 (assuming classic, - // mw, meta, nicer1, modern1, nicer++, modernLayered) - // +0x0100 for unicode - CLUIF2_EXTRACOLUMNCOUNT = 3; // return max number of extra icon available to - // be set in main window - CLUIF2_USEREXTRASTART = 4; // return index of first 'advanced' image except - // Adv1 and Adv2 -} - // can only provide this flag to return the following set of caps, the strings - // show the database setting/type to store the list option, changing the value - // does not reflect what the change is, i.e. ontop can only be affected with - // a call to SetWindowPos() - CLUICAPS_FLAGS1 = 0; - // empty groups aren't shown, 'CList/HideEmptyGroups' (byte) [changes make the list reload] - CLUIF_HIDEEMPTYGROUPS = 1; - // groups can be disabled, lists can be merged into one seamlessly, (byte) 'CList/UseGroups' - CLUIF_DISABLEGROUPS = 2; - // list can be displayed 'on top' of all other windows, 4 (byte) 'CList/OnTop' - CLUIF_HASONTOPOPTION = 4; - // can disappear after a while of inactive use, - // (byte) 'CList/AutoHide' (word) 'CList/HideTime' - CLUIF_HASAUTOHIDEOPTION = 8; - - CLUICAPS_FLAGS2 = 1; // Returns info about extra icons - // HIWORD is the first extra icon number, LOWORD is the extra icons count - - MS_CLUI_GETCAPS:PAnsiChar = 'CLUI/GetCaps'; - { wParam : TMCONTACT lParam : MAKELPARAM(screenX, screenY) @@ -135,10 +95,7 @@ const } ME_CLUI_CONTACTDRAGSTOP:PAnsiChar = 'CLUI/ContactDragStop'; -// return TRUE if Clist Module Support Metacontacts + // return TRUE if Clist Module Support Metacontacts ME_CLUI_METASUPPORT:PAnsiChar = 'CLUI/MetaContactSupport'; -// return pointer to PLUGININFO structure -// MS_CLIST_GETCLISTCAPS = 'CList/GetCaps'; - {$ENDIF} diff --git a/include/m_clui.h b/include/m_clui.h index bd49c8213a..abf2d48a78 100644 --- a/include/m_clui.h +++ b/include/m_clui.h @@ -49,34 +49,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //you do not need to explicitly sort the list #define MS_CLUI_LISTENDREBUILD "CLUI/ListEndRebuild" -//Gets a load of capabilities for the loaded CLUI v0.1.2.1+ -//wParam = capability, CLUICAPS_* -//lParam = 0 -//returns the requested value, 0 if wParam is an unknown value -//If this service is not implemented, it is assumed to return 0 to all input - -#define CLUICAPS_FLAGS1 0 -#define CLUIF_HIDEEMPTYGROUPS 1 //the clist has a checkbox in its options - //to set this, which will be hidden if this flag is not set. It is - //up to the CLUI to provide support for it, but it just seemed insane - //to me to have hide offline and hide empty in different pages. - //The setting is "CList"/"HideEmptyGroups", a byte. A complete list - //reload is sent whenever the user changes it. -#define CLUIF_DISABLEGROUPS 2 //can show list without groups. Adds option - //to change "CList"/"UseGroups", a byte. -#define CLUIF_HASONTOPOPTION 4 //the clui options page provides a way to - //change "CList"/"OnTop", a byte. When it is changed the clui should - //also set the topmost flag on the window using SetWindowPos(). -#define CLUIF_HASAUTOHIDEOPTION 8 //the clui options page provides a way to - //change the list auto hide options. It should read and write the - //byte "CList"/"AutoHide" and the word "CList"/"HideTime". No other - //action is needed. - -#define CLUICAPS_FLAGS2 1 //Returns info about extra icons - //HIWORD is the first extra icon number, LOWORD is the extra icons count - -#define MS_CLUI_GETCAPS "CLUI/GetCaps" - //a contact is being dragged outside the main window v0.1.2.0+ //wParam = (MCONTACT)hContact //lParam = MAKELPARAM(screenX, screenY) diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp index c7f9f5afb8..8a0ed83017 100644 --- a/plugins/Clist_blind/src/clistopts.cpp +++ b/plugins/Clist_blind/src/clistopts.cpp @@ -43,7 +43,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, db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? BST_UNCHECKED : BST_CHECKED); @@ -51,27 +50,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_SORTBYSTATUS, db_get_b(NULL, "CList", "SortByStatus", SETTING_SORTBYSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_SORTBYPROTO, 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, @@ -79,8 +58,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_ALWAYSMULTI, !db_get_b(NULL, "CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_DONTCYCLE, - db_get_b(NULL, "CList", "TrayIcon", - SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE ? BST_CHECKED : BST_UNCHECKED); + db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_SINGLE ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CYCLE, db_get_b(NULL, "CList", "TrayIcon", SETTING_TRAYICON_DEFAULT) == SETTING_TRAYICON_CYCLE ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_MULTITRAY, @@ -133,10 +111,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)); @@ -148,11 +122,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 @@ -165,25 +139,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)); db_set_b(NULL, "CList", "SortByStatus", (BYTE) (g_bSortByStatus = IsDlgButtonChecked(hwndDlg, IDC_SORTBYSTATUS))); db_set_b(NULL, "CList", "SortByProto", (BYTE) (g_bSortByProto = IsDlgButtonChecked(hwndDlg, IDC_SORTBYPROTO))); db_set_b(NULL, "CList", "ConfirmDelete", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONFIRMDELETE)); diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index 2e98e50f79..9df4d4216f 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -31,7 +31,6 @@ extern ImageItem *g_glyphItem; extern int hClcProtoCount; -extern HIMAGELIST hCListImages; static BYTE divide3[765] = { 255 }; extern char *im_clients[]; extern HICON im_clienthIcons[]; diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index 39afbc541a..a8b5a7851c 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -41,7 +41,6 @@ struct CListImlIcon }; static int iconsOn; -extern HIMAGELIST hCListImages; HANDLE hNotifyFrame = (HANDLE)-1; diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index ece688f6aa..468dfddb44 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -24,16 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -extern int AddEvent(WPARAM wParam, LPARAM lParam); -extern int RemoveEvent(WPARAM wParam, LPARAM lParam); - int InitCustomMenus(void); void UninitCustomMenus(void); -INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam); -int EventsProcessContactDoubleClick(MCONTACT hContact); -int SetHideOffline(WPARAM wParam, LPARAM lParam); -extern HIMAGELIST hCListImages; +INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam); extern int g_maxStatus; extern HANDLE hSvc_GetContactStatusMsg; @@ -92,23 +86,6 @@ int LoadContactListModule(void) ///////////////////////////////////////////////////////////////////////////////////////// -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; -} - -int PreloadContactListModule(void) -{ - CreateServiceFunction(MS_CLUI_GETCAPS, GetCaps); - return 0; -} - /* Begin of Hrk's code for bug */ diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index ba7c67b453..0e41b66e01 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -54,28 +54,14 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP opt_gen_opts_changed = 0; TranslateDialogDefault(hwndDlg); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)HookEventMessage(ME_DB_CONTACT_SETTINGCHANGED, hwndDlg, WM_USER + 1)); - CheckDlgButton(hwndDlg, IDC_ONTOP, cfg::getByte("CList", "OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, cfg::getByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_HIDEEMPTYGROUPS, cfg::getByte("CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, cfg::getByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) ? BST_UNCHECKED : BST_CHECKED); CheckDlgButton(hwndDlg, IDC_CONFIRMDELETE, cfg::getByte("CList", "ConfirmDelete", SETTING_CONFIRMDELETE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); - { - 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) { - } - } - CheckDlgButton(hwndDlg, IDC_SHOWBOTTOMBUTTONS, cfg::dat.dwFlags & CLUI_FRAME_SHOWBOTTOMBUTTONS ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_CLISTSUNKEN, cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_EVENTAREAAUTOHIDE, cfg::dat.dwFlags & CLUI_FRAME_AUTOHIDENOTIFY ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_EVENTAREASUNKEN, (cfg::dat.dwFlags & CLUI_FRAME_EVENTAREASUNKEN) ? BST_CHECKED : BST_UNCHECKED); - CheckDlgButton(hwndDlg, IDC_ONECLK, cfg::getByte("CList", "Tray1Click", SETTING_TRAY1CLICK_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_ALWAYSSTATUS, cfg::getByte("CList", "AlwaysStatus", SETTING_ALWAYSSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_ALWAYSMULTI, !cfg::getByte("CList", "AlwaysMulti", SETTING_ALWAYSMULTI_DEFAULT) ? BST_CHECKED : BST_UNCHECKED); @@ -156,17 +142,8 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP return TRUE; cfg::writeByte("CList", "HideOffline", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEOFFLINE)); - { - DWORD caps = CallService(MS_CLUI_GETCAPS, CLUICAPS_FLAGS1, 0); - if (caps & CLUIF_HIDEEMPTYGROUPS) - cfg::writeByte("CList", "HideEmptyGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS)); - if (caps & CLUIF_DISABLEGROUPS) - cfg::writeByte("CList", "UseGroups", (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS)); - if (!(caps & CLUIF_HASONTOPOPTION)) { - cfg::writeByte("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); - } - } + cfg::writeByte("CList", "HideEmptyGroups", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HIDEEMPTYGROUPS)); + cfg::writeByte("CList", "UseGroups", (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEGROUPS)); cfg::writeByte("CList", "ConfirmDelete", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONFIRMDELETE)); cfg::writeByte("CList", "Tray1Click", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ONECLK)); cfg::writeByte("CList", "AlwaysStatus", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_ALWAYSSTATUS)); diff --git a/plugins/Clist_nicer/src/clisttray.cpp b/plugins/Clist_nicer/src/clisttray.cpp index b6524f9729..9dc29ab078 100644 --- a/plugins/Clist_nicer/src/clisttray.cpp +++ b/plugins/Clist_nicer/src/clisttray.cpp @@ -26,8 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TRAYICON_ID_BASE 100 -extern HIMAGELIST hCListImages; - // don't move to win2k.h, need new and old versions to work on 9x/2000/XP #define NIF_STATE 0x00000008 #define NIF_INFO 0x00000010 diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 6fcc9a0b85..0aff338a8a 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -42,8 +42,6 @@ static int transparentFocus = 1; static byte oldhideoffline; static int disableautoupd = 1; HANDLE hFrameContactTree; -extern HIMAGELIST hCListImages; -extern PLUGININFOEX pluginInfo; extern RECT old_window_rect, new_window_rect; extern BOOL g_trayTooltipActive; @@ -67,7 +65,6 @@ TCHAR *statusNames[12]; extern LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); extern HANDLE hNotifyFrame; -int SortList(WPARAM wParam, LPARAM lParam); int LoadCluiServices(void); void InitGroupMenus(); void FS_RegisterFonts(); diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 1c47a705b3..1de847da64 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -25,9 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" #include "cluiframes.h" -extern HIMAGELIST hCListImages; extern ButtonItem *g_ButtonItems; -extern PLUGININFOEX pluginInfo; static INT_PTR GetClistVersion(WPARAM, LPARAM lParam) { diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index f51fe04ad3..ece4a96e3f 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -91,7 +91,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD) extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CLIST, MIID_LAST }; -int PreloadContactListModule(void); int LoadContactListModule(void); int LoadCLCModule(void); void LoadCLUIModule(void); @@ -186,8 +185,6 @@ extern "C" int __declspec(dllexport) CListInitialise() CallService(MS_DB_GETPROFILEPATHT, MAX_PATH, (LPARAM)cfg::dat.tszProfilePath); _tcslwr(cfg::dat.tszProfilePath); - PreloadContactListModule(); - // get the clist interface pcli->hInst = g_hInst; pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged; diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h index 58785fe0f2..6f792be800 100644 --- a/plugins/Clist_nicer/src/stdafx.h +++ b/plugins/Clist_nicer/src/stdafx.h @@ -73,8 +73,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // shared vars extern HINSTANCE g_hInst; extern LONG g_cxsmIcon, g_cysmIcon; +extern PLUGININFOEX pluginInfo; extern LIST arStatusItems; extern ImageItem *g_glyphItem; +extern HIMAGELIST hCListImages; extern CLIST_INTERFACE coreCli; diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index c68cc5b022..8b679f4288 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -27,7 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TIMERID_VIEWMODEEXPIRE 100 -extern HIMAGELIST hCListImages; extern HPEN g_hPenCLUIFrames; extern FRAMEWND *wndFrameViewMode; diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index d698ab6252..42665b0183 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -200,7 +200,7 @@ static void SetAllContactChecks(HWND hwndList, MCONTACT hReceiver) // doubtful n if (szProto == NULL) return; - if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS && db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT)) + if (db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT)) SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, TRUE, 0); else SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, FALSE, 0); diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 2467f63d21..75afb7337d 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -814,7 +814,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)) + if (!db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, FALSE, 0); else SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0); diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 9cae67b3d1..b7d74b1abd 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1132,14 +1132,8 @@ HWND TSAPI DM_CreateClist(TWindowData *dat) if (hItem) SendMessage(hwndClist, CLM_SETCHECKMARK, (WPARAM)hItem, 1); - if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !M.GetByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) - SendMessage(hwndClist, CLM_SETUSEGROUPS, FALSE, 0); - else - SendMessage(hwndClist, CLM_SETUSEGROUPS, TRUE, 0); - if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS && M.GetByte("CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT)) - SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, TRUE, 0); - else - SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, FALSE, 0); + SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, M.GetByte("CList", "HideEmptyGroups", SETTING_USEGROUPS_DEFAULT), 0); + SendMessage(hwndClist, CLM_SETUSEGROUPS, M.GetByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0); SendMessage(hwndClist, CLM_FIRST + 106, 0, 1); SendMessage(hwndClist, CLM_AUTOREBUILD, 0, 0); if (hwndClist) diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index dad59fe1f0..58b62f635d 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -840,7 +840,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 && !M.GetByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) + if (!M.GetByte("CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, FALSE, 0); else SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, TRUE, 0); diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index fe719e5d90..2e8b94fdd8 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -1882,12 +1882,8 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, case WM_INITDIALOG: TranslateDialogDefault(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_SETHIDEEMPTYGROUPS, 1, 0); + SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT), 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0); SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0); { diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 4d5a1659a0..a19eebc996 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -176,7 +176,7 @@ int CTooltipNotify::ProtoAck(WPARAM, LPARAM lParam) if ((ack == NULL) || (ack->type != ACKTYPE_STATUS)) return 0; WORD wNewStatus = (WORD)ack->lParam; - WORD wOldStatus = (WORD)ack->hProcess; + WORD wOldStatus = (UINT_PTR)ack->hProcess; if (wOldStatus == wNewStatus) return 0; //Useless message. char *szProtocol = (char *)ack->szModule; @@ -714,10 +714,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM) void CTooltipNotify::ResetCList(HWND hwndDlg) { - BOOL b = (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && - db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)); - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, (WPARAM)b, 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/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index d83e8cf2fa..1adaed553a 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -93,11 +93,7 @@ static INT_PTR CALLBACK extratextDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPA // dialog box for the %subject% selection void ResetCList(HWND hwndDlg) { - if ((CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_DISABLEGROUPS && !db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) || !(GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE)&CLS_USEGROUPS)) - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, FALSE, 0); - else - SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETUSEGROUPS, 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/protocols/IcqOscarJ/src/icq_uploadui.cpp b/protocols/IcqOscarJ/src/icq_uploadui.cpp index 1dba00dda6..fa1dbf5f52 100644 --- a/protocols/IcqOscarJ/src/icq_uploadui.cpp +++ b/protocols/IcqOscarJ/src/icq_uploadui.cpp @@ -43,8 +43,7 @@ static int cbGroupIds = 0; static void ResetCListOptions(HWND hwndList) { SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList, GWL_STYLE) | CLS_SHOWHIDDEN); - if (CallService(MS_CLUI_GETCAPS, 0, 0) & CLUIF_HIDEEMPTYGROUPS) // hide empty groups - SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM)TRUE, 0); + SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM)TRUE, 0); } // Selects the "All contacts" checkbox if all other list entries 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 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); -- cgit v1.2.3