summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-09 11:10:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-09 11:10:53 +0000
commite01f0a233002645f505d828d0698a0f1829fd2cb (patch)
tree84c7956949aad0c22e03b69e630ba191fb572723 /plugins/TabSRMM
parent25d0c59c48067f195991656514ef76a30053699c (diff)
fixes for old service calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@8493 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/functions.h2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp42
-rw-r--r--plugins/TabSRMM/src/srmm.cpp49
3 files changed, 42 insertions, 51 deletions
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index 28ad139f09..28ddd1f9a7 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -189,7 +189,5 @@ void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle);
INT_PTR CALLBACK SelectContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
#endif /* _TABSRMM_FUNCTIONS_H */
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 32ec5e2083..0bca9aa4cd 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -618,6 +618,48 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
return 1;
}
+static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ COLORREF url_visited = RGB(128, 0, 128);
+ COLORREF url_unvisited = RGB(0, 0, 255);
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ {
+ WORD v[4];
+ CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)&v);
+
+ TCHAR tStr[80];
+ mir_sntprintf(tStr, SIZEOF(tStr), _T("TabSRMM\n%s %d.%d.%d.%d [build %d]"),
+ TranslateT("Version"), __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM, v[3]);
+ SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr);
+ }
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE));
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ case IDCANCEL:
+ DestroyWindow(hwndDlg);
+ return TRUE;
+ case IDC_SUPPORT:
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda.or.at/");
+ break;
+ }
+ break;
+
+ case WM_CTLCOLOREDIT:
+ case WM_CTLCOLORSTATIC:
+ SetTextColor((HDC)wParam, RGB(60, 60, 150));
+ SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
+ return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
+ }
+ return FALSE;
+}
+
LRESULT TSAPI DM_ContainerCmdHandler(TContainerData *pContainer, UINT cmd, WPARAM wParam, LPARAM lParam)
{
if (!pContainer)
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 76ce8aeaa0..145f6eb4de 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -204,52 +204,3 @@ int _DebugPopup(MCONTACT hContact, const TCHAR *fmt, ...)
}
return 0;
}
-
-INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- COLORREF url_visited = RGB(128, 0, 128);
- COLORREF url_unvisited = RGB(0, 0, 255);
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- TCHAR tStr[80];
- char szVersion[512], *found = NULL, buildstr[50] = "";
- UINT build_nr = 0;
- DWORD v = pluginInfo.version;
-
- CallService(MS_SYSTEM_GETVERSIONTEXT, 500, (LPARAM)szVersion);
- if ((found = strchr(szVersion, '#')) != NULL) {
- build_nr = atoi(found + 1);
- mir_snprintf(buildstr, 50, "[Build #%d]", build_nr);
- }
- TCHAR *szBuildstr = mir_a2t(buildstr);
- mir_sntprintf(tStr, SIZEOF(tStr), _T("TabSRMM\n%s %d.%d.%d.%d (Unicode) %s"),
- _T("Version"), HIBYTE(HIWORD(v)), LOBYTE(HIWORD(v)), HIBYTE(LOWORD(v)), LOBYTE(LOWORD(v)),
- szBuildstr);
- SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr);
- mir_free(szBuildstr);
- }
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE));
- return TRUE;
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDOK:
- case IDCANCEL:
- DestroyWindow(hwndDlg);
- return TRUE;
- case IDC_SUPPORT:
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda.or.at/");
- break;
- }
- break;
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORSTATIC:
- SetTextColor((HDC)wParam, RGB(60, 60, 150));
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
- }
- return FALSE;
-}