summaryrefslogtreecommitdiff
path: root/plugins/ZeroNotification
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2017-11-03 21:48:21 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2017-11-03 22:22:56 +0100
commit8b9c147b235578cff10c745c1f474547232c5d67 (patch)
tree0d122048c328a008318573b4f2d5371b16e517c4 /plugins/ZeroNotification
parentbb644d786800cf301ba36e27577261d90c940f8f (diff)
ZeroNotification: minor code cleaning
* remove unnecessary handles for hooks * remove dead link
Diffstat (limited to 'plugins/ZeroNotification')
-rw-r--r--plugins/ZeroNotification/src/main.cpp23
-rw-r--r--plugins/ZeroNotification/src/stdafx.cxx2
2 files changed, 7 insertions, 18 deletions
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index 26e8677049..f199aba221 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -1,9 +1,6 @@
/*
A small Miranda plugin, by bidyut, updated by Maat.
-
-Original plugin idea Anders Nilsson.
-His plugin NoSound can be found at:
-http://anders.nilsson.net/programs/miranda
+Original plugin idea (NoSound) by Anders Nilsson.
Miranda can be found here:
https://miranda-ng.org/
@@ -12,8 +9,6 @@ https://miranda-ng.org/
#include "stdafx.h"
HINSTANCE hInst;
-
-static HANDLE hEventSoundSettingChange, hEventStatusModeChange, hEventOptionsInitialize, hAckEvent;
HGENMENU noSoundMenu;
int hLangpack;
@@ -200,7 +195,7 @@ static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM, LPARA
}
return FALSE;
}
-//Called when the user opened the options dialog
+
static int OptionsInitialize(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
@@ -229,7 +224,6 @@ extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
- //The menu item - begin
if (!db_get_b(NULL, MODNAME, "HideMenu", 1)) {
CreateServiceFunction(MODNAME "/MenuCommand", NoSoundMenuCommand);
@@ -242,20 +236,15 @@ extern "C" __declspec(dllexport) int Load(void)
mi.pszService = MODNAME "/MenuCommand";
noSoundMenu = Menu_AddMainMenuItem(&mi);
}
- //The menu item - end
- //The hooks
- hAckEvent = HookEvent(ME_PROTO_ACK, ProtoAck);
- hEventSoundSettingChange = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SoundSettingChanged);
- hEventOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
+ HookEvent(ME_PROTO_ACK, ProtoAck);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SoundSettingChanged);
+ HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
return 0;
}
extern "C" __declspec(dllexport) int Unload(void)
{
- UnhookEvent(hEventSoundSettingChange);
- UnhookEvent(hEventOptionsInitialize);
- UnhookEvent(hAckEvent);
return 0;
-} \ No newline at end of file
+}
diff --git a/plugins/ZeroNotification/src/stdafx.cxx b/plugins/ZeroNotification/src/stdafx.cxx
index b05ed73bc5..e0372ed6dc 100644
--- a/plugins/ZeroNotification/src/stdafx.cxx
+++ b/plugins/ZeroNotification/src/stdafx.cxx
@@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdafx.h" \ No newline at end of file
+#include "stdafx.h"