summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-08 18:45:11 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-08 18:45:11 +0000
commit929cf4f6f089cc4db4eea16898402120fc812e30 (patch)
tree67218e5b14923f8021b4406249756bdf1cab232a /plugins/Clist_nicer
parent71defe6c2ba6284e775f2317311e29a77c02b81d (diff)
default buttons from Clist Nicer+ & Modern
git-svn-id: http://svn.miranda-ng.org/main/trunk@859 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/INCLUDE/clc.h1
-rw-r--r--plugins/Clist_nicer/INCLUDE/commonheaders.h3
-rw-r--r--plugins/Clist_nicer/SRC/CLCButton.cpp96
-rw-r--r--plugins/Clist_nicer/SRC/clc.cpp4
-rw-r--r--plugins/Clist_nicer/SRC/clui.cpp118
-rw-r--r--plugins/Clist_nicer/SRC/extBackg.cpp14
-rw-r--r--plugins/Clist_nicer/SRC/init.cpp6
7 files changed, 163 insertions, 79 deletions
diff --git a/plugins/Clist_nicer/INCLUDE/clc.h b/plugins/Clist_nicer/INCLUDE/clc.h
index 27cb5d9a62..7a78e52564 100644
--- a/plugins/Clist_nicer/INCLUDE/clc.h
+++ b/plugins/Clist_nicer/INCLUDE/clc.h
@@ -340,6 +340,7 @@ struct TCluiData {
DWORD dwFlags;
DWORD topOffset, bottomOffset;
int statusBarHeight;
+ int soundsOff;
BYTE tabSRMM_Avail;
BYTE bMetaAvail;
BYTE bAvatarServiceAvail;
diff --git a/plugins/Clist_nicer/INCLUDE/commonheaders.h b/plugins/Clist_nicer/INCLUDE/commonheaders.h
index 2b52d2734d..6a2e363544 100644
--- a/plugins/Clist_nicer/INCLUDE/commonheaders.h
+++ b/plugins/Clist_nicer/INCLUDE/commonheaders.h
@@ -192,6 +192,9 @@
// shared vars
extern HINSTANCE g_hInst;
+extern LONG g_cxsmIcon, g_cysmIcon;
+extern StatusItems_t *StatusItems;
+extern ImageItem *g_glyphItem;
/* most free()'s are invalid when the code is executed from a dll, so this changes
all the bad free()'s to good ones, however it's still incorrect code. The reasons for not
diff --git a/plugins/Clist_nicer/SRC/CLCButton.cpp b/plugins/Clist_nicer/SRC/CLCButton.cpp
index 134ca1ae71..3ab8587d0f 100644
--- a/plugins/Clist_nicer/SRC/CLCButton.cpp
+++ b/plugins/Clist_nicer/SRC/CLCButton.cpp
@@ -16,15 +16,60 @@ 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.
*/
-#include <commonheaders.h>
+#include "commonheaders.h"
#include <m_button_int.h>
#include <m_toptoolbar.h>
-extern HINSTANCE g_hInst;
-extern LONG g_cxsmIcon, g_cysmIcon;
-extern StatusItems_t *StatusItems;
-extern ImageItem *g_glyphItem;
+struct
+{
+ int ctrlid;
+ char *pszButtonID, *pszButtonDn, *pszButtonName;
+ int isPush, isVis, isAction;
+ HANDLE hButton;
+}
+static BTNS[] =
+{
+ { IDC_TBTOPMENU, "CLN_topmenu", NULL, LPGEN("Show menu"), 1, 1, 1 },
+ { IDC_TBHIDEOFFLINE, "CLN_online", NULL, LPGEN("Show / hide offline contacts"), 0, 1, 0 },
+ { IDC_TBHIDEGROUPS, "CLN_groups", NULL, LPGEN("Toggle group mode"), 0, 1, 0 },
+ { IDC_TBFINDANDADD, "CLN_findadd", NULL, LPGEN("Find and add contacts"), 1, 1, 0 },
+ { IDC_TBACCOUNTS, "CLN_accounts", NULL, LPGEN("Accounts"), 1, 1, 0 },
+ { IDC_TBOPTIONS, "CLN_options", NULL, LPGEN("Open preferences"), 1, 1, 0 },
+ { IDC_TBSOUND, "CLN_sound", "CLN_soundsoff", LPGEN("Toggle sounds"), 0, 1, 0 },
+ { IDC_TBMINIMIZE, "CLN_minimize", NULL, LPGEN("Minimize contact list"), 1, 0, 0 },
+ { IDC_TBTOPSTATUS, "CLN_topstatus", NULL, LPGEN("Status menu"), 1, 0, 1 },
+ { IDC_TABSRMMSLIST, "CLN_slist", NULL, LPGEN("tabSRMM session list"), 1, 0, 1 },
+ { IDC_TABSRMMMENU, "CLN_menu", NULL, LPGEN("tabSRMM Menu"), 1, 0, 1 },
+
+ { IDC_TBSELECTVIEWMODE, "CLN_CLVM_select", NULL, LPGEN("Select view mode"), 1, 0, 1 },
+ { IDC_TBCONFIGUREVIEWMODE,"CLN_CLVM_options", NULL, LPGEN("Setup view modes"), 1, 0, 0 },
+ { IDC_TBCLEARVIEWMODE, "CLN_CLVM_reset", NULL, LPGEN("Clear view mode"), 1, 0, 0 }
+};
+
+static int InitDefaultButtons(WPARAM, LPARAM)
+{
+ TTBButton tbb = { 0 };
+ tbb.cbSize = sizeof(tbb);
+
+ for (int i=0; i < SIZEOF(BTNS); i++ ) {
+ tbb.dwFlags = TTBBF_ICONBYHANDLE;
+ if (BTNS[i].pszButtonID) {
+ tbb.pszTooltipUp = tbb.pszTooltipDn = tbb.name = BTNS[i].pszButtonName;
+ tbb.pszService = BTNS[i].pszButtonID;
+ tbb.hIconHandleUp = Skin_GetIconHandle(BTNS[i].pszButtonID);
+ if (BTNS[i].pszButtonDn)
+ tbb.hIconHandleUp = Skin_GetIconHandle(BTNS[i].pszButtonDn);
+ }
+ else tbb.dwFlags |= TTBBF_ISSEPARATOR;
+
+ tbb.dwFlags |= (BTNS[i].isVis ? TTBBF_VISIBLE :0 );
+ BTNS[i].hButton = TopToolbar_AddButton(&tbb);
+ }
+ return 1;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
struct MButtonExtension : public MButtonCtrl
{
@@ -32,7 +77,7 @@ struct MButtonExtension : public MButtonCtrl
TCHAR szText[128];
SIZE sLabel;
HIMAGELIST hIml;
- int iIcon;
+ int iIcon, iCtrlID;
BOOL bSendOnDown;
ButtonItem *buttonItem;
LONG lastGlyphMetrics[4];
@@ -292,7 +337,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_SYSKEYUP:
if (bct->stateId != PBS_DISABLED && bct->cHot && bct->cHot == tolower((int) wParam)) {
if (!bct->bSendOnDown)
- SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
+ SendMessage(pcli->hwndContactList, WM_COMMAND, MAKELONG(bct->iCtrlID, BN_CLICKED), (LPARAM) hwndDlg);
return 0;
}
break;
@@ -372,20 +417,21 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
case WM_LBUTTONDOWN:
if (bct->stateId != PBS_DISABLED && bct->stateId != PBS_PRESSED) {
if (bct->bSendOnDown) {
- SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
+ SendMessage(pcli->hwndContactList, WM_COMMAND, MAKELONG(bct->iCtrlID, BN_CLICKED), (LPARAM) hwndDlg);
bct->stateId = PBS_NORMAL;
InvalidateRect(bct->hwnd, NULL, TRUE);
+ return 1;
}
}
break;
case WM_LBUTTONUP:
if (!bct->bSendOnDown)
- SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(GetDlgCtrlID(hwndDlg), BN_CLICKED), (LPARAM) hwndDlg);
+ SendMessage(pcli->hwndContactList, WM_COMMAND, MAKELONG(bct->iCtrlID, BN_CLICKED), (LPARAM) hwndDlg);
break;
case WM_NCHITTEST:
- switch( SendMessage(GetParent(hwndDlg), WM_NCHITTEST, wParam, lParam)) {
+ switch( SendMessage(pcli->hwndContactList, WM_NCHITTEST, wParam, lParam)) {
case HTLEFT: case HTRIGHT: case HTBOTTOM: case HTTOP:
case HTTOPLEFT: case HTTOPRIGHT: case HTBOTTOMLEFT: case HTBOTTOMRIGHT:
return HTTRANSPARENT;
@@ -394,7 +440,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
return 0;
}
-static void CustomizeToolbar(HANDLE, HWND hWnd, LPARAM)
+static void SetButtonAsCustom(HWND hWnd)
{
MButtonCustomize Custom;
Custom.cbLen = sizeof(MButtonExtension);
@@ -403,10 +449,30 @@ static void CustomizeToolbar(HANDLE, HWND hWnd, LPARAM)
SendMessage(hWnd, BUTTONSETCUSTOM, 0, (LPARAM)&Custom);
}
-void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat)
+static void CustomizeToolbar(HANDLE hButton, HWND hWnd, LPARAM)
{
- CustomizeToolbar(0, hWnd, 0);
+ // we don't customize the toolbar window, only buttons
+ if (hButton == TTB_WINDOW_HANDLE)
+ return;
+
+ SetButtonAsCustom(hWnd);
+ for (int i=0; i < SIZEOF(BTNS); i++) {
+ if (BTNS[i].hButton != hButton)
+ continue;
+
+ MButtonExtension *bct = (MButtonExtension*) GetWindowLongPtr(hWnd, 0);
+ bct->iCtrlID = BTNS[i].ctrlid;
+ if (BTNS[i].isAction)
+ bct->bSendOnDown = TRUE;
+ if (!BTNS[i].isPush)
+ bct->bIsPushBtn = TRUE;
+ break;
+ }
+}
+void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat)
+{
+ SetButtonAsCustom(hWnd);
SendMessage(hWnd, BUTTONSETSKINNED, bIsSkinned, 0);
SendMessage(hWnd, BUTTONSETASTHEMEDBTN, bIsThemed, 0);
SendMessage(hWnd, BUTTONSETASFLATBTN, bIsFlat, 0);
@@ -414,12 +480,12 @@ void CustomizeButton(HWND hWnd, bool bIsSkinned, bool bIsThemed, bool bIsFlat)
static int Nicer_CustomizeToolbar(WPARAM, LPARAM)
{
+ HookEvent(ME_TTB_INITBUTTONS, InitDefaultButtons);
TopToolbar_SetCustomProc(CustomizeToolbar, 0);
return 0;
}
-int LoadButtonModule()
+void LoadButtonModule()
{
HookEvent(ME_SYSTEM_MODULESLOADED, Nicer_CustomizeToolbar);
- return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clc.cpp b/plugins/Clist_nicer/SRC/clc.cpp
index 9a7d81a66b..7d6ce337f3 100644
--- a/plugins/Clist_nicer/SRC/clc.cpp
+++ b/plugins/Clist_nicer/SRC/clc.cpp
@@ -168,6 +168,10 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam)
if ((lstrlenA(cws->szSetting) > 6 && !strncmp(cws->szSetting, "Status", 6)) || strstr("Default,ForceSend,Nick", cws->szSetting))
pcli->pfnClcBroadcast(INTM_NAMEORDERCHANGED, wParam, lParam);
}
+ if (!__strcmp(cws->szSetting, "UseSound")) {
+ cfg::dat.soundsOff = cfg::getByte(cws->szModule, cws->szSetting, 0) ? 0 : 1;
+ CheckDlgButton(pcli->hwndContactList, IDC_TBSOUND, cfg::dat.soundsOff ? BST_UNCHECKED : BST_CHECKED);
+ }
}
if (cfg::dat.bMetaAvail && cfg::dat.bMetaEnabled && !__strcmp(cws->szModule, cfg::dat.szMetaName) && !__strcmp(cws->szSetting, "IsSubcontact"))
pcli->pfnClcBroadcast(INTM_HIDDENCHANGED, wParam, lParam);
diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp
index 366e503c76..a000114e6c 100644
--- a/plugins/Clist_nicer/SRC/clui.cpp
+++ b/plugins/Clist_nicer/SRC/clui.cpp
@@ -106,32 +106,21 @@ static HBITMAP hbmLockedPoint = 0, hbmOldLockedPoint = 0;
HICON overlayicons[10];
-struct {
- HICON hIcon, hAltIcon;
- UINT idIcon, idAltIcon;
- char *szIcoLibIcon, *szIcoLibAltIcon;
- DWORD visibilityOrder;
- TCHAR *szTooltip;
-}
-static top_buttons[] =
-{
- { 0, 0, IDI_TBTOPMENU, 0, "CLN_topmenu", NULL, 1, LPGENT("Show menu") },
- { 0, 0, IDI_HIDEOFFLINE, 0, "CLN_online", NULL, 2, LPGENT("Show / hide offline contacts") },
- { 0, 0, IDI_HIDEGROUPS, 0, "CLN_groups", NULL, 4, LPGENT("Toggle group mode") },
- { 0, 0, IDI_FINDANDADD, 0, "CLN_findadd", NULL, 8, LPGENT("Find and add contacts") },
- { 0, 0, IDI_TBACCOUNTS, 0, "CLN_accounts", NULL, 8192, LPGENT("Accounts") },
- { 0, 0, IDI_TBOPTIONS, 0, "CLN_options", NULL, 16, LPGENT("Open preferences") },
- { 0, 0, IDI_SOUNDSON, IDI_SOUNDSOFF, "CLN_sound", "CLN_soundsoff", 32, LPGENT("Toggle sounds") },
- { 0, 0, IDI_MINIMIZE, 0, "CLN_minimize", NULL, 64, LPGENT("Minimize contact list") },
- { 0, 0, 0, 0, "CLN_topstatus", NULL, 128, LPGENT("Status menu") },
- { 0, 0, IDI_TABSRMMSESSIONLIST, 0, "CLN_slist", NULL, 256, LPGENT("tabSRMM session list") },
- { 0, 0, IDI_TABSRMMMENU, 0, "CLN_menu", NULL, 512, LPGENT("tabSRMM Menu") },
-
- { 0, 0, IDI_CLVM_SELECT, 0, "CLN_CLVM_select", NULL, 1024, LPGENT("Select view mode") },
- { 0, 0, IDI_CLVM_OPTIONS, 0, "CLN_CLVM_options", NULL, 2048, LPGENT("Setup view modes") },
- { 0, 0, IDI_DELETE, 0, "CLN_CLVM_reset", NULL, 4096, LPGENT("Clear view mode") },
-
- { 0, 0, IDI_MINIMIZE, 0, "", NULL, 0, LPGENT("Open main menu") }
+static struct IconDesc myIcons[] = {
+ { "CLN_online", LPGEN("Toggle show online/offline"), -IDI_HIDEOFFLINE },
+ { "CLN_groups", LPGEN("Toggle groups"), -IDI_HIDEGROUPS },
+ { "CLN_findadd", LPGEN("Find contacts"), -IDI_FINDANDADD },
+ { "CLN_options", LPGEN("Open preferences"), -IDI_TBOPTIONS },
+ { "CLN_sound", LPGEN("Toggle sounds"), -IDI_SOUNDSON },
+ { "CLN_minimize", LPGEN("Minimize contact list"), -IDI_MINIMIZE },
+ { "CLN_slist", LPGEN("Show tabSRMM session list"), -IDI_TABSRMMSESSIONLIST },
+ { "CLN_menu", LPGEN("Show tabSRMM menu"), -IDI_TABSRMMMENU },
+ { "CLN_soundsoff", LPGEN("Sounds are off"), -IDI_SOUNDSOFF },
+ { "CLN_CLVM_select", LPGEN("Select view mode"), -IDI_CLVM_SELECT },
+ { "CLN_CLVM_reset", LPGEN("Reset view mode"), -IDI_DELETE },
+ { "CLN_CLVM_options", LPGEN("Configure view modes"), -IDI_CLVM_OPTIONS },
+ { "CLN_topmenu", LPGEN("Show menu"), -IDI_TBTOPMENU },
+ { "CLN_accounts", LPGEN("Setup accounts"), -IDI_TBACCOUNTS }
};
HWND hTbMenu, hTbGlobalStatus;
@@ -335,32 +324,25 @@ static void CacheClientIcons()
static void InitIcoLib()
{
- SKINICONDESC sid = {0};
TCHAR szFilename[MAX_PATH];
- int i = 0, version = 0;
+ GetModuleFileName(g_hInst, szFilename, MAX_PATH);
+
+ SKINICONDESC sid = {0};
+ int i, version = 0;
char szBuffer[128];
int p_count = 0;
PROTOACCOUNT **accs = NULL;
- GetModuleFileName(g_hInst, szFilename, MAX_PATH);
-
sid.cbSize = sizeof(SKINICONDESC);
sid.flags = SIDF_PATH_TCHAR;
sid.pszSection = LPGEN("CList - Nicer/Default");
sid.ptszDefaultFile = szFilename;
-
- sid.pszName = "CLN_CLVM_select";
- sid.pszDescription = LPGEN("Select view mode");
- sid.iDefaultIndex = -IDI_CLVM_SELECT;
- Skin_AddIcon(&sid);
- sid.pszName = "CLN_CLVM_reset";
- sid.pszDescription = LPGEN("Reset view mode");
- sid.iDefaultIndex = -IDI_DELETE;
- Skin_AddIcon(&sid);
- sid.pszName = "CLN_CLVM_options";
- sid.pszDescription = LPGEN("Configure view modes");
- sid.iDefaultIndex = -IDI_CLVM_OPTIONS;
- Skin_AddIcon(&sid);
+ for (i=0; i < SIZEOF(myIcons); i++) {
+ sid.pszName = myIcons[i].szName;
+ sid.pszDescription = myIcons[i].szDesc;
+ sid.iDefaultIndex = myIcons[i].uId;
+ Skin_AddIcon(&sid);
+ }
sid.pszName = "CLN_visible";
sid.pszDescription = LPGEN("Contact on visible list");
@@ -588,7 +570,6 @@ void SetDBButtonStates(HANDLE hPassedContact)
}
}
-
void BlitWallpaper(HDC hdc, RECT *rc, RECT *rcPaint, struct ClcData *dat)
{
int x, y;
@@ -888,6 +869,18 @@ static void ShowCLUI(HWND hwnd)
SFL_SetState(cfg::dat.bUseFloater & CLUI_FLOATER_AUTOHIDE ? (old_cliststate == SETTING_STATE_NORMAL ? 0 : 1) : 1);
}
+static void GetButtonRect(HWND hwnd, RECT *rc)
+{
+ if (hwnd)
+ GetWindowRect(hwnd, rc);
+ else {
+ POINT pt;
+ GetCursorPos(&pt);
+ rc->bottom = rc->top = pt.y;
+ rc->left = rc->right = pt.x;
+ }
+}
+
#define M_CREATECLC (WM_USER+1)
LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -1572,22 +1565,35 @@ skipbg:
goto buttons_done;
}
switch (LOWORD(wParam)) {
- case IDC_TBMENU: {
+ case IDC_TBMENU:
+ case IDC_TBTOPMENU: {
RECT rc;
HMENU hMenu = (HMENU) CallService(MS_CLIST_MENUGETMAIN, 0, 0);
-
- GetWindowRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc);
+ GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, LOWORD(wParam) == IDC_TBMENU ? rc.top : rc.bottom, 0, hwnd, NULL);
return 0;
}
+ case IDC_TBTOPSTATUS:
case IDC_TBGLOBALSTATUS: {
RECT rc;
HMENU hmenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
- GetWindowRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc);
+ GetButtonRect(GetDlgItem(hwnd, LOWORD(wParam)), &rc);
TrackPopupMenu(hmenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, rc.left, rc.top, 0, hwnd, NULL);
return 0;
}
+ case IDC_TABSRMMSLIST:
+ case IDC_TABSRMMMENU:
+ if (ServiceExists("SRMsg_MOD/GetWindowFlags"))
+ CallService("SRMsg_MOD/Show_TrayMenu", 0, LOWORD(wParam) == IDC_TABSRMMSLIST ? 0 : 1);
+ return 0;
+
+ case IDC_TBSOUND:
+ cfg::dat.soundsOff = !cfg::dat.soundsOff;
+ cfg::writeByte("CLUI", "NoSounds", (BYTE)cfg::dat.soundsOff);
+ cfg::writeByte("Skin", "UseSound", (BYTE)(cfg::dat.soundsOff ? 0 : 1));
+ return 0;
+
case IDC_TBSELECTVIEWMODE:
SendMessage(g_hwndViewModeFrame, WM_COMMAND, IDC_SELECTMODE, lParam);
break;
@@ -1597,8 +1603,18 @@ skipbg:
case IDC_TBCONFIGUREVIEWMODE:
SendMessage(g_hwndViewModeFrame, WM_COMMAND, IDC_CONFIGUREMODES, lParam);
break;
+ case IDC_TBFINDANDADD:
+ CallService(MS_FINDADD_FINDADD, 0, 0);
+ return 0;
+ case IDC_TBACCOUNTS:
+ CallService(MS_PROTO_SHOWACCMGR, 0, 0);
+ break;
+ case IDC_TBOPTIONS:
+ CallService("Options/OptionsCommand", 0, 0);
+ return 0;
}
- } else if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), (LPARAM)(HANDLE) NULL))
+ }
+ else if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_MAINMENU), (LPARAM)(HANDLE) NULL))
return 0;
buttons_done:
@@ -1610,6 +1626,7 @@ buttons_done:
DestroyWindow(hwnd);
break;
case ID_TRAY_HIDE:
+ case IDC_TBMINIMIZE:
pcli->pfnShowHide(0, 0);
break;
case POPUP_NEWGROUP:
@@ -1618,6 +1635,7 @@ buttons_done:
CallService(MS_CLIST_GROUPCREATE, 0, 0);
break;
case POPUP_HIDEOFFLINE:
+ case IDC_TBHIDEOFFLINE:
CallService(MS_CLIST_SETHIDEOFFLINE, (WPARAM)(-1), 0);
break;
case POPUP_HIDEOFFLINEROOT:
@@ -1629,10 +1647,12 @@ buttons_done:
SendMessage(pcli->hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
break;
}
+ case IDC_TBHIDEGROUPS:
case POPUP_DISABLEGROUPS: {
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
cfg::writeByte("CList", "UseGroups", (BYTE) newVal);
SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
+ CheckDlgButton(hwnd, IDC_TBHIDEGROUPS, newVal ? BST_CHECKED : BST_UNCHECKED);
break;
}
case POPUP_HIDEMIRANDA:
diff --git a/plugins/Clist_nicer/SRC/extBackg.cpp b/plugins/Clist_nicer/SRC/extBackg.cpp
index 089c41e6e7..9cc8f0fd44 100644
--- a/plugins/Clist_nicer/SRC/extBackg.cpp
+++ b/plugins/Clist_nicer/SRC/extBackg.cpp
@@ -1172,19 +1172,7 @@ static void BTN_ReadItem(char *itemName, char *file)
tmpItem.uId = nextButtonID++;
}
}
- else if(_stricmp(szBuffer, "Custom")) {
- int i = 0;
- /*
- while(top_buttons[i].id) {
- if (!_stricmp(top_buttons[i].szIcoLibIcon, szBuffer)) {
- tmpItem.uId = top_buttons[i].id;
- tmpItem.dwFlags |= BUTTON_ISINTERNAL;
- break;
- }
- i++;
- }
- */
- }
+
GetPrivateProfileStringA(itemName, "PassContact", "None", szBuffer, 1000, file);
if(_stricmp(szBuffer, "None")) {
if(szBuffer[0] == 'w' || szBuffer[0] == 'W')
diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp
index 16a33bfc66..3b2f372f95 100644
--- a/plugins/Clist_nicer/SRC/init.cpp
+++ b/plugins/Clist_nicer/SRC/init.cpp
@@ -55,7 +55,8 @@ struct ClcContact* CreateClcContact( void );
struct CListEvent* fnCreateEvent( void );
void ReloadThemedOptions();
void TrayIconUpdateBase(const char *szChangedProto);
-void RegisterCLUIFrameClasses();
+void RegisterCLUIFrameClasses();
+void LoadButtonModule();
void GetDefaultFontSetting(int i, LOGFONT *lf, COLORREF *colour);
int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
@@ -305,6 +306,7 @@ extern "C" int __declspec(dllexport) CListInitialise()
cfg::dat.dwFlags = cfg::getDword("CLUI", "Frameflags", CLUI_FRAME_STATUSICONS | CLUI_FRAME_SHOWBOTTOMBUTTONS |
CLUI_FRAME_BUTTONSFLAT | CLUI_FRAME_CLISTSUNKEN);
cfg::dat.dwFlags |= (cfg::getByte("CLUI", "ShowSBar", 1) ? CLUI_FRAME_SBARSHOW : 0);
+ cfg::dat.soundsOff = cfg::getByte("CLUI", "NoSounds", 0);
CallService(MS_DB_GETPROFILEPATH, MAX_PATH, (LPARAM)szProfilePath);
@@ -365,6 +367,7 @@ LBL_Error:
rc = LoadContactListModule();
if (rc == 0)
rc = LoadCLCModule();
+ LoadButtonModule();
HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
return rc;
}
@@ -384,4 +387,3 @@ extern "C" int __declspec(dllexport) Unload(void)
UnLoadCLUIFramesModule();
return 0;
}
-