diff options
author | George Hazan <george.hazan@gmail.com> | 2012-08-02 19:34:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-08-02 19:34:32 +0000 |
commit | 3af838e995ecc0d61f45ea18e3c385e363bbe3ca (patch) | |
tree | 6601efa590dd567c893a84787ebec49d5a410a53 /plugins | |
parent | e375ccde7e1f274a557c7023d41677f9b8c92861 (diff) |
- build time removed from Help/About dialog in tabSRMM
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@1327 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Clist_modern/src/modern_statusbar.cpp | 15 | ||||
-rw-r--r-- | plugins/TabSRMM/include/resource.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/resource.rc | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/srmm.cpp | 86 |
4 files changed, 49 insertions, 54 deletions
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 150aa0159b..81f40b4bd2 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -23,9 +23,9 @@ COLORREF sttGetColor(char * module, char * color, COLORREF defColor); #define DBFONTF_ITALIC 2
#define DBFONTF_UNDERLINE 4
-typedef struct _ProtoItemData : public MZeroedObject
+struct ProtoItemData : public MZeroedObject
{
- ~_ProtoItemData()
+ ~ProtoItemData()
{
mir_free(ProtoXStatus);
mir_free(ProtoName);
@@ -61,8 +61,7 @@ typedef struct _ProtoItemData : public MZeroedObject int PaddingRight;
bool isDimmed;
-}
- ProtoItemData;
+};
static OBJLIST<ProtoItemData> ProtosData(5);
@@ -203,7 +202,6 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) for (int j = 0; j < protoCount; j++) {
int vis;
- char buf[256];
i = pcli->pfnGetAccountIndexByPos(j);
if (i == -1)
@@ -213,6 +211,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ( !vis)
continue;
+ char buf[256];
mir_snprintf(buf, SIZEOF(buf), "SBarAccountIsCustom_%s", accs[i]->szModuleName);
ProtoItemData* p = new ProtoItemData;
@@ -350,8 +349,10 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) //Code for each line
DWORD sw;
rectwidth = rc.right-rc.left-g_StatusBarData.rectBorders.left-g_StatusBarData.rectBorders.right;
- if (visProtoCount > 1) sw = (rectwidth-(g_StatusBarData.extraspace*(visProtoCount-1)))/visProtoCount;
- else sw = rectwidth;
+ if (visProtoCount > 1)
+ sw = (rectwidth-(g_StatusBarData.extraspace*(visProtoCount-1)))/visProtoCount;
+ else
+ sw = rectwidth;
int *ProtoWidth = (int*)mir_alloc(sizeof(int)*visProtoCount);
for (i=0; i < visProtoCount; i++) {
diff --git a/plugins/TabSRMM/include/resource.h b/plugins/TabSRMM/include/resource.h index 0ae02e554e..25f9547d0f 100644 --- a/plugins/TabSRMM/include/resource.h +++ b/plugins/TabSRMM/include/resource.h @@ -563,7 +563,6 @@ #define IDC_PLUS_CHECKTREE 2000
#define IDC_COPYRIGHT 2002
#define IDC_PLUS_HELP 2004
-#define IDC_BUILDTIME 2005
#define IDC_O_HELP_TITLEFORMAT 2064
#define IDC_OPTIONSTAB 2111
#define IDC_HEADERBAR 2397
diff --git a/plugins/TabSRMM/resource.rc b/plugins/TabSRMM/resource.rc index 2ba8410fb4..e2be8995cb 100644 --- a/plugins/TabSRMM/resource.rc +++ b/plugins/TabSRMM/resource.rc @@ -538,7 +538,6 @@ BEGIN CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",WS_TABSTOP,0,0,228,30
DEFPUSHBUTTON "OK",IDOK,168,123,55,14
CTEXT "Copyright © 2004-2010 by the Miranda IM project, 2012 by the Miranda NG project. More detailed copyright information can be found in the included README file.",IDC_COPYRIGHT,5,39,217,47
- CTEXT "",IDC_BUILDTIME,37,105,150,11
CONTROL "Support and latest version information",IDC_SUPPORT,
"Hyperlink",WS_TABSTOP | 0x1,18,91,192,12
PUSHBUTTON "Reset all hidden warnings",IDC_RESETWARNINGS,2,123,145,14
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index df3e125e2f..c6992c2f48 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -236,55 +236,51 @@ INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar COLORREF url_unvisited = RGB(0, 0, 255);
switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- char str[64];
- TCHAR tStr[80];
- char szVersion[512], *found = NULL, buildstr[50] = "";
- UINT build_nr = 0;
- DWORD v = pluginInfo.version;
-
- mir_snprintf(str, sizeof(str), Translate("Built %s %s"), __DATE__, __TIME__);
- SetDlgItemTextA(hwndDlg, IDC_BUILDTIME, str);
-
- 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, safe_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);
+ 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);
}
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE));
+ TCHAR *szBuildstr = mir_a2t(buildstr);
+ mir_sntprintf(tStr, safe_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 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;
- case IDC_RESETWARNINGS:
- M->WriteDword(SRMSGMOD_T, "cWarningsL", 0);
- M->WriteDword(SRMSGMOD_T, "cWarningsH", 0);
- break;
- }
+ case IDC_SUPPORT:
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://miranda.or.at/");
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);
- default:
+ case IDC_RESETWARNINGS:
+ M->WriteDword(SRMSGMOD_T, "cWarningsL", 0);
+ M->WriteDword(SRMSGMOD_T, "cWarningsH", 0);
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);
+ default:
+ break;
}
return FALSE;
}
|