diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
commit | b7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch) | |
tree | 468d9610a590685322ad2159a9bd2d9e2ba83f89 /plugins/Clist_modern/src/modern_viewmodebar.cpp | |
parent | 7de513f180c429859e246d1033d745b394e1fc28 (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 'plugins/Clist_modern/src/modern_viewmodebar.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
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;
|