summaryrefslogtreecommitdiff
path: root/popup/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'popup/src/main.cpp')
-rw-r--r--popup/src/main.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/popup/src/main.cpp b/popup/src/main.cpp
index 494a7e4..3850a43 100644
--- a/popup/src/main.cpp
+++ b/popup/src/main.cpp
@@ -51,6 +51,7 @@ static int OptionsInitialize(WPARAM,LPARAM);
//===== Initializations =====
static int OkToExit(WPARAM,LPARAM);
bool OptionLoaded = false;
+int hLangpack = 0;
//===== Global variables =====
//===== DLLs =====
@@ -352,7 +353,7 @@ void registerUpdate(){
Update update = {0};
char szVersion[16];
update.cbSize = sizeof(Update);
- update.szComponentName = pluginInfo.shortName;
+ update.szComponentName = pluginInfoEx.shortName;
update.pbVersion = (BYTE *)CreateVersionStringPluginEx(&pluginInfoEx, szVersion);
update.cpbVersion = (int)strlen((char *)update.pbVersion);
@@ -382,6 +383,12 @@ void LoadHotkey(){
hk.ptszSection = LPGENT(MODULNAME_PLU);
hk.pszService = MENUCOMMAND_SVC;
CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &hk);
+
+ // 'Popup History' Hotkey
+ hk.pszName = "Popup History";
+ hk.ptszDescription = LPGENT("Popup History");
+ hk.pszService = MENUCOMMAND_HISTORY;
+ CallService(MS_HOTKEY_REGISTER, 0, (LPARAM) &hk);
}
//menu
@@ -485,21 +492,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
//===== MirandaPluginInfo =====
//Called by Miranda to get the information associated to this plugin.
-//It only returns the PLUGININFO structure, without any test on the version
+//It only returns the PLUGININFOEX structure, without any test on the version
//@param mirandaVersion - The version of the application calling this function
-MIRAPI PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
-{
- g_popup.MirVer = mirandaVersion;
-
-#if defined(_UNICODE)
- pluginInfo.flags = UNICODE_AWARE;
-#else
- if (GetProcAddress(GetModuleHandle(_T("user32")), "DrawTextExW"))
- pluginInfo.flags = 1; // dynamic UNICODE_AWARE
-#endif
- return &pluginInfo;
-}
-
MIRAPI PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
g_popup.MirVer = mirandaVersion;
@@ -532,7 +526,7 @@ static int OkToExit(WPARAM wParam, LPARAM lParam)
static INT_PTR svcGetVersion(WPARAM, LPARAM)
{
- return pluginInfo.version;
+ return pluginInfoEx.version;
}
//===== Load =====
@@ -557,6 +551,7 @@ MIRAPI int Load(PLUGINLINK *link)
mir_getMMI (&mmi);
mir_getUTFI (&utfi);
mir_getMTI (&MText);
+ mir_getLP(&pluginInfoEx);
#if defined(_DEBUG)
PopUpOptions.debug = DBGetContactSettingByte(NULL, MODULNAME, "debug", FALSE);
@@ -648,7 +643,7 @@ MIRAPI int Load(PLUGINLINK *link)
PopupHistoryLoad();
LoadPopupThread();
- if (!(LoadPopupWnd2()))
+ if (!LoadPopupWnd2())
{
MessageBox(0, TranslateTS(
_T("Error: I could not register the PopUp Window class.\r\n")
@@ -662,7 +657,7 @@ MIRAPI int Load(PLUGINLINK *link)
// Register in DBEditor++
DBVARIANT dbv;
if (DBGetContactSetting(NULL, "KnownModules", MODULNAME, &dbv))
- DBWriteContactSettingString(NULL, "KnownModules", pluginInfo.shortName, MODULNAME);
+ DBWriteContactSettingString(NULL, "KnownModules", pluginInfoEx.shortName, MODULNAME);
DBFreeVariant(&dbv);
hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);