diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-07 14:46:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-07 14:46:18 +0000 |
commit | 4bb5a1db945eb4027279213201e91da33351fb7e (patch) | |
tree | 96b400be24aee4d06a5172efc221d55fbd039e64 /plugins/UserInfoEx/svc_homepage.cpp | |
parent | 767d070330f3fb669495b2e3481f0c8abfcd1300 (diff) |
MS_SYSTEM_GETCONTACTINFO in UserInfoEx is made persistent
git-svn-id: http://svn.miranda-ng.org/main/trunk@812 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/svc_homepage.cpp')
-rw-r--r-- | plugins/UserInfoEx/svc_homepage.cpp | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/plugins/UserInfoEx/svc_homepage.cpp b/plugins/UserInfoEx/svc_homepage.cpp index 52b6e799e3..77248960ac 100644 --- a/plugins/UserInfoEx/svc_homepage.cpp +++ b/plugins/UserInfoEx/svc_homepage.cpp @@ -205,40 +205,19 @@ VOID SvcHomepageRebuildMenu() {
static HANDLE hPrebuildMenuHook = NULL;
- if (DB::Setting::GetByte(SET_GETCONTACTINFO_ENABLED, DEFVAL_GETCONTACTINFO_ENABLED))
- {
-
- if (!hPrebuildMenuHook)
- {
- hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildMenu);
- }
-
- if (!ghMenuItem)
- {
- CLISTMENUITEM mi;
-
- // insert contact menuitem
- ZeroMemory(&mi, sizeof(mi));
- mi.cbSize = sizeof(mi);
- mi.position = -2000010000;
- mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
- mi.pszName = "&Homepage";
- mi.pszService = MS_USERINFO_HOMEPAGE_OPENURL;
- ghMenuItem = Menu_AddContactMenuItem(&mi);
- }
- }
- else
- {
- if (hPrebuildMenuHook)
- {
- UnhookEvent(ME_CLIST_PREBUILDCONTACTMENU);
- hPrebuildMenuHook = NULL;
- }
- if (ghMenuItem)
- {
- CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)ghMenuItem, NULL);
- ghMenuItem = NULL;
- }
+ if (!hPrebuildMenuHook)
+ hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildMenu);
+
+ if (!ghMenuItem) {
+ // insert contact menuitem
+ CLISTMENUITEM mi = { 0 };
+ ZeroMemory(&mi, sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.position = -2000010000;
+ mi.hIcon = IcoLib_GetIcon(ICO_BTN_GOTO);
+ mi.pszName = "&Homepage";
+ mi.pszService = MS_USERINFO_HOMEPAGE_OPENURL;
+ ghMenuItem = Menu_AddContactMenuItem(&mi);
}
}
|