summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-27 10:38:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-27 10:38:57 +0000
commitdae67fa8059f77a0bd2cbf7e69e0a2d6a3e59a3f (patch)
tree05139b44152096953ee8d6e0fe4a748fb33faee8 /src
parentb3f9db42c5bec217b538a33182b89fc83461fb13 (diff)
fix for the broken extra icons editor
git-svn-id: http://svn.miranda-ng.org/main/trunk@6246 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/modules/extraicons/options_ei.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/extraicons/options_ei.cpp b/src/modules/extraicons/options_ei.cpp
index 38ce9bb2b3..3bffe0c641 100644
--- a/src/modules/extraicons/options_ei.cpp
+++ b/src/modules/extraicons/options_ei.cpp
@@ -474,8 +474,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (lpnmhdr->code == (UINT) PSN_APPLY) {
// Store old slots
int *oldSlots = new int[registeredExtraIcons.getCount()];
- int i, lastUsedSlot = -1;
- for (i = 0; i < registeredExtraIcons.getCount(); i++) {
+ int lastUsedSlot = -1;
+ for (int i = 0; i < registeredExtraIcons.getCount(); i++) {
if (extraIconsByHandle[i] == registeredExtraIcons[i])
oldSlots[i] = registeredExtraIcons[i]->getSlot();
else
@@ -533,7 +533,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
// Store data
- for (i = 0; i < registeredExtraIcons.getCount(); i++) {
+ for (int i = 0; i < registeredExtraIcons.getCount(); i++) {
BaseExtraIcon *extra = registeredExtraIcons[i];
char setting[512];
@@ -550,13 +550,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ExtraIconGroup *group = groups[k];
char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "%d_count", i);
+ mir_snprintf(setting, SIZEOF(setting), "%d_count", k);
db_set_w(NULL, MODULE_NAME "Groups", setting, (WORD)group->items.size());
for (unsigned j = 0; j < group->items.size(); j++) {
BaseExtraIcon *extra = group->items[j];
- mir_snprintf(setting, SIZEOF(setting), "%d_%d", i, j);
+ mir_snprintf(setting, SIZEOF(setting), "%d_%d", k, j);
db_set_s(NULL, MODULE_NAME "Groups", setting, extra->getName());
}
}
@@ -578,7 +578,6 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
delete[] oldSlots;
-
return TRUE;
}
}