diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-23 22:00:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-23 22:00:47 +0000 |
commit | f2afd38df832e12dea8ba41ce25835f2f4de419a (patch) | |
tree | b87acbb161e08797ad29e09247daa1f709654fdd | |
parent | 10fa9a24ced9d0a37722c53846c1a0bd94047412 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@594 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/TopToolBar/InternalButtons.cpp | 1 | ||||
-rw-r--r-- | plugins/TopToolBar/main.cpp | 1 | ||||
-rw-r--r-- | plugins/TopToolBar/toolbar.cpp | 1 | ||||
-rw-r--r-- | plugins/TopToolBar/topbutton.cpp | 1 | ||||
-rw-r--r-- | plugins/TopToolBar/ttbopt.cpp | 40 |
5 files changed, 16 insertions, 28 deletions
diff --git a/plugins/TopToolBar/InternalButtons.cpp b/plugins/TopToolBar/InternalButtons.cpp index 8f0fbedfcd..08c8f09802 100644 --- a/plugins/TopToolBar/InternalButtons.cpp +++ b/plugins/TopToolBar/InternalButtons.cpp @@ -1,6 +1,5 @@ #include "common.h"
-#pragma hdrstop
#define TTBI_GROUPSHOWHIDE "TTBInternal/GroupShowHide"
#define TTBI_SOUNDSONOFF "TTBInternal/SoundsOnOFF"
diff --git a/plugins/TopToolBar/main.cpp b/plugins/TopToolBar/main.cpp index 6874e43ce8..d4f486bbe0 100644 --- a/plugins/TopToolBar/main.cpp +++ b/plugins/TopToolBar/main.cpp @@ -1,7 +1,6 @@ #include "common.h"
#include "version.h"
-#pragma hdrstop
HINSTANCE hInst;
PLUGINLINK *pluginLink;
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp index e23da5649b..f7e2b19c68 100644 --- a/plugins/TopToolBar/toolbar.cpp +++ b/plugins/TopToolBar/toolbar.cpp @@ -1,6 +1,5 @@ #include "common.h"
-#pragma hdrstop
HWND hwndContactList = 0;
HWND hwndTopToolBar = 0;
diff --git a/plugins/TopToolBar/topbutton.cpp b/plugins/TopToolBar/topbutton.cpp index 3c216e364a..d6d5b1cce9 100644 --- a/plugins/TopToolBar/topbutton.cpp +++ b/plugins/TopToolBar/topbutton.cpp @@ -1,6 +1,5 @@ #include "common.h"
-#pragma hdrstop
#define BitChanged(c) (dwFlags ^ Flags) & c
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp index 8ff338bc28..67d6b99238 100644 --- a/plugins/TopToolBar/ttbopt.cpp +++ b/plugins/TopToolBar/ttbopt.cpp @@ -1,6 +1,5 @@ #include "common.h"
#include <shlobj.h>
-#pragma hdrstop
HWND OptionshWnd = 0;
@@ -21,7 +20,7 @@ HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST il) TCHAR* tmp;
if (b->dwFlags & TTBBF_ISSEPARATOR) {
- tvis.item.pszText = L"------------------";
+ tvis.item.pszText = _T("------------------");
index = -1;
}
else {
@@ -61,12 +60,9 @@ int BuildTree(HWND hwndDlg) if (Buttons.getCount() == 0)
return FALSE;
- for (int i = 0; i < Buttons.getCount(); i++) {
- TopButtonInt *b = Buttons[i];
- AddLine(hTree, b, TVI_LAST, dat->himlButtonIcons);
- }
-
- return (TRUE);
+ for (int i = 0; i < Buttons.getCount(); i++)
+ AddLine(hTree, Buttons[i], TVI_LAST, dat->himlButtonIcons);
+ return TRUE;
}
//call this when options opened and buttons added/removed
@@ -78,7 +74,7 @@ int OptionsPageRebuild() return 0;
}
-int SaveTree(HWND hwndDlg)
+void SaveTree(HWND hwndDlg)
{
HWND hTree = GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE);
@@ -115,10 +111,9 @@ int SaveTree(HWND hwndDlg) ulockbut();
SaveAllButtonsOptions();
- return (TRUE);
}
-int CancelProcess(HWND hwndDlg)
+void CancelProcess(HWND hwndDlg)
{
HWND hTree = GetDlgItem(hwndDlg, IDC_BUTTONORDERTREE);
@@ -137,8 +132,6 @@ int CancelProcess(HWND hwndDlg) tvi.hItem = TreeView_GetNextSibling(hTree, tvi.hItem);
}
-
- return (TRUE);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -365,8 +358,7 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR else
SetDlgItemTextA(hwndDlg, IDC_EPATH, "");
}
- else
- {
+ else {
EnableWindow(GetDlgItem(hwndDlg,IDC_REMOVEBUTTON),
(btn->dwFlags & TTBBF_ISSEPARATOR)?TRUE:FALSE);
@@ -404,14 +396,6 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR }
break;
- case WM_DESTROY:
- if (dat) {
- ImageList_Destroy(dat->himlButtonIcons);
- free(dat);
- }
- OptionshWnd = NULL;
- return 0;
-
case WM_LBUTTONUP:
if (dat->dragging) {
TreeView_SetInsertMark(hTree, NULL, 0);
@@ -432,7 +416,7 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR tvi.mask = TVIF_HANDLE|TVIF_PARAM;
tvi.hItem = hti.hItem;
TreeView_GetItem(hTree, &tvi);
- if (hti.flags&(TVHT_ONITEM|TVHT_ONITEMRIGHT)) {
+ if (hti.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT)) {
TVINSERTSTRUCT tvis;
TCHAR name[128];
tvis.item.mask = TVIF_HANDLE | TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
@@ -451,6 +435,14 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR }
}
break;
+
+ case WM_DESTROY:
+ if (dat) {
+ ImageList_Destroy(dat->himlButtonIcons);
+ free(dat);
+ }
+ OptionshWnd = NULL;
+ break;
}
return FALSE;
}
|