summaryrefslogtreecommitdiff
path: root/src/core/stdaway
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2023-01-02 21:10:29 +0300
committerdartraiden <wowemuh@gmail.com>2023-01-02 21:10:29 +0300
commit1979fd80424d16b2e489f9b57d01d9c7811d25a2 (patch)
tree960d42c5fe4a51f0fe2850bea91256e226bce221 /src/core/stdaway
parentadfbbb217d4f4a05acf198755f219a5223d31c27 (diff)
Update copyrights
Diffstat (limited to 'src/core/stdaway')
-rw-r--r--src/core/stdaway/src/awaymsg.cpp2
-rw-r--r--src/core/stdaway/src/main.cpp2
-rw-r--r--src/core/stdaway/src/options.cpp280
-rw-r--r--src/core/stdaway/src/sendmsg.cpp2
-rw-r--r--src/core/stdaway/src/stdafx.h2
-rw-r--r--src/core/stdaway/src/version.h2
6 files changed, 145 insertions, 145 deletions
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp
index 94f097fbe1..391a61383e 100644
--- a/src/core/stdaway/src/awaymsg.cpp
+++ b/src/core/stdaway/src/awaymsg.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-12 Miranda IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp
index 1dfab72a34..bf275c259a 100644
--- a/src/core/stdaway/src/main.cpp
+++ b/src/core/stdaway/src/main.cpp
@@ -2,7 +2,7 @@
Standard away message processing module for Miranda NG
-Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/core/stdaway/src/options.cpp b/src/core/stdaway/src/options.cpp
index 64943461d9..1287a623d3 100644
--- a/src/core/stdaway/src/options.cpp
+++ b/src/core/stdaway/src/options.cpp
@@ -1,140 +1,140 @@
-/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org),
-Copyright (c) 2000-12 Miranda IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-static const int statusModes[] =
-{
- ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND,
- ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE, ID_STATUS_IDLE
-};
-
-class CAwayMsgOptsDlg : public CDlgBase
-{
- struct
- {
- int ignore;
- int noDialog;
- int usePrevious;
- wchar_t msg[1024];
- }
- m_info[_countof(statusModes)];
-
- int oldPage = -1;
-
- CCtrlEdit etdMsg;
- CCtrlCombo cmbStatus;
- CCtrlCheck chkDontReply, chkUsePrev, chkUseSpecific, chkNoDialog;
-
-public:
- CAwayMsgOptsDlg() :
- CDlgBase(g_plugin, IDD_OPT_AWAYMSG),
- etdMsg(this, IDC_MSG),
- cmbStatus(this, IDC_STATUS),
- chkUsePrev(this, IDC_USEPREVIOUS),
- chkNoDialog(this, IDC_NODIALOG),
- chkDontReply(this, IDC_DONTREPLY),
- chkUseSpecific(this, IDC_USESPECIFIC)
- {
- chkUsePrev.OnChange = chkDontReply.OnChange = chkUseSpecific.OnChange = Callback(this, &CAwayMsgOptsDlg::onSelChange_Status);
- cmbStatus.OnSelChanged = Callback(this, &CAwayMsgOptsDlg::onSelChange_Status);
- }
-
- bool OnInitDialog() override
- {
- for (auto &it : statusModes) {
- if (!(protoModeMsgFlags & Proto_Status2Flag(it)))
- continue;
-
- int j = cmbStatus.AddString(Clist_GetStatusModeDescription(it, 0), it);
- m_info[j].ignore = g_plugin.GetStatusModeByte(it, "Ignore");
- m_info[j].noDialog = g_plugin.GetStatusModeByte(it, "NoDlg", true);
- m_info[j].usePrevious = g_plugin.GetStatusModeByte(it, "UsePrev");
-
- DBVARIANT dbv;
- if (g_plugin.getWString(StatusModeToDbSetting(it, "Default"), &dbv))
- if (g_plugin.getWString(StatusModeToDbSetting(it, "Msg"), &dbv))
- dbv.pwszVal = mir_wstrdup(GetDefaultMessage(it));
- mir_wstrcpy(m_info[j].msg, dbv.pwszVal);
- mir_free(dbv.pwszVal);
- }
-
- cmbStatus.SetCurSel(0);
- onSelChange_Status(0);
- return true;
- }
-
- bool OnApply() override
- {
- onSelChange_Status(0);
-
- for (int i = cmbStatus.GetCount() - 1; i >= 0; i--) {
- int status = cmbStatus.GetItemData(i);
- g_plugin.SetStatusModeByte(status, "Ignore", (uint8_t)m_info[i].ignore);
- g_plugin.SetStatusModeByte(status, "NoDlg", (uint8_t)m_info[i].noDialog);
- g_plugin.SetStatusModeByte(status, "UsePrev", (uint8_t)m_info[i].usePrevious);
- g_plugin.setWString(StatusModeToDbSetting(status, "Default"), m_info[i].msg);
- }
- return true;
- }
-
- void onSelChange_Status(CCtrlCombo*)
- {
- if (oldPage != -1) {
- m_info[oldPage].ignore = chkDontReply.GetState();
- m_info[oldPage].noDialog = chkNoDialog.GetState();
- m_info[oldPage].usePrevious = chkUsePrev.GetState();
- etdMsg.GetText(m_info[oldPage].msg, _countof(m_info[oldPage].msg));
- }
-
- int i = cmbStatus.GetCurSel();
- chkDontReply.SetState(i < 0 ? 0 : m_info[i].ignore);
- chkNoDialog.SetState(i < 0 ? 0 : m_info[i].noDialog);
- chkUsePrev.SetState(i < 0 ? 0 : m_info[i].usePrevious);
- chkUseSpecific.SetState(i < 0 ? 0 : !m_info[i].usePrevious);
-
- etdMsg.SetText(i < 0 ? L"" : m_info[i].msg);
-
- chkNoDialog.Enable(i < 0 ? 0 : !m_info[i].ignore);
- chkUsePrev.Enable(i < 0 ? 0 : !m_info[i].ignore);
- chkUseSpecific.Enable(i < 0 ? 0 : !m_info[i].ignore);
- etdMsg.Enable(i < 0 ? 0 : !(m_info[i].ignore || m_info[i].usePrevious));
- oldPage = i;
- }
-};
-
-int AwayMsgOptInitialise(WPARAM wParam, LPARAM)
-{
- if (protoModeMsgFlags == 0)
- return 0;
-
- OPTIONSDIALOGPAGE odp = {};
- odp.flags = ODPF_BOLDGROUPS;
- odp.position = 870000000;
- odp.szTitle.a = LPGEN("Status messages");
- odp.szGroup.a = LPGEN("Status");
- odp.pDialog = new CAwayMsgOptsDlg();
- g_plugin.addOptions(wParam, &odp);
- return 0;
-}
+/*
+
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org),
+Copyright (c) 2000-12 Miranda IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "stdafx.h"
+
+static const int statusModes[] =
+{
+ ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND,
+ ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE, ID_STATUS_IDLE
+};
+
+class CAwayMsgOptsDlg : public CDlgBase
+{
+ struct
+ {
+ int ignore;
+ int noDialog;
+ int usePrevious;
+ wchar_t msg[1024];
+ }
+ m_info[_countof(statusModes)];
+
+ int oldPage = -1;
+
+ CCtrlEdit etdMsg;
+ CCtrlCombo cmbStatus;
+ CCtrlCheck chkDontReply, chkUsePrev, chkUseSpecific, chkNoDialog;
+
+public:
+ CAwayMsgOptsDlg() :
+ CDlgBase(g_plugin, IDD_OPT_AWAYMSG),
+ etdMsg(this, IDC_MSG),
+ cmbStatus(this, IDC_STATUS),
+ chkUsePrev(this, IDC_USEPREVIOUS),
+ chkNoDialog(this, IDC_NODIALOG),
+ chkDontReply(this, IDC_DONTREPLY),
+ chkUseSpecific(this, IDC_USESPECIFIC)
+ {
+ chkUsePrev.OnChange = chkDontReply.OnChange = chkUseSpecific.OnChange = Callback(this, &CAwayMsgOptsDlg::onSelChange_Status);
+ cmbStatus.OnSelChanged = Callback(this, &CAwayMsgOptsDlg::onSelChange_Status);
+ }
+
+ bool OnInitDialog() override
+ {
+ for (auto &it : statusModes) {
+ if (!(protoModeMsgFlags & Proto_Status2Flag(it)))
+ continue;
+
+ int j = cmbStatus.AddString(Clist_GetStatusModeDescription(it, 0), it);
+ m_info[j].ignore = g_plugin.GetStatusModeByte(it, "Ignore");
+ m_info[j].noDialog = g_plugin.GetStatusModeByte(it, "NoDlg", true);
+ m_info[j].usePrevious = g_plugin.GetStatusModeByte(it, "UsePrev");
+
+ DBVARIANT dbv;
+ if (g_plugin.getWString(StatusModeToDbSetting(it, "Default"), &dbv))
+ if (g_plugin.getWString(StatusModeToDbSetting(it, "Msg"), &dbv))
+ dbv.pwszVal = mir_wstrdup(GetDefaultMessage(it));
+ mir_wstrcpy(m_info[j].msg, dbv.pwszVal);
+ mir_free(dbv.pwszVal);
+ }
+
+ cmbStatus.SetCurSel(0);
+ onSelChange_Status(0);
+ return true;
+ }
+
+ bool OnApply() override
+ {
+ onSelChange_Status(0);
+
+ for (int i = cmbStatus.GetCount() - 1; i >= 0; i--) {
+ int status = cmbStatus.GetItemData(i);
+ g_plugin.SetStatusModeByte(status, "Ignore", (uint8_t)m_info[i].ignore);
+ g_plugin.SetStatusModeByte(status, "NoDlg", (uint8_t)m_info[i].noDialog);
+ g_plugin.SetStatusModeByte(status, "UsePrev", (uint8_t)m_info[i].usePrevious);
+ g_plugin.setWString(StatusModeToDbSetting(status, "Default"), m_info[i].msg);
+ }
+ return true;
+ }
+
+ void onSelChange_Status(CCtrlCombo*)
+ {
+ if (oldPage != -1) {
+ m_info[oldPage].ignore = chkDontReply.GetState();
+ m_info[oldPage].noDialog = chkNoDialog.GetState();
+ m_info[oldPage].usePrevious = chkUsePrev.GetState();
+ etdMsg.GetText(m_info[oldPage].msg, _countof(m_info[oldPage].msg));
+ }
+
+ int i = cmbStatus.GetCurSel();
+ chkDontReply.SetState(i < 0 ? 0 : m_info[i].ignore);
+ chkNoDialog.SetState(i < 0 ? 0 : m_info[i].noDialog);
+ chkUsePrev.SetState(i < 0 ? 0 : m_info[i].usePrevious);
+ chkUseSpecific.SetState(i < 0 ? 0 : !m_info[i].usePrevious);
+
+ etdMsg.SetText(i < 0 ? L"" : m_info[i].msg);
+
+ chkNoDialog.Enable(i < 0 ? 0 : !m_info[i].ignore);
+ chkUsePrev.Enable(i < 0 ? 0 : !m_info[i].ignore);
+ chkUseSpecific.Enable(i < 0 ? 0 : !m_info[i].ignore);
+ etdMsg.Enable(i < 0 ? 0 : !(m_info[i].ignore || m_info[i].usePrevious));
+ oldPage = i;
+ }
+};
+
+int AwayMsgOptInitialise(WPARAM wParam, LPARAM)
+{
+ if (protoModeMsgFlags == 0)
+ return 0;
+
+ OPTIONSDIALOGPAGE odp = {};
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.position = 870000000;
+ odp.szTitle.a = LPGEN("Status messages");
+ odp.szGroup.a = LPGEN("Status");
+ odp.pDialog = new CAwayMsgOptsDlg();
+ g_plugin.addOptions(wParam, &odp);
+ return 0;
+}
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp
index 1eaaac5cc4..dff644a928 100644
--- a/src/core/stdaway/src/sendmsg.cpp
+++ b/src/core/stdaway/src/sendmsg.cpp
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-12 Miranda IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdaway/src/stdafx.h b/src/core/stdaway/src/stdafx.h
index 4cd3dd5b24..83d5a859c9 100644
--- a/src/core/stdaway/src/stdafx.h
+++ b/src/core/stdaway/src/stdafx.h
@@ -2,7 +2,7 @@
Miranda NG: the free IM client for Microsoft* Windows*
-Copyright (C) 2012-22 Miranda NG team (https://miranda-ng.org),
+Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-12 Miranda IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdaway/src/version.h b/src/core/stdaway/src/version.h
index 1cbc94e44c..03131a5179 100644
--- a/src/core/stdaway/src/version.h
+++ b/src/core/stdaway/src/version.h
@@ -8,4 +8,4 @@
#define __DESCRIPTION "Core module for the away messages processing."
#define __AUTHOR "Miranda NG team"
#define __AUTHORWEB "https://miranda-ng.org/p/StdAway"
-#define __COPYRIGHT "© 2012-22 Miranda NG team"
+#define __COPYRIGHT "© 2012-23 Miranda NG team"