summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-06-12 17:49:53 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-06-12 17:49:53 +0000
commit7de38a08b97e0554e318b8c25806cef5d47259e6 (patch)
tree2400708e16b437245da88623046e96fb833e23b9 /plugins/AutoShutdown
parent1b88f240b94fc04aa11ef352b720fda741c0ebc6 (diff)
headers of not adopted plugins moved to !Deprecated
git-svn-id: http://svn.miranda-ng.org/main/trunk@9438 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AutoShutdown')
-rw-r--r--plugins/AutoShutdown/res/resource.rc2
-rw-r--r--plugins/AutoShutdown/src/common.h5
-rw-r--r--plugins/AutoShutdown/src/options.cpp6
-rw-r--r--plugins/AutoShutdown/src/resource.h1
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp5
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp18
6 files changed, 1 insertions, 36 deletions
diff --git a/plugins/AutoShutdown/res/resource.rc b/plugins/AutoShutdown/res/resource.rc
index 222c63cecb..6739278fdc 100644
--- a/plugins/AutoShutdown/res/resource.rc
+++ b/plugins/AutoShutdown/res/resource.rc
@@ -71,8 +71,6 @@ BEGIN
LTEXT "Automatically shutdown the computer and turn the power off when one of the following occurs:",IDC_STATIC,12,128,273,18,SS_NOPREFIX
CONTROL "&Thunderstorm warning is issued (Weather)",IDC_CHECK_WEATHER,
"Button",BS_AUTOCHECKBOX | BS_TOP | WS_DISABLED | WS_TABSTOP,12,150,273,11
- CONTROL "&Harddrive overheats (HDD Info)",IDC_CHECK_HDDOVERHEAT,
- "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,12,163,273,10
END
IDD_SETTINGS DIALOGEX 0, 0, 239, 286
diff --git a/plugins/AutoShutdown/src/common.h b/plugins/AutoShutdown/src/common.h
index 7a59d8961f..e2cd8a8264 100644
--- a/plugins/AutoShutdown/src/common.h
+++ b/plugins/AutoShutdown/src/common.h
@@ -59,11 +59,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_hotkeys.h>
#include <m_weather.h>
-#include <m_hddinfo.h>
#include <m_toptoolbar.h>
-#include <m_autoreplacer.h>
-#include <m_snappingwindows.h>
-#include "m_shutdown.h"
+#include <m_shutdown.h>
#include "cpuusage.h"
#include "frame.h"
diff --git a/plugins/AutoShutdown/src/options.cpp b/plugins/AutoShutdown/src/options.cpp
index 4cadbe61c4..fbd8da2d41 100644
--- a/plugins/AutoShutdown/src/options.cpp
+++ b/plugins/AutoShutdown/src/options.cpp
@@ -50,10 +50,6 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
{
BOOL enabled = ServiceIsTypeEnabled(SDSDT_SHUTDOWN,0);
if (enabled) {
- if (ServiceExists(MS_SYSINFO_HDDTEMP)) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_HDDOVERHEAT),TRUE);
- CheckDlgButton(hwndDlg,IDC_CHECK_HDDOVERHEAT,db_get_b(NULL,"AutoShutdown","HddOverheatShutdown",SETTING_HDDOVERHEATSHUTDOWN_DEFAULT) != 0);
- }
if (ServiceExists(MS_WEATHER_UPDATE)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_WEATHER),TRUE);
CheckDlgButton(hwndDlg,IDC_CHECK_WEATHER,db_get_b(NULL,"AutoShutdown","WeatherShutdown",SETTING_WEATHERSHUTDOWN_DEFAULT) != 0);
@@ -100,8 +96,6 @@ static INT_PTR CALLBACK ShutdownOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
db_set_b(NULL,"AutoShutdown","SmartOfflineCheck",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_CHECK_SMARTOFFLINECHECK) != 0));
if (IsWindowEnabled(GetDlgItem(hwndDlg,IDC_CHECK_WEATHER)))
db_set_b(NULL,"AutoShutdown","WeatherShutdown",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_CHECK_WEATHER) != 0));
- if (IsWindowEnabled(GetDlgItem(hwndDlg,IDC_CHECK_HDDOVERHEAT)))
- db_set_b(NULL,"AutoShutdown","HddOverheatShutdown",(BYTE)(IsDlgButtonChecked(hwndDlg,IDC_CHECK_HDDOVERHEAT) != 0));
return TRUE;
}
break;
diff --git a/plugins/AutoShutdown/src/resource.h b/plugins/AutoShutdown/src/resource.h
index f379eb3aab..78a764d908 100644
--- a/plugins/AutoShutdown/src/resource.h
+++ b/plugins/AutoShutdown/src/resource.h
@@ -43,7 +43,6 @@
#define IDC_CHECK_REMEMBERONRESTART 1033
#define IDC_CHECK_SMARTOFFLINECHECK 1034
#define IDC_CHECK_WEATHER 1035
-#define IDC_CHECK_HDDOVERHEAT 1036
// Next default values for new objects
//
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index 1f3fad458e..f18255283a 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -130,8 +130,6 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
SetDlgItemText(hwndDlg,IDC_EDIT_MESSAGE,dbv.ptszVal);
mir_free(dbv.ptszVal);
}
- if (ServiceExists(MS_AUTOREPLACER_ADDWINHANDLE))
- CallService(MS_AUTOREPLACER_ADDWINHANDLE,0,(LPARAM)GetDlgItem(hwndDlg,IDC_EDIT_MESSAGE));
}
/* cpuusage threshold */
{
@@ -181,8 +179,6 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
}
case WM_DESTROY:
{
- if (ServiceExists(MS_AUTOREPLACER_ADDWINHANDLE))
- CallService(MS_AUTOREPLACER_REMWINHANDLE,0,(LPARAM)GetDlgItem(hwndDlg,IDC_EDIT_MESSAGE));
Utils_SaveWindowPosition(hwndDlg,NULL,"AutoShutdown","SettingsDlg_");
HICON hIcon=(HICON)SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,0);
HFONT hFont=(HFONT)SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_GETFONT,0,0);
@@ -395,7 +391,6 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
}
break;
}
- CallSnappingWindowProc(hwndDlg,msg,wParam,lParam); /* Snapping Windows plugin */
return FALSE;
}
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp
index 70111eaa44..61686744f4 100644
--- a/plugins/AutoShutdown/src/watcher.cpp
+++ b/plugins/AutoShutdown/src/watcher.cpp
@@ -31,8 +31,6 @@ static HANDLE hHookIdleChanged;
static HANDLE hHookSettingChanged;
/* Weather Shutdown */
static HANDLE hHookWeatherUpdated;
-/* Overheat Shutdown */
-static HANDLE hHookHddOverheat;
/* Services */
static HANDLE hServiceStartWatcher,hServiceStopWatcher,hServiceIsEnabled;
static HANDLE hEventWatcherChanged;
@@ -246,15 +244,6 @@ static int WeatherUpdated(WPARAM wParam,LPARAM lParam)
return 0;
}
-/************************* Overheat Shutdown **************************/
-
-static int HddOverheat(WPARAM wParam,LPARAM lParam)
-{
- if (db_get_b(NULL,"AutoShutdown","HddOverheatShutdown",SETTING_HDDOVERHEATSHUTDOWN_DEFAULT))
- ServiceShutdown(SDSDT_SHUTDOWN,TRUE);
- return 0;
-}
-
/************************* Services ***********************************/
INT_PTR ServiceStartWatcher(WPARAM wParam,LPARAM lParam)
@@ -329,9 +318,6 @@ void WatcherModulesLoaded(void)
/* Weather Shutdown */
if (ServiceExists(MS_WEATHER_UPDATE))
hHookWeatherUpdated=HookEvent(ME_WEATHER_UPDATED,WeatherUpdated);
- /* Overheat Shutdown */
- if (ServiceExists(MS_SYSINFO_HDDTEMP))
- hHookHddOverheat=HookEvent(ME_SYSINFO_HDDOVERHEAT,HddOverheat);
/* restore watcher if it was running on last exit */
if (db_get_b(NULL,"AutoShutdown","RememberOnRestart",0)==SDROR_RUNNING) {
@@ -356,8 +342,6 @@ void InitWatcher(void)
hHookProtoAck=HookEvent(ME_PROTO_ACK,ProtoAck);
/* Weather Shutdown */
hHookWeatherUpdated=NULL;
- /* Overheat Shutdown */
- hHookHddOverheat=NULL;
/* Services */
hEventWatcherChanged=CreateHookableEvent(ME_AUTOSHUTDOWN_WATCHERCHANGED);
hServiceStartWatcher = CreateServiceFunction(MS_AUTOSHUTDOWN_STARTWATCHER, ServiceStartWatcher);
@@ -383,8 +367,6 @@ void UninitWatcher(void)
mir_free(transfers); /* does NULL check */
/* Weather Shutdown */
UnhookEvent(hHookWeatherUpdated); /* does NULL check */
- /* Overheat Shutdown */
- UnhookEvent(hHookHddOverheat); /* does NULL check */
/* Services */
DestroyServiceFunction(hServiceStartWatcher);
DestroyServiceFunction(hServiceStopWatcher);