From 7c0fdf0c457d55b6bfdda0282cf5099057c715c7 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 21 Sep 2013 21:58:47 +0000 Subject: Not needed version checks removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NotesAndReminders/src/globals.h | 2 -- plugins/NotesAndReminders/src/hotkeys.cpp | 10 +++------ plugins/NotesAndReminders/src/main.cpp | 2 -- plugins/NotesAndReminders/src/notes.cpp | 34 +++++++++---------------------- plugins/NotesAndReminders/src/options.cpp | 9 +------- 5 files changed, 14 insertions(+), 43 deletions(-) (limited to 'plugins/NotesAndReminders') diff --git a/plugins/NotesAndReminders/src/globals.h b/plugins/NotesAndReminders/src/globals.h index 35a7188126..e440c95870 100644 --- a/plugins/NotesAndReminders/src/globals.h +++ b/plugins/NotesAndReminders/src/globals.h @@ -121,8 +121,6 @@ extern int g_Transparency; extern char *g_RemindSMS; -extern BOOL g_isWin2kPlus; - extern TCHAR *g_lpszAltBrowser; extern int g_reminderListGeom[4]; diff --git a/plugins/NotesAndReminders/src/hotkeys.cpp b/plugins/NotesAndReminders/src/hotkeys.cpp index a71ecf9399..fb5fb678c5 100644 --- a/plugins/NotesAndReminders/src/hotkeys.cpp +++ b/plugins/NotesAndReminders/src/hotkeys.cpp @@ -121,14 +121,10 @@ void CreateMsgWindow(void) RegisterClassEx(&TWC); } - if ( IsWinVer2000Plus() ) - { - // win2k+ has special message-only windows support - hParent = HWND_MESSAGE; - } + hParent = HWND_MESSAGE; - HKHwnd = CreateWindowEx(WS_EX_TOOLWINDOW, MSG_WND_CLASS, _T("StickyNotes"), 0, 0, 0, 0, 0, hParent, NULL, hmiranda, NULL); - SetTimer(HKHwnd, 1026, REMINDER_UPDATE_INTERVAL, 0); + HKHwnd = CreateWindowEx(WS_EX_TOOLWINDOW, MSG_WND_CLASS, _T("StickyNotes"), 0, 0, 0, 0, 0, hParent, NULL, hmiranda, NULL); + SetTimer(HKHwnd, 1026, REMINDER_UPDATE_INTERVAL, 0); } void DestroyMsgWindow(void) diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 386cc792fb..660b0a41d2 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -311,8 +311,6 @@ extern "C" __declspec(dllexport) int Load(void) ctrls.dwICC = ICC_DATE_CLASSES; InitCommonControlsEx(&ctrls); - g_isWin2kPlus = IsWinVer2000Plus(); - hRichedDll = LoadLibrary(_T("RICHED20.DLL")); if (!hRichedDll) { if (MessageBox(0, TranslateT("Miranda could not load the Note & Reminders plugin, RICHED20.DLL is missing. If you are using Windows 95 or WINE please make sure you have riched20.dll installed. Press 'Yes' to continue loading Miranda."), _T(SECTIONNAME), MB_YESNO | MB_ICONINFORMATION) != IDYES) diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 9907655063..5c19457227 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1018,22 +1018,17 @@ static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam) // NOTE: names used for FindMenuItem would need to include & chars if such shortcuts are added to the menus - // color preset menu items uses features that require win2k or later, I'm too lazy to make a fallback path - // for obsolete OS versions (win95/98/ME users can still use the "Custom" menu option) - if (g_isWin2kPlus) + n = FindMenuItem(FhMenu, _T("Appearance")); + if (n >= 0 && (hSub = GetSubMenu(FhMenu, n))) { - n = FindMenuItem(FhMenu, _T("Appearance")); - if (n >= 0 && (hSub = GetSubMenu(FhMenu, n))) - { - HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color"))); - HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color"))); + HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color"))); + HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color"))); - for (i=0; iBgColor) ? SN->BgColor : BodyColor)); - } - else - { - hBkBrush = (HBRUSH)CreateSolidBrush( GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor) ); - } + hBkBrush = (HBRUSH)GetStockObject(DC_BRUSH); + SetDCBrushColor(hdc, GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor)); - //FillRect(hdc, &rect, hBkBrush); // draw all frame sides separately to avoid filling client area (which flickers) { // top @@ -1302,7 +1289,6 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l r.left = rect.right - 3; r.right = rect.right; FillRect(hdc, &r, hBkBrush); } - if (hBkBrush && !g_isWin2kPlus) DeleteObject(hBkBrush); // paint title bar contents (time stamp and buttons) diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp index fefe500820..1cbb55f47b 100644 --- a/plugins/NotesAndReminders/src/options.cpp +++ b/plugins/NotesAndReminders/src/options.cpp @@ -18,7 +18,6 @@ int g_NoteTitleDate, g_NoteTitleTime; int g_NoteWidth,g_NoteHeight; int g_Transparency; char *g_RemindSMS = NULL; -BOOL g_isWin2kPlus = TRUE; TCHAR *g_lpszAltBrowser = NULL; @@ -479,13 +478,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPar ofn.nMaxFile = SIZEOF(s); ofn.lpstrTitle = TranslateT("Select Executable"); ofn.lpstrInitialDir = _T("."); - ofn.Flags = OFN_FILEMUSTEXIST|OFN_LONGNAMES; - if ( IsWinVer98Plus() ) - { - ofn.Flags |= OFN_ENABLESIZING; - if (g_isWin2kPlus) - ofn.Flags |= OFN_DONTADDTORECENT; - } + ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_ENABLESIZING | OFN_DONTADDTORECENT; SendDlgItemMessage(hdlg,IDC_EDIT_ALTBROWSER,WM_GETTEXT,(WPARAM)ofn.nMaxFile,(LPARAM)s); -- cgit v1.2.3