summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-11-02 15:31:01 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-11-02 15:31:01 +0000
commitb00c26145dbf35830e85590e8442ec910a9a9b56 (patch)
treec10eb8a3900dab2833ea21406f27a0814b1dde58
parentedcd2e23f19aedc49b6ed1ad05cd311db83aca87 (diff)
StartupSilence: filtered mode popup notification
git-svn-id: http://svn.miranda-ng.org/main/trunk@6745 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/StartupSilence/res/StartupSilence.rc2
-rw-r--r--plugins/StartupSilence/res/filteredon.icobin0 -> 894 bytes
-rw-r--r--plugins/StartupSilence/src/StartupSilence.h7
-rw-r--r--plugins/StartupSilence/src/main.cpp7
-rw-r--r--plugins/StartupSilence/src/resource.h1
5 files changed, 11 insertions, 6 deletions
diff --git a/plugins/StartupSilence/res/StartupSilence.rc b/plugins/StartupSilence/res/StartupSilence.rc
index 74bb4407a2..693450c42b 100644
--- a/plugins/StartupSilence/res/StartupSilence.rc
+++ b/plugins/StartupSilence/res/StartupSilence.rc
@@ -92,7 +92,7 @@ IDI_SSENABLE ICON "enable.ico"
IDI_SSDISABLE ICON "disable.ico"
IDI_SSENABLETTB ICON "enablettb.ico"
IDI_SSDISABLETTB ICON "disablettb.ico"
-
+IDI_SSFILTEREDON ICON "filteredon.ico"
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
diff --git a/plugins/StartupSilence/res/filteredon.ico b/plugins/StartupSilence/res/filteredon.ico
new file mode 100644
index 0000000000..7d3471467a
--- /dev/null
+++ b/plugins/StartupSilence/res/filteredon.ico
Binary files differ
diff --git a/plugins/StartupSilence/src/StartupSilence.h b/plugins/StartupSilence/src/StartupSilence.h
index 99cf3ed2be..eef2e72621 100644
--- a/plugins/StartupSilence/src/StartupSilence.h
+++ b/plugins/StartupSilence/src/StartupSilence.h
@@ -52,8 +52,10 @@ INT_PTR SilenceConnection(WPARAM wParam, LPARAM lParam);
#define ENABLE_SILENCE LPGEN("Toggle Silence ON")
#define DISABLE_SILENCETTB LPGEN("Toggle Silence OFF TTB")
#define ENABLE_SILENCETTB LPGEN("Toggle Silence ON TTB")
-#define ALL_ENABLED TranslateT("Sounds and popups are enabled")
-#define ALL_DISABLED TranslateT("Sounds and popups are disabled temporarily")
+#define ALL_ENABLED TranslateT("Sounds and popups are enabled")
+#define ALL_ENABLED_FLT LPGEN("Filtered mode On")
+#define ALL_DISABLED TranslateT("Sounds and popups are disabled temporarily")
+#define ALL_DISABLED_FLT TranslateT("Sounds and popups are disabled temporarily\nAllow mRadio or Weather popups, etc...")
#define S_MODE_CHANGEDON TranslateT("Silent Startup mode changed to ON")
#define S_MODE_CHANGEDOFF TranslateT("Silent Startup mode changed to OFF")
#define SS_IS_ON Translate("Silence At Startup is ON")
@@ -65,6 +67,7 @@ INT_PTR SilenceConnection(WPARAM wParam, LPARAM lParam);
static IconItem iconList[] = {
{MENU_NAME, MENU_NAME, IDI_SSICON},
+ {ALL_ENABLED_FLT, ALL_ENABLED_FLT, IDI_SSFILTEREDON},
{DISABLE_SILENCE, DISABLE_SILENCE, IDI_SSDISABLE},
{ENABLE_SILENCE, ENABLE_SILENCE, IDI_SSENABLE}
};
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index a3be4ce0ad..1bd2e66885 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -235,8 +235,8 @@ static INT_PTR AdvSt()
EnablePopupModule();
if (PopUp == 1) {
- lptzText = ALL_DISABLED;
- ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)GetIconHandle(MENU_NAME));
+ lptzText = NonStatusAllow == 1 ? ALL_DISABLED_FLT : ALL_DISABLED;
+ ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)(NonStatusAllow == 1 ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME)));
ppd.lchContact = NULL;
ppd.iSeconds = PopUpTime;
wcsncpy_s(ppd.lptzText, lptzText, size_t(lptzText));
@@ -250,7 +250,8 @@ static INT_PTR AdvSt()
timer = 0;
if (PopUp == 1) {
- lptzText = ALL_ENABLED;
+ lptzText = (DefEnabled == 1 && DefPopup == 1) ? TranslateT(ALL_ENABLED_FLT) : ALL_ENABLED;
+ ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)((DefEnabled == 1 && DefPopup == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME)));
wcsncpy_s(ppd.lptzText, lptzText, size_t(lptzText));
PUAddPopupT(&ppd);
}
diff --git a/plugins/StartupSilence/src/resource.h b/plugins/StartupSilence/src/resource.h
index df8183de0e..a14aa93342 100644
--- a/plugins/StartupSilence/src/resource.h
+++ b/plugins/StartupSilence/src/resource.h
@@ -8,6 +8,7 @@
#define IDD_SSOPT 104
#define IDI_SSENABLETTB 105
#define IDI_SSDISABLETTB 106
+#define IDI_SSFILTEREDON 107
#define IDC_SSTIME 40001
#define IDC_DELAY 40002
#define IDC_SSSPIN 40003