summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clcopts.cpp18
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clistopts.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_log.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_newrowopts.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp46
-rw-r--r--plugins/Clist_modern/src/modern_statusbar.cpp20
-rw-r--r--plugins/Clist_modern/src/modern_statusbar_options.cpp18
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp52
13 files changed, 91 insertions, 91 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index 1d287f65d0..f7406fd5fb 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -85,7 +85,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam)
tmi.ownerdata = mmep;
char buf[1024];
- mir_snprintf(buf, SIZEOF(buf), "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
OptParam op;
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hGroupMenuObject, (LPARAM)&tmi);
@@ -398,7 +398,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam)
tmi.ownerdata = mmep;
char buf[1024];
- mir_snprintf(buf, SIZEOF(buf), "%s/%s", mi->pszService, mi->pszName);
+ mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
OptParam op;
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hSubGroupMenuObject, (LPARAM)&tmi);
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 22cd91558f..eb3442289b 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -712,7 +712,7 @@ int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, Clc
}
// check the proto, use it as a base filter result for all further checks
if (g_CluiData.bFilterEffective & CLVM_FILTER_PROTOS) {
- mir_snprintf(szTemp, SIZEOF(szTemp), "%s|", szProto);
+ mir_snprintf(szTemp, "%s|", szProto);
filterResult = strstr(g_CluiData.protoFilter, szTemp) ? 1 : 0;
}
if (g_CluiData.bFilterEffective & CLVM_FILTER_GROUPS) {
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp
index 9d762dd183..ea2cdbfbdb 100644
--- a/plugins/Clist_modern/src/modern_clcopts.cpp
+++ b/plugins/Clist_modern/src/modern_clcopts.cpp
@@ -146,7 +146,7 @@ void RegisterCLUIFonts(void)
mir_tstrncpy(fontid.group, fontOptionsList[i].szGroup, SIZEOF(fontid.group));
mir_tstrncpy(fontid.name, fontOptionsList[i].szDescr, SIZEOF(fontid.name));
- mir_snprintf(idstr, SIZEOF(idstr), "Font%d", fontOptionsList[i].fontID);
+ mir_snprintf(idstr, "Font%d", fontOptionsList[i].fontID);
mir_strncpy(fontid.prefix, idstr, SIZEOF(fontid.prefix));
fontid.order = i + 1;
@@ -160,7 +160,7 @@ void RegisterCLUIFonts(void)
mir_tstrncpy(effectid.group, fontOptionsList[i].szGroup, SIZEOF(effectid.group));
mir_tstrncpy(effectid.name, fontOptionsList[i].szDescr, SIZEOF(effectid.name));
- mir_snprintf(idstr, SIZEOF(idstr), "Font%d", fontOptionsList[i].fontID);
+ mir_snprintf(idstr, "Font%d", fontOptionsList[i].fontID);
mir_strncpy(effectid.setting, idstr, SIZEOF(effectid.setting));
effectid.order = i + 1;
@@ -220,11 +220,11 @@ void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, BYTE *effect, COLORREF
*colour = col;
if (effect) {
- mir_snprintf(idstr, SIZEOF(idstr), "Font%dEffect", i);
+ mir_snprintf(idstr, "Font%dEffect", i);
*effect = db_get_b(NULL, "CLC", idstr, 0);
- mir_snprintf(idstr, SIZEOF(idstr), "Font%dEffectCol1", i);
+ mir_snprintf(idstr, "Font%dEffectCol1", i);
*eColour1 = db_get_dw(NULL, "CLC", idstr, 0);
- mir_snprintf(idstr, SIZEOF(idstr), "Font%dEffectCol2", i);
+ mir_snprintf(idstr, "Font%dEffectCol2", i);
*eColour2 = db_get_dw(NULL, "CLC", idstr, 0);
}
}
@@ -1111,9 +1111,9 @@ static INT_PTR CALLBACK DlgProcClistWindowOpts(HWND hwndDlg, UINT msg, WPARAM wP
case WM_HSCROLL:
{
char str[10];
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
+ mir_snprintf(str, "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg, IDC_INACTIVEPERC, str);
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
+ mir_snprintf(str, "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg, IDC_ACTIVEPERC, str);
}
if (wParam != 0x12345678)
@@ -1695,9 +1695,9 @@ static INT_PTR CALLBACK DlgProcModernOptions(HWND hwndDlg, UINT msg, WPARAM wPar
break;
case WM_HSCROLL:
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
+ mir_snprintf(str, "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg, IDC_INACTIVEPERC, str);
- mir_snprintf(str, SIZEOF(str), "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
+ mir_snprintf(str, "%d%%", 100 * SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0) / 255);
SetDlgItemTextA(hwndDlg, IDC_ACTIVEPERC, str);
if (wParam != 0x12345678 && !bInit)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index f68832d1b9..c98a8645b5 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -524,7 +524,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
int defItemsOrder[NUM_ITEM_TYPE] = SETTINS_ROWITEMORDER_DEFAULT;
for (int i = 0; i < NUM_ITEM_TYPE; i++) {
char tmp[128];
- mir_snprintf(tmp, SIZEOF(tmp), "RowPos%d", i);
+ mir_snprintf(tmp, "RowPos%d", i);
dat->row_items[i] = db_get_w(NULL, "CList", tmp, defItemsOrder[i]);
}
}
diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp
index 0f317ee373..20e6f19089 100644
--- a/plugins/Clist_modern/src/modern_clistopts.cpp
+++ b/plugins/Clist_modern/src/modern_clistopts.cpp
@@ -62,7 +62,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
int type;
int pos = 0;
- mir_snprintf(tmp, SIZEOF(tmp), "RowPos%d", i);
+ mir_snprintf(tmp, "RowPos%d", i);
type = db_get_w(NULL, "CList", tmp, i);
switch (type) {
@@ -207,7 +207,7 @@ static INT_PTR CALLBACK DlgProcItemRowOpts(HWND hwndDlg, UINT msg, WPARAM wParam
HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST_ORDER);
for (int i = 0; i < NUM_ITEM_TYPE; i++) {
char tmp[128];
- mir_snprintf(tmp, SIZEOF(tmp), "RowPos%d", i);
+ mir_snprintf(tmp, "RowPos%d", i);
db_set_w(NULL, "CList", tmp, (WORD)SendMessage(hwndList, LB_GETITEMDATA, i, 0));
}
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 8474bb8961..c3a8f275a7 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -2477,7 +2477,7 @@ LRESULT CLUI::OnDrawItem(UINT, WPARAM wParam, LPARAM lParam)
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MAINMENU);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 1, dis->itemState);
- mir_snprintf(buf, SIZEOF(buf), "Main,ID=MainMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
+ mir_snprintf(buf, "Main,ID=MainMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
SkinDrawGlyph(dis->hDC, &dis->rcItem, &dis->rcItem, buf);
int x = (dis->rcItem.right + dis->rcItem.left - GetSystemMetrics(SM_CXSMICON)) / 2 + offset;
@@ -2511,7 +2511,7 @@ LRESULT CLUI::OnDrawItem(UINT, WPARAM wParam, LPARAM lParam)
}
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 2, dis->itemState);
SetBkMode(dis->hDC, TRANSPARENT);
- mir_snprintf(buf, SIZEOF(buf), "Main,ID=StatusMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
+ mir_snprintf(buf, "Main,ID=StatusMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
SkinDrawGlyph(dis->hDC, &dis->rcItem, &dis->rcItem, buf);
SetTextColor(dis->hDC, (dis->itemState&ODS_SELECTED/*|dis->itemState&ODS_HOTLIGHT*/) ? dat->MenuTextHiColor : dat->MenuTextColor);
DrawText(dis->hDC, TranslateT("Status"), -1, &rc, DT_CENTER | DT_VCENTER | DT_SINGLELINE);
@@ -2530,7 +2530,7 @@ LRESULT CLUI::OnDrawItem(UINT, WPARAM wParam, LPARAM lParam)
short dx = 1 + (dis->itemState&ODS_SELECTED ? 1 : 0) - (dis->itemState&ODS_HOTLIGHT ? 1 : 0);
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 3, dis->itemState);
- mir_snprintf(buf, SIZEOF(buf), "Main,ID=MainMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
+ mir_snprintf(buf, "Main,ID=MainMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
SkinDrawGlyph(dis->hDC, &dis->rcItem, &dis->rcItem, buf);
DrawState(dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, (dis->rcItem.right + dis->rcItem.left - GetSystemMetrics(SM_CXSMICON)) / 2 + dx, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2 + dx, 0, 0, DST_ICON);
Skin_ReleaseIcon(hIcon);
diff --git a/plugins/Clist_modern/src/modern_log.cpp b/plugins/Clist_modern/src/modern_log.cpp
index 25122fef72..f14ec4ca36 100644
--- a/plugins/Clist_modern/src/modern_log.cpp
+++ b/plugins/Clist_modern/src/modern_log.cpp
@@ -31,7 +31,7 @@ void Log(const char *file, int line, const char *fmt, ...)
tmp++;
}
}
- mir_snprintf(buf, SIZEOF(buf), "clist_modern:[%u - %u]: %s \t\t(%s Ln %d)\n", GetCurrentThreadId(), GetTickCount(), str, file_tmp, line);
+ mir_snprintf(buf, "clist_modern:[%u - %u]: %s \t\t(%s Ln %d)\n", GetCurrentThreadId(), GetTickCount(), str, file_tmp, line);
#ifdef _FILELOG_
{
FILE *fp;
diff --git a/plugins/Clist_modern/src/modern_newrowopts.cpp b/plugins/Clist_modern/src/modern_newrowopts.cpp
index 8da157d3c4..d435f7e0e2 100644
--- a/plugins/Clist_modern/src/modern_newrowopts.cpp
+++ b/plugins/Clist_modern/src/modern_newrowopts.cpp
@@ -120,7 +120,7 @@ void TraceTreeLevel(NodeList * node)
PrintIdent();
{
char buf[255];
- mir_snprintf(buf, SIZEOF(buf), "%d\n", node->pData);
+ mir_snprintf(buf, "%d\n", node->pData);
TRACE(buf);
}
ident += 5;
@@ -134,7 +134,7 @@ void TraceTreeLevel(NodeList * node)
PrintIdent();
{
char buf[255];
- mir_snprintf(buf, SIZEOF(buf), "%d\n", node->childNodes[i].pData);
+ mir_snprintf(buf, "%d\n", node->childNodes[i].pData);
TRACE(buf);
}
}
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp
index 892b9a983f..24bccdd60c 100644
--- a/plugins/Clist_modern/src/modern_skinengine.cpp
+++ b/plugins/Clist_modern/src/modern_skinengine.cpp
@@ -38,28 +38,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//Implementation
-#pragma pack(push, 1)
-/* tga header */
-struct tga_header_t
-{
- BYTE id_lenght; /* size of image id */
- BYTE colormap_type; /* 1 is has a colormap */
- BYTE image_type; /* compression type */
-
- short cm_first_entry; /* colormap origin */
- short cm_length; /* colormap length */
- BYTE cm_size; /* colormap size */
-
- short x_origin; /* bottom left x coord origin */
- short y_origin; /* bottom left y coord origin */
-
- short width; /* picture width (in pixels) */
- short height; /* picture height (in pixels) */
-
- BYTE pixel_depth; /* bits per pixel: 8, 16, 24 or 32 */
- BYTE image_descriptor; /* 24 bits = 0x00; 32 bits = 0x80 */
-};
-#pragma pack(pop)
+#pragma pack(push, 1)
+/* tga header */
+struct tga_header_t
+{
+ BYTE id_lenght; /* size of image id */
+ BYTE colormap_type; /* 1 is has a colormap */
+ BYTE image_type; /* compression type */
+
+ short cm_first_entry; /* colormap origin */
+ short cm_length; /* colormap length */
+ BYTE cm_size; /* colormap size */
+
+ short x_origin; /* bottom left x coord origin */
+ short y_origin; /* bottom left y coord origin */
+
+ short width; /* picture width (in pixels) */
+ short height; /* picture height (in pixels) */
+
+ BYTE pixel_depth; /* bits per pixel: 8, 16, 24 or 32 */
+ BYTE image_descriptor; /* 24 bits = 0x00; 32 bits = 0x80 */
+};
+#pragma pack(pop)
/* Global variables */
@@ -3300,7 +3300,7 @@ static DWORD ske_HexToARGB(char * Hex)
{
char buf[10] = { 0 };
char buf2[11] = { 0 };
- mir_snprintf(buf, SIZEOF(buf), "%s\n", Hex);
+ mir_snprintf(buf, "%s\n", Hex);
if (buf[1] == 'x' || buf[1] == 'X')
mir_snprintf(buf2, SIZEOF(buf2), "0x%s\n", buf + 2);
else
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp
index fcd2fc2bf0..7f5e2e6e3d 100644
--- a/plugins/Clist_modern/src/modern_statusbar.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar.cpp
@@ -187,18 +187,18 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
continue;
char buf[256];
- mir_snprintf(buf, SIZEOF(buf), "SBarAccountIsCustom_%s", szProto);
+ mir_snprintf(buf, "SBarAccountIsCustom_%s", szProto);
ProtoItemData *p = NULL;
if (g_StatusBarData.perProtoConfig && db_get_b(NULL, "CLUI", buf, SETTING_SBARACCOUNTISCUSTOM_DEFAULT)) {
- mir_snprintf(buf, SIZEOF(buf), "HideAccount_%s", szProto);
+ mir_snprintf(buf, "HideAccount_%s", szProto);
if (db_get_b(NULL, "CLUI", buf, SETTING_SBARHIDEACCOUNT_DEFAULT)) {
iProtoInStatusMenu++;
continue;
}
- mir_snprintf(buf, SIZEOF(buf), "SBarShow_%s", szProto);
+ mir_snprintf(buf, "SBarShow_%s", szProto);
BYTE showOps = db_get_b(NULL, "CLUI", buf, SETTING_SBARSHOW_DEFAULT);
p = new ProtoItemData;
@@ -206,22 +206,22 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
p->bShowProtoName = (showOps & 2) != 0;
p->bShowStatusName = (showOps & 4) != 0;
- mir_snprintf(buf, SIZEOF(buf), "ShowXStatus_%s", szProto);
+ mir_snprintf(buf, "ShowXStatus_%s", szProto);
p->xStatusMode = db_get_b(NULL, "CLUI", buf, SETTING_SBARSHOW_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "UseConnectingIcon_%s", szProto);
+ mir_snprintf(buf, "UseConnectingIcon_%s", szProto);
p->bConnectingIcon = db_get_b(NULL, "CLUI", buf, SETTING_USECONNECTINGICON_DEFAULT) != 0;
- mir_snprintf(buf, SIZEOF(buf), "ShowUnreadEmails_%s", szProto);
+ mir_snprintf(buf, "ShowUnreadEmails_%s", szProto);
p->bShowProtoEmails = db_get_b(NULL, "CLUI", buf, SETTING_SHOWUNREADEMAILS_DEFAULT) != 0;
- mir_snprintf(buf, SIZEOF(buf), "SBarRightClk_%s", szProto);
+ mir_snprintf(buf, "SBarRightClk_%s", szProto);
p->SBarRightClk = db_get_b(NULL, "CLUI", buf, SETTING_SBARRIGHTCLK_DEFAULT) != 0;
- mir_snprintf(buf, SIZEOF(buf), "PaddingLeft_%s", szProto);
+ mir_snprintf(buf, "PaddingLeft_%s", szProto);
p->PaddingLeft = db_get_dw(NULL, "CLUI", buf, SETTING_PADDINGLEFT_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "PaddingRight_%s", szProto);
+ mir_snprintf(buf, "PaddingRight_%s", szProto);
p->PaddingRight = db_get_dw(NULL, "CLUI", buf, SETTING_PADDINGRIGHT_DEFAULT);
}
else {
@@ -258,7 +258,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC)
p->bIsDimmed = 0;
if (g_CluiData.bFilterEffective & CLVM_FILTER_PROTOS) {
char szTemp[2048];
- mir_snprintf(szTemp, SIZEOF(szTemp), "%s|", p->szAccountName);
+ mir_snprintf(szTemp, "%s|", p->szAccountName);
p->bIsDimmed = strstr(g_CluiData.protoFilter, szTemp) ? 0 : 1;
}
diff --git a/plugins/Clist_modern/src/modern_statusbar_options.cpp b/plugins/Clist_modern/src/modern_statusbar_options.cpp
index 569bfbe3b3..acf1c22e7e 100644
--- a/plugins/Clist_modern/src/modern_statusbar_options.cpp
+++ b/plugins/Clist_modern/src/modern_statusbar_options.cpp
@@ -180,31 +180,31 @@ INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
SendMessage(hwndComboBox, CB_SETITEMDATA, dwNewId, (LPARAM)dat);
char buf[256];
- mir_snprintf(buf, SIZEOF(buf), "SBarAccountIsCustom_%s", szName);
+ mir_snprintf(buf, "SBarAccountIsCustom_%s", szName);
dat->AccountIsCustomized = db_get_b(NULL, "CLUI", buf, SETTING_SBARACCOUNTISCUSTOM_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "HideAccount_%s", szName);
+ mir_snprintf(buf, "HideAccount_%s", szName);
dat->HideAccount = db_get_b(NULL, "CLUI", buf, SETTING_SBARHIDEACCOUNT_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "SBarShow_%s", szName);
+ mir_snprintf(buf, "SBarShow_%s", szName);
dat->SBarShow = db_get_b(NULL, "CLUI", buf, SETTING_SBARSHOW_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "SBarRightClk_%s", szName);
+ mir_snprintf(buf, "SBarRightClk_%s", szName);
dat->SBarRightClk = db_get_b(NULL, "CLUI", buf, SETTING_SBARRIGHTCLK_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "ShowUnreadEmails_%s", szName);
+ mir_snprintf(buf, "ShowUnreadEmails_%s", szName);
dat->ShowUnreadEmails = db_get_b(NULL, "CLUI", buf, SETTING_SHOWUNREADEMAILS_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "ShowXStatus_%s", szName);
+ mir_snprintf(buf, "ShowXStatus_%s", szName);
dat->ShowXStatus = db_get_b(NULL, "CLUI", buf, SETTING_SHOWXSTATUS_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "UseConnectingIcon_%s", szName);
+ mir_snprintf(buf, "UseConnectingIcon_%s", szName);
dat->UseConnectingIcon = db_get_b(NULL, "CLUI", buf, SETTING_USECONNECTINGICON_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "PaddingLeft_%s", szName);
+ mir_snprintf(buf, "PaddingLeft_%s", szName);
dat->PaddingLeft = db_get_dw(NULL, "CLUI", buf, SETTING_PADDINGLEFT_DEFAULT);
- mir_snprintf(buf, SIZEOF(buf), "PaddingRight_%s", szName);
+ mir_snprintf(buf, "PaddingRight_%s", szName);
dat->PaddingRight = db_get_dw(NULL, "CLUI", buf, SETTING_PADDINGRIGHT_DEFAULT);
}
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 3771fc2324..e3b12a3db7 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -70,13 +70,13 @@ void Modern_InitButtons()
char buf[255];
if (i != 0) {
- mir_snprintf(buf, SIZEOF(buf), "%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_dn");
+ mir_snprintf(buf, "%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_dn");
tbb.hIconHandleUp = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipUp, _T("icons\\toolbar_icons.dll"), BTNS[i].icoDefIdx, g_hInst, BTNS[i].defResource);
}
else tbb.hIconHandleUp = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipUp, NULL, 0, NULL, SKINICON_OTHER_MAINMENU);
if (BTNS[i].pszTooltipDn) {
- mir_snprintf(buf, SIZEOF(buf), "%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_up");
+ mir_snprintf(buf, "%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_up");
tbb.hIconHandleDn = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipDn, _T("icons\\toolbar_icons.dll"), BTNS[i].icoDefIdx + 1, g_hInst, BTNS[i].defResource2);
}
else tbb.hIconHandleDn = NULL;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 62280566a4..e8d28ed80a 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -349,17 +349,17 @@ void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szPr
CLVM_EnumModes(DeleteAutoModesCallback);
char szSetting[512];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_PF", 246, name);
+ mir_snprintf(szSetting, "%c%s_PF", 246, name);
db_set_s(NULL, CLVM_MODULE, szSetting, szProtoFilter);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_GF", 246, name);
+ mir_snprintf(szSetting, "%c%s_GF", 246, name);
db_set_ws(NULL, CLVM_MODULE, szSetting, szGroupFilter);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SM", 246, name);
+ mir_snprintf(szSetting, "%c%s_SM", 246, name);
db_set_dw(NULL, CLVM_MODULE, szSetting, statusMask);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SSM", 246, name);
+ mir_snprintf(szSetting, "%c%s_SSM", 246, name);
db_set_dw(NULL, CLVM_MODULE, szSetting, stickyStatusMask);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_OPT", 246, name);
+ mir_snprintf(szSetting, "%c%s_OPT", 246, name);
db_set_dw(NULL, CLVM_MODULE, szSetting, options);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_LM", 246, name);
+ mir_snprintf(szSetting, "%c%s_LM", 246, name);
db_set_dw(NULL, CLVM_MODULE, szSetting, lmdat);
db_set_dw(NULL, CLVM_MODULE, name, MAKELONG((unsigned short)operators, (unsigned short)stickies));
@@ -504,23 +504,23 @@ static void UpdateFilters()
mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("Configuring view mode: %s"), szTempBuf);
SetDlgItemText(clvmHwnd, IDC_CURVIEWMODE2, szTemp);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_PF", 246, szBuf);
+ mir_snprintf(szSetting, "%c%s_PF", 246, szBuf);
ptrA szPF(db_get_sa(NULL, CLVM_MODULE, szSetting));
if (szPF == NULL)
return;
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_GF", 246, szBuf);
+ mir_snprintf(szSetting, "%c%s_GF", 246, szBuf);
ptrT szGF(db_get_tsa(NULL, CLVM_MODULE, szSetting));
if (szGF == NULL)
return;
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_OPT", 246, szBuf);
+ mir_snprintf(szSetting, "%c%s_OPT", 246, szBuf);
if ((opt = db_get_dw(NULL, CLVM_MODULE, szSetting, -1)) != -1)
SendDlgItemMessage(clvmHwnd, IDC_AUTOCLEARSPIN, UDM_SETPOS, 0, MAKELONG(LOWORD(opt), 0));
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SM", 246, szBuf);
+ mir_snprintf(szSetting, "%c%s_SM", 246, szBuf);
DWORD statusMask = db_get_dw(NULL, CLVM_MODULE, szSetting, 0);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SSM", 246, szBuf);
+ mir_snprintf(szSetting, "%c%s_SSM", 246, szBuf);
stickyStatusMask = db_get_dw(NULL, CLVM_MODULE, szSetting, -1);
dwFlags = db_get_dw(NULL, CLVM_MODULE, szBuf, 0);
{
@@ -593,7 +593,7 @@ static void UpdateFilters()
EnableWindow(GetDlgItem(clvmHwnd, IDC_LASTMSGVALUE), useLastMsg);
EnableWindow(GetDlgItem(clvmHwnd, IDC_LASTMESSAGEUNIT), useLastMsg);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_LM", 246, szBuf);
+ mir_snprintf(szSetting, "%c%s_LM", 246, szBuf);
DWORD lmdat = db_get_dw(NULL, CLVM_MODULE, szSetting, 0);
SetDlgItemInt(clvmHwnd, IDC_LASTMSGVALUE, LOWORD(lmdat), FALSE);
@@ -610,15 +610,15 @@ void DeleteViewMode(char * szName)
{
char szSetting[256];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_PF", 246, szName);
+ mir_snprintf(szSetting, "%c%s_PF", 246, szName);
db_unset(NULL, CLVM_MODULE, szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_GF", 246, szName);
+ mir_snprintf(szSetting, "%c%s_GF", 246, szName);
db_unset(NULL, CLVM_MODULE, szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SM", 246, szName);
+ mir_snprintf(szSetting, "%c%s_SM", 246, szName);
db_unset(NULL, CLVM_MODULE, szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_VA", 246, szName);
+ mir_snprintf(szSetting, "%c%s_VA", 246, szName);
db_unset(NULL, CLVM_MODULE, szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SSM", 246, szName);
+ mir_snprintf(szSetting, "%c%s_SSM", 246, szName);
db_unset(NULL, CLVM_MODULE, szSetting);
db_unset(NULL, CLVM_MODULE, szName);
@@ -1223,7 +1223,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
g_CluiData.bFilterEffective = 0;
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c_LastMode", 246);
+ mir_snprintf(szSetting, "%c_LastMode", 246);
if (!Name) { // Name is null - apply last stored view mode
if (!db_get_s(NULL, CLVM_MODULE, szSetting, &dbv)) {
@@ -1238,7 +1238,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
g_CluiData.bFilterEffective = 0;
// remove last applied view mode
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c_LastMode", 246);
+ mir_snprintf(szSetting, "%c_LastMode", 246);
db_unset(NULL, CLVM_MODULE, szSetting);
if (g_CluiData.bOldUseGroups != (BYTE)-1)
@@ -1259,7 +1259,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
}
if (!onlySelector) {
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_PF", 246, Name);
+ mir_snprintf(szSetting, "%c%s_PF", 246, Name);
if (!db_get_s(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (mir_strlen(dbv.pszVal) >= 2) {
mir_strncpy(g_CluiData.protoFilter, dbv.pszVal, SIZEOF(g_CluiData.protoFilter));
@@ -1268,7 +1268,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
}
mir_free(dbv.pszVal);
}
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_GF", 246, Name);
+ mir_snprintf(szSetting, "%c%s_GF", 246, Name);
if (!db_get_ts(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (mir_tstrlen(dbv.ptszVal) >= 2) {
mir_tstrncpy(g_CluiData.groupFilter, dbv.ptszVal, SIZEOF(g_CluiData.groupFilter));
@@ -1277,12 +1277,12 @@ void ApplyViewMode(const char *Name, bool onlySelector)
}
mir_free(dbv.ptszVal);
}
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SM", 246, Name);
+ mir_snprintf(szSetting, "%c%s_SM", 246, Name);
g_CluiData.statusMaskFilter = db_get_dw(NULL, CLVM_MODULE, szSetting, -1);
if (g_CluiData.statusMaskFilter >= 1)
g_CluiData.bFilterEffective |= CLVM_FILTER_STATUS;
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SSM", 246, Name);
+ mir_snprintf(szSetting, "%c%s_SSM", 246, Name);
g_CluiData.stickyMaskFilter = db_get_dw(NULL, CLVM_MODULE, szSetting, -1);
if (g_CluiData.stickyMaskFilter != -1)
g_CluiData.bFilterEffective |= CLVM_FILTER_STICKYSTATUS;
@@ -1292,14 +1292,14 @@ void ApplyViewMode(const char *Name, bool onlySelector)
KillTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE);
if (g_CluiData.filterFlags & CLVM_AUTOCLEAR) {
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_OPT", 246, Name);
+ mir_snprintf(szSetting, "%c%s_OPT", 246, Name);
DWORD timerexpire = LOWORD(db_get_dw(NULL, CLVM_MODULE, szSetting, 0));
mir_strncpy(g_CluiData.old_viewmode, g_CluiData.current_viewmode, SIZEOF(g_CluiData.old_viewmode));
g_CluiData.old_viewmode[255] = 0;
CLUI_SafeSetTimer(g_hwndViewModeFrame, TIMERID_VIEWMODEEXPIRE, timerexpire * 1000, NULL);
}
else { //store last selected view mode only if it is not autoclear
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c_LastMode", 246);
+ mir_snprintf(szSetting, "%c_LastMode", 246);
db_set_s(NULL, CLVM_MODULE, szSetting, Name);
}
mir_strncpy(g_CluiData.current_viewmode, Name, SIZEOF(g_CluiData.current_viewmode));
@@ -1316,7 +1316,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
g_CluiData.bSortByOrder[0] = bSaved;
g_CluiData.bFilterEffective |= CLVM_FILTER_LASTMSG;
- mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_LM", 246, Name);
+ mir_snprintf(szSetting, "%c%s_LM", 246, Name);
g_CluiData.lastMsgFilter = db_get_dw(NULL, CLVM_MODULE, szSetting, 0);
if (LOBYTE(HIWORD(g_CluiData.lastMsgFilter)))
g_CluiData.bFilterEffective |= CLVM_FILTER_LASTMSG_NEWERTHAN;