diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-06-08 14:11:04 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-06-08 14:11:04 +0000 |
commit | 622896cbc0960da3ea412615d23dfb30d624539b (patch) | |
tree | 0856ddb50a047ef918c90fdae219eb721ad063de /plugins/Modernb | |
parent | 47739a02585405a13b81123da3a9f3ff97cea0b9 (diff) |
clist_modern: Temporary show empty groups when creating new group
clist_modern, clist_nicer: Also temporary enable groups when creating new group
git-svn-id: http://svn.miranda-ng.org/main/trunk@361 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Modernb')
-rw-r--r-- | plugins/Modernb/modern_clc.cpp | 1 | ||||
-rw-r--r-- | plugins/Modernb/modern_groupmenu.cpp | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Modernb/modern_clc.cpp b/plugins/Modernb/modern_clc.cpp index ec54139d94..243d399d52 100644 --- a/plugins/Modernb/modern_clc.cpp +++ b/plugins/Modernb/modern_clc.cpp @@ -519,6 +519,7 @@ static LRESULT clcOnCommand(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM wPa if (contact->type != CLCIT_GROUP)
return 0;
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS);
+ SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) | CLS_USEGROUPS);
CallService(MS_CLIST_GROUPCREATE, contact->groupId, 0);
return 0;
case POPUP_RENAMEGROUP:
diff --git a/plugins/Modernb/modern_groupmenu.cpp b/plugins/Modernb/modern_groupmenu.cpp index 7d1fde6433..d0aa305006 100644 --- a/plugins/Modernb/modern_groupmenu.cpp +++ b/plugins/Modernb/modern_groupmenu.cpp @@ -223,6 +223,15 @@ SendMessage( return 0;
};
+INT_PTR CreateGroupHelper(WPARAM wParam,LPARAM lParam)
+{
+ SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0), CLM_SETHIDEEMPTYGROUPS, 0, 0);
+ SendMessage((HWND)CallService(MS_CLUI_GETHWNDTREE,0,0), CLM_SETUSEGROUPS, 1, 0);
+ CallService(MS_CLIST_GROUPCREATE, 0, 0);
+
+ return 0;
+};
+
static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam)
{
CLISTMENUITEM mi;
@@ -286,6 +295,7 @@ void GroupMenus_Init(void) CreateServiceFunction("CLISTMENUSGroup/HideGroupsHelper",HideGroupsHelper);
CreateServiceFunction("CLISTMENUSGroup/UseGroupsHelper",UseGroupsHelper);
CreateServiceFunction("CLISTMENUSGroup/HideOfflineRootHelper",HideOfflineRootHelper);
+ CreateServiceFunction("CLISTMENUSGroup/CreateGroupHelper",CreateGroupHelper);
CreateServiceFunction(MS_CLIST_ADDGROUPMENUITEM,AddGroupMenuItem);
CreateServiceFunction(MS_CLIST_REMOVEGROUPMENUITEM,RemoveGroupMenuItem);
@@ -399,7 +409,7 @@ void GroupMenus_Init(void) mi.cbSize=sizeof(mi);
mi.position=100000;
mi.hIcon=ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
- mi.pszService=MS_CLIST_GROUPCREATE;
+ mi.pszService="CLISTMENUSGroup/CreateGroupHelper";
mi.pszName=LPGEN("&New Group");
hNewGroupMenuItem=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
|