summaryrefslogtreecommitdiff
path: root/plugins/NotesAndReminders/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-21 21:58:47 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-21 21:58:47 +0000
commit7c0fdf0c457d55b6bfdda0282cf5099057c715c7 (patch)
tree31389d750c1fb6a6e7ecdd9279d32c238a50ff62 /plugins/NotesAndReminders/src
parent4d970faf406c59e807a9ffd4d7a51f1aaad6636a (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/NotesAndReminders/src')
-rw-r--r--plugins/NotesAndReminders/src/globals.h2
-rw-r--r--plugins/NotesAndReminders/src/hotkeys.cpp10
-rw-r--r--plugins/NotesAndReminders/src/main.cpp2
-rw-r--r--plugins/NotesAndReminders/src/notes.cpp34
-rw-r--r--plugins/NotesAndReminders/src/options.cpp9
5 files changed, 14 insertions, 43 deletions
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; i<SIZEOF(clrPresets); i++)
- InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, TranslateTS(clrPresets[i].szName));
+ for (i=0; i<SIZEOF(clrPresets); i++)
+ InsertMenu(hBg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_BG+i, TranslateTS(clrPresets[i].szName));
- for (i=0; i<SIZEOF(clrPresets); i++)
- InsertMenu(hFg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_FG+i, TranslateTS(clrPresets[i].szName));
- }
+ for (i=0; i<SIZEOF(clrPresets); i++)
+ InsertMenu(hFg, i, MF_BYPOSITION|MF_OWNERDRAW, IDM_COLORPRESET_FG+i, TranslateTS(clrPresets[i].szName));
}
CallService(MS_LANGPACK_TRANSLATEMENU,(DWORD)FhMenu,0);
@@ -1274,17 +1269,9 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l
rect = wr;
OffsetRect(&rect, -wr.left, -wr.top);
- if (g_isWin2kPlus)
- {
- hBkBrush = (HBRUSH)GetStockObject(DC_BRUSH);
- SetDCBrushColor(hdc, GetCaptionColor((SN && SN->BgColor) ? 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);