diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-25 14:32:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-25 14:32:41 +0000 |
commit | 497153f11a96cd336e8dadeeaa50c29e2c1bc2af (patch) | |
tree | 7b9c2097d8407988467a0e2c37c11ad9a63af2a7 /plugins | |
parent | 9554d6d4d701beb6e3f4bbcf83d34baa30e7186b (diff) |
- fix for the clist services creation order
- Clist Nicer's options adapted for the extraicons plugin
git-svn-id: http://svn.miranda-ng.org/main/trunk@1651 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmod.cpp | 27 | ||||
-rw-r--r-- | plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp | 13 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clc.cpp | 19 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clistopts.cpp | 17 | ||||
-rw-r--r-- | plugins/Clist_mw/src/init.cpp | 114 | ||||
-rw-r--r-- | plugins/Clist_nicer/res/resource.rc | 24 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/Include/resource.h | 1 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 5 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcopts.cpp | 108 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmod.cpp | 19 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/init.cpp | 3 | ||||
-rw-r--r-- | plugins/ExtraIcons/src/options.cpp | 63 |
12 files changed, 240 insertions, 173 deletions
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index d60a7a64ee..de45d9a20e 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -213,12 +213,10 @@ int CListMod_ContactListShutdownProc(WPARAM wParam,LPARAM lParam) return 0;
}
-INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam)
+INT_PTR GetCapsService(WPARAM wParam,LPARAM lParam)
{
- if (lParam)
- {
- switch (lParam)
- {
+ if (lParam) {
+ switch (lParam) {
case 0:
return 0;
case CLUIF2_PLUGININFO:
@@ -230,12 +228,9 @@ INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam) case CLUIF2_USEREXTRASTART:
return EXTRA_ICON_ADV3;
}
- return 0;
}
- else
- {
- switch (wParam)
- {
+ else {
+ switch (wParam) {
case CLUICAPS_FLAGS1:
return CLUIF_HIDEEMPTYGROUPS|CLUIF_DISABLEGROUPS|CLUIF_HASONTOPOPTION|CLUIF_HASAUTOHIDEOPTION;
case CLUICAPS_FLAGS2:
@@ -244,18 +239,18 @@ INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam) }
return 0;
}
+
HRESULT PreLoadContactListModule()
{
/* Global data initialization */
- {
- g_CluiData.fOnDesktop = FALSE;
- g_CluiData.dwKeyColor = RGB(255,0,255);
- g_CluiData.bCurrentAlpha = 255;
- }
+ g_CluiData.fOnDesktop = FALSE;
+ 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_CLIST_GETCONTACTICON, GetContactIcon);
+ CreateServiceFunction(MS_CLUI_GETCAPS, GetCapsService);
return S_OK;
}
@@ -265,8 +260,6 @@ INT_PTR SvcApplySkin(WPARAM wParam, LPARAM lParam); HRESULT CluiLoadModule()
{
- CreateServiceFunction(MS_CLUI_GETCAPS,CLUIGetCapsService);
-
InitDisplayNameCache();
hookSystemShutdown_CListMod = HookEvent(ME_SYSTEM_SHUTDOWN,CListMod_ContactListShutdownProc);
hookOptInitialise_CList = HookEvent(ME_OPT_INITIALISE,CListOptInit);
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index 11af1f62b2..b8d21480e0 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -2886,17 +2886,6 @@ static int CLUIFrameOnModulesUnload(WPARAM wParam,LPARAM lParam) return 0;
}
-static INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam)
-{
- switch (wParam) {
- case CLUICAPS_FLAGS1:
- return CLUIF_HIDEEMPTYGROUPS | CLUIF_DISABLEGROUPS | CLUIF_HASONTOPOPTION | CLUIF_HASAUTOHIDEOPTION;
- case CLUICAPS_FLAGS2:
- return MAKELONG(EXTRACOLUMNCOUNT,1);
- }
- return 0;
-}
-
int LoadCLUIFramesModule(void)
{
WNDCLASS wndclass;
@@ -2954,8 +2943,6 @@ int LoadCLUIFramesModule(void) CreateServiceFunction(MS_CLIST_FRAMES_UCOLLFRAME,CLUIFramesCollapseUnCollapseFrame);
CreateServiceFunction(MS_CLIST_FRAMES_SETUNBORDER,CLUIFramesSetUnSetBorder);
- CreateServiceFunction(MS_CLUI_GETCAPS,CLUIGetCapsService);
-
CreateServiceFunction(CLUIFRAMESSETALIGN,CLUIFramesSetAlign);
CreateServiceFunction(CLUIFRAMESMOVEUPDOWN,CLUIFramesMoveUpDown);
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 40eddc02eb..305a9a9ded 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -292,3 +292,22 @@ int LoadCLCModule(void) HookEvent(ME_SYSTEM_SHUTDOWN,ClcShutdown);
return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static INT_PTR CLUIGetCapsService(WPARAM wParam,LPARAM lParam)
+{
+ switch (wParam) {
+ case CLUICAPS_FLAGS1:
+ return CLUIF_HIDEEMPTYGROUPS | CLUIF_DISABLEGROUPS | CLUIF_HASONTOPOPTION | CLUIF_HASAUTOHIDEOPTION;
+ case CLUICAPS_FLAGS2:
+ return MAKELONG(MAXEXTRACOLUMNS,1);
+ }
+ return 0;
+}
+
+int PreloadCLCModule()
+{
+ CreateServiceFunction(MS_CLUI_GETCAPS, CLUIGetCapsService);
+ return 0;
+}
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index b845c5a0a0..dfca53a5cd 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -99,7 +99,8 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_AUTOHIDE, DBGetContactSettingByte(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- { DWORD caps = CallService(MS_CLUI_GETCAPS,CLUICAPS_FLAGS1,0);
+ {
+ DWORD caps = CallService(MS_CLUI_GETCAPS,CLUICAPS_FLAGS1,0);
if (!(caps&CLUIF_HIDEEMPTYGROUPS)) ShowWindow(GetDlgItem(hwndDlg,IDC_HIDEEMPTYGROUPS),SW_HIDE);
if (!(caps&CLUIF_DISABLEGROUPS)) ShowWindow(GetDlgItem(hwndDlg,IDC_DISABLEGROUPS),SW_HIDE);
if (caps&CLUIF_HASONTOPOPTION) ShowWindow(GetDlgItem(hwndDlg,IDC_ONTOP),SW_HIDE);
@@ -191,18 +192,18 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
- switch (((LPNMHDR)lParam)->code)
- {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
DBWriteContactSettingByte(NULL,"CList","HideOffline",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEOFFLINE));
- { DWORD caps = CallService(MS_CLUI_GETCAPS,CLUICAPS_FLAGS1,0);
- if (caps&CLUIF_HIDEEMPTYGROUPS) DBWriteContactSettingByte(NULL,"CList","HideEmptyGroups",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEEMPTYGROUPS));
- if (caps&CLUIF_DISABLEGROUPS) DBWriteContactSettingByte(NULL,"CList","UseGroups",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_DISABLEGROUPS));
- if (!(caps&CLUIF_HASONTOPOPTION)) {
+ {
+ DWORD caps = CallService(MS_CLUI_GETCAPS,CLUICAPS_FLAGS1,0);
+ if (caps & CLUIF_HIDEEMPTYGROUPS) DBWriteContactSettingByte(NULL,"CList","HideEmptyGroups",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEEMPTYGROUPS));
+ if (caps & CLUIF_DISABLEGROUPS) DBWriteContactSettingByte(NULL,"CList","UseGroups",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_DISABLEGROUPS));
+ if ( !(caps & CLUIF_HASONTOPOPTION)) {
DBWriteContactSettingByte(NULL,"CList","OnTop",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_ONTOP));
SetWindowPos(pcli->hwndContactList,IsDlgButtonChecked(hwndDlg,IDC_ONTOP)?HWND_TOPMOST:HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
- if (!(caps&CLUIF_HASAUTOHIDEOPTION)) {
+ if ( !(caps & CLUIF_HASAUTOHIDEOPTION)) {
DBWriteContactSettingByte(NULL,"CList","AutoHide",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
DBWriteContactSettingWord(NULL,"CList","HideTime",(WORD)SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_GETPOS,0,0));
}
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp index 19e2ef96a4..2144ab6eb8 100644 --- a/plugins/Clist_mw/src/init.cpp +++ b/plugins/Clist_mw/src/init.cpp @@ -104,6 +104,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_CLIST, MIID_LAST};
int LoadContactListModule(void);
+int PreloadCLCModule(void);
int LoadCLCModule(void);
int LoadCLUIModule();
int InitSkinHotKeys();
@@ -150,69 +151,64 @@ extern "C" int __declspec(dllexport) CListInitialise() {
int rc = 0;
- // get the internal malloc/free()
- __try {
+ OutputDebugStringA("CListInitialise ClistMW\r\n");
+ mir_getLP( &pluginInfo );
- OutputDebugStringA("CListInitialise ClistMW\r\n");
- mir_getLP( &pluginInfo );
+ PreloadCLCModule();
- pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
- if ( (INT_PTR)pcli == CALLSERVICE_NOTFOUND ) {
+ pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
+ if ( (INT_PTR)pcli == CALLSERVICE_NOTFOUND ) {
LBL_Error:
- MessageBoxA( NULL, "This version of plugin requires Miranda IM 0.8.0.9 or later", "Fatal error", MB_OK );
- return 1;
- }
- if ( pcli->version < 6 )
- goto LBL_Error;
-
- pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
- pcli->pfnCalcEipPosition = CalcEipPosition;
- pcli->pfnCheckCacheItem = CheckPDNCE;
- pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
- pcli->pfnCompareContacts = CompareContacts;
- pcli->pfnCreateClcContact = fnCreateClcContact;
- pcli->pfnCreateCacheItem = fnCreateCacheItem;
- pcli->pfnFindItem = FindItem;
- pcli->pfnFreeCacheItem = FreeDisplayNameCacheItem;
- pcli->pfnGetDefaultFontSetting = GetDefaultFontSetting;
- pcli->pfnGetRowsPriorTo = GetRowsPriorTo;
- pcli->pfnGetRowByIndex = GetRowByIndex;
- pcli->pfnHitTest = HitTest;
- pcli->pfnPaintClc = PaintClc;
- pcli->pfnRebuildEntireList = RebuildEntireList;
- pcli->pfnRecalcScrollBar = RecalcScrollBar;
- pcli->pfnScrollTo = ScrollTo;
-
- saveIconFromStatusMode = pcli->pfnIconFromStatusMode;
- pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;
-
- saveAddGroup = pcli->pfnAddGroup; pcli->pfnAddGroup = AddGroup;
- saveAddInfoItemToGroup = pcli->pfnAddInfoItemToGroup; pcli->pfnAddInfoItemToGroup = AddInfoItemToGroup;
- saveAddItemToGroup = pcli->pfnAddItemToGroup; pcli->pfnAddItemToGroup = AddItemToGroup;
- saveRemoveItemFromGroup = pcli->pfnRemoveItemFromGroup; pcli->pfnRemoveItemFromGroup = RemoveItemFromGroup;
- saveFreeContact = pcli->pfnFreeContact; pcli->pfnFreeContact = FreeContact;
- saveFreeGroup = pcli->pfnFreeGroup; pcli->pfnFreeGroup = FreeGroup;
- saveContactListControlWndProc = pcli->pfnContactListControlWndProc; pcli->pfnContactListControlWndProc = ContactListControlWndProc;
- saveTrayIconProcessMessage = pcli->pfnTrayIconProcessMessage; pcli->pfnTrayIconProcessMessage = TrayIconProcessMessage;
- saveContactListWndProc = pcli->pfnContactListWndProc; pcli->pfnContactListWndProc = ContactListWndProc;
- saveLoadClcOptions = pcli->pfnLoadClcOptions; pcli->pfnLoadClcOptions = LoadClcOptions;
- saveSortCLC = pcli->pfnSortCLC; pcli->pfnSortCLC = SortCLC;
-
- memset(&SED,0,sizeof(SED));
- CreateServiceFunction(CLUI_SetDrawerService,SetDrawer);
-
- rc = LoadContactListModule();
- if (rc == 0) rc = LoadCLCModule();
-
- HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- BGModuleLoad();
-
- OutputDebugStringA("CListInitialise ClistMW...Done\r\n");
- }
- __except (exceptFunction(GetExceptionInformation()))
- {
- return 0;
+ MessageBoxA( NULL, "This version of plugin requires Miranda IM 0.8.0.9 or later", "Fatal error", MB_OK );
+ return 1;
}
+ if ( pcli->version < 6 )
+ goto LBL_Error;
+
+ pcli->pfnBuildGroupPopupMenu = BuildGroupPopupMenu;
+ pcli->pfnCalcEipPosition = CalcEipPosition;
+ pcli->pfnCheckCacheItem = CheckPDNCE;
+ pcli->pfnCluiProtocolStatusChanged = CluiProtocolStatusChanged;
+ pcli->pfnCompareContacts = CompareContacts;
+ pcli->pfnCreateClcContact = fnCreateClcContact;
+ pcli->pfnCreateCacheItem = fnCreateCacheItem;
+ pcli->pfnFindItem = FindItem;
+ pcli->pfnFreeCacheItem = FreeDisplayNameCacheItem;
+ pcli->pfnGetDefaultFontSetting = GetDefaultFontSetting;
+ pcli->pfnGetRowsPriorTo = GetRowsPriorTo;
+ pcli->pfnGetRowByIndex = GetRowByIndex;
+ pcli->pfnHitTest = HitTest;
+ pcli->pfnPaintClc = PaintClc;
+ pcli->pfnRebuildEntireList = RebuildEntireList;
+ pcli->pfnRecalcScrollBar = RecalcScrollBar;
+ pcli->pfnScrollTo = ScrollTo;
+
+ saveIconFromStatusMode = pcli->pfnIconFromStatusMode;
+ pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;
+
+ saveAddGroup = pcli->pfnAddGroup; pcli->pfnAddGroup = AddGroup;
+ saveAddInfoItemToGroup = pcli->pfnAddInfoItemToGroup; pcli->pfnAddInfoItemToGroup = AddInfoItemToGroup;
+ saveAddItemToGroup = pcli->pfnAddItemToGroup; pcli->pfnAddItemToGroup = AddItemToGroup;
+ saveRemoveItemFromGroup = pcli->pfnRemoveItemFromGroup; pcli->pfnRemoveItemFromGroup = RemoveItemFromGroup;
+ saveFreeContact = pcli->pfnFreeContact; pcli->pfnFreeContact = FreeContact;
+ saveFreeGroup = pcli->pfnFreeGroup; pcli->pfnFreeGroup = FreeGroup;
+ saveContactListControlWndProc = pcli->pfnContactListControlWndProc; pcli->pfnContactListControlWndProc = ContactListControlWndProc;
+ saveTrayIconProcessMessage = pcli->pfnTrayIconProcessMessage; pcli->pfnTrayIconProcessMessage = TrayIconProcessMessage;
+ saveContactListWndProc = pcli->pfnContactListWndProc; pcli->pfnContactListWndProc = ContactListWndProc;
+ saveLoadClcOptions = pcli->pfnLoadClcOptions; pcli->pfnLoadClcOptions = LoadClcOptions;
+ saveSortCLC = pcli->pfnSortCLC; pcli->pfnSortCLC = SortCLC;
+
+ memset(&SED,0,sizeof(SED));
+ CreateServiceFunction(CLUI_SetDrawerService,SetDrawer);
+
+ rc = LoadContactListModule();
+ if (rc == 0)
+ rc = LoadCLCModule();
+
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ BGModuleLoad();
+
+ OutputDebugStringA("CListInitialise ClistMW...Done\r\n");
return rc;
}
diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 3c3541a321..6115b08891 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -287,12 +287,20 @@ IDD_OPT_XICONS DIALOGEX 0, 0, 227, 205 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- GROUPBOX "Extra icons (drag items to reorder them)",IDC_STATIC,1,100,224,87
- EDITTEXT IDC_EXICONSCALE,141,192,31,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ GROUPBOX "Extra icons (drag items to reorder them)",IDC_STATIC,1,0,224,164
+ PUSHBUTTON "Reset order and visibility to default",IDC_RESETXICONS,5,169,216,15
+ CONTROL "",IDC_EXTRAORDER,"SysTreeView32",TVS_NOTOOLTIPS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,4,12,216,148
+ LTEXT "Extra icon size",IDC_STATIC,51,193,87,11
+ EDITTEXT IDC_EXICONSCALE,141,192,31,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_EXICONSCALESPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_HOTTRACK,160,187,12,14
- LTEXT "Extra icon size",IDC_STATIC,51,193,87,11
- CONTROL "Show status icons",IDC_SHOWSTATUSICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,10,106,10
+END
+
+IDD_OPT_ICONS DIALOGEX 0, 0, 227, 205
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
GROUPBOX "Icons",IDC_STATIC,1,0,224,99
+ CONTROL "Show status icons",IDC_SHOWSTATUSICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,10,106,10
CONTROL "Show visibility icons",IDC_SHOWVISIBILITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,22,214,10
CONTROL "When possible, draw status icons in avatar space",IDC_SELECTIVEICONS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,34,214,10
@@ -303,8 +311,6 @@ BEGIN CONTROL "Dim idle contacts",IDC_IDLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,70,214,10
CONTROL "Replace status icons with xStatus",IDC_XSTATUSASSTATUS,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,82,214,10
- CONTROL "",IDC_EXTRAORDER,"SysTreeView32",TVS_NOTOOLTIPS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,22,111,182,56
- PUSHBUTTON "Reset order and visibility to default",IDC_RESETXICONS,5,169,216,15
END
IDD_OPT_CLUI DIALOGEX 0, 0, 305, 226
@@ -594,19 +600,19 @@ END // TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"..\\src\\include\\resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include <windows.h>\r\n"
"#include <winres.h>\r\n"
"#include <statusmodes.h>\r\n"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
diff --git a/plugins/Clist_nicer/src/Include/resource.h b/plugins/Clist_nicer/src/Include/resource.h index 0512a0dda0..e7224dd57d 100644 --- a/plugins/Clist_nicer/src/Include/resource.h +++ b/plugins/Clist_nicer/src/Include/resource.h @@ -27,6 +27,7 @@ #define IDC_DROPUSER 215
#define IDD_OPT_CLUI 218
#define IDD_OPT_XICONS 219
+#define IDD_OPT_ICONS 220
#define IDD_OPT_CLC 228
#define IDD_OPT_CLCBKG 230
#define IDD_OPT_SBAR 234
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 0841efed14..84ab25af3c 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -803,8 +803,5 @@ LBL_Def: }
}
- {
- LRESULT result = saveContactListControlWndProc(hwnd, msg, wParam, lParam);
- return result;
- }
+ return saveContactListControlWndProc(hwnd, msg, wParam, lParam);
}
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index 60af19554b..cb778098cd 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -26,6 +26,8 @@ UNICODE done #include <commonheaders.h>
#include "../coolsb/coolscroll.h"
+#include <m_extraicons.h>
+
#define DBFONTF_BOLD 1
#define DBFONTF_ITALIC 2
#define DBFONTF_UNDERLINE 4
@@ -894,18 +896,6 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA case WM_USER + 100:
p = (DISPLAYPROFILE *)lParam;
if (p) {
- CheckDlgButton(hwndDlg, IDC_XSTATUSASSTATUS, p->dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS ? 1 : 0);
-
- CheckDlgButton(hwndDlg, IDC_SHOWSTATUSICONS, (p->dwFlags & CLUI_FRAME_STATUSICONS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWVISIBILITY, (p->dwFlags & CLUI_SHOWVISI) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWMETA, (p->dwFlags & CLUI_USEMETAICONS) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_OVERLAYICONS, (p->dwFlags & CLUI_FRAME_OVERLAYICONS) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SELECTIVEICONS, (p->dwFlags & CLUI_FRAME_SELECTIVEICONS) ? BST_CHECKED : BST_UNCHECKED);
-
- CheckDlgButton(hwndDlg, IDC_STATUSICONSCENTERED, p->bCenterStatusIcons ? 1 : 0);
- CheckDlgButton(hwndDlg, IDC_IDLE, p->bDimIdle ? BST_CHECKED : BST_UNCHECKED);
-
SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_SETRANGE, 0, MAKELONG(20, 8));
SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_SETPOS, 0, (LPARAM)p->exIconScale);
FillOrderTree(hwndDlg, GetDlgItem(hwndDlg, IDC_EXTRAORDER), p->exIconOrder, p->dwExtraImageMask);
@@ -919,16 +909,6 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA p->exIconScale = SendDlgItemMessage(hwndDlg, IDC_EXICONSCALESPIN, UDM_GETPOS, 0, 0);
p->exIconScale = (p->exIconScale < 8 || p->exIconScale > 20) ? 16 : p->exIconScale;
-
- p->dwFlags |= ((IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSICONS) ? CLUI_FRAME_STATUSICONS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SHOWVISIBILITY) ? CLUI_SHOWVISI : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SHOWMETA) ? CLUI_USEMETAICONS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_OVERLAYICONS) ? CLUI_FRAME_OVERLAYICONS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_XSTATUSASSTATUS) ? CLUI_FRAME_USEXSTATUSASSTATUS : 0) |
- (IsDlgButtonChecked(hwndDlg, IDC_SELECTIVEICONS) ? CLUI_FRAME_SELECTIVEICONS : 0));
-
- p->bDimIdle = IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0;
- p->bCenterStatusIcons = IsDlgButtonChecked(hwndDlg, IDC_STATUSICONSCENTERED) ? 1 : 0;
}
return 0;
@@ -1037,6 +1017,61 @@ static INT_PTR CALLBACK DlgProcXIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return FALSE;
}
+static INT_PTR CALLBACK DlgProcIcons(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ DISPLAYPROFILE *p;
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ return TRUE;
+
+ case WM_COMMAND:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_USER + 100:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ CheckDlgButton(hwndDlg, IDC_XSTATUSASSTATUS, p->dwFlags & CLUI_FRAME_USEXSTATUSASSTATUS ? 1 : 0);
+
+ CheckDlgButton(hwndDlg, IDC_SHOWSTATUSICONS, (p->dwFlags & CLUI_FRAME_STATUSICONS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWVISIBILITY, (p->dwFlags & CLUI_SHOWVISI) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWMETA, (p->dwFlags & CLUI_USEMETAICONS) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_OVERLAYICONS, (p->dwFlags & CLUI_FRAME_OVERLAYICONS) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SELECTIVEICONS, (p->dwFlags & CLUI_FRAME_SELECTIVEICONS) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_STATUSICONSCENTERED, p->bCenterStatusIcons ? 1 : 0);
+ CheckDlgButton(hwndDlg, IDC_IDLE, p->bDimIdle ? BST_CHECKED : BST_UNCHECKED);
+ }
+ return 0;
+
+ case WM_USER + 200:
+ p = (DISPLAYPROFILE *)lParam;
+ if (p) {
+ p->dwFlags |= ((IsDlgButtonChecked(hwndDlg, IDC_SHOWSTATUSICONS) ? CLUI_FRAME_STATUSICONS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SHOWVISIBILITY) ? CLUI_SHOWVISI : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SHOWMETA) ? CLUI_USEMETAICONS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_OVERLAYICONS) ? CLUI_FRAME_OVERLAYICONS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_XSTATUSASSTATUS) ? CLUI_FRAME_USEXSTATUSASSTATUS : 0) |
+ (IsDlgButtonChecked(hwndDlg, IDC_SELECTIVEICONS) ? CLUI_FRAME_SELECTIVEICONS : 0));
+
+ p->bDimIdle = IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0;
+ p->bCenterStatusIcons = IsDlgButtonChecked(hwndDlg, IDC_STATUSICONSCENTERED) ? 1 : 0;
+ }
+ return 0;
+
+ case WM_NOTIFY:
+ switch (((LPNMHDR) lParam)->code) {
+ case PSN_APPLY:
+ return TRUE;
+ }
+ break;
+ }
+ return FALSE;
+}
+
static HWND hwndList;
static DISPLAYPROFILE dsp_current;
@@ -1080,40 +1115,51 @@ static INT_PTR CALLBACK DlgProcDspProfiles(HWND hwnd, UINT msg, WPARAM wParam, L hwndTab = GetDlgItem(hwnd, IDC_OPTIONSTAB);
iInit = TRUE;
+ int iOrder = 0;
TCITEM tci;
tci.mask = TCIF_PARAM|TCIF_TEXT;
tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPITEMS), hwnd, DlgProcDspItems);
tci.pszText = TranslateT("Contacts");
- TabCtrl_InsertItem(hwndTab, 0, &tci);
+ TabCtrl_InsertItem(hwndTab, iOrder, &tci);
int oPage = cfg::getByte("CLUI", "opage_d", 0);
MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 0 ? SW_SHOW : SW_HIDE);
+ ShowWindow((HWND)tci.lParam, oPage == iOrder ? SW_SHOW : SW_HIDE);
if (IS_THEMED)
API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPGROUPS), hwnd, DlgProcDspGroups);
tci.pszText = TranslateT("Groups and layout");
- TabCtrl_InsertItem(hwndTab, 1, &tci);
+ TabCtrl_InsertItem(hwndTab, ++iOrder, &tci);
MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 1 ? SW_SHOW : SW_HIDE);
+ ShowWindow((HWND)tci.lParam, oPage == iOrder ? SW_SHOW : SW_HIDE);
if (IS_THEMED)
API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
- tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_XICONS), hwnd, DlgProcXIcons);
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_ICONS), hwnd, DlgProcIcons);
tci.pszText = TranslateT("Icons");
- TabCtrl_InsertItem(hwndTab, 2, &tci);
+ TabCtrl_InsertItem(hwndTab, ++iOrder, &tci);
MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 2 ? SW_SHOW : SW_HIDE);
+ ShowWindow((HWND)tci.lParam, oPage == iOrder ? SW_SHOW : SW_HIDE);
if (IS_THEMED)
API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+ if ( !ServiceExists(MS_EXTRAICON_REGISTER)) {
+ tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_XICONS), hwnd, DlgProcXIcons);
+ tci.pszText = TranslateT("Extra Icons");
+ TabCtrl_InsertItem(hwndTab, ++iOrder, &tci);
+ MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
+ ShowWindow((HWND)tci.lParam, oPage == iOrder ? SW_SHOW : SW_HIDE);
+ if (IS_THEMED)
+ API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
+ }
+
tci.lParam = (LPARAM)CreateDialog(g_hInst,MAKEINTRESOURCE(IDD_OPT_DSPADVANCED), hwnd, DlgProcDspAdvanced);
tci.pszText = TranslateT("Advanced");
- TabCtrl_InsertItem(hwndTab, 3, &tci);
+ TabCtrl_InsertItem(hwndTab, ++iOrder, &tci);
MoveWindow((HWND)tci.lParam,64,25,rcClient.right-128,rcClient.bottom-67,1);
- ShowWindow((HWND)tci.lParam, oPage == 3 ? SW_SHOW : SW_HIDE);
+ ShowWindow((HWND)tci.lParam, oPage == iOrder ? SW_SHOW : SW_HIDE);
if (IS_THEMED)
API::pfnEnableThemeDialogTexture((HWND)tci.lParam, ETDT_ENABLETAB);
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index 7e7cb40f38..d07f079815 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -103,6 +103,25 @@ int LoadContactListModule(void) return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static INT_PTR GetCaps(WPARAM wParam, LPARAM)
+{
+ switch (wParam) {
+ case CLUICAPS_FLAGS1:
+ return CLUIF_HIDEEMPTYGROUPS | CLUIF_DISABLEGROUPS | CLUIF_HASONTOPOPTION | CLUIF_HASAUTOHIDEOPTION;
+ case CLUICAPS_FLAGS2:
+ return MAKELONG(MAXEXTRACOLUMNS,1);
+ }
+ return 0;
+}
+
+int PreloadContactListModule(void)
+{
+ CreateServiceFunction(MS_CLUI_GETCAPS, GetCaps);
+ return 0;
+}
+
/*
Begin of Hrk's code for bug
*/
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 63fed7fbce..f4cb71debc 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -175,6 +175,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirand extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_CLIST, MIID_LAST};
+int PreloadContactListModule(void);
int LoadContactListModule(void);
int LoadCLCModule(void);
void LoadCLUIModule( void );
@@ -311,6 +312,8 @@ extern "C" int __declspec(dllexport) CListInitialise() _tcslwr(cfg::dat.tszProfilePath);
+ PreloadContactListModule();
+
// get the clist interface
pcli = ( CLIST_INTERFACE* )CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)g_hInst);
if ( (INT_PTR)pcli == CALLSERVICE_NOTFOUND ) {
diff --git a/plugins/ExtraIcons/src/options.cpp b/plugins/ExtraIcons/src/options.cpp index 8d8d30c1fd..f1f1371403 100644 --- a/plugins/ExtraIcons/src/options.cpp +++ b/plugins/ExtraIcons/src/options.cpp @@ -25,40 +25,8 @@ HANDLE hOptHook = NULL;
-static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
// Functions //////////////////////////////////////////////////////////////////////////////////////
-
-int InitOptionsCallback(WPARAM wParam, LPARAM lParam)
-{
- if (GetNumberOfSlots() < 1)
- return 0;
-
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
- odp.pszGroup = LPGEN("Contact List");
- odp.pszTitle = LPGEN("Extra icons");
- odp.pszTab = LPGEN("General");
- odp.pfnDlgProc = OptionsDlgProc;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
- Options_AddPage(wParam, &odp);
-
- return 0;
-}
-
-void InitOptions()
-{
- hOptHook = HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
-}
-
-void DeInitOptions()
-{
- UnhookEvent(hOptHook);
-}
-
BOOL ScreenToClient(HWND hWnd, LPRECT lpRect)
{
BOOL ret;
@@ -864,3 +832,34 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP return 0;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int InitOptionsCallback(WPARAM wParam, LPARAM lParam)
+{
+ if (GetNumberOfSlots() < 1)
+ return 0;
+
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.hInstance = hInst;
+ odp.pszGroup = LPGEN("Contact List");
+ odp.pszTitle = LPGEN("Extra icons");
+ odp.pszTab = LPGEN("General");
+ odp.pfnDlgProc = OptionsDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.flags = ODPF_BOLDGROUPS | ODPF_EXPERTONLY;
+ Options_AddPage(wParam, &odp);
+
+ return 0;
+}
+
+void InitOptions()
+{
+ hOptHook = HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
+}
+
+void DeInitOptions()
+{
+ UnhookEvent(hOptHook);
+}
|