diff options
Diffstat (limited to 'plugins/StartupSilence/src/main.cpp')
-rw-r--r-- | plugins/StartupSilence/src/main.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 208f2a2f9a..a3be4ce0ad 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -94,6 +94,7 @@ INT_PTR StartupSilence() HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
mir_forkthread((pThreadFunc)AdvSt, NULL);
CreateServiceFunction(SS_SERVICE_NAME, SturtupSilenceEnabled);
+ CreateServiceFunction(SS_SILENCE_CONNECTION, SilenceConnection);
IsMenu();
HookEvent(ME_OPT_INITIALISE, InitializeOptions);
return 0;
@@ -134,13 +135,16 @@ int DisablePopup(WPARAM wParam, LPARAM lParam) if ((timer == 2 && NonStatusAllow == 1) //filtering while timer
|| (DefPopup == 1 && DefEnabled == 1)) //also filtered only: We do not run next lines every time
//if "Filtered only..." is unchecked --->
- {
+ {
HANDLE hContact = (HANDLE)wParam;
- if (hContact != NULL) {
+ if (hContact != NULL)
+ {
char* cp = GetContactProto(hContact);
if ( !strcmp(cp, "Weather") || !strcmp(cp, "mRadio") )
return 0;
}
+ else return 0; //allow popups for unread mail notification from MRA, keepstatus ... other services?
+
return 1; //filtering while timer
}
return 0; //---> just allow all popups with this return
@@ -278,6 +282,15 @@ static INT_PTR SturtupSilenceEnabled(WPARAM wParam, LPARAM lParam) return 0;
}
+static INT_PTR SilenceConnection(WPARAM wParam, LPARAM lParam)
+{
+ timer = (BYTE)wParam;
+// if (timer == 2) //commented for now
+// db_set_b(NULL, "Skin", "UseSound", 0);
+// else db_set_b(NULL, "Skin", "UseSound", 1);
+ return 0;
+}
+
static INT_PTR InitMenu()
{
CLISTMENUITEM mi = {sizeof(mi)};
|