From e31ac6c82a921e5d972fe3a3d437f18f147877a9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 7 Jun 2013 20:35:29 +0000 Subject: duplicated and unused services removed git-svn-id: http://svn.miranda-ng.org/main/trunk@4899 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_clist.inc | 22 ---- include/delphi/m_clui.inc | 28 ----- include/m_clist.h | 16 --- include/m_clui.h | 22 ---- .../Clist_modern/src/hdr/modern_commonprototypes.h | 3 +- plugins/Clist_modern/src/hdr/modern_static_clui.h | 1 - plugins/Clist_modern/src/init.cpp | 3 +- plugins/Clist_modern/src/modern_clc.cpp | 2 +- plugins/Clist_modern/src/modern_clistmod.cpp | 34 +----- plugins/Clist_modern/src/modern_clisttray.cpp | 2 +- plugins/Clist_modern/src/modern_clui.cpp | 4 +- plugins/Clist_modern/src/modern_cluiservices.cpp | 119 +-------------------- plugins/Clist_modern/src/modern_contact.cpp | 11 -- plugins/Clist_modern/src/modern_statusbar.cpp | 2 +- .../Clist_modern/src/modern_statusbar_options.cpp | 2 +- plugins/Clist_mw/src/contact.cpp | 2 - plugins/Clist_nicer/src/contact.cpp | 2 - plugins/ListeningTo/src/options.cpp | 4 +- plugins/MenuItemEx/src/main.cpp | 5 +- plugins/MetaContacts/src/meta_menu.cpp | 3 - plugins/MetaContacts/src/meta_utils.cpp | 5 - plugins/VersionInfo/src/services.cpp | 2 - src/modules/clist/clcfiledrop.cpp | 2 +- src/modules/clist/clistmod.cpp | 6 +- src/modules/clist/cluiservices.cpp | 14 --- src/modules/clist/contact.cpp | 2 - 26 files changed, 17 insertions(+), 301 deletions(-) diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index ac6c1746e2..c3ea28b48d 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -431,17 +431,6 @@ const } MS_CLIST_DOCKINGISDOCKED:PAnsiChar = 'CList/DockingIsDocked'; - { - wParam : Pointer to a TMSG - lParam : Pointer to an LRESULT - Affect : Process all the messages required for the tray icon, see notes - Returns: TRUE if the message should not be processed anymore, False otherwise - Notes : Only msg.hwnd, msg.message, msg.wparam and msg.lParam are used - your WndProc should return LRESULT if and ONLY if TRUE is returned - Version: v0.1.1.0+ - } - MS_CLIST_TRAYICONPROCESSMESSAGE:PAnsiChar = 'CList/TrayIconProcessMessage'; - { wParam : Pointer to TMSG lParam : Pointer to an LRESULT @@ -461,17 +450,6 @@ const } MS_CLIST_SHOWHIDE:PAnsiChar = 'CList/ShowHide'; - { - wParam : 0 - lParam : 0 - Affect : temporarily disable the autohide feature, see notes - Notes : this service will restart the auto hide timer, so if you need - to keep the window visible you'll have to bee getting user input - or calling this service each time - Version: v0.1.2.1+ - } - MS_CLIST_PAUSEAUTOHIDE:PAnsiChar = 'CList/PauseAutoHide'; - { sent when the group get modified (created, renamed or deleted) or contact is moving from group to group diff --git a/include/delphi/m_clui.inc b/include/delphi/m_clui.inc index 00a2e80cde..febf121332 100644 --- a/include/delphi/m_clui.inc +++ b/include/delphi/m_clui.inc @@ -45,16 +45,6 @@ const //get ContactTree hwnd MS_CLUI_GETHWNDTREE:PAnsiChar = 'CLUI/GetHwndTree'; - { - wParam : new status - lParam : null terminated string to a protocol ID - Affects: Change the protocol specific status indicators, see notes! - Returns: 0 on success, [non zero] on failure - Notes : protocol modules don't want to call this, they want - clist/protocolstatuschanged instead - } - MS_CLUI_PROTOCOLSTATUSCHANGED:PAnsiChar = 'CLUI/ProtocolStatusChanged'; - { wParam : Handle to a group lParam : 1 or 0 @@ -146,16 +136,6 @@ const } MS_CLUI_LISTENDREBUILD:PAnsiChar = 'CLUI/ListEndRebuild'; - { - wParam : 0 - lParam : 0 - Affect : Sort the contact list now, see notes - Returns: 0 success, [non zero] on failure - Notes : Sorts are buffered so you won't get this message lots of times - if the lists needs to be resorted many times rapidly - } - MS_CLUI_SORTLIST:PAnsiChar = 'CLUI/SortList'; - { wParam : CLUICAPS_* lParam : 0 @@ -194,14 +174,6 @@ const CLUICAPS_FLAGS2 = 1; // Returns info about extra icons // HIWORD is the first extra icon number, LOWORD is the extra icons count -//LPARAMS for CLUICAPS_FLAGS1 - 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 - MS_CLUI_GETCAPS:PAnsiChar = 'CLUI/GetCaps'; { diff --git a/include/m_clist.h b/include/m_clist.h index eba83c6769..587a3cb35b 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -443,14 +443,6 @@ typedef struct { //returns nonzero if the contact list is docked, of 0 if it is not #define MS_CLIST_DOCKINGISDOCKED "CList/DockingIsDocked" -//process all the messages required for the tray icon v0.1.1.0+ -//wParam = (WPARAM)(MSG*)&msg -//lParam = (LPARAM)(LRESULT*)&lResult -//returns TRUE if the message should not be processed further, FALSE otherwise -//only msg.hwnd, msg.message, msg.wParam and msg.lParam are used -//your wndproc should return lResult if and only if TRUE is returned -#define MS_CLIST_TRAYICONPROCESSMESSAGE "CList/TrayIconProcessMessage" - //process all the messages required for hotkeys v0.1.1.0+ //wParam = (WPARAM)(MSG*)&msg //lParam = (LPARAM)(LRESULT*)&lResult @@ -464,14 +456,6 @@ typedef struct { //returns 0 on success, nonzero on failure #define MS_CLIST_SHOWHIDE "CList/ShowHide" -//temporarily disable the autohide feature v0.1.2.1+ -//wParam = lParam = 0 -//returns 0 on success, nonzero on failure -//This service will restart the autohide timer, so if you need to keep the -//window visible you'll have to be getting user input regularly and calling -//this function each time -#define MS_CLIST_PAUSEAUTOHIDE "CList/PauseAutoHide" - //sent when the group get modified (created, renamed or deleted) //or contact is moving from group to group //wParam = hContact - NULL if operation on group diff --git a/include/m_clui.h b/include/m_clui.h index 903971ab52..bbda841f01 100644 --- a/include/m_clui.h +++ b/include/m_clui.h @@ -39,14 +39,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //get ContactTree hwnd #define MS_CLUI_GETHWNDTREE "CLUI/GetHwndTree" -//change protocol-specific status indicators -//wParam = new status -//lParam = (LPARAM)(const char*)szProtocolID -//returns 0 on success, nonzero on failure -//protocol modules don't want to call this. They want -//clist/protocolstatuschanged instead -#define MS_CLUI_PROTOCOLSTATUSCHANGED "CLUI/ProtocolStatusChanged" - //a new group was created. Add it to the list //wParam = (WPARAM)(HANDLE)hGroup //lParam = newGroup @@ -113,13 +105,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" -//sort the contact list now -//wParam = lParam = 0 -//returns 0 on success, nonzero on failure -//sorts are buffered so you won't get this message lots of times if the list -//needs to be re-sorted many times rapidly. -#define MS_CLUI_SORTLIST "CLUI/SortList" - //Gets a load of capabilities for the loaded CLUI v0.1.2.1+ //wParam = capability, CLUICAPS_* //lParam = 0 @@ -146,13 +131,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CLUICAPS_FLAGS2 1 //Returns info about extra icons //HIWORD is the first extra icon number, LOWORD is the extra icons count -//LPARAMS for CLUICAPS_FLAGS2 -#define CLUIF2_PLUGININFO 1 //returns pointer to plugininfo -#define CLUIF2_CLISTTYPE 2 // the genaration of list in chronologic -// modern layered return 0x07 (assuming classic, mw, meta, nicer1, modern1, nicer++, modernLayered) -// +0x0100 for unicode -#define CLUIF2_EXTRACOLUMNCOUNT 3 // return max number of extra icon available to be set in main window - #define MS_CLUI_GETCAPS "CLUI/GetCaps" //a contact is being dragged outside the main window v0.1.2.0+ diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h index 19f2d1d3d2..844638c10b 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h @@ -118,8 +118,6 @@ void CLUI_UpdateLayeredMode(); UINT_PTR CLUI_SafeSetTimer(HWND hwnd, int ID, int Timeout, TIMERPROC proc); /* CLUIServices */ -INT_PTR CLUIServices_ProtocolStatusChanged(WPARAM wParam,LPARAM lParam); - int CLUIUnreadEmailCountChanged(WPARAM wParam,LPARAM lParam); /* GDIPlus */ @@ -303,6 +301,7 @@ BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ); int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2); int cliFindItem(HWND hwnd,ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup **subgroup,int *isVisible); void cliTrayIconUpdateBase(const char *szChangedProto); +int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam); void cliCluiProtocolStatusChanged(int status,const char * proto); HMENU cliBuildGroupPopupMenu(ClcGroup *group); void cliInvalidateDisplayNameCacheEntry(HANDLE hContact); diff --git a/plugins/Clist_modern/src/hdr/modern_static_clui.h b/plugins/Clist_modern/src/hdr/modern_static_clui.h index ec4e3acc01..844d172c7c 100644 --- a/plugins/Clist_modern/src/hdr/modern_static_clui.h +++ b/plugins/Clist_modern/src/hdr/modern_static_clui.h @@ -67,7 +67,6 @@ int CListSettings_SetToCache(ClcCacheEntry *pSrc, DWORD flag); int CLUIServices_LoadModule(void); INT_PTR CLUIServices_SortList(WPARAM wParam,LPARAM lParam); -INT_PTR CLUIServices_ProtocolStatusChanged(WPARAM wParam,LPARAM lParam); void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc); diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index ed6ac90cd1..80e7c27b14 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -160,7 +160,8 @@ static HRESULT SubclassClistInterface() pcli->pfnFreeCacheItem = cliFreeCacheItem; pcli->pfnInvalidateDisplayNameCacheEntry = cliInvalidateDisplayNameCacheEntry; - pcli->pfnTrayIconUpdateBase = cliTrayIconUpdateBase; + pcli->pfnTrayIconPauseAutoHide = cliTrayIconPauseAutoHide; + pcli->pfnTrayIconUpdateBase = cliTrayIconUpdateBase; pcli->pfnCluiProtocolStatusChanged = cliCluiProtocolStatusChanged; pcli->pfnBeginRenameSelection = cliBeginRenameSelection; diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 15e8300427..1663134546 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -211,7 +211,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) } else if ( !strcmp(cws->szSetting,"XStatusId") || !strcmp(cws->szSetting,"XStatusName")) { - CLUIServices_ProtocolStatusChanged(0, (LPARAM)cws->szModule); + cliCluiProtocolStatusChanged(0, cws->szModule); } } else // (HANDLE)wParam != NULL diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index f3da87eae2..6fd2978021 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -47,7 +47,6 @@ int ModernSkinOptInit(WPARAM wParam,LPARAM lParam); int EventsProcessContactDoubleClick(HANDLE hContact); INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam); -INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam); void InitTrayMenus(void); void UninitTrayMenu(); @@ -157,31 +156,6 @@ int CListMod_ContactListShutdownProc(WPARAM wParam,LPARAM lParam) return 0; } -INT_PTR GetCapsService(WPARAM wParam,LPARAM lParam) -{ - if (lParam) { - switch (lParam) { - case 0: - return 0; - case CLUIF2_PLUGININFO: - return (INT_PTR)&pluginInfo; - case CLUIF2_CLISTTYPE: - return 0x0107; - case CLUIF2_EXTRACOLUMNCOUNT: - return EXTRA_ICON_COUNT; - } - } - else { - 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; -} - HRESULT PreLoadContactListModule() { /* Global data initialization */ @@ -189,10 +163,6 @@ HRESULT PreLoadContactListModule() g_CluiData.dwKeyColor = RGB(255, 0, 255); g_CluiData.bCurrentAlpha = 255; - //initialize firstly hooks - //clist interface is empty yet so handles should check - CreateServiceFunction(MS_CLUI_GETCAPS, GetCapsService); - // catch langpack events HookEvent(ME_LANGPACK_CHANGED, OnLoadLangpack); OnLoadLangpack(0, 0); @@ -215,9 +185,7 @@ HRESULT CluiLoadModule() CreateServiceFunction("ModernSkinSel/Apply", SvcApplySkin); HookEvent(ME_DB_CONTACT_ADDED,ContactAdded); - CreateServiceFunction(MS_CLIST_TRAYICONPROCESSMESSAGE,cli_TrayIconProcessMessage); - CreateServiceFunction(MS_CLIST_PAUSEAUTOHIDE,TrayIconPauseAutoHide); - CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP,ContactChangeGroup); + CreateServiceFunction(MS_CLIST_TOGGLEHIDEOFFLINE,ToggleHideOffline); CreateServiceFunction(MS_CLIST_TOGGLEGROUPS,ToggleGroups); diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index f99b24ca6d..19a6b8c605 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -360,7 +360,7 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd,UINT message,UINT_PTR idEve MySetProcessWorkingSetSize(GetCurrentProcess(),-1,-1); } -INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam) +int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam) { if ( db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT)) { diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 75be2ea628..cea7571750 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -71,7 +71,7 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam) if ( ServiceExists(MS_MC_GETPROTOCOLNAME)) g_szMetaModuleName = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0); - CLUIServices_ProtocolStatusChanged(0, 0); + cliCluiProtocolStatusChanged(0, 0); SleepEx(0, TRUE); g_flag_bOnModulesLoadedCalled = TRUE; ///pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE); @@ -1980,7 +1980,7 @@ LRESULT CLUI::OnCreate(UINT msg, WPARAM wParam, LPARAM lParam) { TranslateMenu(GetMenu(m_hWnd)); DrawMenuBar(m_hWnd); - CLUIServices_ProtocolStatusChanged(0, 0); + cliCluiProtocolStatusChanged(0, 0); MENUITEMINFO mii; ZeroMemory(&mii,sizeof(mii)); diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp index 75140b5afc..c5813f1439 100644 --- a/plugins/Clist_modern/src/modern_cluiservices.cpp +++ b/plugins/Clist_modern/src/modern_cluiservices.cpp @@ -31,24 +31,11 @@ int CLUIUnreadEmailCountChanged(WPARAM wParam,LPARAM lParam) return 0; } -INT_PTR CLUIServices_ProtocolStatusChanged(WPARAM wParam,LPARAM lParam) -{ - CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,(WPARAM)pcli->hwndStatus,0); - if (lParam) cliTrayIconUpdateBase((char*)lParam); - return 0; -} - void cliCluiProtocolStatusChanged(int status,const char * proto) { - CLUIServices_ProtocolStatusChanged((WPARAM)status,(LPARAM)proto); -} - -INT_PTR SortList(WPARAM wParam,LPARAM lParam) -{ - pcli->pfnClcBroadcast( WM_TIMER,TIMERID_DELAYEDRESORTCLC,0); - pcli->pfnClcBroadcast( INTM_SCROLLBARCHANGED, 0, 0); - - return 0; + CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,(WPARAM)pcli->hwndStatus,0); + if (proto) + cliTrayIconUpdateBase(proto); } static INT_PTR MetaSupportCheck(WPARAM wParam,LPARAM lParam) @@ -56,110 +43,10 @@ static INT_PTR MetaSupportCheck(WPARAM wParam,LPARAM lParam) return 1; } -static INT_PTR GetHwnd(WPARAM wParam, LPARAM lParam) -{ - return (INT_PTR)pcli->hwndContactList; -} - -static INT_PTR GetHwndTree(WPARAM wParam,LPARAM lParam) -{ - return (INT_PTR)pcli->hwndContactTree; -} - -static INT_PTR GroupAdded(WPARAM wParam, LPARAM lParam) -{ - //CLC does this automatically unless it's a new group - if (lParam) { - HANDLE hItem; - TCHAR szFocusClass[64]; - HWND hwndFocus = GetFocus(); - - GetClassName(hwndFocus, szFocusClass, SIZEOF(szFocusClass)); - if ( !lstrcmp(szFocusClass, _T(CLISTCONTROL_CLASS))) { - hItem = (HANDLE) SendMessage(hwndFocus, CLM_FINDGROUP, wParam, 0); - if (hItem) - SendMessage(hwndFocus, CLM_EDITLABEL, (WPARAM) hItem, 0); - } - } - return 0; -} - -static INT_PTR ContactSetIcon(WPARAM wParam, LPARAM lParam) -{ - //unnecessary: CLC does this automatically - return 0; -} - -static INT_PTR ContactDeleted(WPARAM wParam, LPARAM lParam) -{ - //unnecessary: CLC does this automatically - return 0; -} - -static INT_PTR ContactAdded(WPARAM wParam, LPARAM lParam) -{ - //unnecessary: CLC does this automatically - return 0; -} - -static INT_PTR ListBeginRebuild(WPARAM wParam, LPARAM lParam) -{ - //unnecessary: CLC does this automatically - return 0; -} - -static INT_PTR ContactRenamed(WPARAM wParam, LPARAM lParam) -{ - //unnecessary: CLC does this automatically - return 0; -} - -static INT_PTR ListEndRebuild(WPARAM wParam, LPARAM lParam) -{ - int rebuild = 0; - //CLC does this automatically, but we need to force it if hideoffline or hideempty has changed - if (( db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEOFFLINE) == 0)) { - if ( db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) - SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEOFFLINE); - else - SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEOFFLINE); - rebuild = 1; - } - if (( db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) == 0)) { - if ( db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT)) - SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_HIDEEMPTYGROUPS); - else - SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS); - rebuild = 1; - } - if (( db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS) == 0)) { - if ( db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT)) - SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) | CLS_USEGROUPS); - else - SetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE, GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & ~CLS_USEGROUPS); - rebuild = 1; - } - if (rebuild) - SendMessage(pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0); - return 0; -} - int CLUIServices_LoadModule(void) { CreateServiceFunction(MS_CLUI_METASUPPORT,MetaSupportCheck); - CreateServiceFunction(MS_CLUI_PROTOCOLSTATUSCHANGED,CLUIServices_ProtocolStatusChanged); - CreateServiceFunction(MS_CLUI_SORTLIST,SortList); CreateServiceFunction(MS_CLIST_GETSTATUSMODE,CListTray_GetGlobalStatus); - - CreateServiceFunction(MS_CLUI_GETHWND, GetHwnd); - CreateServiceFunction(MS_CLUI_GETHWNDTREE,GetHwndTree); - CreateServiceFunction(MS_CLUI_GROUPADDED, GroupAdded); - CreateServiceFunction(MS_CLUI_CONTACTSETICON, ContactSetIcon); - CreateServiceFunction(MS_CLUI_CONTACTADDED, ContactAdded); - CreateServiceFunction(MS_CLUI_CONTACTDELETED, ContactDeleted); - CreateServiceFunction(MS_CLUI_CONTACTRENAMED, ContactRenamed); - CreateServiceFunction(MS_CLUI_LISTBEGINREBUILD, ListBeginRebuild); - CreateServiceFunction(MS_CLUI_LISTENDREBUILD, ListEndRebuild); return 0; } diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 29db1d8e81..2fe6c81265 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -167,17 +167,6 @@ int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2) #undef SAFESTRING -INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam) -{ - CallService(MS_CLUI_CONTACTDELETED,wParam,0); - if ((HANDLE)lParam == NULL) - db_unset((HANDLE)wParam,"CList","Group"); - else - db_set_ws((HANDLE)wParam,"CList","Group",pcli->pfnGetGroupName(lParam, NULL)); - CallService(MS_CLUI_CONTACTADDED, wParam, pcli->pfnIconFromStatusMode(GetContactProto((HANDLE)wParam),GetContactStatus((HANDLE)wParam),(HANDLE)wParam)); - return 0; -} - INT_PTR ToggleHideOffline(WPARAM wParam,LPARAM lParam) { return pcli->pfnSetHideOffline((WPARAM)-1,0); diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 496c18ffd4..0c8e13521e 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -983,7 +983,7 @@ HWND StatusBar_Create(HWND parent) CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)Frame.hWnd,(LPARAM)NewStatusPaintCallbackProc); //$$$$$ register sub for frame LoadStatusBarData(); - CLUIServices_ProtocolStatusChanged(0, 0); + cliCluiProtocolStatusChanged(0, 0); CallService(MS_CLIST_FRAMES_UPDATEFRAME,-1,0); return hModernStatusBar; } diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp index 0173efb72f..3fce815114 100644 --- a/plugins/Clist_modern/src/modern_statusbar_options.cpp +++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp @@ -524,7 +524,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l db_set_b(NULL,"CLUI","ShowSBar",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR)); LoadStatusBarData(); - CLUIServices_ProtocolStatusChanged(0, 0); + cliCluiProtocolStatusChanged(0, 0); return TRUE; } } diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index 589b11bbbc..a45d7152c8 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -97,7 +97,6 @@ void LoadContactTree(void) sortByProto = db_get_b(NULL,"CList","SortByProto",SETTING_SORTBYPROTO_DEFAULT); sortNoOfflineBottom = db_get_b(NULL,"CList","NoOfflineBottom",SETTING_NOOFFLINEBOTTOM_DEFAULT); - CallService(MS_CLUI_SORTLIST,0,0); CallService(MS_CLUI_LISTENDREBUILD,0,0); tick = GetTickCount()-tick; @@ -160,7 +159,6 @@ static VOID CALLBACK SortContactsTimer(HWND hwnd,UINT message,UINT_PTR idEvent,D { KillTimer(NULL,resortTimerId); resortTimerId = 0; - CallService(MS_CLUI_SORTLIST,0,0); } void SortContacts(void) diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 4c572e4a31..b482c35291 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -167,7 +167,6 @@ void LoadContactTree(void) } cfg::writeByte("CList", "fhistdata", 1); mc_hgh_removed = TRUE; - CallService(MS_CLUI_SORTLIST, 0, 0); CallService(MS_CLUI_LISTENDREBUILD, 0, 0); } @@ -293,7 +292,6 @@ static VOID CALLBACK SortContactsTimer(HWND hwnd, UINT message, UINT idEvent, DW { KillTimer(NULL, resortTimerId); resortTimerId = 0; - CallService(MS_CLUI_SORTLIST, 0, 0); } int SetHideOffline(WPARAM wParam, LPARAM lParam) diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp index a21e10cf1e..5d8b402bb6 100644 --- a/plugins/ListeningTo/src/options.cpp +++ b/plugins/ListeningTo/src/options.cpp @@ -194,9 +194,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP } else { // Init combo - int total = 0, first = 0; - if (ServiceExists(MS_CLUI_GETCAPS)) - total = CallService(MS_CLUI_GETCAPS, 0, CLUIF2_EXTRACOLUMNCOUNT); + int total = EXTRA_ICON_COUNT, first = 0; SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM) _T("1")); SendDlgItemMessage(hwndDlg, IDC_ADV_ICON, CB_ADDSTRING, 0, (LPARAM) _T("2")); diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index ce77c69938..9ced29f044 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -500,7 +500,6 @@ INT_PTR onSetVis(WPARAM wparam,LPARAM lparam) INT_PTR onHide(WPARAM wparam,LPARAM lparam) { db_set_b((HANDLE)wparam,"CList","Hidden",(byte)!db_get_b((HANDLE)wparam,"CList","Hidden",0)); - CallService(MS_CLUI_SORTLIST,0,0); return 0; } @@ -776,10 +775,8 @@ int isIgnored(HANDLE hContact, int type) INT_PTR onIgnore(WPARAM wparam,LPARAM lparam) { - if (db_get_b(NULL, MODULENAME, "ignorehide", 0) && (lparam == IGNOREEVENT_ALL)) { + if (db_get_b(NULL, MODULENAME, "ignorehide", 0) && (lparam == IGNOREEVENT_ALL)) db_set_b((HANDLE)wparam, "CList", "Hidden", (isIgnored((HANDLE)wparam, lparam) ? (byte)0 : (byte)1)); - CallService(MS_CLUI_SORTLIST, 0, 0); - } CallService(isIgnored((HANDLE)wparam, lparam) ? MS_IGNORE_UNIGNORE : MS_IGNORE_IGNORE, wparam, lparam); return 0; diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp index 815d4d4a0f..5bb857b2f3 100644 --- a/plugins/MetaContacts/src/meta_menu.cpp +++ b/plugins/MetaContacts/src/meta_menu.cpp @@ -72,9 +72,6 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) db_set_b(hMetaContact, "CList", "Hidden", 1); } - // Update the graphics - CallService(MS_CLUI_SORTLIST, 0, 0); - free(group); return (INT_PTR)hMetaContact; } diff --git a/plugins/MetaContacts/src/meta_utils.cpp b/plugins/MetaContacts/src/meta_utils.cpp index 7cb5176d5a..db5f9e9682 100644 --- a/plugins/MetaContacts/src/meta_utils.cpp +++ b/plugins/MetaContacts/src/meta_utils.cpp @@ -994,7 +994,6 @@ int Meta_HideLinkedContacts(void) { hContact = db_find_next(hContact); } - CallService(MS_CLUI_SORTLIST, 0, 0); return 0; } @@ -1011,8 +1010,6 @@ int Meta_UnhideLinkedContacts(void) } } - if ( !CallService(MS_SYSTEM_TERMINATED, 0, 0)) - CallService(MS_CLUI_SORTLIST, 0, 0); return 0; } @@ -1039,8 +1036,6 @@ int Meta_HideMetaContacts(int hide) } } - if ( !CallService(MS_SYSTEM_TERMINATED, 0, 0)) - CallService(MS_CLUI_SORTLIST, 0, 0); return 0; } diff --git a/plugins/VersionInfo/src/services.cpp b/plugins/VersionInfo/src/services.cpp index 3953af590a..85bc1b7347 100644 --- a/plugins/VersionInfo/src/services.cpp +++ b/plugins/VersionInfo/src/services.cpp @@ -35,8 +35,6 @@ INT_PTR PluginMenuCommand(WPARAM wParam, LPARAM lParam) int debugTo = db_get_b(NULL, ModuleName, "DebugTo", TO_DIALOGBOX); DoDebugTo(debugTo); if (verbose) PUShowMessage("I have printed the information.", SM_NOTIFY); -/* char *data; - CallService(MS_VERSIONINFO_GETINFO, 1, (LPARAM) &data); */ return 0; } diff --git a/src/modules/clist/clcfiledrop.cpp b/src/modules/clist/clcfiledrop.cpp index dfd75751ee..cbcf7ca3a5 100644 --- a/src/modules/clist/clcfiledrop.cpp +++ b/src/modules/clist/clcfiledrop.cpp @@ -107,7 +107,7 @@ HRESULT CDropTarget::DragOver(DWORD /*grfKeyState*/, POINTL pt, DWORD * pdwEffec *pdwEffect = DROPEFFECT_NONE; return S_OK; } - CallService(MS_CLIST_PAUSEAUTOHIDE, 0, 0); + cli.pfnTrayIconPauseAutoHide(0, 0); dat = (struct ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0); shortPt.x = pt.x; shortPt.y = pt.y; diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index 75e63a242f..a7cae8ed75 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -139,7 +139,7 @@ static int ProtocolAck(WPARAM, LPARAM lParam) if (ack->type != ACKTYPE_STATUS) return 0; - CallService(MS_CLUI_PROTOCOLSTATUSCHANGED, ack->lParam, (LPARAM) ack->szModule); + cli.pfnCluiProtocolStatusChanged(lParam, ack->szModule); if ((int)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) { DWORD caps = (DWORD)CallProtoServiceInt(NULL,ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0); @@ -485,8 +485,6 @@ static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam) /***************************************************************************************/ -static INT_PTR TrayIconProcessMessageStub(WPARAM wParam, LPARAM lParam) { return cli.pfnTrayIconProcessMessage(wParam, lParam); } -static INT_PTR TrayIconPauseAutoHideStub(WPARAM wParam, LPARAM lParam) { return cli.pfnTrayIconPauseAutoHide(wParam, lParam); } static INT_PTR ShowHideStub(WPARAM wParam, LPARAM lParam) { return cli.pfnShowHide(wParam, lParam); } static INT_PTR SetHideOfflineStub(WPARAM wParam, LPARAM lParam) { return cli.pfnSetHideOffline(wParam, lParam); } static INT_PTR Docking_ProcessWindowMessageStub(WPARAM wParam, LPARAM lParam) { return cli.pfnDocking_ProcessWindowMessage(wParam, lParam); } @@ -511,8 +509,6 @@ int LoadContactListModule2(void) CreateServiceFunction(MS_CLIST_GETSTATUSMODEDESCRIPTION, GetStatusModeDescription); CreateServiceFunction(MS_CLIST_GETCONTACTDISPLAYNAME, GetContactDisplayName); CreateServiceFunction(MS_CLIST_INVALIDATEDISPLAYNAME, InvalidateDisplayName); - CreateServiceFunction(MS_CLIST_TRAYICONPROCESSMESSAGE, TrayIconProcessMessageStub); - CreateServiceFunction(MS_CLIST_PAUSEAUTOHIDE, TrayIconPauseAutoHideStub); CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE, CompareContacts); CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP, ContactChangeGroup); CreateServiceFunction(MS_CLIST_SHOWHIDE, ShowHideStub); diff --git a/src/modules/clist/cluiservices.cpp b/src/modules/clist/cluiservices.cpp index cc67c14954..1f50dfba8d 100644 --- a/src/modules/clist/cluiservices.cpp +++ b/src/modules/clist/cluiservices.cpp @@ -34,18 +34,6 @@ static INT_PTR GetHwndTree(WPARAM, LPARAM) return (INT_PTR)cli.hwndContactTree; } -static INT_PTR CluiProtocolStatusChanged(WPARAM wParam, LPARAM lParam) -{ - cli.pfnCluiProtocolStatusChanged(wParam, (const char*)lParam); - return 0; -} - -INT_PTR SortList(WPARAM, LPARAM) -{ - //unnecessary: CLC does this automatically - return 0; -} - static INT_PTR GroupAdded(WPARAM wParam, LPARAM lParam) { //CLC does this automatically unless it's a new group @@ -139,7 +127,6 @@ void LoadCluiServices(void) { CreateServiceFunction(MS_CLUI_GETHWND, GetHwnd); CreateServiceFunction(MS_CLUI_GETHWNDTREE, GetHwndTree); - CreateServiceFunction(MS_CLUI_PROTOCOLSTATUSCHANGED, CluiProtocolStatusChanged); CreateServiceFunction(MS_CLUI_GROUPADDED, GroupAdded); CreateServiceFunction(MS_CLUI_CONTACTSETICON, ContactSetIcon); CreateServiceFunction(MS_CLUI_CONTACTADDED, ContactAdded); @@ -147,7 +134,6 @@ void LoadCluiServices(void) CreateServiceFunction(MS_CLUI_CONTACTRENAMED, ContactRenamed); CreateServiceFunction(MS_CLUI_LISTBEGINREBUILD, ListBeginRebuild); CreateServiceFunction(MS_CLUI_LISTENDREBUILD, ListEndRebuild); - CreateServiceFunction(MS_CLUI_SORTLIST, SortList); CreateServiceFunction(MS_CLUI_GETCAPS, GetCaps); } diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp index 7671cd2b11..c7daba0d76 100644 --- a/src/modules/clist/contact.cpp +++ b/src/modules/clist/contact.cpp @@ -84,7 +84,6 @@ void fnLoadContactTree(void) } sortByStatus = db_get_b(NULL, "CList", "SortByStatus", SETTING_SORTBYSTATUS_DEFAULT); sortByProto = db_get_b(NULL, "CList", "SortByProto", SETTING_SORTBYPROTO_DEFAULT); - CallService(MS_CLUI_SORTLIST, 0, 0); CallService(MS_CLUI_LISTENDREBUILD, 0, 0); } @@ -138,7 +137,6 @@ static VOID CALLBACK SortContactsTimer(HWND, UINT, UINT_PTR, DWORD) { KillTimer(NULL, resortTimerId); resortTimerId = 0; - CallService(MS_CLUI_SORTLIST, 0, 0); } void fnSortContacts(void) -- cgit v1.2.3