diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-15 21:04:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-15 21:04:26 +0000 |
commit | d949a7ed17fd90bfc1ee5d85c83812b974037531 (patch) | |
tree | c33e397185df5c4c974afa4ad385fa63dc48e637 /plugins/Clist_mw/src/groupmenu.cpp | |
parent | 90b4d09356a49c0f1c9f4ca0dc1cbc27f11fc2ae (diff) |
- fix for the Online/Offline button in clist_mw
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@2320 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_mw/src/groupmenu.cpp')
-rw-r--r-- | plugins/Clist_mw/src/groupmenu.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp index 9f5f5846ae..ecf2c4aeeb 100644 --- a/plugins/Clist_mw/src/groupmenu.cpp +++ b/plugins/Clist_mw/src/groupmenu.cpp @@ -155,7 +155,7 @@ INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) { if (wParam != 0)
{
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
- if (!strcmp(mmep->szServiceName,"Help/AboutCommand"))
+ if ( !strcmp(mmep->szServiceName,"Help/AboutCommand"))
{
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
@@ -184,7 +184,7 @@ return 0; INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS);
- DBWriteContactSettingByte(NULL,"CList","HideEmptyGroups",(BYTE)newVal);
+ db_set_b(NULL,"CList","HideEmptyGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETHIDEEMPTYGROUPS,newVal,0);
return 0;
}
@@ -192,7 +192,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam) INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
- DBWriteContactSettingByte(NULL,"CList","UseGroups",(BYTE)newVal);
+ db_set_b(NULL,"CList","UseGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETUSEGROUPS,newVal,0);
return 0;
}
@@ -209,11 +209,7 @@ SendMessage( static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
{
- CLISTMENUITEM mi;
-
-
- ZeroMemory(&mi,sizeof(mi));
- mi.cbSize = sizeof(mi);
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hHideOfflineUsersMenuItem, (LPARAM)&mi);
@@ -530,7 +526,7 @@ INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam) {
if (wParam != 0) {
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
- if (!strcmp(mmep->szServiceName,"Help/AboutCommand")) {
+ if ( !strcmp(mmep->szServiceName,"Help/AboutCommand")) {
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
CallService(mmep->szServiceName,mmep->Param1,lParam);
|