diff options
Diffstat (limited to 'plugins/StartupSilence/src')
-rw-r--r-- | plugins/StartupSilence/src/main.cpp | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 084297eb78..abe47b5afb 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -223,38 +223,40 @@ void IsMenu() static INT_PTR AdvSt()
{
- if ((Enabled == 1)){
- POPUPDATAT ppd = {0};
- TCHAR * lptzText =L"";
- db_set_b(NULL, "Skin", "UseSound", 0);
- EnablePopupModule();
-
- if (PopUp == 1) {
- lptzText = NonStatusAllow == 1 ? ALL_DISABLED_FLT : ALL_DISABLED;
- ppd.lchIcon = IcoLib_GetIconByHandle((NonStatusAllow == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME));
- ppd.lchContact = NULL;
- ppd.iSeconds = PopUpTime;
- wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE);
- lptzText = TranslateT(MENU_NAME);
- wcsncpy_s(ppd.lptzContactName, lptzText, _TRUNCATE);
- PUAddPopupT(&ppd);
- }
+ Thread_SetName("StartupSilenc: AdvSt");
- timer = 2;
- Sleep(delay * 1000);
- timer = 0;
+ if ((Enabled == 1)) {
+ POPUPDATAT ppd = {0};
+ TCHAR * lptzText =L"";
+ db_set_b(NULL, "Skin", "UseSound", 0);
+ EnablePopupModule();
+
+ if (PopUp == 1) {
+ lptzText = NonStatusAllow == 1 ? ALL_DISABLED_FLT : ALL_DISABLED;
+ ppd.lchIcon = IcoLib_GetIconByHandle((NonStatusAllow == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME));
+ ppd.lchContact = NULL;
+ ppd.iSeconds = PopUpTime;
+ wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE);
+ lptzText = TranslateT(MENU_NAME);
+ wcsncpy_s(ppd.lptzContactName, lptzText, _TRUNCATE);
+ PUAddPopupT(&ppd);
+ }
- if (PopUp == 1) {
- lptzText = (DefEnabled == 1 && DefPopup == 1) ? TranslateT(ALL_ENABLED_FLT) : ALL_ENABLED;
- ppd.lchIcon = IcoLib_GetIconByHandle((DefEnabled == 1 && DefPopup == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME));
- wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE);
- PUAddPopupT(&ppd);
- }
- if (DefEnabled == 1) { //predefined sound setting
- db_set_b(NULL, "Skin", "UseSound", DefSound);
- }
- else db_set_b(NULL, "Skin", "UseSound", 1); //or enable sounds every starts
+ timer = 2;
+ Sleep(delay * 1000);
+ timer = 0;
+
+ if (PopUp == 1) {
+ lptzText = (DefEnabled == 1 && DefPopup == 1) ? TranslateT(ALL_ENABLED_FLT) : ALL_ENABLED;
+ ppd.lchIcon = IcoLib_GetIconByHandle((DefEnabled == 1 && DefPopup == 1) ? GetIconHandle(ALL_ENABLED_FLT) : GetIconHandle(MENU_NAME));
+ wcsncpy_s(ppd.lptzText, lptzText, _TRUNCATE);
+ PUAddPopupT(&ppd);
}
+ if (DefEnabled == 1) { //predefined sound setting
+ db_set_b(NULL, "Skin", "UseSound", DefSound);
+ }
+ else db_set_b(NULL, "Skin", "UseSound", 1); //or enable sounds every starts
+ }
return 0;
}
|