summaryrefslogtreecommitdiff
path: root/plugins/IEHistory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEHistory')
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp15
-rw-r--r--plugins/IEHistory/src/events.cpp27
-rw-r--r--plugins/IEHistory/src/events.h4
3 files changed, 15 insertions, 31 deletions
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index b12c216810..3427308ada 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -67,10 +67,23 @@ extern "C" int __declspec(dllexport) Load(void)
if ((hUxTheme = LoadLibraryA("uxtheme.dll")) != 0)
MyEnableThemeDialogTexture = (BOOL(WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
- //all initialization here
+ /// all initialization here
hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HISTORYICON));
+ hOpenWindowsList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
InitServices();
+
+ /// menu items
+ CLISTMENUITEM menuItem = { sizeof(CLISTMENUITEM) };
+ menuItem.ptszName = LPGENT("View &history");
+ menuItem.flags = CMIF_TCHAR;
+ menuItem.position = 1000090000;
+ menuItem.hIcon = hIcon;
+ menuItem.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
+ Menu_AddContactMenuItem(&menuItem);
+/// @todo (White-Tiger#1#08/19/14): fully implement System History someday^^
+ menuItem.ptszName = LPGENT("&System History");
+ Menu_AddMainMenuItem(&menuItem);
HookEvents();
return 0;
diff --git a/plugins/IEHistory/src/events.cpp b/plugins/IEHistory/src/events.cpp
index 2b73d127b1..5a5dd6a8c9 100644
--- a/plugins/IEHistory/src/events.cpp
+++ b/plugins/IEHistory/src/events.cpp
@@ -21,47 +21,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "events.h"
-HANDLE hModulesLoaded;
HANDLE hOptionsInitialize;
int HookEvents()
{
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialize);
return 0;
}
int UnhookEvents()
{
- UnhookEvent(hModulesLoaded);
UnhookEvent(hOptionsInitialize);
return 0;
}
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
-{
- CLISTMENUITEM menuItem = {0};
- menuItem.cbSize = sizeof(CLISTMENUITEM);
- menuItem.flags = 0;
- menuItem.pszContactOwner = NULL; //all contacts
- menuItem.hIcon = hIcon;
-
- menuItem.position = 1000090000;
-
- menuItem.pszName = Translate("View &history");
- menuItem.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
-
- Menu_AddContactMenuItem(&menuItem);
-
-/// @todo (White-Tiger#1#08/19/14): fully implement
- menuItem.pszName = Translate("&System History");
- Menu_AddMainMenuItem(&menuItem);
- //PLUGININFO pInfo = pluginInfo;
- //pInfo.shortName = "IEView History Viewer";
- hOpenWindowsList = (HANDLE) CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
- return 0;
-}
-
int OnOptionsInitialize(WPARAM wParam, LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/plugins/IEHistory/src/events.h b/plugins/IEHistory/src/events.h
index 8dee289795..70dd68cccf 100644
--- a/plugins/IEHistory/src/events.h
+++ b/plugins/IEHistory/src/events.h
@@ -23,13 +23,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-extern HANDLE hModulesLoaded;
extern HANDLE hOptionsInitialize;
int HookEvents();
int UnhookEvents();
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam);
int OnOptionsInitialize(WPARAM wParam, LPARAM lParam);
-#endif //M_HISTORY_HOOKED_EVENTS_H \ No newline at end of file
+#endif //M_HISTORY_HOOKED_EVENTS_H