summaryrefslogtreecommitdiff
path: root/plugins/Alarms/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-25 19:25:38 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-25 19:25:38 +0000
commit2cf824fd2efaec5fa0125fdde5fd513dd906d844 (patch)
treeaadae8304f8cf90c06c73ca49180c62faeef539b /plugins/Alarms/src
parenta01f62f394fc01e3c6ed89924be804d2438787e5 (diff)
plugins cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6233 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Alarms/src')
-rw-r--r--plugins/Alarms/src/alarm_win.cpp18
-rw-r--r--plugins/Alarms/src/alarm_win.h1
-rw-r--r--plugins/Alarms/src/options.cpp6
3 files changed, 1 insertions, 24 deletions
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp
index b46758cbc1..67f8c38958 100644
--- a/plugins/Alarms/src/alarm_win.cpp
+++ b/plugins/Alarms/src/alarm_win.cpp
@@ -6,10 +6,6 @@
#define SPEACH_REPEAT_PERIOD 15000 // milliseconds
HANDLE hAlarmWindowList = 0;
-HMODULE hUserDll;
-BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD) = 0;
-BOOL (WINAPI *MyAnimateWindow)(HWND hWnd,DWORD dwTime,DWORD dwFlags) = 0;
-
FontIDT title_font_id, window_font_id;
ColourIDT bk_colour_id;
HFONT hTitleFont = 0, hWindowFont = 0;
@@ -33,11 +29,6 @@ void SetAlarmWinOptions()
WindowList_Broadcast(hAlarmWindowList, WMU_SETOPT, IDC_SNOOZE, 0);
}
-bool TransparencyEnabled()
-{
- return MySetLayeredWindowAttributes != 0;
-}
-
INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch ( msg ) {
@@ -146,8 +137,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) | WS_EX_LAYERED);
#endif
#ifdef LWA_ALPHA
- if (MySetLayeredWindowAttributes)
- MySetLayeredWindowAttributes(hwndDlg, RGB(0,0,0), (int)((100 - opt->aw_trans) / 100.0 * 255), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwndDlg, RGB(0,0,0), (int)((100 - opt->aw_trans) / 100.0 * 255), LWA_ALPHA);
#endif
}
return TRUE;
@@ -413,10 +403,6 @@ int AlarmWinModulesLoaded(WPARAM wParam, LPARAM lParam)
void InitAlarmWin()
{
- hUserDll = LoadLibrary(_T("user32.dll"));
- if (hUserDll)
- MySetLayeredWindowAttributes = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(hUserDll, "SetLayeredWindowAttributes");
-
hAlarmWindowList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
HookEvent(ME_SYSTEM_MODULESLOADED, AlarmWinModulesLoaded);
@@ -426,8 +412,6 @@ void DeinitAlarmWin()
{
WindowList_Broadcast(hAlarmWindowList, WM_COMMAND, IDC_SNOOZE, 0);
- FreeLibrary(hUserDll);
-
if (hBackgroundBrush) DeleteObject(hBackgroundBrush);
if (hTitleFont) DeleteObject(hTitleFont);
if (hWindowFont) DeleteObject(hWindowFont);
diff --git a/plugins/Alarms/src/alarm_win.h b/plugins/Alarms/src/alarm_win.h
index 19576050c6..5a73de86dd 100644
--- a/plugins/Alarms/src/alarm_win.h
+++ b/plugins/Alarms/src/alarm_win.h
@@ -14,7 +14,6 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
extern HANDLE hAlarmWindowList;
void SetAlarmWinOptions();
-bool TransparencyEnabled();
void InitAlarmWin();
void DeinitAlarmWin();
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index c16c8c118b..68657c65f7 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -888,12 +888,6 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
SendMessage(GetDlgItem(hwndDlg, IDC_SPIN_TRANS), UDM_SETRANGE, 0, (LPARAM)MAKELONG(100, 0));
SendMessage(GetDlgItem(hwndDlg, IDC_SPIN_TRANS), UDM_SETPOS, 0, temp_options.aw_trans);
- if (!TransparencyEnabled()) {
- HWND hw = GetDlgItem(hwndDlg, IDC_SPIN_TRANS);
- EnableWindow(hw, FALSE);
- hw = GetDlgItem(hwndDlg, IDC_ED_TRANS);
- EnableWindow(hw, FALSE);
- }
}
CheckDlgButton(hwndDlg, IDC_SHOWHIDE, temp_options.auto_showhide ? TRUE : FALSE);