summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-12 12:37:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-12 12:37:54 +0000
commitf53121766f887f34a489c06669735ccbd2a859ab (patch)
treea7bb426cec7888b0e9fc2bbc3439849eade787ef
parent9c62ad6bb204781819184f772992fec768cb4418 (diff)
obsolete flag TTBBF_ICONBYHANDLE removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@920 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/BASS_interface/src/Main.cpp2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp2
-rw-r--r--plugins/Clist_modern/modern_toolbar.cpp1
-rw-r--r--plugins/Clist_nicer/SRC/CLCButton.cpp1
-rw-r--r--plugins/Console/Console.cpp2
-rw-r--r--plugins/ExternalAPI/m_toptoolbar.h3
-rw-r--r--plugins/FavContacts/src/main.cpp2
-rw-r--r--plugins/ListeningTo/listeningto.cpp2
-rw-r--r--plugins/NewXstatusNotify/main.cpp2
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/main.cpp2
-rw-r--r--plugins/StatusPlugins/StartupStatus/toolbars.cpp2
-rw-r--r--plugins/Svc_crshdmp/crshdmp.cpp4
-rw-r--r--plugins/TopToolBar/toolbar.cpp14
-rw-r--r--plugins/TopToolBar/ttbopt.cpp2
-rw-r--r--plugins/Updater/updater.cpp2
-rw-r--r--plugins/UserInfoEx/dlg_anniversarylist.cpp2
-rw-r--r--plugins/UserInfoEx/svc_reminder.cpp2
-rw-r--r--protocols/JabberG/jabber_menu.cpp2
-rw-r--r--protocols/YAMN/services.cpp2
-rw-r--r--src/modules/icolib/skin2icons.cpp83
22 files changed, 65 insertions, 73 deletions
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index 218ede544e..2c544d71ba 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -378,7 +378,7 @@ int OnToolbarLoaded(WPARAM wParam, LPARAM lParam)
tbb.pszTooltipDn = LPGEN("Audio device is closed");
tbb.hIconHandleUp = hIconLibItem[0];
tbb.hIconHandleDn = hIconLibItem[1];
- tbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_SHOWTOOLTIP;
hTBButton = TopToolbar_AddButton(&tbb);
return 0;
}
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index bfdf0b274d..0499410ea5 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -109,7 +109,7 @@ int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam)
tbb.name = LPGEN("Open History");
tbb.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
tbb.pszTooltipUp = LPGEN("Open History");
- tbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_SHOWTOOLTIP;
tbb.hIconHandleUp = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
hToolbarButton = TopToolbar_AddButton(&tbb);
}
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp
index 5b7ea96a37..5f26d88dbf 100644
--- a/plugins/Clist_modern/modern_toolbar.cpp
+++ b/plugins/Clist_modern/modern_toolbar.cpp
@@ -61,7 +61,6 @@ static int Modern_InitButtons(WPARAM, LPARAM)
tbb.cbSize = sizeof(tbb);
for (int i=0; i < SIZEOF(BTNS); i++) {
- tbb.dwFlags = TTBBF_ICONBYHANDLE;
if (BTNS[i].pszButtonID) {
tbb.name = BTNS[i].pszButtonID;
tbb.pszService = BTNS[i].pszServiceName;
diff --git a/plugins/Clist_nicer/SRC/CLCButton.cpp b/plugins/Clist_nicer/SRC/CLCButton.cpp
index f57fea034f..3b4b46f545 100644
--- a/plugins/Clist_nicer/SRC/CLCButton.cpp
+++ b/plugins/Clist_nicer/SRC/CLCButton.cpp
@@ -56,7 +56,6 @@ static int InitDefaultButtons(WPARAM, LPARAM)
for (int i=0; i < SIZEOF(BTNS); i++ ) {
g_index = i;
- tbb.dwFlags = TTBBF_ICONBYHANDLE;
if (BTNS[i].pszButtonID) {
tbb.pszTooltipUp = tbb.name = BTNS[i].pszButtonName;
tbb.pszService = BTNS[i].pszButtonID;
diff --git a/plugins/Console/Console.cpp b/plugins/Console/Console.cpp
index 2a2093e7c0..b04be4dc39 100644
--- a/plugins/Console/Console.cpp
+++ b/plugins/Console/Console.cpp
@@ -157,7 +157,7 @@ static int OnTTBLoaded(WPARAM wParam,LPARAM lParam)
sid.iDefaultIndex = -IDI_BTN_DN;
ttbb.hIconHandleDn = Skin_AddIcon(&sid);
- ttbb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttbb.dwFlags = (state ? TTBBF_PUSHED : 0) | TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttbb.pszService = "Console/Hide";
ttbb.name = LPGEN("Show/Hide Console");
ttbb.pszTooltipDn = LPGEN("Hide Console");
diff --git a/plugins/ExternalAPI/m_toptoolbar.h b/plugins/ExternalAPI/m_toptoolbar.h
index 6b72a179da..dd664d4124 100644
--- a/plugins/ExternalAPI/m_toptoolbar.h
+++ b/plugins/ExternalAPI/m_toptoolbar.h
@@ -10,9 +10,8 @@
#define TTBBF_SHOWTOOLTIP 0x0008
#define TTBBF_ISSEPARATOR 0x0020
#define TTBBF_ISLBUTTON 0x0040
-#define TTBBF_ICONBYHANDLE 0x0080
+#define TTBBF_ASPUSHBUTTON 0x0080
#define TTBBF_ISSBUTTON 0x0100
-#define TTBBF_ASPUSHBUTTON 0x0200
typedef struct {
int cbSize;
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 7c97602857..5233df1d65 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -128,7 +128,7 @@ int ProcessTBLoaded(WPARAM wParam, LPARAM lParam)
button.pszTooltipUp = button.pszTooltipUp =
button.name = LPGEN("Favourite Contacts");
button.pszService = MS_FAVCONTACTS_SHOWMENU;
- button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
button.hIconHandleUp = (HANDLE)g_icoFavourite;
TopToolbar_AddButton(&button);
return 0;
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp
index d36cfecec2..219c92c7e1 100644
--- a/plugins/ListeningTo/listeningto.cpp
+++ b/plugins/ListeningTo/listeningto.cpp
@@ -530,7 +530,7 @@ int TopToolBarLoaded(WPARAM wParam, LPARAM lParam)
ttb.hIconHandleDn = hIcon2;
ttb.hIconHandleUp = hIcon1;
ttb.pszService = MS_LISTENINGTO_TTB;
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_ICONBYHANDLE | TTBBF_SHOWTOOLTIP | (enabled ? TTBBF_PUSHED : 0);
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | (enabled ? TTBBF_PUSHED : 0);
ttb.name = "Enable/Disable sending Listening To info (to all protocols)";
ttb.pszTooltipDn = LPGEN("Disable ListeningTo (to all protocols)");
ttb.pszTooltipUp = LPGEN("Enable ListeningTo (to all protocols)");
diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp
index 7519dca662..bb467473e9 100644
--- a/plugins/NewXstatusNotify/main.cpp
+++ b/plugins/NewXstatusNotify/main.cpp
@@ -1333,7 +1333,7 @@ int InitTopToolbar(WPARAM, LPARAM)
tbb.pszTooltipDn = LPGEN("Status notification disabled");
tbb.hIconHandleUp = GetIconHandle(ICO_NOTIFICATION_ON);
tbb.hIconHandleDn = GetIconHandle(ICO_NOTIFICATION_OFF);
- tbb.dwFlags = TTBBF_ICONBYHANDLE | (opt.TempDisabled ? TTBBF_PUSHED : 0);
+ tbb.dwFlags = (opt.TempDisabled ? TTBBF_PUSHED : 0);
hToolbarButton = TopToolbar_AddButton(&tbb);
return 0;
}
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index 66c345017a..4071d2a804 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -208,7 +208,7 @@ static int TTBLoaded(WPARAM wParam,LPARAM lParam)
btn.cbSize = sizeof(btn);
btn.pszService = MENUCOMMAND_SVC;
btn.lParamUp = 1;
- btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
btn.name = LPGEN("Toggle Popups");
btn.hIconHandleUp = Skin_GetIconHandle(ICO_TB_POPUP_ON);
btn.hIconHandleDn = Skin_GetIconHandle(ICO_TB_POPUP_OFF);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 53027ee6e3..bb0fd11df7 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -856,7 +856,7 @@ INT_PTR BuildFavMenu(WPARAM wparam,LPARAM lparam)
static int CreateButtons(WPARAM wparam,LPARAM lparam)
{
TTBButton button = {0};
- button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
button.pszService = MS_SESSIONS_OPENMANAGER;
button.pszTooltipUp = button.name = LPGEN("Open Sessions Manager");
diff --git a/plugins/SimpleStatusMsg/main.cpp b/plugins/SimpleStatusMsg/main.cpp
index de266b6d93..4ba8a8a6a0 100644
--- a/plugins/SimpleStatusMsg/main.cpp
+++ b/plugins/SimpleStatusMsg/main.cpp
@@ -1602,7 +1602,7 @@ static int AddTopToolbarButton(WPARAM wParam, LPARAM lParam)
ttbb.cbSize = sizeof(ttbb);
ttbb.hIconHandleUp = GetIconHandle(IDI_CSMSG);
ttbb.pszService = MS_SIMPLESTATUSMSG_SHOWDIALOGINT;
- ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttbb.name = LPGEN("Change Status Message");
ttbb.pszTooltipUp = LPGEN("Change Status Message");
hTTBButton = TopToolbar_AddButton(&ttbb);
diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
index e1b94d8f44..989468cdb4 100644
--- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp
+++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
@@ -58,7 +58,7 @@ int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam)
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = MS_SS_LOADANDSETPROFILE;
for (int i=0; i < profileCount; i++) {
char setting[80];
diff --git a/plugins/Svc_crshdmp/crshdmp.cpp b/plugins/Svc_crshdmp/crshdmp.cpp
index 4f0acab235..3dd69dd022 100644
--- a/plugins/Svc_crshdmp/crshdmp.cpp
+++ b/plugins/Svc_crshdmp/crshdmp.cpp
@@ -217,14 +217,14 @@ static int ToolbarModulesLoaded(WPARAM, LPARAM)
tbb.pszService = MS_CRASHDUMPER_STORETOCLIP;
tbb.pszTooltipUp = LPGEN("Version Information To Clipboard");
tbb.hIconHandleUp = GetIconHandle("storeToClip");
- tbb.dwFlags = TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_VISIBLE;
TopToolbar_AddButton(&tbb);
tbb.name = LPGEN("Version Information To File");
tbb.pszService = MS_CRASHDUMPER_STORETOFILE;
tbb.pszTooltipUp = LPGEN("Version Information To File");
tbb.hIconHandleUp = GetIconHandle("storeToFile");
- tbb.dwFlags = TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = 0;
TopToolbar_AddButton(&tbb);
tbb.name = LPGEN("Show Version Information");
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index e9d6525c15..a9467708c2 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -207,12 +207,14 @@ TopButtonInt* CreateButton(TTBButton* but)
b->pszName = mir_strdup(but->name);
- if (b->dwFlags & TTBBF_ICONBYHANDLE) {
- b->hIconUp = Skin_GetIconByHandle(b->hIconHandleUp = but->hIconHandleUp);
- if (but->hIconHandleDn)
- b->hIconDn = Skin_GetIconByHandle(b->hIconHandleDn = but->hIconHandleDn);
- else
- b->hIconDn = 0, b->hIconHandleDn = 0;
+ b->hIconHandleUp = (HANDLE)CallService(MS_SKIN2_ISMANAGEDICON, WPARAM(but->hIconHandleUp), 0);
+ if (b->hIconHandleUp) {
+ b->hIconUp = Skin_GetIconByHandle(b->hIconHandleUp);
+ if (but->hIconHandleDn) {
+ b->hIconHandleDn = (HANDLE)CallService(MS_SKIN2_ISMANAGEDICON, WPARAM(but->hIconHandleDn), 0);
+ b->hIconDn = Skin_GetIconByHandle(b->hIconHandleDn);
+ }
+ else b->hIconDn = 0, b->hIconHandleDn = 0;
}
else {
char buf[256];
diff --git a/plugins/TopToolBar/ttbopt.cpp b/plugins/TopToolBar/ttbopt.cpp
index 3fa0b1916c..db7d78dcb5 100644
--- a/plugins/TopToolBar/ttbopt.cpp
+++ b/plugins/TopToolBar/ttbopt.cpp
@@ -25,7 +25,7 @@ static HTREEITEM AddLine(HWND hTree,TopButtonInt *b, HTREEITEM hItem, HIMAGELIST
index = -1;
}
else {
- if (b->dwFlags & TTBBF_ICONBYHANDLE) {
+ if (b->hIconHandleUp) {
HICON hIcon = Skin_GetIconByHandle(b->hIconHandleUp);
index = ImageList_AddIcon(il, hIcon);
Skin_ReleaseIcon(hIcon);
diff --git a/plugins/Updater/updater.cpp b/plugins/Updater/updater.cpp
index db4968c373..72eb686974 100644
--- a/plugins/Updater/updater.cpp
+++ b/plugins/Updater/updater.cpp
@@ -181,7 +181,7 @@ static int ToolbarModulesLoaded(WPARAM, LPARAM)
{
TTBButton tbb = {0};
tbb.cbSize = sizeof(TTBButton);
- tbb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ tbb.dwFlags = TTBBF_SHOWTOOLTIP;
tbb.name = LPGEN("Check for Updates");
tbb.pszService = MS_UPDATE_CHECKFORUPDATES;
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp
index 539ba3bd6b..53bd90f0ef 100644
--- a/plugins/UserInfoEx/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp
@@ -1092,7 +1092,7 @@ VOID DlgAnniversaryListOnTopToolBarLoaded()
{
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = MS_USERINFO_REMINDER_LIST;
ttb.hIconHandleUp = Skin_GetIconHandle(ICO_COMMON_ANNIVERSARY);
ttb.pszTooltipUp = LPGEN("Anniversary list");
diff --git a/plugins/UserInfoEx/svc_reminder.cpp b/plugins/UserInfoEx/svc_reminder.cpp
index 98f52f9c21..f5f42bc20c 100644
--- a/plugins/UserInfoEx/svc_reminder.cpp
+++ b/plugins/UserInfoEx/svc_reminder.cpp
@@ -907,7 +907,7 @@ VOID SvcReminderOnTopToolBarLoaded()
TTBButton ttb = { 0 };
ttb.cbSize = sizeof(ttb);
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
ttb.pszService = MS_USERINFO_REMINDER_CHECK;
ttb.name = "Check anniversaries";
ttb.pszTooltipUp = LPGEN("Check anniversaries");
diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp
index 8f2f5dafec..985db5e17e 100644
--- a/protocols/JabberG/jabber_menu.cpp
+++ b/protocols/JabberG/jabber_menu.cpp
@@ -981,7 +981,7 @@ int g_OnToolbarInit(WPARAM, LPARAM)
TTBButton button = {0};
button.cbSize = sizeof(button);
- button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE | TTBBF_ICONBYHANDLE;
+ button.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
List_InsertPtr( &arServices, CreateServiceFunction("JABBER/*/Groupchat", g_ToolbarHandleJoinGroupchat ));
button.pszService = "JABBER/*/Groupchat";
diff --git a/protocols/YAMN/services.cpp b/protocols/YAMN/services.cpp
index abe890fdf7..4048f7881b 100644
--- a/protocols/YAMN/services.cpp
+++ b/protocols/YAMN/services.cpp
@@ -312,7 +312,7 @@ int AddTopToolbarIcon(WPARAM,LPARAM)
TTBButton btn = { 0 };
btn.cbSize = sizeof(btn);
btn.pszService = MS_YAMN_FORCECHECK;
- btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ICONBYHANDLE;
+ btn.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
btn.name = "Check mail";
btn.hIconHandleUp = g_GetIconHandle(5);
btn.hIconHandleDn = g_GetIconHandle(6);
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index b838e7def6..609080d4aa 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -453,23 +453,23 @@ IconItem* IcoLib_FindIcon(const char* pszIconName)
IconItem* IcoLib_FindHIcon(HICON hIcon, bool &big)
{
- IconItem* item = NULL;
- int indx;
-
- for (indx = 0; indx < iconList.getCount(); indx++) {
- if (iconList[ indx ]->source_small && iconList[ indx ]->source_small->icon == hIcon) {
- item = iconList[ indx ];
+ for (int i = 0; i < iconList.getCount(); i++) {
+ IconItem *p = iconList[i];
+ if ((void*)p == hIcon) {
+ big = (p->source_small == NULL);
+ return p;
+ }
+ if (p->source_small && p->source_small->icon == hIcon) {
big = false;
- break;
+ return p;
}
- else if (iconList[ indx ]->source_big && iconList[ indx ]->source_big->icon == hIcon) {
- item = iconList[ indx ];
+ if (p->source_big && p->source_big->icon == hIcon) {
big = true;
- break;
+ return p;
}
}
- return item;
+ return NULL;
}
static void IcoLib_FreeIcon(IconItem* icon)
@@ -575,15 +575,15 @@ static INT_PTR IcoLib_RemoveIcon(WPARAM, LPARAM lParam)
if (lParam) {
mir_cslock lck(csIconList);
- int indx;
- if ((indx = iconList.getIndex((IconItem*)&lParam)) != -1) {
- IconItem *item = iconList[ indx ];
+ int i;
+ if ((i = iconList.getIndex((IconItem*)&lParam)) != -1) {
+ IconItem *item = iconList[ i ];
IcoLib_FreeIcon(item);
- iconList.remove(indx);
+ iconList.remove(i);
SAFE_FREE((void**)&item);
}
- return (indx == -1) ? 1 : 0;
+ return (i == -1) ? 1 : 0;
}
return 1; // Failed
}
@@ -743,14 +743,7 @@ HANDLE IcoLib_IsManaged(HICON hIcon)
mir_cslock lck(csIconList);
bool big;
- IconItem* item = IcoLib_FindHIcon(hIcon, big);
- if (item) {
- IconSourceItem* source = big && !item->cx ? item->source_big : item->source_small;
- if (source->icon_ref_count == 0)
- item = NULL;
- }
-
- return item;
+ return IcoLib_FindHIcon(hIcon, big);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -841,7 +834,7 @@ int LoadIcoLibModule(void)
void UnloadIcoLibModule(void)
{
- int indx;
+ int i;
if ( !bModuleInitialized) return;
@@ -858,35 +851,35 @@ void UnloadIcoLibModule(void)
DestroyServiceFunction(hIcoLib_ReleaseIcon);
DeleteCriticalSection(&csIconList);
- for (indx = iconList.getCount()-1; indx >= 0; indx--) {
- IconItem* I = iconList[indx];
- iconList.remove(indx);
- IcoLib_FreeIcon(I);
- mir_free(I);
+ for (i = iconList.getCount()-1; i >= 0; i--) {
+ IconItem* p = iconList[i];
+ iconList.remove(i);
+ IcoLib_FreeIcon(p);
+ mir_free(p);
}
iconList.destroy();
- for (indx = iconSourceList.getCount()-1; indx >= 0; indx--) {
- IconSourceItem* I = iconSourceList[indx];
- iconSourceList.remove(indx);
- IconSourceFile_Release(&I->file);
- SafeDestroyIcon(&I->icon);
- SAFE_FREE((void**)&I->icon_data);
- SAFE_FREE((void**)&I);
+ for (i = iconSourceList.getCount()-1; i >= 0; i--) {
+ IconSourceItem* p = iconSourceList[i];
+ iconSourceList.remove(i);
+ IconSourceFile_Release(&p->file);
+ SafeDestroyIcon(&p->icon);
+ SAFE_FREE((void**)&p->icon_data);
+ SAFE_FREE((void**)&p);
}
iconSourceList.destroy();
- for (indx = iconSourceFileList.getCount()-1; indx >= 0; indx--) {
- IconSourceFile* I = iconSourceFileList[indx];
- iconSourceFileList.remove(indx);
- SAFE_FREE((void**)&I->file);
- SAFE_FREE((void**)&I);
+ for (i = iconSourceFileList.getCount()-1; i >= 0; i--) {
+ IconSourceFile* p = iconSourceFileList[i];
+ iconSourceFileList.remove(i);
+ SAFE_FREE((void**)&p->file);
+ SAFE_FREE((void**)&p);
}
iconSourceFileList.destroy();
- for (indx = 0; indx < sectionList.getCount(); indx++) {
- SAFE_FREE((void**)&sectionList[indx]->name);
- mir_free(sectionList[indx]);
+ for (i = 0; i < sectionList.getCount(); i++) {
+ SAFE_FREE((void**)&sectionList[i]->name);
+ mir_free(sectionList[i]);
}
sectionList.destroy();