summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-03-18 12:46:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-03-18 12:46:23 +0300
commit64c29727ee3ccca5581a2103d16536f323fafe57 (patch)
tree278ccf094849c2f0e8d2a12cc0f6295996c77fc1
parentd07899c7630040511591755c86371a9fbd58da34 (diff)
fixes #2784 (StartupSilence: remove "Main menu item" option)
-rw-r--r--plugins/HTTPServer/src/version.h2
-rw-r--r--plugins/StartupSilence/res/StartupSilence.rc49
-rw-r--r--plugins/StartupSilence/src/main.cpp27
-rw-r--r--plugins/StartupSilence/src/resource.h1
-rw-r--r--plugins/StartupSilence/src/version.h8
5 files changed, 47 insertions, 40 deletions
diff --git a/plugins/HTTPServer/src/version.h b/plugins/HTTPServer/src/version.h
index 6c93022e1c..17f253dbc4 100644
--- a/plugins/HTTPServer/src/version.h
+++ b/plugins/HTTPServer/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 2
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#include <stdver.h>
diff --git a/plugins/StartupSilence/res/StartupSilence.rc b/plugins/StartupSilence/res/StartupSilence.rc
index 635a986bc4..98a6db1ddc 100644
--- a/plugins/StartupSilence/res/StartupSilence.rc
+++ b/plugins/StartupSilence/res/StartupSilence.rc
@@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// NEUTRAL resources
+// Neutral resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
@@ -24,12 +24,12 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// Dialog
//
-IDD_SSOPT DIALOGEX 0, 0, 312, 238
+IDD_SSOPT DIALOGEX 0, 0, 312, 210
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- GROUPBOX "Silence at Startup",IDC_STATIC,3,0,304,133
+ GROUPBOX "Silence at Startup",IDC_STATIC,3,0,304,121
LTEXT "Settings for the next Computer Name:",IDC_STATIC,11,11,182,8
EDITTEXT IDC_HST,24,22,271,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP
CONTROL "Enable silence at startup",IDC_DELAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,34,259,9
@@ -41,16 +41,17 @@ BEGIN
EDITTEXT IDC_SSPOPUPTIME,47,75,34,14,ES_AUTOHSCROLL | ES_NUMBER
CONTROL "",IDC_SSSPIN2,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,77,75,12,15
LTEXT "Popup time 1-30 seconds (Default 5)",IDC_STATIC,83,77,161,9
- CONTROL "Main Menu Item (plugin reload or Miranda restart required)",IDC_MENU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,92,259,9
- CONTROL "TopToolBar button (Miranda restart required)",IDC_TTB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,105,259,9
- PUSHBUTTON "Reset to default\r\n(for this computer)",IDC_RESETDEFAULT,207,215,100,20,BS_CENTER | BS_VCENTER | BS_MULTILINE | NOT WS_TABSTOP
- CTEXT "You need to configure it once for each computer, where you run your Miranda NG.",IDC_STATIC,7,195,295,20
- LTEXT "No Apply button required.",IDC_STATIC,11,220,184,8
- GROUPBOX "After startup set:",IDC_STATIC,3,136,303,57
- CONTROL "Filtered popups only (leave uncheck for no popups)",IDC_DEFPOPUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,167,274,9
- CONTROL "Enable sounds",IDC_DEFSOUNDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,181,287,9
- CONTROL "Allow to set sounds and filtered popups only after startup (uncheck for all popups and sounds)",IDC_RESTORE,"Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,11,147,290,19
- CONTROL "Allow mRadio or Weather popups, etc.",IDC_NONSTATUSES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,118,259,9
+ CONTROL "TopToolBar button (Miranda restart required)",IDC_TTB,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,92,259,9
+ PUSHBUTTON "Reset to default",IDC_RESETDEFAULT,207,184,100,20,BS_CENTER | BS_VCENTER | BS_MULTILINE | NOT WS_TABSTOP
+ GROUPBOX "After startup set:",IDC_STATIC,3,123,303,57
+ CONTROL "Filtered popups only (leave uncheck for no popups)",IDC_DEFPOPUP,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,22,154,274,9
+ CONTROL "Enable sounds",IDC_DEFSOUNDS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,168,287,9
+ CONTROL "Allow to set sounds and filtered popups only after startup (uncheck for all popups and sounds)",IDC_RESTORE,
+ "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,11,134,290,19
+ CONTROL "Allow mRadio or Weather popups, etc.",IDC_NONSTATUSES,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,105,259,9
END
@@ -88,11 +89,18 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_SSICON ICON "startupsilence.ico"
+
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
@@ -103,12 +111,23 @@ GUIDELINES DESIGNINFO
BEGIN
IDD_SSOPT, DIALOG
BEGIN
- BOTTOMMARGIN, 235
+ BOTTOMMARGIN, 204
END
END
#endif // APSTUDIO_INVOKED
-#endif // NEUTRAL resources
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// AFX_DIALOG_LAYOUT
+//
+
+IDD_SSOPT AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
+#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 40f0f9741d..2b524c864d 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -26,18 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CMPlugin g_plugin;
-HGENMENU hSSMenuToggleOnOff;
-HANDLE hOptionsInitialize;
HANDLE hTTBarloaded = nullptr;
HANDLE Buttons = nullptr;
-int DisablePopup(WPARAM wParam, LPARAM lParam);
-void RemoveTTButtons();
BYTE Enabled;
DWORD delay;
BYTE PopUp;
DWORD PopUpTime;
-BYTE MenuItem;
BYTE TTBButtons;
BYTE DefSound;
BYTE DefPopup;
@@ -183,7 +178,6 @@ void LoadSettings()
delay = g_plugin.getDword(DelayComp);
PopUp = g_plugin.getByte(PopUpComp);
PopUpTime = g_plugin.getDword(PopUpTimeComp);
- MenuItem = g_plugin.getByte(MenuitemComp);
TTBButtons = g_plugin.getByte(TTBButtonsComp);
DefSound = g_plugin.getByte(DefSoundComp);
DefPopup = g_plugin.getByte(DefPopupComp);
@@ -207,8 +201,7 @@ static INT_PTR StartupSilenceEnabled(WPARAM, LPARAM)
{
g_plugin.setByte(EnabledComp, !Enabled);
LoadSettings();
- if (MenuItem == 1)
- UpdateMenu();
+ UpdateMenu();
if (PopUp == 1) {
wchar_t * lpwzText = Enabled == 1 ? S_MODE_CHANGEDON : S_MODE_CHANGEDOFF;
POPUPDATAW ppd;
@@ -231,6 +224,8 @@ static INT_PTR SilenceConnection(WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
+HGENMENU hSSMenuToggleOnOff;
+
static INT_PTR InitMenu()
{
CMenuItem mi(&g_plugin);
@@ -283,6 +278,9 @@ void RemoveTTButtons()
ttbButtons.destroy();
}
+/////////////////////////////////////////////////////////////////////////////////////////
+// Options
+
static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
@@ -302,8 +300,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_SSSPIN2, UDM_SETPOS, 0, MAKELONG((PopUpTime), 0));
SendDlgItemMessage(hwndDlg, IDC_SSPOPUPTIME, EM_LIMITTEXT, (WPARAM)3, 0);
- CheckDlgButton(hwndDlg, IDC_MENU, (MenuItem == 1) ? BST_CHECKED : BST_UNCHECKED);
-
CheckDlgButton(hwndDlg, IDC_TTB, (TTBButtons == 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DEFPOPUP, (DefPopup == 1) ? BST_CHECKED : BST_UNCHECKED);
@@ -339,10 +335,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
PopUp = db_set_b(0, MODULENAME, PopUpComp, IsDlgButtonChecked(hwndDlg, IDC_DELAY2) == BST_CHECKED);
break;
- case IDC_MENU:
- MenuItem = db_set_b(0, MODULENAME, MenuitemComp, IsDlgButtonChecked(hwndDlg, IDC_MENU) == BST_CHECKED);
- break;
-
case IDC_TTB:
if (!hTTBarloaded) {
MessageBox(nullptr, NEEDTTBMOD, NOTICE, MB_OK);
@@ -378,7 +370,6 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_SSSPIN, UDM_SETPOS, 0, MAKELONG((delay), 0));
CheckDlgButton(hwndDlg, IDC_DELAY2, (PopUp == 1) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg, IDC_SSSPIN2, UDM_SETPOS, 0, MAKELONG((PopUpTime), 0));
- CheckDlgButton(hwndDlg, IDC_MENU, (MenuItem == 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_TTB, (TTBButtons == 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DEFPOPUP, (DefPopup == 1) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DEFSOUNDS, (DefSound == 1) ? BST_CHECKED : BST_UNCHECKED);
@@ -429,10 +420,8 @@ int CMPlugin::Load()
CreateServiceFunction(SS_SERVICE_NAME, StartupSilenceEnabled);
CreateServiceFunction(SS_SILENCE_CONNECTION, SilenceConnection);
- if (MenuItem == 1) {
- g_plugin.registerIcon(MENU_NAME, iconList, MENU_NAME);
- InitMenu();
- }
+ g_plugin.registerIcon(MENU_NAME, iconList, MENU_NAME);
+ InitMenu();
return 0;
}
diff --git a/plugins/StartupSilence/src/resource.h b/plugins/StartupSilence/src/resource.h
index a14aa93342..e7ba0e7214 100644
--- a/plugins/StartupSilence/src/resource.h
+++ b/plugins/StartupSilence/src/resource.h
@@ -15,7 +15,6 @@
#define IDC_DELAY2 40004
#define IDC_SSPOPUPTIME 40005
#define IDC_SSSPIN2 40006
-#define IDC_MENU 40007
#define IDC_TTB 40008
#define IDC_RESETDEFAULT 40009
#define IDC_HST 40010
diff --git a/plugins/StartupSilence/src/version.h b/plugins/StartupSilence/src/version.h
index 1c9eafbd35..8c062d3577 100644
--- a/plugins/StartupSilence/src/version.h
+++ b/plugins/StartupSilence/src/version.h
@@ -5,10 +5,10 @@
// find it under Project properties - Configuration properties - Resource - General - Preprocessor definitions)
// plugin version part
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 2
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 0
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 2
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 1
// stuff that will be used in PluginInfo section and in Version resource
#define __PLUGIN_NAME "StartupSilence"