summaryrefslogtreecommitdiff
path: root/src/modules/extraicons
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
commitb7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch)
tree468d9610a590685322ad2159a9bd2d9e2ba83f89 /src/modules/extraicons
parent7de513f180c429859e246d1033d745b394e1fc28 (diff)
new mir_snprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/extraicons')
-rw-r--r--src/modules/extraicons/extraicons.cpp10
-rw-r--r--src/modules/extraicons/options_ei.cpp22
2 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index 90ac2c35b2..4df022e512 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -133,16 +133,16 @@ static void LoadGroups(LIST<ExtraIconGroup> &groups)
int count = db_get_w(NULL, MODULE_NAME "Groups", "Count", 0);
for (int i=0; i < count; i++) {
char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "%d_count", i);
+ mir_snprintf(setting, "%d_count", i);
unsigned int items = db_get_w(NULL, MODULE_NAME "Groups", setting, 0);
if (items < 1)
continue;
- mir_snprintf(setting, SIZEOF(setting), "__group_%d", i);
+ mir_snprintf(setting, "__group_%d", i);
ExtraIconGroup *group = new ExtraIconGroup(setting);
for (unsigned int j = 0; j < items; j++) {
- mir_snprintf(setting, SIZEOF(setting), "%d_%d", i, j);
+ mir_snprintf(setting, "%d_%d", i, j);
ptrA szIconName(db_get_sa(NULL, MODULE_NAME "Groups", setting));
if (IsEmpty(szIconName))
continue;
@@ -408,10 +408,10 @@ INT_PTR ExtraIcon_Register(WPARAM wParam, LPARAM lParam)
}
char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "Position_%s", ei->name);
+ mir_snprintf(setting, "Position_%s", ei->name);
extra->setPosition(db_get_w(NULL, MODULE_NAME, setting, 1000));
- mir_snprintf(setting, SIZEOF(setting), "Slot_%s", ei->name);
+ mir_snprintf(setting, "Slot_%s", ei->name);
int slot = db_get_w(NULL, MODULE_NAME, setting, 1);
if (slot == (WORD)-1)
slot = -1;
diff --git a/src/modules/extraicons/options_ei.cpp b/src/modules/extraicons/options_ei.cpp
index 2b51b9e718..28d0bf553d 100644
--- a/src/modules/extraicons/options_ei.cpp
+++ b/src/modules/extraicons/options_ei.cpp
@@ -342,7 +342,7 @@ public:
}
else {
char name[128];
- mir_snprintf(name, SIZEOF(name), "__group_%d", groups.getCount());
+ mir_snprintf(name, "__group_%d", groups.getCount());
ExtraIconGroup *group = new ExtraIconGroup(name);
@@ -365,10 +365,10 @@ public:
BaseExtraIcon *extra = registeredExtraIcons[i];
char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "Position_%s", extra->getName());
+ mir_snprintf(setting, "Position_%s", extra->getName());
db_set_w(NULL, MODULE_NAME, setting, extra->getPosition());
- mir_snprintf(setting, SIZEOF(setting), "Slot_%s", extra->getName());
+ mir_snprintf(setting, "Slot_%s", extra->getName());
db_set_w(NULL, MODULE_NAME, setting, extra->getSlot());
}
@@ -378,13 +378,13 @@ public:
ExtraIconGroup *group = groups[k];
char setting[512];
- mir_snprintf(setting, SIZEOF(setting), "%d_count", k);
+ mir_snprintf(setting, "%d_count", k);
db_set_w(NULL, MODULE_NAME "Groups", setting, (WORD)group->items.getCount());
for (int j = 0; j < group->items.getCount(); j++) {
BaseExtraIcon *extra = group->items[j];
- mir_snprintf(setting, SIZEOF(setting), "%d_%d", k, j);
+ mir_snprintf(setting, "%d_%d", k, j);
db_set_s(NULL, MODULE_NAME "Groups", setting, extra->getName());
}
}
@@ -419,10 +419,10 @@ public:
ImageList_Destroy(m_tree.GetImageList(TVSIL_NORMAL));
}
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
- {
- if (msg == WM_NOTIFY) {
- LPNMHDR lpnmhdr = (LPNMHDR)lParam;
+ virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
+ {
+ if (msg == WM_NOTIFY) {
+ LPNMHDR lpnmhdr = (LPNMHDR)lParam;
if (lpnmhdr->idFrom == IDC_EXTRAORDER && lpnmhdr->code == NM_RCLICK) {
HTREEITEM hSelected = m_tree.GetDropHilight();
if (hSelected != NULL && !m_tree.IsSelected(hSelected)) {
@@ -450,8 +450,8 @@ public:
}
}
- return CDlgBase::DlgProc(msg, wParam, lParam);
- }
+ return CDlgBase::DlgProc(msg, wParam, lParam);
+ }
};
/////////////////////////////////////////////////////////////////////////////////////////