diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-21 21:58:47 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-21 21:58:47 +0000 |
commit | 7c0fdf0c457d55b6bfdda0282cf5099057c715c7 (patch) | |
tree | 31389d750c1fb6a6e7ecdd9279d32c238a50ff62 /plugins/Clist_modern | |
parent | 4d970faf406c59e807a9ffd4d7a51f1aaad6636a (diff) |
Not needed version checks removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/hdr/modern_defsettings.h | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 15 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clui.cpp | 56 |
3 files changed, 30 insertions, 43 deletions
diff --git a/plugins/Clist_modern/src/hdr/modern_defsettings.h b/plugins/Clist_modern/src/hdr/modern_defsettings.h index ca03dcdd6f..7bae7516e8 100644 --- a/plugins/Clist_modern/src/hdr/modern_defsettings.h +++ b/plugins/Clist_modern/src/hdr/modern_defsettings.h @@ -223,7 +223,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_BLENDINACTIVESTATE_DEFAULT 0 //"CLC","BlendInActiveState"
#define CLCDEFAULT_MODERN_SELTEXTCOLOUR (g_CluiData.fDisableSkinEngine?GetSysColor(COLOR_HIGHLIGHTTEXT):RGB(0,0,128))
-#define CLCDEFAULT_MODERN_HOTTEXTCOLOUR (g_CluiData.fDisableSkinEngine?(IsWinVer98Plus()?CLCDEFAULT_MODERN_SELTEXTCOLOUR:GetSysColor(COLOR_HOTLIGHT)):RGB(0,0,255))
+#define CLCDEFAULT_MODERN_HOTTEXTCOLOUR (g_CluiData.fDisableSkinEngine ? CLCDEFAULT_MODERN_SELTEXTCOLOUR : RGB(0,0,255))
#define CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR RGB(255,255,0)
#define CLCDEFAULT_NOVSCROLL 0 //"CLC","NoVScrollBar"
#define CLCDEFAULT_INFOTIPTIME 750 //"! "CLC","InfoTipHoverTime"
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 92184f0c75..451594269f 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -1239,12 +1239,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP dbv.pszVal = NULL;
}
}
- if ( !IsWinVer2000Plus()) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
- }
- else CheckDlgButton(hwndDlg,IDC_TRANSPARENT,db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_TRANSPARENT, db_get_b(NULL, "CList", "Transparent", SETTING_TRANSPARENT_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
@@ -1394,7 +1389,7 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP }
AniAva_UpdateParent();
db_set_b(NULL,"CLUI","FadeInOut",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT));
- g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && (BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT);
+ g_CluiData.fSmoothAnimation = (BYTE)IsDlgButtonChecked(hwndDlg,IDC_FADEINOUT);
{
int i1 = SendDlgItemMessage(hwndDlg,IDC_FRAMESSPIN,UDM_GETPOS, 0, 0);
int i2 = SendDlgItemMessage(hwndDlg,IDC_CAPTIONSSPIN,UDM_GETPOS, 0, 0);
@@ -1884,12 +1879,6 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETRANGE, 0, MAKELONG(900, 1));
SendDlgItemMessage(hwndDlg,IDC_HIDETIMESPIN,UDM_SETPOS, 0, MAKELONG(db_get_w(NULL,"CList","HideTime",SETTING_HIDETIME_DEFAULT),0));
- if ( !IsWinVer2000Plus()) {
- EnableWindow(GetDlgItem(hwndDlg,IDC_FADEINOUT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_TRANSPARENT),FALSE);
- EnableWindow(GetDlgItem(hwndDlg,IDC_DROPSHADOW),FALSE);
- }
-
if ( !IsDlgButtonChecked(hwndDlg,IDC_TRANSPARENT)) {
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC11),FALSE);
EnableWindow(GetDlgItem(hwndDlg,IDC_STATIC12),FALSE);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index ba54fa857b..24b5588c44 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -338,7 +338,7 @@ HRESULT CLUI::LoadDllsRuntime() g_proc_SetLayeredWindowAttributesNew = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(m_hUserDll, "SetLayeredWindowAttributes");
g_CluiData.fLayered = (g_proc_UpdateLayeredWindow != NULL) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
- g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
+ g_CluiData.fSmoothAnimation = db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
g_CluiData.fLayered = (g_CluiData.fLayered*db_get_b(NULL, "ModernData", "EnableLayering", g_CluiData.fLayered)) && !db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
}
@@ -604,31 +604,29 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd) void CLUI_UpdateLayeredMode()
{
g_CluiData.fDisableSkinEngine = db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
- if ( IsWinVer2000Plus()) {
- BOOL tLayeredFlag = TRUE;
- tLayeredFlag &= ( db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine);
-
- if (g_CluiData.fLayered != tLayeredFlag) {
- BOOL fWasVisible = IsWindowVisible(pcli->hwndContactList);
- if (fWasVisible)
- ShowWindow(pcli->hwndContactList,SW_HIDE);
-
- //change layered mode
- LONG exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
- if (tLayeredFlag)
- exStyle |= WS_EX_LAYERED;
- else
- exStyle &= ~WS_EX_LAYERED;
-
- SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
- SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
- g_CluiData.fLayered = tLayeredFlag;
- Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
- CLUI_ChangeWindowMode();
- Sync(CLUIFrames_OnClistResize_mod, 0, 0 );
- if (fWasVisible)
- ShowWindow(pcli->hwndContactList,SW_SHOW);
- }
+ BOOL tLayeredFlag = TRUE;
+ tLayeredFlag &= ( db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag) && !g_CluiData.fDisableSkinEngine);
+
+ if (g_CluiData.fLayered != tLayeredFlag) {
+ BOOL fWasVisible = IsWindowVisible(pcli->hwndContactList);
+ if (fWasVisible)
+ ShowWindow(pcli->hwndContactList,SW_HIDE);
+
+ //change layered mode
+ LONG exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
+ if (tLayeredFlag)
+ exStyle |= WS_EX_LAYERED;
+ else
+ exStyle &= ~WS_EX_LAYERED;
+
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
+ SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
+ g_CluiData.fLayered = tLayeredFlag;
+ Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
+ CLUI_ChangeWindowMode();
+ Sync(CLUIFrames_OnClistResize_mod, 0, 0 );
+ if (fWasVisible)
+ ShowWindow(pcli->hwndContactList,SW_SHOW);
}
}
@@ -669,8 +667,8 @@ void CLUI_ChangeWindowMode() if ( !pcli->hwndContactList) return;
g_mutex_bChangingMode = TRUE;
- g_bTransparentFlag = IsWinVer2000Plus() && db_get_b( NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT);
- g_CluiData.fSmoothAnimation = IsWinVer2000Plus() && db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
+ g_bTransparentFlag = db_get_b( NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT);
+ g_CluiData.fSmoothAnimation = db_get_b(NULL, "CLUI", "FadeInOut", SETTING_FADEIN_DEFAULT);
if (g_bTransparentFlag == 0 && g_CluiData.bCurrentAlpha != 0)
g_CluiData.bCurrentAlpha = 255;
//2- Calculate STYLES and STYLESEX
@@ -1333,7 +1331,7 @@ int CLUI_IconsChanged(WPARAM wParam,LPARAM lParam) void CLUI_cli_LoadCluiGlobalOpts()
{
- BOOL tLayeredFlag = IsWinVer2000Plus();
+ BOOL tLayeredFlag = TRUE;
tLayeredFlag &= db_get_b(NULL, "ModernData", "EnableLayering", tLayeredFlag);
if (tLayeredFlag) {
if ( db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 1)
|