summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r--plugins/AutoShutdown/src/options.cpp12
-rw-r--r--plugins/AutoShutdown/src/resource.h1
-rw-r--r--plugins/AutoShutdown/src/stdafx.cxx2
-rw-r--r--plugins/AutoShutdown/src/stdafx.h1
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp15
5 files changed, 2 insertions, 29 deletions
diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp
index 4dcf972a56..a005589ffd 100644
--- a/plugins/AutoShutdown/src/options.cpp
+++ b/plugins/AutoShutdown/src/options.cpp
@@ -42,15 +42,7 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
CheckDlgButton(hwndDlg, IDC_CHECK_SMARTOFFLINECHECK, g_plugin.getByte("SmartOfflineCheck", SETTING_SMARTOFFLINECHECK_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHECK_REMEMBERONRESTART, g_plugin.getByte("RememberOnRestart", SETTING_REMEMBERONRESTART_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_CHECK_SHOWCONFIRMDLG, g_plugin.getByte("ShowConfirmDlg", SETTING_SHOWCONFIRMDLG_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
- {
- BOOL enabled = ServiceIsTypeEnabled(SDSDT_SHUTDOWN, 0);
- if (enabled) {
- if (ServiceExists(MS_WEATHER_UPDATE)) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_WEATHER), TRUE);
- CheckDlgButton(hwndDlg, IDC_CHECK_WEATHER, g_plugin.getByte("WeatherShutdown", SETTING_WEATHERSHUTDOWN_DEFAULT) != 0 ? BST_CHECKED : BST_UNCHECKED);
- }
- }
- }
+
SendMessage(hwndDlg, M_ENABLE_SUBCTLS, 0, 0);
return TRUE; /* default focus */
@@ -89,8 +81,6 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
g_plugin.setWord("ConfirmDlgCountdown", (uint16_t)GetDlgItemInt(hwndDlg, IDC_EDIT_CONFIRMDLGCOUNTDOWN, nullptr, FALSE));
g_plugin.setByte("RememberOnRestart", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_REMEMBERONRESTART) != 0));
g_plugin.setByte("SmartOfflineCheck", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_SMARTOFFLINECHECK) != 0));
- if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_CHECK_WEATHER)))
- g_plugin.setByte("WeatherShutdown", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_CHECK_WEATHER) != 0));
return TRUE;
}
break;
diff --git a/plugins/AutoShutdown/src/resource.h b/plugins/AutoShutdown/src/resource.h
index 78a764d908..7a9f7d1baf 100644
--- a/plugins/AutoShutdown/src/resource.h
+++ b/plugins/AutoShutdown/src/resource.h
@@ -42,7 +42,6 @@
#define IDC_SPIN_CONFIRMDLGCOUNTDOWN 1032
#define IDC_CHECK_REMEMBERONRESTART 1033
#define IDC_CHECK_SMARTOFFLINECHECK 1034
-#define IDC_CHECK_WEATHER 1035
// Next default values for new objects
//
diff --git a/plugins/AutoShutdown/src/stdafx.cxx b/plugins/AutoShutdown/src/stdafx.cxx
index 13f28e1314..f111565f38 100644
--- a/plugins/AutoShutdown/src/stdafx.cxx
+++ b/plugins/AutoShutdown/src/stdafx.cxx
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org)
+Copyright (C) 2012-25 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
diff --git a/plugins/AutoShutdown/src/stdafx.h b/plugins/AutoShutdown/src/stdafx.h
index 3ee6fd516b..88e6f526fe 100644
--- a/plugins/AutoShutdown/src/stdafx.h
+++ b/plugins/AutoShutdown/src/stdafx.h
@@ -58,7 +58,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_icolib.h>
#include <m_hotkeys.h>
-#include <m_weather.h>
#include <m_toptoolbar.h>
#include <m_shutdown.h>
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 57ee51f9f4..e91433c632 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -200,17 +200,6 @@ static BOOL CALLBACK CpuUsageWatcherProc(uint8_t nCpuUsage, LPARAM lParam)
return TRUE;
}
-/************************* Weather Shutdown ***************************/
-
-static int WeatherUpdated(WPARAM wParam, LPARAM lParam)
-{
- char *pszProto = Proto_GetBaseAccountName(wParam);
- if ((BOOL)lParam && pszProto != nullptr && Proto_GetStatus(pszProto) == ID_STATUS_INVISIBLE)
- if (g_plugin.getByte("WeatherShutdown", SETTING_WEATHERSHUTDOWN_DEFAULT))
- ServiceShutdown(SDSDT_SHUTDOWN, TRUE);
- return 0;
-}
-
/************************* Services ***********************************/
INT_PTR ServiceStartWatcher(WPARAM, LPARAM lParam)
@@ -282,10 +271,6 @@ INT_PTR ServiceIsWatcherEnabled(WPARAM, LPARAM)
void WatcherModulesLoaded(void)
{
- /* Weather Shutdown */
- if (ServiceExists(MS_WEATHER_UPDATE))
- hHookWeatherUpdated = HookEvent(ME_WEATHER_UPDATED, WeatherUpdated);
-
/* restore watcher if it was running on last exit */
if (g_plugin.getByte("RememberOnRestart", 0) == SDROR_RUNNING) {
g_plugin.setByte("RememberOnRestart", 1);