summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-07 18:23:45 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-07 18:23:45 +0300
commit0ae12122c221c4f467a2dabd247794f5a0e4a101 (patch)
tree0cb39899bff1a2ff722853830d38650753273cbd /protocols
parent5c83e3597b1c38b6ff695199e6009e78505d5961 (diff)
fixes #3833 (ConnectionNotify: проблемы с настройками)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ConnectionNotify/res/ConnectionNotify.rc234
-rw-r--r--protocols/ConnectionNotify/src/ConnectionNotify.cpp2
-rw-r--r--protocols/ConnectionNotify/src/options.cpp4
-rw-r--r--protocols/ConnectionNotify/src/resource.h77
-rw-r--r--protocols/ConnectionNotify/src/stdafx.h2
5 files changed, 214 insertions, 105 deletions
diff --git a/protocols/ConnectionNotify/res/ConnectionNotify.rc b/protocols/ConnectionNotify/res/ConnectionNotify.rc
index 7557da5945..ecc0a0f694 100644
--- a/protocols/ConnectionNotify/res/ConnectionNotify.rc
+++ b/protocols/ConnectionNotify/res/ConnectionNotify.rc
@@ -1,94 +1,190 @@
-// Generated by ResEdit 1.5.11
-// Copyright (C) 2006-2012
-// http://www.resedit.net
-
-#include <windows.h>
-#include <commctrl.h>
-#include <richedit.h>
+// Microsoft Visual C++ generated resource script.
+//
#include "..\src\resource.h"
-#include "..\src\version.h"
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
//
-// Dialog resources
+// Generated from the TEXTINCLUDE 2 resource.
//
+#include <winres.h>
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-IDD_OPT_DIALOG DIALOGEX 0, 0, 314, 239
+#pragma code_page(1251)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPT_DIALOG DIALOGEX 0, 0, 314, 234
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
-{
-
- AUTOCHECKBOX "Set popup colors", IDC_SETCOLOURS, 20, 174, 132, 10, WS_GROUP | BS_PUSHLIKE
- CONTROL "Custom1", IDC_BGCOLOR, "ColourPicker", 0x50030000, 18, 185, 10, 10
- CONTROL "Custom1", IDC_FGCOLOR, "ColourPicker", 0x50030000, 78, 185, 10, 9
- GROUPBOX "Popup options", IDC_STATIC, 10, 164, 187, 52, WS_GROUP
- LTEXT "Background", IDC_STATIC, 34, 186, 43, 8, SS_LEFT
- LTEXT "Text", IDC_STATIC, 94, 186, 41, 8, SS_LEFT
- EDITTEXT IDC_INTERVAL1, 60, 195, 21, 12, WS_GROUP | ES_AUTOHSCROLL
- RTEXT "Close after:", IDC_STATIC, 12, 197, 47, 9, SS_RIGHT
- LTEXT "sec (0 default, -1 disabled)", IDC_STATIC, 84, 197, 111, 8, SS_LEFT
- CONTROL "", IDC_LIST_EXCEPTIONS, WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT, 5, 14, 292, 104
- CONTROL "", IDC_STATUS, WC_LISTVIEW, WS_TABSTOP | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOLABELWRAP | LVS_NOSORTHEADER | LVS_REPORT, 209, 131, 96, 99, WS_EX_CLIENTEDGE
- GROUPBOX "Settings", IDC_STATIC, 5, 118, 196, 101
- AUTOCHECKBOX "try resolve addresses", IDC_RESOLVEIP, 12, 143, 185, 8
- EDITTEXT IDC_INTERVAL, 10, 154, 21, 12, ES_AUTOHSCROLL
- AUTOCHECKBOX "Show notification if no filter defined", ID_CHK_DEFAULTACTION, 12, 131, 187, 8
- LTEXT "Attempt interval (ms)", IDC_STATIC, 35, 155, 163, 8, SS_LEFT
- PUSHBUTTON "Delete", ID_DELETE, 297, 68, 16, 16, BS_ICON, WS_EX_CLIENTEDGE
- LTEXT "'Online' means:", IDC_STATIC, 211, 122, 92, 8, SS_LEFT
- LTEXT "Filters", IDC_STATIC, 6, 5, 289, 8, SS_LEFT
- PUSHBUTTON "Move down", ID_DOWN, 297, 52, 16, 16, BS_ICON, WS_EX_CLIENTEDGE
- PUSHBUTTON "Move up", ID_UP, 297, 37, 16, 16, BS_ICON, WS_EX_CLIENTEDGE
- PUSHBUTTON "Add", ID_ADD, 297, 22, 16, 16, BS_ICON, WS_EX_CLIENTEDGE
-}
-
+BEGIN
+ CONTROL "Set popup colors",IDC_SETCOLOURS,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_GROUP | WS_TABSTOP,20,178,132,15
+ CONTROL "Custom1",IDC_BGCOLOR,"ColourPicker",WS_GROUP | WS_TABSTOP,15,196,10,8
+ CONTROL "Custom1",IDC_FGCOLOR,"ColourPicker",WS_GROUP | WS_TABSTOP,114,196,10,8
+ GROUPBOX "Popup options",IDC_STATIC,6,164,198,66,WS_GROUP
+ LTEXT "Background",IDC_STATIC,32,196,70,8
+ LTEXT "Text",IDC_STATIC,132,196,67,8
+ EDITTEXT IDC_INTERVAL1,60,208,21,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Close after:",IDC_STATIC,12,210,47,9
+ LTEXT "sec (0 default, -1 disabled)",IDC_STATIC,84,209,111,15
+ CONTROL "",IDC_LIST_EXCEPTIONS,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,5,14,292,104
+ CONTROL "",IDC_STATUS,"SysListView32",LVS_REPORT | LVS_NOLABELWRAP | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_TABSTOP,209,131,96,99,WS_EX_CLIENTEDGE
+ CONTROL "try resolve addresses",IDC_RESOLVEIP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,136,185,8
+ EDITTEXT IDC_INTERVAL,8,149,21,12,ES_AUTOHSCROLL
+ CONTROL "Show notification if no filter defined",ID_CHK_DEFAULTACTION,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,124,195,8
+ LTEXT "Attempt interval (ms)",IDC_STATIC,35,151,163,8
+ PUSHBUTTON "Delete",ID_DELETE,297,68,16,16,BS_ICON,WS_EX_CLIENTEDGE
+ LTEXT "'Online' means:",IDC_STATIC,211,122,92,8
+ LTEXT "Filters",IDC_STATIC,6,5,289,8
+ PUSHBUTTON "Move down",ID_DOWN,297,52,16,16,BS_ICON,WS_EX_CLIENTEDGE
+ PUSHBUTTON "Move up",ID_UP,297,37,16,16,BS_ICON,WS_EX_CLIENTEDGE
+ PUSHBUTTON "Add",ID_ADD,297,22,16,16,BS_ICON,WS_EX_CLIENTEDGE
+END
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_FILTER_DIALOG DIALOG 0, 0, 266, 108
-STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SETFOREGROUND | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Rule editor"
FONT 8, "Ms Shell Dlg"
-{
- LTEXT "Application name", -1, 4, 6, 65, 8, SS_LEFT
- EDITTEXT ID_TEXT_NAME, 72, 4, 140, 13, ES_AUTOHSCROLL
- LTEXT "Local IP:Port", -1, 4, 24, 65, 8, SS_LEFT
- LTEXT ":", -1, 213, 24, 8, 8, SS_LEFT
- LTEXT ":", -1, 214, 43, 8, 8, SS_LEFT
- EDITTEXT ID_TXT_LOCAL_IP, 72, 22, 140, 13, ES_AUTOHSCROLL
- EDITTEXT ID_TXT_LOCAL_PORT, 217, 22, 45, 13, ES_AUTOHSCROLL
- EDITTEXT ID_TXT_REMOTE_IP, 72, 40, 140, 13, ES_AUTOHSCROLL
- EDITTEXT ID_TXT_REMOTE_PORT, 217, 40, 45, 13, ES_AUTOHSCROLL
- COMBOBOX ID_CBO_ACTION, 72, 57, 140, 48, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST
- LTEXT "Action:", -1, 4, 59, 23, 8, SS_LEFT
- DEFPUSHBUTTON "OK", ID_OK, 153, 87, 52, 16
- PUSHBUTTON "Cancel", ID_CANCEL, 209, 87, 52, 16
- LTEXT "* and ? wildcard characters also available (for port enter number or *)", -1, 4, 76, 253, 8, SS_LEFT
- LTEXT "Remote IP:Port", -1, 4, 42, 65, 8, SS_LEFT
-}
-
-//
-// Icon resources
+BEGIN
+ LTEXT "Application name",-1,4,6,65,8
+ EDITTEXT ID_TEXT_NAME,72,4,140,13,ES_AUTOHSCROLL
+ LTEXT "Local IP:Port",-1,4,24,65,8
+ LTEXT ":",-1,213,24,8,8
+ LTEXT ":",-1,214,43,8,8
+ EDITTEXT ID_TXT_LOCAL_IP,72,22,140,13,ES_AUTOHSCROLL
+ EDITTEXT ID_TXT_LOCAL_PORT,217,22,45,13,ES_AUTOHSCROLL
+ EDITTEXT ID_TXT_REMOTE_IP,72,40,140,13,ES_AUTOHSCROLL
+ EDITTEXT ID_TXT_REMOTE_PORT,217,40,45,13,ES_AUTOHSCROLL
+ COMBOBOX ID_CBO_ACTION,72,57,140,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Action:",-1,4,59,23,8
+ DEFPUSHBUTTON "OK",ID_OK,153,87,52,16
+ PUSHBUTTON "Cancel",ID_CANCEL,209,87,52,16
+ LTEXT "* and ? wildcard characters also available (for port enter number or *)",-1,4,76,253,8
+ LTEXT "Remote IP:Port",-1,4,42,65,8
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON3 ICON ".\\delete_item.ico"
+
+IDI_ICON4 ICON ".\\arrowdown.ico"
+
+IDI_ICON5 ICON ".\\arrowup.ico"
+
+IDI_ICON6 ICON ".\\add.ico"
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPT_DIALOG, DIALOG
+ BEGIN
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// AFX_DIALOG_LAYOUT
//
-LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
-IDI_ICON1 ICON "icon1.ico"
+IDD_OPT_DIALOG AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "..\\src\\resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include <winres.h>\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral (Sys. Default) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD)
LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
-IDI_ICON2 ICON "icon2.ico"
+#pragma code_page(1252)
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-IDI_ICON3 ICON ".\\delete_item.ico"
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "icon1.ico"
+IDI_ICON2 ICON "icon2.ico"
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-IDI_ICON4 ICON ".\\arrowdown.ico"
+#endif // Neutral (Sys. Default) resources
+/////////////////////////////////////////////////////////////////////////////
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-IDI_ICON5 ICON ".\\arrowup.ico"
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-IDI_ICON6 ICON ".\\add.ico"
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/protocols/ConnectionNotify/src/ConnectionNotify.cpp b/protocols/ConnectionNotify/src/ConnectionNotify.cpp
index df5997621c..d328c0bfab 100644
--- a/protocols/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/protocols/ConnectionNotify/src/ConnectionNotify.cpp
@@ -148,7 +148,7 @@ void LoadSettings()
g_plugin.FgColor = g_plugin.getDword("PopupFgColor", (uint32_t)0x000000);
g_plugin.iFiltersCount = g_plugin.getDword("FiltersCount");
g_plugin.iStatusMask = g_plugin.getWord("StatusMask", 16);
- for (int i = 0; i < MAX_STATUS_COUNT; i++) {
+ for (int i = 0; i < MAX_STATUS_COUNT-1; i++) {
char buff[128];
mir_snprintf(buff, "Status%d", i);
g_plugin.iStatus[i] = (g_plugin.getByte(buff, 0) == 1);
diff --git a/protocols/ConnectionNotify/src/options.cpp b/protocols/ConnectionNotify/src/options.cpp
index b643349249..131c44bef8 100644
--- a/protocols/ConnectionNotify/src/options.cpp
+++ b/protocols/ConnectionNotify/src/options.cpp
@@ -170,7 +170,7 @@ INT_PTR CALLBACK DlgProcConnectionNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wPar
// Initialize LVITEM members that are common to all
// items.
lvI.mask = LVIF_TEXT;
- for (int i = 0; i < MAX_STATUS_COUNT; i++) {
+ for (int i = 0; i < MAX_STATUS_COUNT-1; i++) {
lvI.pszText = Clist_GetStatusModeDescription(ID_STATUS_ONLINE + i, 0);
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
@@ -353,7 +353,7 @@ INT_PTR CALLBACK DlgProcConnectionNotifyOpts(HWND hwndDlg, UINT msg, WPARAM wPar
g_plugin.setByte("ResolveIp", g_plugin.bResolveIp);
g_plugin.setByte("FilterDefaultAction", g_plugin.iDefaultAction);
- for (int i = 0; i < MAX_STATUS_COUNT; i++) {
+ for (int i = 0; i < MAX_STATUS_COUNT-1; i++) {
char buff[128];
mir_snprintf(buff, "Status%d", i);
g_plugin.iStatus[i] = (ListView_GetCheckState(GetDlgItem(hwndDlg, IDC_STATUS), i) ? TRUE : FALSE);
diff --git a/protocols/ConnectionNotify/src/resource.h b/protocols/ConnectionNotify/src/resource.h
index 2fac35edd3..91f09a984e 100644
--- a/protocols/ConnectionNotify/src/resource.h
+++ b/protocols/ConnectionNotify/src/resource.h
@@ -1,33 +1,46 @@
-#ifndef IDC_STATIC
-#define IDC_STATIC (-1)
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by W:\miranda-ng\protocols\ConnectionNotify\res\ConnectionNotify.rc
+//
+#define VS_VERSION_INFO 1
+#define IDI_ICON1 101
+#define IDD_OPT_DIALOG 102
+#define IDI_ICON2 103
+#define IDD_FILTER_DIALOG 105
+#define IDI_ICON3 110
+#define IDI_ICON4 111
+#define IDI_ICON5 114
+#define IDI_ICON6 115
+#define ID_TEXT_NAME 1000
+#define IDC_RESOLVEIP 1001
+#define IDC_LIST_EXCEPTIONS 1002
+#define IDC_INTERVAL 1003
+#define ID_CHK_DEFAULTACTION 1004
+#define ID_DELETE 1005
+#define ID_DOWN 1006
+#define ID_ADD 1007
+#define ID_UP 1008
+#define IDC_SETCOLOURS 1009
+#define IDC_INTERVAL1 1010
+#define IDC_BGCOLOR 1011
+#define IDC_FGCOLOR 1012
+#define IDC_STATUS 1016
+#define ID_TXT_LOCAL_IP 1070
+#define ID_TXT_REMOTE_IP 1071
+#define ID_CBO_ACTION 1074
+#define ID_TXT_REMOTE_PORT 1075
+#define ID_TXT_LOCAL_PORT 1076
+#define ID_CANCEL 1077
+#define ID_OK 1078
+#define IDC_STATIC -1
-#define IDI_ICON1 101
-#define IDD_OPT_DIALOG 102
-#define IDI_ICON2 103
-#define IDD_FILTER_DIALOG 105
-#define IDI_ICON3 110
-#define IDI_ICON4 111
-#define IDI_ICON5 114
-#define IDI_ICON6 115
-#define ID_TEXT_NAME 1000
-#define IDC_RESOLVEIP 1001
-#define IDC_LIST_EXCEPTIONS 1002
-#define IDC_INTERVAL 1003
-#define ID_CHK_DEFAULTACTION 1004
-#define ID_DELETE 1005
-#define ID_DOWN 1006
-#define ID_ADD 1007
-#define ID_UP 1008
-#define IDC_SETCOLOURS 1009
-#define IDC_INTERVAL1 1010
-#define IDC_BGCOLOR 1011
-#define IDC_FGCOLOR 1012
-#define IDC_STATUS 1016
-#define ID_TXT_LOCAL_IP 1070
-#define ID_TXT_REMOTE_IP 1071
-#define ID_CBO_ACTION 1074
-#define ID_TXT_REMOTE_PORT 1075
-#define ID_TXT_LOCAL_PORT 1076
-#define ID_CANCEL 1077
-#define ID_OK 1078
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/protocols/ConnectionNotify/src/stdafx.h b/protocols/ConnectionNotify/src/stdafx.h
index 436385367b..d55f2c1910 100644
--- a/protocols/ConnectionNotify/src/stdafx.h
+++ b/protocols/ConnectionNotify/src/stdafx.h
@@ -43,7 +43,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
int iInterval;
int iInterval1;
bool bResolveIp;
- int iStatus[MAX_STATUS_COUNT];
+ int iStatus[MAX_STATUS_COUNT-1];
int iFiltersCount;
int iDefaultAction = TRUE;
uint16_t iStatusMask;