diff options
author | George Hazan <george.hazan@gmail.com> | 2023-11-21 12:26:36 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-11-21 12:26:36 +0300 |
commit | ca7e7ca93dc11f1a02cf1d1dd4a1435b79d75fbe (patch) | |
tree | 10aa75f902c3ff4776bd0e6dda0fcee3d3984e88 /plugins/Toaster | |
parent | 176cbd229f87889d2467269e8f0c7a290e073e0b (diff) |
fixes #3941 (Toaster: добавить переключатель всплывающих окон в строку состояния плагинов сообщений)
Diffstat (limited to 'plugins/Toaster')
-rw-r--r-- | plugins/Toaster/src/main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp index 06c61e2dc0..852d5d504e 100644 --- a/plugins/Toaster/src/main.cpp +++ b/plugins/Toaster/src/main.cpp @@ -28,6 +28,27 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_POPUP, /////////////////////////////////////////////////////////////////////////////////////////
+static int SrmmMenu_ProcessIconClick(WPARAM, LPARAM lParam)
+{
+ StatusIconClickData *sicd = (StatusIconClickData *)lParam;
+
+ if (!mir_strcmp(sicd->szModule, MODULENAME))
+ Popup_Enable(!Popup_Enabled());
+
+ return 0;
+}
+
+static int OnModulesLoaded(WPARAM, LPARAM)
+{
+ StatusIconData sid = {};
+ sid.szModule = MODULENAME;
+ sid.szTooltip.a = LPGEN("Popup mode");
+ sid.hIcon = sid.hIconDisabled = Skin_LoadIcon(SKINICON_OTHER_POPUP);
+ Srmm_AddIcon(&sid, &g_plugin);
+
+ HookEvent(ME_MSG_ICONPRESSED, SrmmMenu_ProcessIconClick);
+}
+
static int OnShutdown(WPARAM, LPARAM)
{
CleanupClasses();
|