summaryrefslogtreecommitdiff
path: root/src/modules/icolib
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-05 22:41:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-05 22:41:06 +0000
commite3cefc7b6ca803e3f87dbadae54a110332778490 (patch)
tree0ee41f14f962f946c9e64fae4a11fbcb197af853 /src/modules/icolib
parentf0fb070eab8f276e66c0154363656045bc0dadb3 (diff)
- first of the /Core standard plugins;
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/icolib')
-rw-r--r--src/modules/icolib/extracticon.cpp8
-rw-r--r--src/modules/icolib/skin2icons.cpp20
-rw-r--r--src/modules/icolib/skin2opts.cpp14
3 files changed, 21 insertions, 21 deletions
diff --git a/src/modules/icolib/extracticon.cpp b/src/modules/icolib/extracticon.cpp
index 6a9b3a2ccc..6a53f767cc 100644
--- a/src/modules/icolib/extracticon.cpp
+++ b/src/modules/icolib/extracticon.cpp
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#undef _ASSERT
#endif
#define _ASSERT(n)
-// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcereference/resourcestructures/newheader.asp
+// http://msdn.microsoft.com/library/default.asp?url = /library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcereference/resourcestructures/newheader.asp
typedef struct
{
WORD Reserved;
@@ -53,7 +53,7 @@ void* _RelativeVirtualAddresstoPtr(IMAGE_DOS_HEADER* pDosHeader, DWORD rva)
IMAGE_SECTION_HEADER* pSection = IMAGE_FIRST_SECTION(pPE);
int i;
- for (i = 0; i < pPE->FileHeader.NumberOfSections; i++) {
+ for (i=0; i < pPE->FileHeader.NumberOfSections; i++) {
IMAGE_SECTION_HEADER* cSection = &pSection[i];
DWORD size = cSection->Misc.VirtualSize ? cSection->Misc.VirtualSize : cSection->SizeOfRawData;
@@ -103,7 +103,7 @@ IMAGE_RESOURCE_DIRECTORY_ENTRY* _FindResourceBase(void* prt, int resType, int* p
count = pDir->NumberOfIdEntries + pDir->NumberOfNamedEntries;
pRes = (IMAGE_RESOURCE_DIRECTORY_ENTRY*)(pDir+1);
- for (i = 0; i < count; i++)
+ for (i=0; i < count; i++)
if (pRes[i].Name == (DWORD)resType) break;
if (i == count) return NULL;
@@ -111,7 +111,7 @@ IMAGE_RESOURCE_DIRECTORY_ENTRY* _FindResourceBase(void* prt, int resType, int* p
pDir = (IMAGE_RESOURCE_DIRECTORY*)((LPBYTE)prt +
(pRes[i].OffsetToData & ~IMAGE_RESOURCE_DATA_IS_DIRECTORY));
- count = pDir->NumberOfIdEntries + pDir->NumberOfNamedEntries;
+ count = pDir->NumberOfIdEntries + pDir->NumberOfNamedEntries;
*pCount = count;
pRes = (IMAGE_RESOURCE_DIRECTORY_ENTRY*)(pDir+1);
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 62ab6b15cf..b838e7def6 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -364,7 +364,7 @@ IconSourceItem* CreateStaticIconSourceItem(int cxIcon, int cyIcon)
TCHAR sourceName[ MAX_PATH ];
IconSourceFile key = { sourceName };
- int i = 0;
+ int i=0;
do { // find new unique name
mir_sntprintf(sourceName, SIZEOF(sourceName), _T("*StaticIcon_%d"), ++i);
} while (iconSourceFileList.getIndex(&key) != -1);
@@ -594,7 +594,7 @@ void KillModuleIcons(int hLangpack)
return;
mir_cslock lck(csIconList);
- for (int i=iconList.getCount()-1; i >= 0; i--) {
+ for (int i = iconList.getCount()-1; i >= 0; i--) {
IconItem *item = iconList[i];
if ( item->hLangpack == hLangpack) {
IcoLib_FreeIcon(item);
@@ -821,15 +821,15 @@ int LoadIcoLibModule(void)
hIconBlank = LoadIconEx(NULL, MAKEINTRESOURCE(IDI_BLANK), 0);
InitializeCriticalSection(&csIconList);
- hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
- hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
- hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
+ hIcoLib_AddNewIcon = CreateServiceFunction("Skin2/Icons/AddIcon", sttIcoLib_AddNewIcon);
+ hIcoLib_RemoveIcon = CreateServiceFunction(MS_SKIN2_REMOVEICON, IcoLib_RemoveIcon);
+ hIcoLib_GetIcon = CreateServiceFunction(MS_SKIN2_GETICON, sttIcoLib_GetIcon);
hIcoLib_GetIconHandle = CreateServiceFunction(MS_SKIN2_GETICONHANDLE, sttIcoLib_GetIconHandle);
- hIcoLib_GetIcon2 = CreateServiceFunction(MS_SKIN2_GETICONBYHANDLE, sttIcoLib_GetIconByHandle);
- hIcoLib_IsManaged = CreateServiceFunction(MS_SKIN2_ISMANAGEDICON, sttIcoLib_IsManaged);
- hIcoLib_AddRef = CreateServiceFunction(MS_SKIN2_ADDREFICON, IcoLib_AddRef);
- hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICON, sttIcoLib_ReleaseIcon);
- hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICONBIG, sttIcoLib_ReleaseIconBig);
+ hIcoLib_GetIcon2 = CreateServiceFunction(MS_SKIN2_GETICONBYHANDLE, sttIcoLib_GetIconByHandle);
+ hIcoLib_IsManaged = CreateServiceFunction(MS_SKIN2_ISMANAGEDICON, sttIcoLib_IsManaged);
+ hIcoLib_AddRef = CreateServiceFunction(MS_SKIN2_ADDREFICON, IcoLib_AddRef);
+ hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICON, sttIcoLib_ReleaseIcon);
+ hIcoLib_ReleaseIcon = CreateServiceFunction(MS_SKIN2_RELEASEICONBIG, sttIcoLib_ReleaseIconBig);
hIcons2ChangedEvent = CreateHookableEvent(ME_SKIN2_ICONSCHANGED);
hIconsChangedEvent = CreateHookableEvent(ME_SKIN_ICONSCHANGED);
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp
index 97529762e3..d9bcdaf8d9 100644
--- a/src/modules/icolib/skin2opts.cpp
+++ b/src/modules/icolib/skin2opts.cpp
@@ -227,7 +227,7 @@ void UndoSubItemChanges(HWND htv, HTREEITEM hItem, int cmd)
static void OpenIconsPage()
{
- CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://addons.miranda-im.org/index.php?action=display&id=35");
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://addons.miranda-im.org/index.php?action = display&id = 35");
}
static int OpenPopupMenu(HWND hwndDlg)
@@ -259,7 +259,7 @@ static TCHAR* OpenFileDlg(HWND hParent, const TCHAR* szFile, BOOL bAll)
else
lstrcat(filter, _T(" (*.dll)"));
- pfilter=filter+lstrlen(filter)+1;
+ pfilter = filter+lstrlen(filter)+1;
if (bAll)
lstrcpy(pfilter, _T("*.DLL;*.ICL;*.EXE;*.ICO"));
else
@@ -271,7 +271,7 @@ static TCHAR* OpenFileDlg(HWND hParent, const TCHAR* szFile, BOOL bAll)
pfilter += lstrlen(pfilter) + 1;
lstrcpy(pfilter, _T("*"));
pfilter += lstrlen(pfilter) + 1;
- *pfilter='\0';
+ *pfilter = '\0';
ofn.lpstrFilter = filter;
ofn.lpstrDefExt = _T("dll");
@@ -444,7 +444,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
lvi.iSubItem = 0;
lvi.iItem = 0;
int count = (int)_ExtractIconEx(filename, -1, 16, 16, NULL, LR_DEFAULTCOLOR);
- for (int i = 0; i < count; lvi.iItem++, i++) {
+ for (int i=0; i < count; lvi.iItem++, i++) {
mir_sntprintf(caption, SIZEOF(caption), _T("%d"), i+1);
lvi.pszText = caption;
@@ -486,7 +486,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case WM_MOUSEMOVE:
if (dragging) {
LVHITTESTINFO lvhti;
- int onItem=0;
+ int onItem = 0;
HWND hwndOver;
RECT rc;
POINT ptDrag;
@@ -542,7 +542,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
GetDlgItemText(hwndDlg, IDC_ICONSET, fullPath, SIZEOF(fullPath));
CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)fullPath, (LPARAM)filename);
- lvi.mask=LVIF_PARAM;
+ lvi.mask = LVIF_PARAM;
lvi.iItem = dragItem; lvi.iSubItem = 0;
ListView_GetItem(hPreview, &lvi);
mir_sntprintf(path, MAX_PATH, _T("%s,%d"), filename, (int)lvi.lParam);
@@ -1019,7 +1019,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
return FALSE;
}
-static UINT iconsExpertOnlyControls[]={IDC_IMPORT};
+static UINT iconsExpertOnlyControls[] = {IDC_IMPORT};
int SkinOptionsInit(WPARAM wParam, LPARAM)
{