diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-26 14:54:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-26 14:54:58 +0000 |
commit | 2105de2e1be94d18a1cb5dfd6afcc33a788bc640 (patch) | |
tree | b3685df860dc3fb265974d0cfb33ed9cabbcd36e | |
parent | 14b3e00732b7f8b23c3e194815a9a0d3a6f2723f (diff) |
R.I.P m_clui.h, you helped us alot
git-svn-id: http://svn.miranda-ng.org/main/trunk@16767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
91 files changed, 177 insertions, 460 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib Binary files differindex 859ed244b1..15b7818db2 100644 --- a/bin10/lib/mir_app.lib +++ b/bin10/lib/mir_app.lib diff --git a/bin10/lib/mir_app64.lib b/bin10/lib/mir_app64.lib Binary files differindex f09c732567..4ea9579bad 100644 --- a/bin10/lib/mir_app64.lib +++ b/bin10/lib/mir_app64.lib diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib Binary files differindex 859ed244b1..15b7818db2 100644 --- a/bin12/lib/mir_app.lib +++ b/bin12/lib/mir_app.lib diff --git a/bin12/lib/mir_app64.lib b/bin12/lib/mir_app64.lib Binary files differindex f09c732567..4ea9579bad 100644 --- a/bin12/lib/mir_app64.lib +++ b/bin12/lib/mir_app64.lib diff --git a/bin14/lib/mir_app.lib b/bin14/lib/mir_app.lib Binary files differindex 859ed244b1..15b7818db2 100644 --- a/bin14/lib/mir_app.lib +++ b/bin14/lib/mir_app.lib diff --git a/bin14/lib/mir_app64.lib b/bin14/lib/mir_app64.lib Binary files differindex f09c732567..4ea9579bad 100644 --- a/bin14/lib/mir_app64.lib +++ b/bin14/lib/mir_app64.lib diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas index 21c05d1ed9..f51f6e2ddd 100644 --- a/include/delphi/m_api.pas +++ b/include/delphi/m_api.pas @@ -197,7 +197,6 @@ var {$include m_chat.inc}
{$include m_clc.inc}
{$include m_clistint.inc}
- {$include m_clui.inc}
{$include m_cluiframes.inc}
{$include m_contacts.inc}
{$include m_crypto.inc}
diff --git a/include/delphi/m_clui.inc b/include/delphi/m_clui.inc deleted file mode 100644 index bb7bd26f7b..0000000000 --- a/include/delphi/m_clui.inc +++ /dev/null @@ -1,101 +0,0 @@ -{
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-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,
-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.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-}
-
-{$IFNDEF M_CLUI}
-{$DEFINE M_CLUI}
-
-{<</
- this header was created for use for v0.1.1.0, most of it's UI related
- stuff and you probably don't need to call it, see m_clist.inc instead.
- -- There are some functions that were implemented in v0.1.2.0 though
-/>>}
-
-const
- {
- wParam : Handle to a group
- lParam : 1 or 0
- Affect : A new group was created, add it to the list, see notes
- Notes : lParam is set to 1 or 0 if the user just created
- the group or not.
- -
- this is also called when the contact list is being rebuilt,
- new groups are always created with the name 'New group'
- }
- MS_CLUI_GROUPADDED:PAnsiChar = 'CLUI/GroupCreated';
-
- {
- wParam : 0
- lParam : 0
- Affect : Start a rebuild of the contact list, see notes
- Returns: 0 on success, [non zero] on failure
- Notes : this is the cue to clear the existing content of the list
- expect to get a series of :
-
- clui/groupadded
- clui/contactadded
- clui/resortlist
- }
- MS_CLUI_LISTBEGINREBUILD:PAnsiChar = 'CLUI/ListBeginRebuild';
-
- {
- wParam : 0
- lParam : 0
- Affect : End a rebuild of the contact list, see notes
- Returns: 0 on success, [non zero] on error
- Notes : if you dissplayed an hourglass in beginbuild, set it back
- here, you do not need to explicitly sort the list
- }
- MS_CLUI_LISTENDREBUILD:PAnsiChar = 'CLUI/ListEndRebuild';
-
- {
- wParam : TMCONTACT
- lParam : MAKELPARAM(screenX, screenY)
- Affect : A contact is being dragged outside the main window
- Return : return [non zero] to show the drag cursor as "accepting" the drag
- or zero to show the circle/slash 'not allowed'
- Version: v0.1.2.0+
- }
- ME_CLUI_CONTACTDRAGGING:PAnsiChar = 'CLUI/ContactDragging';
-
- {
- wParam : TMCONTACT
- lParam : MAKELPARAM(screenX, screenY)
- Affect : a contact has just been dropped outside the main window, see notes
- Notes : return non zero to stop other hooks processing this event.
- Version: v0.1.2.0+
- }
- ME_CLUI_CONTACTDROPPED:PAnsiChar = 'CLUI/ContactDropped';
-
- {
- wParam : TMCONTACT
- lParam : 0
- Affect : A contact that *was* being dragged outside the main window
- has gone back to the main window
- Return : always return 0
- Version: v0.1.2.1+
- }
- ME_CLUI_CONTACTDRAGSTOP:PAnsiChar = 'CLUI/ContactDragStop';
-
- // return TRUE if Clist Module Support Metacontacts
- ME_CLUI_METASUPPORT:PAnsiChar = 'CLUI/MetaContactSupport';
-
-{$ENDIF}
diff --git a/include/m_clist.h b/include/m_clist.h index b5ae118ca6..972485651e 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -354,6 +354,13 @@ EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupExists(LPCTSTR ptszGroupName); EXTERN_C MIR_APP_DLL(MGROUP) Clist_GroupCreate(MGROUP hParent, const TCHAR *ptszGroupName);
/////////////////////////////////////////////////////////////////////////////////////////
+// a new group was created. Add it to the list
+// this is also called when the contact list is being rebuilt
+// new groups are always created with the name "New Group"
+
+EXTERN_C MIR_APP_DLL(void) Clist_GroupAdded(MGROUP hGroup);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// deletes a group and calls CLUI to display the change
// returns 0 on success, nonzero on failure
@@ -411,6 +418,11 @@ EXTERN_C MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefo EXTERN_C MIR_APP_DLL(HMENU) Clist_GroupBuildMenu(void);
/////////////////////////////////////////////////////////////////////////////////////////
+// end a rebuild of the contact list
+
+EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// changes the 'hide offline contacts' flag and call CLUI
// wParam = newValue
// lParam = 0
@@ -452,6 +464,29 @@ EXTERN_C MIR_APP_DLL(HMENU) Clist_GroupBuildMenu(void); #define MS_CLIST_CONTACTSCOMPARE "CList/ContactsCompare"
/////////////////////////////////////////////////////////////////////////////////////////
+// DRAG-N-DROP SUPPORT
+/////////////////////////////////////////////////////////////////////////////////////////
+// a contact is being dragged outside the main window
+// wParam = (MCONTACT)hContact
+// lParam = MAKELPARAM(screenX, screenY)
+// return nonzero to make the cursor a 'can drop here', or zero for 'no'
+#define ME_CLUI_CONTACTDRAGGING "CLUI/ContactDragging"
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// a contact has just been dropped outside the main window
+// wParam = (MCONTACT)hContact
+// lParam = MAKELPARAM(screenX, screenY)
+// return nonzero if your hook processed this, so no other hooks get it
+#define ME_CLUI_CONTACTDROPPED "CLUI/ContactDropped"
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// a contact that was being dragged outside the main window has gone back in to the main window.
+// wParam = (MCONTACT)hContact
+// lParam = 0
+// always returns zero
+#define ME_CLUI_CONTACTDRAGSTOP "CLUI/ContactDragStop"
+
+/////////////////////////////////////////////////////////////////////////////////////////
// wParam = 0 (not used)
// lParam = (LPARAM) &MIRANDASYSTRAYNOTIFY
//
diff --git a/include/m_clui.h b/include/m_clui.h deleted file mode 100644 index abf2d48a78..0000000000 --- a/include/m_clui.h +++ /dev/null @@ -1,75 +0,0 @@ -/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (ñ) 2012-16 Miranda NG project (http://miranda-ng.org)
-Copyright (c) 2000-08 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-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,
-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.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CLUI_H__
-#define M_CLUI_H__ 1
-
-//a new group was created. Add it to the list
-//wParam = (WPARAM)(HANDLE)hGroup
-//lParam = newGroup
-//returns 0 on success, nonzero on failure
-//newGroup is set to 1 if the user just created the group, and 0 otherwise
-//this is also called when the contact list is being rebuilt
-//new groups are always created with the name "New Group"
-#define MS_CLUI_GROUPADDED "CLUI/GroupCreated"
-
-//start a rebuild of the contact list
-//wParam = lParam = 0
-//returns 0 on success, nonzero on failure
-//this is the cue to clear the existing contents of the list
-//expect to get a series of clui/groupadded calls followed by a series of
-//clui/contactadded calls, then a clui/resortlist
-#define MS_CLUI_LISTBEGINREBUILD "CLUI/ListBeginRebuild"
-
-//end a rebuild of the contact list
-//wParam = lParam = 0
-//returns 0 on success, nonzero on failure
-//if you displayed an hourglass in beginrebuild, set it back here
-//you do not need to explicitly sort the list
-#define MS_CLUI_LISTENDREBUILD "CLUI/ListEndRebuild"
-
-//a contact is being dragged outside the main window v0.1.2.0+
-//wParam = (MCONTACT)hContact
-//lParam = MAKELPARAM(screenX, screenY)
-//return nonzero to make the cursor a 'can drop here', or zero for 'no'
-#define ME_CLUI_CONTACTDRAGGING "CLUI/ContactDragging"
-
-//a contact has just been dropped outside the main window v0.1.2.0+
-//wParam = (MCONTACT)hContact
-//lParam = MAKELPARAM(screenX, screenY)
-//return nonzero if your hook processed this, so no other hooks get it
-#define ME_CLUI_CONTACTDROPPED "CLUI/ContactDropped"
-
-//a contact that was being dragged outside the main window has gone back in to
-//the main window. v0.1.2.1+
-//wParam = (MCONTACT)hContact
-//lParam = 0
-//return zero
-#define ME_CLUI_CONTACTDRAGSTOP "CLUI/ContactDragStop"
-
-// return TRUE if Clist Module Support Metacontacts
-#define MS_CLUI_METASUPPORT "CLUI/MetaContactSupport"
-
-
-#endif // M_CLUI_H__
diff --git a/plugins/AdvaImg/src/main.cpp b/plugins/AdvaImg/src/main.cpp index 87340ddd2c..b9be9dcb58 100644 --- a/plugins/AdvaImg/src/main.cpp +++ b/plugins/AdvaImg/src/main.cpp @@ -28,8 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <commdlg.h>
#include <malloc.h>
-#include <m_clui.h>
-
#include <m_imgsrvc.h>
#include "newpluginapi.h"
diff --git a/plugins/Alarms/src/stdafx.h b/plugins/Alarms/src/stdafx.h index 8e000393b4..ade5b17c78 100644 --- a/plugins/Alarms/src/stdafx.h +++ b/plugins/Alarms/src/stdafx.h @@ -16,7 +16,6 @@ #include <m_popup.h>
#include <m_clist.h>
#include <m_idle.h>
-#include <m_clui.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
#include <m_icolib.h>
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h index 2bff3bea17..be9415d830 100644 --- a/plugins/AutoShutdown/src/stdafx.h +++ b/plugins/AutoShutdown/src/stdafx.h @@ -42,7 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_database.h>
-#include <m_clui.h>
#include <m_langpack.h>
#include <m_skin.h>
#include <m_protosvc.h>
diff --git a/plugins/BASS_interface/src/stdafx.h b/plugins/BASS_interface/src/stdafx.h index 93059bd003..f09b58d36c 100644 --- a/plugins/BASS_interface/src/stdafx.h +++ b/plugins/BASS_interface/src/stdafx.h @@ -12,7 +12,6 @@ Copyright (C) 2010, 2011 tico-tico #include <m_database.h>
#include <m_options.h>
#include <win2k.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
diff --git a/plugins/Clist_blind/src/stdafx.h b/plugins/Clist_blind/src/stdafx.h index 1d3c397236..a908c1c97d 100644 --- a/plugins/Clist_blind/src/stdafx.h +++ b/plugins/Clist_blind/src/stdafx.h @@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_options.h>
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp index 6801632ee6..61c606bd4c 100644 --- a/plugins/Clist_modern/src/groupmenu.cpp +++ b/plugins/Clist_modern/src/groupmenu.cpp @@ -22,7 +22,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "stdafx.h"
-#include "m_clui.h"
#include "modern_clist.h"
#include "modern_clc.h"
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 30be3a17a7..a4183bc8f2 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -53,13 +53,6 @@ static ClcContact *hitcontact = NULL; HANDLE hSkinFolder;
TCHAR SkinsFolder[MAX_PATH];
-static int clcHookSmileyAddOptionsChanged(WPARAM wParam, LPARAM lParam);
-static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam);
-static int clcHookBkgndConfigChanged(WPARAM wParam, LPARAM lParam);
-static int clcProceedDragToScroll(HWND hwnd, int Y);
-static int clcExitDragToScroll();
-
-
int ReloadSkinFolder(WPARAM, LPARAM)
{
FoldersGetCustomPathT(hSkinFolder, SkinsFolder, _countof(SkinsFolder), _T(DEFAULT_SKIN_FOLDER));
@@ -205,19 +198,16 @@ static int clcExitDragToScroll() static int clcProceedDragToScroll(HWND hwnd, int Y)
{
- int pos, dy;
if (!IsDragToScrollMode) return 0;
if (GetCapture() != hwnd) clcExitDragToScroll();
- dy = StartDragPos - Y;
- pos = StartScrollPos + dy;
+ int dy = StartDragPos - Y;
+ int pos = StartScrollPos + dy;
if (pos < 0)
pos = 0;
SendMessage(hwnd, WM_VSCROLL, MAKEWPARAM(SB_THUMBTRACK, pos), 0);
return 1;
}
-
-
static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const TCHAR *text, int prefixOk, BOOL fSearchUp)
{
ClcGroup *group = &dat->list;
@@ -418,6 +408,7 @@ static LRESULT clcOnChar(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARA }
return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
}
+
static LRESULT clcOnPaint(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (IsWindowVisible(hwnd)) {
@@ -638,14 +629,14 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
case TIMERID_INVALIDATE:
- {
- time_t cur_time = (time(NULL) / 60);
- if (cur_time != dat->last_tick_time) {
- CLUI__cliInvalidateRect(hwnd, NULL, FALSE);
- dat->last_tick_time = cur_time;
+ {
+ time_t cur_time = (time(NULL) / 60);
+ if (cur_time != dat->last_tick_time) {
+ CLUI__cliInvalidateRect(hwnd, NULL, FALSE);
+ dat->last_tick_time = cur_time;
+ }
}
- }
- return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
+ return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
case TIMERID_SUBEXPAND:
KillTimer(hwnd, TIMERID_SUBEXPAND);
@@ -691,7 +682,6 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR }
}
-
static LRESULT clcOnActivate(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
TRACE("clcOnActivate\n");
@@ -751,6 +741,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP int hit = cliHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, &group, &hitFlags);
if (GetFocus() != hwnd)
SetFocus(hwnd);
+
if (hit != -1 && !(hitFlags & CLCHT_NOWHERE)) {
if (hit == dat->selection && hitFlags & CLCHT_ONITEMLABEL && dat->exStyle & CLS_EX_EDITLABELS) {
if (!(dat->dragStage & DRAGSTAGEF_SKIPRENAME)) {
@@ -1600,8 +1591,8 @@ static int clcHookModulesLoaded(WPARAM, LPARAM) if (!ServiceExists(MS_AV_GETAVATARBITMAP))
MessageBox(NULL,
- TranslateT("Clist Modern requires AVS plugin to be present. Install it using PluginUpdater or download from http://wiki.miranda-ng.org/Download"),
- TranslateT("Error loading plugin"), MB_ICONERROR | MB_OK);
+ TranslateT("Clist Modern requires AVS plugin to be present. Install it using PluginUpdater or download from http://wiki.miranda-ng.org/Download"),
+ TranslateT("Error loading plugin"), MB_ICONERROR | MB_OK);
HookEvent(ME_AV_AVATARCHANGED, clcHookAvatarChanged);
@@ -1802,8 +1793,7 @@ int ClcEnterDragToScroll(HWND hwnd, int Y) */
LRESULT CALLBACK cli_ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
-
-#define CASE_MSG_RET(msg, handler) case msg: return handler(dat, hwnd, msg, wParam, lParam);
+ #define CASE_MSG_RET(msg, handler) case msg: return handler(dat, hwnd, msg, wParam, lParam);
ClcData *dat = (ClcData*)GetWindowLongPtr(hwnd, 0);
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 78bd96b475..bca83d69db 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "stdafx.h"
-#include "m_clui.h"
#include "modern_clist.h"
#include "modern_commonprototypes.h"
#include "modern_clcpaint.h"
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index a0dc3834c5..027da4c262 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
#include "modern_clist.h"
#include "m_genmenu.h"
-#include "m_clui.h"
#include "modern_commonprototypes.h"
int LoadFavoriteContactMenu();
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 2a8c81e727..29dcd0b5de 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "stdafx.h"
-#include "m_clui.h"
#include "modern_clist.h"
#include "modern_commonprototypes.h"
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index d03ff525b9..3b713f0f01 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "stdafx.h"
-#include <m_clui.h>
#include "modern_clist.h"
#include "modern_commonprototypes.h"
#include "modern_statusbar.h"
diff --git a/plugins/Clist_modern/src/modern_cluiservices.cpp b/plugins/Clist_modern/src/modern_cluiservices.cpp index 32507cc395..e43ede7807 100644 --- a/plugins/Clist_modern/src/modern_cluiservices.cpp +++ b/plugins/Clist_modern/src/modern_cluiservices.cpp @@ -40,14 +40,8 @@ void cliCluiProtocolStatusChanged(int, const char * proto) pcli->pfnTrayIconUpdateBase(proto);
}
-static INT_PTR MetaSupportCheck(WPARAM, LPARAM)
-{
- return 1;
-}
-
int CLUIServices_LoadModule(void)
{
- CreateServiceFunction(MS_CLUI_METASUPPORT, MetaSupportCheck);
CreateServiceFunction(MS_CLIST_GETSTATUSMODE, CListTray_GetGlobalStatus);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 3260689079..24cdcb0a96 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "stdafx.h"
-#include "m_clui.h"
#include "modern_clist.h"
#include "modern_commonprototypes.h"
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index a726afc1a6..a48543b1b1 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -1216,8 +1216,6 @@ void CreateViewModeFrame() ApplyViewMode(NULL); //Apply last selected view mode
}
-const char *MakeVariablesString(const char *src, const char *UIN);
-
void ApplyViewMode(const char *Name, bool onlySelector)
{
char szSetting[256];
diff --git a/plugins/Clist_nicer/src/clist.h b/plugins/Clist_nicer/src/clist.h index d1a4e93d6b..89462cbc5f 100644 --- a/plugins/Clist_nicer/src/clist.h +++ b/plugins/Clist_nicer/src/clist.h @@ -22,7 +22,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-void LoadContactTree(void);
int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON *phIcon);
HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
void SortContacts(void);
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 0e41b66e01..9496f8b98b 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -24,9 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-void LoadContactTree(void);
-void SortContacts(void);
-
static int opt_gen_opts_changed = 0;
static void __setFlag(DWORD dwFlag, int iMode)
@@ -179,7 +176,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP HideShowNotifyFrame();
SendMessage(pcli->hwndContactTree, WM_SIZE, 0, 0);
SendMessage(pcli->hwndContactList, WM_SIZE, 0, 0);
- LoadContactTree(); /* this won't do job properly since it only really works when changes happen */
+ pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
PostMessage(pcli->hwndContactList, CLUIINTM_REDRAW, 0, 0);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 0aff338a8a..4da1543aff 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -66,6 +66,7 @@ extern LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPA extern HANDLE hNotifyFrame; int LoadCluiServices(void); +void MF_InitCheck(void);
void InitGroupMenus(); void FS_RegisterFonts(); void LoadExtraIconModule(); @@ -1951,6 +1952,8 @@ void LoadCLUIModule(void) TranslateT("Warning"), MB_OK | MB_ICONWARNING); db_unset(NULL, "CLUI", "FloaterMode"); } + + MF_InitCheck(); } void OnCreateClc() diff --git a/plugins/Clist_nicer/src/cluiopts.cpp b/plugins/Clist_nicer/src/cluiopts.cpp index 3e2b638ab7..5a1ed61b96 100644 --- a/plugins/Clist_nicer/src/cluiopts.cpp +++ b/plugins/Clist_nicer/src/cluiopts.cpp @@ -24,9 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-extern HANDLE hExtraImageApplying;
-extern SIZE g_oldSize;
-extern POINT g_oldPos;
extern COLORREF g_CLUISkinnedBkColorRGB;
static int opt_clui_changed = 0;
@@ -37,85 +34,82 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l {
switch (msg) {
case WM_INITDIALOG:
- {
- opt_clui_changed = 0;
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, cfg::getByte("CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ALWAYSHIDEONTASKBAR, cfg::getByte("CList", "AlwaysHideOnTB", 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONTOP, cfg::getByte("CList", "OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, cfg::getByte("CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, cfg::getByte("CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_FADEINOUT, cfg::dat.fadeinout ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOSIZE, cfg::dat.autosize ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_DROPSHADOW, cfg::getByte("CList", "WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONDESKTOP, cfg::getByte("CList", "OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
-
- SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Title bar"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Tool Window"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Thin border"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("No border"));
- SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_SETCURSEL, cfg::getByte("CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW), 0);
-
- SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
- SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, cfg::getByte("CLUI", "MaxSizeHeight", 75));
-
- SendDlgItemMessage(hwndDlg, IDC_CLIPBORDERSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
- SendDlgItemMessage(hwndDlg, IDC_CLIPBORDERSPIN, UDM_SETPOS, 0, cfg::dat.bClipBorder);
-
- SendDlgItemMessage(hwndDlg, IDC_CLEFTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
- SendDlgItemMessage(hwndDlg, IDC_CRIGHTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
- SendDlgItemMessage(hwndDlg, IDC_CTOPSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
- SendDlgItemMessage(hwndDlg, IDC_CBOTTOMSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
-
- SendDlgItemMessage(hwndDlg, IDC_CLEFTSPIN, UDM_SETPOS, 0, cfg::dat.bCLeft - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0));
- SendDlgItemMessage(hwndDlg, IDC_CRIGHTSPIN, UDM_SETPOS, 0, cfg::dat.bCRight - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0));
- SendDlgItemMessage(hwndDlg, IDC_CTOPSPIN, UDM_SETPOS, 0, cfg::dat.bCTop);
- SendDlgItemMessage(hwndDlg, IDC_CBOTTOMSPIN, UDM_SETPOS, 0, cfg::dat.bCBottom);
-
- CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, cfg::getByte("CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOHIDE, cfg::getByte("CList", "AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
- SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(cfg::getWord("CList", "HideTime", SETTING_HIDETIME_DEFAULT), 0));
- Utils::enableDlgControl(hwndDlg, IDC_HIDETIME, IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- Utils::enableDlgControl(hwndDlg, IDC_HIDETIMESPIN, IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- Utils::enableDlgControl(hwndDlg, IDC_STATIC01, IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE)) {
- Utils::enableDlgControl(hwndDlg, IDC_STATIC21, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_STATIC22, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_MAXSIZEHEIGHT, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_MAXSIZESPIN, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_AUTOSIZEUPWARD, FALSE);
- } {
- DBVARIANT dbv;
- if (!cfg::getTString(NULL, "CList", "TitleText", &dbv)) {
- SetDlgItemText(hwndDlg, IDC_TITLETEXT, dbv.ptszVal);
- db_free(&dbv);
- }
- else
- SetDlgItemTextA(hwndDlg, IDC_TITLETEXT, MIRANDANAME);
- }
-
- CheckDlgButton(hwndDlg, IDC_TRANSPARENT, cfg::dat.isTransparent ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_FULLTRANSPARENT, cfg::dat.bFullTransparent ? BST_CHECKED : BST_UNCHECKED);
+ TranslateDialogDefault(hwndDlg);
- if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
- Utils::enableDlgControl(hwndDlg, IDC_STATIC11, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_STATIC12, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_TRANSACTIVE, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_TRANSINACTIVE, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_ACTIVEPERC, FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_INACTIVEPERC, FALSE);
- }
- SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
- SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
- SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, cfg::dat.alpha);
- SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, cfg::dat.autoalpha);
- SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
-
- CheckDlgButton(hwndDlg, IDC_ROUNDEDBORDER, cfg::dat.dwFlags & CLUI_FRAME_ROUNDEDFRAME ? BST_CHECKED : BST_UNCHECKED);
- SendDlgItemMessage(hwndDlg, IDC_FRAMEGAPSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
- SendDlgItemMessage(hwndDlg, IDC_FRAMEGAPSPIN, UDM_SETPOS, 0, (LPARAM)cfg::dat.gapBetweenFrames);
+ opt_clui_changed = 0;
+ CheckDlgButton(hwndDlg, IDC_BRINGTOFRONT, cfg::getByte("CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ALWAYSHIDEONTASKBAR, cfg::getByte("CList", "AlwaysHideOnTB", 1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONTOP, cfg::getByte("CList", "OnTop", SETTING_ONTOP_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWMAINMENU, cfg::getByte("CLUI", "ShowMainMenu", SETTING_SHOWMAINMENU_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CLIENTDRAG, cfg::getByte("CLUI", "ClientAreaDrag", SETTING_CLIENTDRAG_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FADEINOUT, cfg::dat.fadeinout ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZE, cfg::dat.autosize ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_DROPSHADOW, cfg::getByte("CList", "WindowShadow", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_ONDESKTOP, cfg::getByte("CList", "OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
+
+ SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Title bar"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Tool Window"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("Thin border"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_INSERTSTRING, -1, (LPARAM)TranslateT("No border"));
+ SendDlgItemMessage(hwndDlg, IDC_BORDERSTYLE, CB_SETCURSEL, cfg::getByte("CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW), 0);
+
+ SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETRANGE, 0, MAKELONG(100, 0));
+ SendDlgItemMessage(hwndDlg, IDC_MAXSIZESPIN, UDM_SETPOS, 0, cfg::getByte("CLUI", "MaxSizeHeight", 75));
+
+ SendDlgItemMessage(hwndDlg, IDC_CLIPBORDERSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
+ SendDlgItemMessage(hwndDlg, IDC_CLIPBORDERSPIN, UDM_SETPOS, 0, cfg::dat.bClipBorder);
+
+ SendDlgItemMessage(hwndDlg, IDC_CLEFTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
+ SendDlgItemMessage(hwndDlg, IDC_CRIGHTSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
+ SendDlgItemMessage(hwndDlg, IDC_CTOPSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
+ SendDlgItemMessage(hwndDlg, IDC_CBOTTOMSPIN, UDM_SETRANGE, 0, MAKELONG(255, 0));
+
+ SendDlgItemMessage(hwndDlg, IDC_CLEFTSPIN, UDM_SETPOS, 0, cfg::dat.bCLeft - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0));
+ SendDlgItemMessage(hwndDlg, IDC_CRIGHTSPIN, UDM_SETPOS, 0, cfg::dat.bCRight - (cfg::dat.dwFlags & CLUI_FRAME_CLISTSUNKEN ? 3 : 0));
+ SendDlgItemMessage(hwndDlg, IDC_CTOPSPIN, UDM_SETPOS, 0, cfg::dat.bCTop);
+ SendDlgItemMessage(hwndDlg, IDC_CBOTTOMSPIN, UDM_SETPOS, 0, cfg::dat.bCBottom);
+
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZEUPWARD, cfg::getByte("CLUI", "AutoSizeUpward", 0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOHIDE, cfg::getByte("CList", "AutoHide", SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETRANGE, 0, MAKELONG(900, 1));
+ SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_SETPOS, 0, MAKELONG(cfg::getWord("CList", "HideTime", SETTING_HIDETIME_DEFAULT), 0));
+ Utils::enableDlgControl(hwndDlg, IDC_HIDETIME, IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ Utils::enableDlgControl(hwndDlg, IDC_HIDETIMESPIN, IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ Utils::enableDlgControl(hwndDlg, IDC_STATIC01, IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
+ if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE)) {
+ Utils::enableDlgControl(hwndDlg, IDC_STATIC21, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_STATIC22, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_MAXSIZEHEIGHT, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_MAXSIZESPIN, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_AUTOSIZEUPWARD, FALSE);
+ }
+ {
+ ptrT tszTitle(db_get_tsa(NULL, "CList", "TitleText"));
+ if (tszTitle != NULL)
+ SetDlgItemText(hwndDlg, IDC_TITLETEXT, tszTitle);
+ else
+ SetDlgItemTextA(hwndDlg, IDC_TITLETEXT, MIRANDANAME);
+ }
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, cfg::dat.isTransparent ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FULLTRANSPARENT, cfg::dat.bFullTransparent ? BST_CHECKED : BST_UNCHECKED);
+
+ if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
+ Utils::enableDlgControl(hwndDlg, IDC_STATIC11, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_STATIC12, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_TRANSACTIVE, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_TRANSINACTIVE, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_ACTIVEPERC, FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_INACTIVEPERC, FALSE);
}
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETRANGE, FALSE, MAKELONG(1, 255));
+ SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_SETPOS, TRUE, cfg::dat.alpha);
+ SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_SETPOS, TRUE, cfg::dat.autoalpha);
+ SendMessage(hwndDlg, WM_HSCROLL, 0x12345678, 0);
+
+ CheckDlgButton(hwndDlg, IDC_ROUNDEDBORDER, cfg::dat.dwFlags & CLUI_FRAME_ROUNDEDFRAME ? BST_CHECKED : BST_UNCHECKED);
+ SendDlgItemMessage(hwndDlg, IDC_FRAMEGAPSPIN, UDM_SETRANGE, 0, MAKELONG(10, 0));
+ SendDlgItemMessage(hwndDlg, IDC_FRAMEGAPSPIN, UDM_SETPOS, 0, (LPARAM)cfg::dat.gapBetweenFrames);
return TRUE;
case WM_COMMAND:
@@ -239,12 +233,11 @@ INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l else
SetMenu(pcli->hwndContactList, pcli->hMenuMain);
- {
- TCHAR title[256];
- GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
- cfg::writeTString(NULL, "CList", "TitleText", title);
- SetWindowText(pcli->hwndContactList, title);
- }
+ TCHAR title[256];
+ GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
+ cfg::writeTString(NULL, "CList", "TitleText", title);
+ SetWindowText(pcli->hwndContactList, title);
+
cfg::dat.dwFlags = IsDlgButtonChecked(hwndDlg, IDC_ROUNDEDBORDER) ? cfg::dat.dwFlags | CLUI_FRAME_ROUNDEDFRAME : cfg::dat.dwFlags & ~CLUI_FRAME_ROUNDEDFRAME;
cfg::writeByte("CLUI", "AutoSize", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZE));
@@ -348,6 +341,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l Utils::enableDlgControl(hwndDlg, IDC_SKINBACKGROUND, FALSE);
}
return TRUE;
+
case WM_COMMAND:
if (LOWORD(wParam) == IDC_SHOWSBAR) {
Utils::enableDlgControl(hwndDlg, IDC_SHOWICON, IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR));
@@ -363,6 +357,7 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
opt_sbar_changed = 1;
break;
+
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 26dc01f498..382ae75e70 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -124,31 +124,14 @@ void MF_UpdateThread(LPVOID) CloseHandle(hEvent);
}
-void LoadContactTree(void)
+void MF_InitCheck(void)
{
- int i, status, hideOffline;
BYTE bMsgFrequency = cfg::getByte("CList", "fhistdata", 0);
-
- CallService(MS_CLUI_LISTBEGINREBUILD, 0, 0);
- for (i = 1;; i++) {
- if (Clist_GroupGetName(i, NULL) == NULL)
- break;
- CallService(MS_CLUI_GROUPADDED, i, 0);
- }
-
- hideOffline = cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
-
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- status = GetContactStatus(hContact);
- if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL))
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL));
-
- // build initial data for message frequency
- if (!bMsgFrequency)
+ if (!bMsgFrequency) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
MF_CalcFrequency(hContact, 100, 0);
+ cfg::writeByte("CList", "fhistdata", 1);
}
- cfg::writeByte("CList", "fhistdata", 1);
- CallService(MS_CLUI_LISTENDREBUILD, 0, 0);
}
DWORD INTSORT_GetLastMsgTime(MCONTACT hContact)
@@ -281,6 +264,6 @@ int SetHideOffline(WPARAM wParam, LPARAM) }
SetButtonStates();
ClcSetButtonState(IDC_TBHIDEOFFLINE, newVal);
- LoadContactTree();
+ pcli->pfnLoadContactTree();
return 0;
}
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index ece4a96e3f..218a20d758 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -198,7 +198,6 @@ extern "C" int __declspec(dllexport) CListInitialise() pcli->pfnGetRowTotalHeight = RowHeight::getTotalHeight;
pcli->pfnGetWindowVisibleState = GetWindowVisibleState;
pcli->pfnHitTest = HitTest;
- pcli->pfnLoadContactTree = LoadContactTree;
pcli->pfnOnCreateClc = OnCreateClc;
pcli->pfnPaintClc = PaintClc;
pcli->pfnRebuildEntireList = RebuildEntireList;
diff --git a/plugins/Clist_nicer/src/stdafx.h b/plugins/Clist_nicer/src/stdafx.h index 6f792be800..48091ba4eb 100644 --- a/plugins/Clist_nicer/src/stdafx.h +++ b/plugins/Clist_nicer/src/stdafx.h @@ -50,7 +50,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_addcontact.h>
#include <m_timezones.h>
#include <m_cluiframes.h>
-#include <m_clui.h>
#include <m_icolib.h>
#include <m_fontservice.h>
#include <m_xstatus.h>
diff --git a/plugins/CmdLine/src/stdafx.h b/plugins/CmdLine/src/stdafx.h index 2394d55fa8..527f179566 100644 --- a/plugins/CmdLine/src/stdafx.h +++ b/plugins/CmdLine/src/stdafx.h @@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_database.h"
#include "m_clist.h"
#include "m_clistint.h"
-#include "m_clui.h"
#include "m_contacts.h"
#include "m_langpack.h"
#include "m_protosvc.h"
diff --git a/plugins/ContactsPlus/src/stdafx.h b/plugins/ContactsPlus/src/stdafx.h index a6e99bc3d6..1e8a725838 100644 --- a/plugins/ContactsPlus/src/stdafx.h +++ b/plugins/ContactsPlus/src/stdafx.h @@ -35,7 +35,6 @@ #include "m_clist.h"
#include "m_clistint.h"
#include "m_clc.h"
-#include "m_clui.h"
#include "m_addcontact.h"
#include "m_history.h"
#include "m_userinfo.h"
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index a9f5d33b7f..26e42a773b 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -361,7 +361,6 @@ void importSettings(MCONTACT hContact, char *utf8) continue;
MGROUP GroupHandle = Clist_GroupCreate(0, GroupName);
- CallService(MS_CLUI_GROUPADDED, GroupHandle, 0);
Clist_GroupSetExpanded(GroupHandle, true);
}
diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h index cc345714a5..7049c908e4 100644 --- a/plugins/DbEditorPP/src/stdafx.h +++ b/plugins/DbEditorPP/src/stdafx.h @@ -21,7 +21,6 @@ #include <newpluginapi.h>
#include <m_utils.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_skin.h>
#include <m_langpack.h>
#include <m_database.h>
diff --git a/plugins/ExternalAPI/m_skin_eng.h b/plugins/ExternalAPI/m_skin_eng.h index b80b02e319..a1b8b6cf55 100644 --- a/plugins/ExternalAPI/m_skin_eng.h +++ b/plugins/ExternalAPI/m_skin_eng.h @@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_ske_H_INC
#define M_ske_H_INC
-#include <m_clui.h>
#include <m_clistint.h>
/*defaults*/
diff --git a/plugins/FloatingContacts/src/stdafx.h b/plugins/FloatingContacts/src/stdafx.h index fbad88c334..af3decec3f 100644 --- a/plugins/FloatingContacts/src/stdafx.h +++ b/plugins/FloatingContacts/src/stdafx.h @@ -15,7 +15,6 @@ #include <m_protosvc.h>
#include <m_database.h>
#include <m_message.h>
-#include <m_clui.h>
#include <m_options.h>
#include <m_clist.h>
#include <m_hotkeys.h>
diff --git a/plugins/GmailNotifier/src/stdafx.h b/plugins/GmailNotifier/src/stdafx.h index ef1e8bc67b..10623f9466 100644 --- a/plugins/GmailNotifier/src/stdafx.h +++ b/plugins/GmailNotifier/src/stdafx.h @@ -6,7 +6,6 @@ #include "newpluginapi.h"
#include "m_clist.h"
-#include "m_clui.h"
#include "m_skin.h"
#include "m_langpack.h"
#include "m_database.h"
diff --git a/plugins/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h index 2b5fe8e8c3..2b22af38a9 100644 --- a/plugins/HTTPServer/src/Glob.h +++ b/plugins/HTTPServer/src/Glob.h @@ -32,7 +32,6 @@ using namespace std; #include <m_database.h>
#include <m_clist.h>
#include <m_langpack.h>
-#include <m_clui.h>
#include <m_userinfo.h>
#include <m_netlib.h>
#include <m_message.h>
diff --git a/plugins/HistoryPlusPlus/GlobalSearch.pas b/plugins/HistoryPlusPlus/GlobalSearch.pas index 5454de3ffe..a868423ead 100644 --- a/plugins/HistoryPlusPlus/GlobalSearch.pas +++ b/plugins/HistoryPlusPlus/GlobalSearch.pas @@ -530,11 +530,9 @@ begin else
begin
li.Caption := LastAddedContact.Name;
- // li.Caption := CurContactName;
Inc(ContactsFound);
end;
- li.ImageIndex := CallService(MS_CLIST_GETCONTACTICON, CurContact, 0);
- // meTest.Lines.Add(CurContactName+' icon is '+IntToStr(CallService(MS_CLIST_GETCONTACTICON,CurContact,0)));
+ li.ImageIndex := cli^.pfnGetContactIcon(CurContact);
li.Data := Pointer(CurContact);
end;
diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h index 6533dd30e7..8646a67c1e 100644 --- a/plugins/HistoryStats/src/stdafx.h +++ b/plugins/HistoryStats/src/stdafx.h @@ -39,7 +39,6 @@ #include <m_chat.h> // not used
#include <m_clc.h>
#include <m_clist.h>
-#include <m_clui.h> // not used
#include <m_contacts.h>
#include <m_database.h>
#include <m_email.h> // not used
diff --git a/plugins/ListeningTo/src/stdafx.h b/plugins/ListeningTo/src/stdafx.h index 27cd7a4c92..7a5bf4242f 100644 --- a/plugins/ListeningTo/src/stdafx.h +++ b/plugins/ListeningTo/src/stdafx.h @@ -36,7 +36,6 @@ Boston, MA 02111-1307, USA. #include <m_clist.h>
#include <m_options.h>
#include <m_xstatus.h>
-#include <m_clui.h>
#include <m_genmenu.h>
#include <m_hotkeys.h>
#include <m_extraicons.h>
diff --git a/plugins/MenuItemEx/src/stdafx.h b/plugins/MenuItemEx/src/stdafx.h index cc23ddfb39..8f84e9a5ee 100644 --- a/plugins/MenuItemEx/src/stdafx.h +++ b/plugins/MenuItemEx/src/stdafx.h @@ -13,7 +13,6 @@ #include <m_protosvc.h>
#include <m_langpack.h>
#include <m_file.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_ignore.h>
#include <m_icolib.h>
diff --git a/plugins/MirandaG15/src/StdAfx.h b/plugins/MirandaG15/src/StdAfx.h index e6df528c12..e1812a712d 100644 --- a/plugins/MirandaG15/src/StdAfx.h +++ b/plugins/MirandaG15/src/StdAfx.h @@ -26,7 +26,6 @@ using namespace std; #include <m_clist.h>
#include <m_protocols.h>
#include <m_skin.h>
-#include <m_clui.h>
#include <m_chat.h>
#include <m_idle.h>
#include <m_metacontacts.h>
diff --git a/plugins/MyDetails/src/stdafx.h b/plugins/MyDetails/src/stdafx.h index ca0b47d830..a425f1945b 100644 --- a/plugins/MyDetails/src/stdafx.h +++ b/plugins/MyDetails/src/stdafx.h @@ -33,7 +33,6 @@ Boston, MA 02111-1307, USA. #include <m_langpack.h>
#include <m_contacts.h>
#include <m_options.h>
-#include <m_clui.h>
#include <m_fontservice.h>
#include <m_avatars.h>
#include <m_xstatus.h>
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp index 4cb37750c5..d003b7da23 100644 --- a/plugins/New_GPG/src/icons.cpp +++ b/plugins/New_GPG/src/icons.cpp @@ -68,13 +68,10 @@ void setSrmmIcon(MCONTACT h) Srmm_ModifyIcon(hMC, &sid);
}
-
void RefreshContactListIcons()
{
- CallService(MS_CLUI_LISTBEGINREBUILD,0,0);
-
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
setClistIcon(hContact);
- CallService(MS_CLUI_LISTENDREBUILD,0,0);
+ Clist_EndRebuild();
}
diff --git a/plugins/New_GPG/src/stdafx.h b/plugins/New_GPG/src/stdafx.h index eb5e6ba6a3..2e8ad39177 100644 --- a/plugins/New_GPG/src/stdafx.h +++ b/plugins/New_GPG/src/stdafx.h @@ -59,7 +59,6 @@ using std::fstream; #include <m_database.h> #include <m_options.h> #include <m_langpack.h> -#include <m_clui.h> #include <m_skin.h> #include <m_jabber.h> #include <m_icq.h> diff --git a/plugins/Non-IM Contact/src/stdafx.h b/plugins/Non-IM Contact/src/stdafx.h index 0c5cfc0992..dcacf5841c 100644 --- a/plugins/Non-IM Contact/src/stdafx.h +++ b/plugins/Non-IM Contact/src/stdafx.h @@ -32,7 +32,6 @@ struct DLGTEMPLATEEX #include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_skin.h>
#include <m_langpack.h>
#include <m_database.h>
diff --git a/plugins/Nudge/src/stdafx.h b/plugins/Nudge/src/stdafx.h index f12cc9839b..b56db035a0 100644 --- a/plugins/Nudge/src/stdafx.h +++ b/plugins/Nudge/src/stdafx.h @@ -11,7 +11,6 @@ #include <m_clist.h>
#include <m_langpack.h>
#include <m_popup.h>
-#include <m_clui.h>
#include <m_message.h>
#include <m_ignore.h>
#include <m_options.h>
diff --git a/plugins/Ping/src/stdafx.h b/plugins/Ping/src/stdafx.h index bfa39fbd0c..87cdeeaf15 100644 --- a/plugins/Ping/src/stdafx.h +++ b/plugins/Ping/src/stdafx.h @@ -18,7 +18,6 @@ #include <m_netlib.h>
#include <m_database.h>
#include <m_protosvc.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_cluiframes.h>
#include <m_fontservice.h>
diff --git a/plugins/Popup/src/stdafx.h b/plugins/Popup/src/stdafx.h index db8bbf6bee..bc6507a35f 100644 --- a/plugins/Popup/src/stdafx.h +++ b/plugins/Popup/src/stdafx.h @@ -62,7 +62,6 @@ http://miranda-ng.org/distr/ #include <newpluginapi.h>
#include <win2k.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_options.h>
#include <m_skin.h>
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h index fb97bf8bd3..2ba33197c8 100644 --- a/plugins/Scriver/src/stdafx.h +++ b/plugins/Scriver/src/stdafx.h @@ -45,7 +45,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_langpack.h>
#include <m_button.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_protosvc.h>
#include <m_skin.h>
#include <m_contacts.h>
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.h b/plugins/StatusPlugins/StartupStatus/startupstatus.h index 7088c7666c..f0cc1047a0 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.h +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.h @@ -23,7 +23,6 @@ #include <wininet.h>
#include <shlobj.h>
#include <m_options.h>
-#include <m_clui.h>
#include <m_toptoolbar.h>
#include "version.h"
diff --git a/plugins/TabSRMM/src/stdafx.h b/plugins/TabSRMM/src/stdafx.h index 2a638c2f18..bee1a8f4f2 100644 --- a/plugins/TabSRMM/src/stdafx.h +++ b/plugins/TabSRMM/src/stdafx.h @@ -60,7 +60,6 @@ #include <m_contacts.h>
#include <m_icolib.h>
#include <m_clc.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_userinfo.h>
#include <m_history.h>
diff --git a/plugins/TipperYM/src/stdafx.h b/plugins/TipperYM/src/stdafx.h index d2758550ad..b0bd0ad7df 100644 --- a/plugins/TipperYM/src/stdafx.h +++ b/plugins/TipperYM/src/stdafx.h @@ -32,7 +32,6 @@ Boston, MA 02111-1307, USA. #include <m_awaymsg.h>
#include <m_clist.h>
#include <m_clc.h>
-#include <m_clui.h>
#include <m_cluiframes.h>
#include <m_database.h>
#include <m_fontservice.h>
diff --git a/plugins/TooltipNotify/src/stdafx.h b/plugins/TooltipNotify/src/stdafx.h index d8c21992e6..f1a20e5546 100644 --- a/plugins/TooltipNotify/src/stdafx.h +++ b/plugins/TooltipNotify/src/stdafx.h @@ -15,7 +15,6 @@ #include <m_clist.h>
#include <m_skin.h>
#include <m_database.h>
-#include <m_clui.h>
#include <m_ignore.h>
#include <m_options.h>
#include <m_protosvc.h>
diff --git a/plugins/TopToolBar/src/stdafx.h b/plugins/TopToolBar/src/stdafx.h index 956053a9d2..85b32c1e60 100644 --- a/plugins/TopToolBar/src/stdafx.h +++ b/plugins/TopToolBar/src/stdafx.h @@ -11,7 +11,6 @@ #include <m_database.h>
#include <m_skin.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_cluiframes.h>
#include <m_clc.h>
#include <m_findadd.h>
diff --git a/plugins/TrafficCounter/src/stdafx.h b/plugins/TrafficCounter/src/stdafx.h index b8e8bb1618..abeb7badd6 100644 --- a/plugins/TrafficCounter/src/stdafx.h +++ b/plugins/TrafficCounter/src/stdafx.h @@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_netlib.h>
#include <m_langpack.h>
-#include <m_clui.h>
#include <m_clc.h>
#include <m_clist.h>
#include <m_options.h>
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 811ea09749..abc7596ccf 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
#include <Commdlg.h>
-#include <m_clui.h>
#include <m_skin.h>
typedef struct _MSGPOPUPDATA
diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h index 43675c5b5d..e6ce640603 100644 --- a/plugins/UserInfoEx/src/stdafx.h +++ b/plugins/UserInfoEx/src/stdafx.h @@ -50,7 +50,6 @@ using namespace std; #include <newpluginapi.h>
#include <m_button.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_database.h>
#include <m_hotkeys.h>
diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h index ef504b4e02..fba748c67e 100644 --- a/plugins/Variables/src/stdafx.h +++ b/plugins/Variables/src/stdafx.h @@ -39,7 +39,6 @@ #include <m_contacts.h>
#include <m_options.h>
#include <m_icolib.h>
-#include <m_clui.h>
#include <m_clc.h>
#include <m_string.h>
#include <m_metacontacts.h>
diff --git a/plugins/Weather/src/stdafx.h b/plugins/Weather/src/stdafx.h index 658894e12a..a6b155d5f5 100644 --- a/plugins/Weather/src/stdafx.h +++ b/plugins/Weather/src/stdafx.h @@ -45,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_findadd.h>
#include <m_button.h>
#include <m_avatars.h>
-#include <m_clui.h>
#include <m_clc.h>
#include <m_fontservice.h>
#include <m_skin_eng.h>
diff --git a/plugins/WebView/src/stdafx.h b/plugins/WebView/src/stdafx.h index e2c5a0a728..99f90ed9e6 100644 --- a/plugins/WebView/src/stdafx.h +++ b/plugins/WebView/src/stdafx.h @@ -17,7 +17,6 @@ #include <m_system.h>
#include <m_clist.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_database.h>
#include <m_protocols.h>
#include <m_protosvc.h>
@@ -27,7 +26,6 @@ #include <m_genmenu.h>
#include <m_icolib.h>
#include <m_options.h>
-#include <m_clui.h>
#include <m_popup.h>
#include <m_netlib.h>
#include <m_langpack.h>
diff --git a/plugins/YAPP/src/stdafx.h b/plugins/YAPP/src/stdafx.h index 26ec420cc1..f702b2b0e1 100644 --- a/plugins/YAPP/src/stdafx.h +++ b/plugins/YAPP/src/stdafx.h @@ -18,7 +18,6 @@ #include <m_langpack.h>
#include <m_options.h>
#include <m_skin.h>
-#include <m_clui.h>
#include <m_clist.h>
#include <m_fontservice.h>
#include <m_avatars.h>
diff --git a/plugins/ZeroSwitch/src/stdafx.h b/plugins/ZeroSwitch/src/stdafx.h index 2531d2596b..f5502963ee 100644 --- a/plugins/ZeroSwitch/src/stdafx.h +++ b/plugins/ZeroSwitch/src/stdafx.h @@ -10,7 +10,6 @@ #include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_skin.h>
#include <m_langpack.h>
diff --git a/plugins/helpers/commonheaders.h b/plugins/helpers/commonheaders.h index b7d7b74956..ea3062672d 100644 --- a/plugins/helpers/commonheaders.h +++ b/plugins/helpers/commonheaders.h @@ -38,7 +38,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_system.h>
#include <m_database.h>
#include <m_clc.h>
-#include <m_clui.h>
#include <m_langpack.h>
#include <m_clist.h>
#include <m_clistint.h>
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h index 9fb6394bf0..7a8d0978e2 100644 --- a/protocols/Gadu-Gadu/src/gg.h +++ b/protocols/Gadu-Gadu/src/gg.h @@ -59,7 +59,6 @@ #include <m_clist.h>
#include <m_options.h>
#include <m_userinfo.h>
-#include <m_clui.h>
#include <m_button.h>
#include <m_message.h>
#include <m_icolib.h>
diff --git a/protocols/IRCG/src/stdafx.h b/protocols/IRCG/src/stdafx.h index 850c2f44e1..bc450f78ac 100644 --- a/protocols/IRCG/src/stdafx.h +++ b/protocols/IRCG/src/stdafx.h @@ -53,7 +53,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_utils.h"
#include "m_skin.h"
#include "m_netlib.h"
-#include "m_clui.h"
#include "m_langpack.h"
#include "m_message.h"
#include "m_userinfo.h"
diff --git a/protocols/IcqOscarJ/src/stdafx.h b/protocols/IcqOscarJ/src/stdafx.h index f6cfeaec68..16a2b5b21a 100644 --- a/protocols/IcqOscarJ/src/stdafx.h +++ b/protocols/IcqOscarJ/src/stdafx.h @@ -57,7 +57,6 @@ // Miranda IM SDK includes
#include <newpluginapi.h> // This must be included first
#include <m_clist.h>
-#include <m_clui.h>
#include <m_database.h>
#include <m_langpack.h>
#include <m_message.h>
diff --git a/protocols/MRA/src/stdafx.h b/protocols/MRA/src/stdafx.h index 8262f8ef69..f221a23f92 100644 --- a/protocols/MRA/src/stdafx.h +++ b/protocols/MRA/src/stdafx.h @@ -26,7 +26,6 @@ #include <m_protocols.h>
#include <m_clist.h>
#include <m_cluiframes.h>
-#include <m_clui.h>
#include <m_genmenu.h>
#include <m_ignore.h>
#include <m_message.h>
diff --git a/protocols/MSN/src/stdafx.h b/protocols/MSN/src/stdafx.h index 4c01648788..6607c74d92 100644 --- a/protocols/MSN/src/stdafx.h +++ b/protocols/MSN/src/stdafx.h @@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_contacts.h>
#include <m_idle.h>
#include <m_icolib.h>
diff --git a/protocols/Sametime/src/StdAfx.h b/protocols/Sametime/src/StdAfx.h index c98e61d137..3eae2826f9 100644 --- a/protocols/Sametime/src/StdAfx.h +++ b/protocols/Sametime/src/StdAfx.h @@ -66,7 +66,6 @@ extern "C" { #include <m_protocols.h>
#include <m_protosvc.h>
#include <m_ignore.h>
-#include <m_clui.h>
#include <m_clc.h>
#include <m_utils.h>
#include <m_idle.h>
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index d9ea2ea318..ce68a3f3d7 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -49,7 +49,6 @@ void CSametimeProto::AddGroup(const char* name, bool expanded) return;
MGROUP hGroup = Clist_GroupCreate(NULL, ptrT(mir_utf8decodeT(name)));
- CallService(MS_CLUI_GROUPADDED, hGroup, 0);
Clist_GroupSetExpanded(hGroup, expanded);
}
diff --git a/protocols/Tlen/src/stdafx.h b/protocols/Tlen/src/stdafx.h index 7e7f4bc3f2..cc69fef948 100644 --- a/protocols/Tlen/src/stdafx.h +++ b/protocols/Tlen/src/stdafx.h @@ -63,7 +63,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_protoint.h>
#include <m_contacts.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_options.h>
#include <m_userinfo.h>
#include <m_database.h>
diff --git a/protocols/Twitter/src/stdafx.h b/protocols/Twitter/src/stdafx.h index 506177b634..d8b3ba5274 100644 --- a/protocols/Twitter/src/stdafx.h +++ b/protocols/Twitter/src/stdafx.h @@ -41,7 +41,6 @@ typedef std::basic_string<TCHAR> tstring; #include <m_button.h>
#include <m_chat.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_database.h>
#include <m_folders.h>
#include <m_history.h>
diff --git a/protocols/WhatsApp/src/stdafx.h b/protocols/WhatsApp/src/stdafx.h index 9620bb10b7..7caac6c8e9 100644 --- a/protocols/WhatsApp/src/stdafx.h +++ b/protocols/WhatsApp/src/stdafx.h @@ -39,7 +39,6 @@ Copyright © 2013-14 Uli Hecht #include <m_chat.h>
#include <m_clc.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_database.h>
#include <m_history.h>
#include <m_idle.h>
diff --git a/src/core/stdauth/src/stdafx.h b/src/core/stdauth/src/stdafx.h index 48074554e4..06f20fb566 100644 --- a/src/core/stdauth/src/stdafx.h +++ b/src/core/stdauth/src/stdafx.h @@ -47,7 +47,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_database.h>
#include <m_netlib.h>
-#include <m_clui.h>
#include <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
diff --git a/src/core/stdchat/src/stdafx.h b/src/core/stdchat/src/stdafx.h index da9ed84090..ec6be80973 100644 --- a/src/core/stdchat/src/stdafx.h +++ b/src/core/stdchat/src/stdafx.h @@ -48,7 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_button.h>
#include <m_protosvc.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_message.h>
#include <m_icolib.h>
#include <m_popup.h>
diff --git a/src/core/stdclist/src/stdafx.h b/src/core/stdclist/src/stdafx.h index 4bf2523e76..10a16fd245 100644 --- a/src/core/stdclist/src/stdafx.h +++ b/src/core/stdclist/src/stdafx.h @@ -38,7 +38,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <win2k.h>
#include <newpluginapi.h>
#include <m_clist.h>
-#include <m_clui.h>
#include <m_system.h>
#include <m_database.h>
#include <m_langpack.h>
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index e732c0532e..35acfc8216 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -44,7 +44,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_button.h>
#include <m_clist.h>
#include <m_clc.h>
-#include <m_clui.h>
#include <m_options.h>
#include <m_protosvc.h>
#include <m_utils.h>
diff --git a/src/core/stduserinfo/src/stdafx.h b/src/core/stduserinfo/src/stdafx.h index 6d2b94a1ec..9136d69408 100644 --- a/src/core/stduserinfo/src/stdafx.h +++ b/src/core/stduserinfo/src/stdafx.h @@ -48,7 +48,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_database.h>
#include <m_netlib.h>
-#include <m_clui.h>
#include <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp index 767368d911..1abd72c32b 100644 --- a/src/mir_app/src/chat_clist.cpp +++ b/src/mir_app/src/chat_clist.cpp @@ -35,10 +35,8 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi MGROUP hGroup = Clist_GroupExists(pszGroup);
if (hGroup == 0) {
hGroup = Clist_GroupCreate(0, pszGroup);
- if (hGroup) {
- CallService(MS_CLUI_GROUPADDED, (WPARAM)hGroup, 0);
+ if (hGroup)
Clist_GroupSetExpanded(hGroup, 1);
- }
}
}
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index 41231fc40d..951bb61f7a 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -717,7 +717,6 @@ void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour) void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
{
dat->rowHeight = db_get_b(NULL, "CLC", "RowHeight", CLCDEFAULT_ROWHEIGHT);
-
dat->leftMargin = db_get_b(NULL, "CLC", "LeftMargin", CLCDEFAULT_LEFTMARGIN);
dat->exStyle = db_get_dw(NULL, "CLC", "ExStyle", cli.pfnGetDefaultExStyle());
dat->scrollTime = db_get_w(NULL, "CLC", "ScrollTime", CLCDEFAULT_SCROLLTIME);
diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp index c5289a1f57..08c377b681 100644 --- a/src/mir_app/src/clistgroups.cpp +++ b/src/mir_app/src/clistgroups.cpp @@ -132,7 +132,7 @@ static INT_PTR CreateGroupInternal(MGROUP hParent, const TCHAR *ptszName) arByIds.insert(pNew);
arByName.insert(pNew);
- CallService(MS_CLUI_GROUPADDED, newId + 1, 1);
+ Clist_GroupAdded(newId + 1);
CLISTGROUPCHANGE grpChg = { sizeof(grpChg), NULL, newName };
NotifyEventHooks(hGroupChangeEvent, 0, (LPARAM)&grpChg);
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index 758e34075a..5ae1741942 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -34,7 +34,6 @@ int ContactAdded(WPARAM wParam, LPARAM lParam); INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam);
INT_PTR InvalidateDisplayName(WPARAM wParam, LPARAM lParam);
int InitGroupServices(void);
-void LoadCluiServices();
INT_PTR Docking_IsDocked(WPARAM wParam, LPARAM lParam);
int LoadCLUIModule(void);
int InitClistHotKeys(void);
@@ -427,8 +426,6 @@ int LoadContactListModule2(void) hContactDoubleClicked = CreateHookableEvent(ME_CLIST_DOUBLECLICKED);
hContactIconChangedEvent = CreateHookableEvent(ME_CLIST_CONTACTICONCHANGED);
- LoadCluiServices();
-
CreateServiceFunction(MS_CLIST_CONTACTDOUBLECLICKED, ContactDoubleClicked);
CreateServiceFunction(MS_CLIST_CONTACTFILESDROPPED, ContactFilesDropped);
CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE, CompareContacts);
diff --git a/src/mir_app/src/cluiservices.cpp b/src/mir_app/src/cluiservices.cpp index 416dbdfb13..094535bcf5 100644 --- a/src/mir_app/src/cluiservices.cpp +++ b/src/mir_app/src/cluiservices.cpp @@ -25,30 +25,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
#include "clc.h"
-static INT_PTR GroupAdded(WPARAM wParam, LPARAM lParam)
+EXTERN_C MIR_APP_DLL(void) Clist_GroupAdded(MGROUP hGroup)
{
- //CLC does this automatically unless it's a new group
- if (lParam) {
- HANDLE hItem;
- TCHAR szFocusClass[64];
- HWND hwndFocus = GetFocus();
-
- GetClassName(hwndFocus, szFocusClass, _countof(szFocusClass));
- if (!mir_tstrcmp(szFocusClass, _T(CLISTCONTROL_CLASS))) {
- hItem = (HANDLE) SendMessage(hwndFocus, CLM_FINDGROUP, wParam, 0);
- if (hItem)
- SendMessage(hwndFocus, CLM_EDITLABEL, (WPARAM) hItem, 0);
- }
+ // CLC does this automatically unless it's a new group
+ HWND hwndFocus = GetFocus();
+
+ TCHAR szFocusClass[64];
+ GetClassName(hwndFocus, szFocusClass, _countof(szFocusClass));
+ if (!mir_tstrcmp(szFocusClass, _T(CLISTCONTROL_CLASS))) {
+ HANDLE hItem = (HANDLE)SendMessage(hwndFocus, CLM_FINDGROUP, hGroup, 0);
+ if (hItem)
+ SendMessage(hwndFocus, CLM_EDITLABEL, (WPARAM)hItem, 0);
}
- return 0;
}
-static INT_PTR ListBeginRebuild(WPARAM, LPARAM)
-{
- return 0;
-}
-
-static INT_PTR ListEndRebuild(WPARAM, LPARAM)
+EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void)
{
bool bRebuild = false;
LONG_PTR dwStyle = GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE);
@@ -61,7 +52,7 @@ static INT_PTR ListEndRebuild(WPARAM, LPARAM) dwStyle &= ~CLS_HIDEOFFLINE;
bRebuild = true;
}
-
+
if ((db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT) == 0) != ((dwStyle & CLS_HIDEEMPTYGROUPS) == 0)) {
if (db_get_b(NULL, "CList", "HideEmptyGroups", SETTING_HIDEEMPTYGROUPS_DEFAULT))
dwStyle |= CLS_HIDEEMPTYGROUPS;
@@ -69,7 +60,7 @@ static INT_PTR ListEndRebuild(WPARAM, LPARAM) dwStyle &= ~CLS_HIDEEMPTYGROUPS;
bRebuild = true;
}
-
+
if ((db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) == 0) != ((dwStyle & CLS_USEGROUPS) == 0)) {
if (db_get_b(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT))
dwStyle |= CLS_USEGROUPS;
@@ -77,19 +68,11 @@ static INT_PTR ListEndRebuild(WPARAM, LPARAM) dwStyle &= ~CLS_USEGROUPS;
bRebuild = true;
}
-
+
if (bRebuild) {
SetWindowLongPtr(cli.hwndContactTree, GWL_STYLE, dwStyle);
cli.pfnInitAutoRebuild(cli.hwndContactTree);
}
- return 0;
-}
-
-void LoadCluiServices(void)
-{
- CreateServiceFunction(MS_CLUI_GROUPADDED, GroupAdded);
- CreateServiceFunction(MS_CLUI_LISTBEGINREBUILD, ListBeginRebuild);
- CreateServiceFunction(MS_CLUI_LISTENDREBUILD, ListEndRebuild);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -97,35 +80,30 @@ void LoadCluiServices(void) void fnCluiProtocolStatusChanged(int, const char*)
{
- int i, *partWidths;
- int borders[3];
- int flags = 0;
-
if (cli.menuProtoCount == 0) {
SendMessage(cli.hwndStatus, SB_SETPARTS, 0, 0);
SendMessage(cli.hwndStatus, SB_SETTEXT, SBT_OWNERDRAW, 0);
return;
}
+ int borders[3];
SendMessage(cli.hwndStatus, SB_GETBORDERS, 0, (LPARAM)&borders);
- partWidths = (int*)alloca(cli.menuProtoCount * sizeof(int));
+ int *partWidths = (int*)alloca(cli.menuProtoCount * sizeof(int));
if (db_get_b(NULL, "CLUI", "EqualSections", 0)) {
RECT rc;
GetClientRect(cli.hwndStatus, &rc);
rc.right -= borders[0] * 2 + (db_get_b(NULL, "CLUI", "ShowGrip", 1) ? GetSystemMetrics(SM_CXVSCROLL) : 0);
- for (i=0; i < cli.menuProtoCount; i++)
- partWidths[ i ] = (i+1) * rc.right / cli.menuProtoCount - (borders[2] >> 1);
+ for (int i = 0; i < cli.menuProtoCount; i++)
+ partWidths[i] = (i + 1) * rc.right / cli.menuProtoCount - (borders[2] >> 1);
}
else {
- HDC hdc;
- HFONT hFont;
SIZE textSize;
BYTE showOpts = db_get_b(NULL, "CLUI", "SBarShow", 1);
- hdc = GetDC(NULL);
- hFont = (HFONT)SelectObject(hdc, (HFONT) SendMessage(cli.hwndStatus, WM_GETFONT, 0, 0));
- for (i=0; i < cli.menuProtoCount; i++) { //count down since built in ones tend to go at the end
+ HDC hdc = GetDC(NULL);
+ HFONT hFont = (HFONT)SelectObject(hdc, (HFONT)SendMessage(cli.hwndStatus, WM_GETFONT, 0, 0));
+ for (int i = 0; i < cli.menuProtoCount; i++) { //count down since built in ones tend to go at the end
int x = 2;
if (showOpts & 1)
x += g_IconWidth;
@@ -137,31 +115,32 @@ void fnCluiProtocolStatusChanged(int, const char*) else
tszName[0] = 0;
- if (showOpts & 4 && mir_tstrlen(tszName) < _countof(tszName)-1)
+ if (showOpts & 4 && mir_tstrlen(tszName) < _countof(tszName) - 1)
mir_tstrcat(tszName, _T(" "));
GetTextExtentPoint32(hdc, tszName, (int)mir_tstrlen(tszName), &textSize);
x += textSize.cx;
x += GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
}
if (showOpts & 4) {
- TCHAR* modeDescr = cli.pfnGetStatusModeDescription(CallProtoServiceInt(NULL,cli.menuProtos[i].szProto, PS_GETSTATUS, 0, 0), 0);
+ TCHAR* modeDescr = cli.pfnGetStatusModeDescription(CallProtoServiceInt(NULL, cli.menuProtos[i].szProto, PS_GETSTATUS, 0, 0), 0);
GetTextExtentPoint32(hdc, modeDescr, (int)mir_tstrlen(modeDescr), &textSize);
x += textSize.cx;
x += GetSystemMetrics(SM_CXBORDER) * 4; // The SB panel doesnt allocate enough room
}
- partWidths[ i ] = (i ? partWidths[ i-1] : 0) + x + 2;
+ partWidths[i] = (i ? partWidths[i - 1] : 0) + x + 2;
}
SelectObject(hdc, hFont);
ReleaseDC(NULL, hdc);
}
- partWidths[ cli.menuProtoCount-1 ] = -1;
+ partWidths[cli.menuProtoCount - 1] = -1;
SendMessage(cli.hwndStatus, SB_SETMINHEIGHT, g_IconHeight, 0);
SendMessage(cli.hwndStatus, SB_SETPARTS, cli.menuProtoCount, (LPARAM)partWidths);
- flags = SBT_OWNERDRAW;
+
+ int flags = SBT_OWNERDRAW;
if (db_get_b(NULL, "CLUI", "SBarBevel", 1) == 0)
flags |= SBT_NOBORDERS;
- for (i=0; i < cli.menuProtoCount; i++) {
+
+ for (int i = 0; i < cli.menuProtoCount; i++)
SendMessage(cli.hwndStatus, SB_SETTEXT, i | flags, (LPARAM)cli.menuProtos[i].szProto);
- }
}
diff --git a/src/mir_app/src/contact.cpp b/src/mir_app/src/contact.cpp index d86c8b8127..ac1d01ab73 100644 --- a/src/mir_app/src/contact.cpp +++ b/src/mir_app/src/contact.cpp @@ -37,20 +37,13 @@ static int GetContactStatus(MCONTACT hContact) void fnLoadContactTree(void) { - CallService(MS_CLUI_LISTBEGINREBUILD, 0, 0); - for (int i = 1;; i++) { - if (Clist_GroupGetName(i, NULL) == NULL) - break; - CallService(MS_CLUI_GROUPADDED, i, 0); - } - int hideOffline = db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT); for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { int status = GetContactStatus(hContact); if ((!hideOffline || status != ID_STATUS_OFFLINE) && !db_get_b(hContact, "CList", "Hidden", 0)) cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(GetContactProto(hContact), status, hContact)); } - CallService(MS_CLUI_LISTENDREBUILD, 0, 0); + Clist_EndRebuild(); } INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam) diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 7461945320..e142457c3c 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -257,3 +257,5 @@ Clist_GroupSetExpanded @255 Clist_GroupSetFlags @256
Clist_GroupGetName @257
Clist_GroupRename @258
+Clist_EndRebuild @259
+Clist_GroupAdded @260
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 70c2db00b7..6fd5286825 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -257,3 +257,5 @@ Clist_GroupSetExpanded @255 Clist_GroupSetFlags @256
Clist_GroupGetName @257
Clist_GroupRename @258
+Clist_EndRebuild @259
+Clist_GroupAdded @260
diff --git a/src/mir_app/src/stdafx.h b/src/mir_app/src/stdafx.h index b0435f664d..ca12a93a5b 100644 --- a/src/mir_app/src/stdafx.h +++ b/src/mir_app/src/stdafx.h @@ -64,7 +64,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_database.h>
#include <m_db_int.h>
#include <m_clc.h>
-#include <m_clui.h>
#include <m_crypto.h>
#include <m_langpack.h>
#include <m_clist.h>
diff --git a/utils/mir_smileys.cpp b/utils/mir_smileys.cpp index bce1cc75ee..375a5bba64 100644 --- a/utils/mir_smileys.cpp +++ b/utils/mir_smileys.cpp @@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. #include <m_smileyadd.h> #include <newpluginapi.h> #include <m_langpack.h> -#include <m_clui.h> #include <m_database.h> #include <commctrl.h> #include <m_skin_eng.h> |