summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat/options.cpp2
-rw-r--r--plugins/Scriver/src/chat/tools.cpp2
-rw-r--r--plugins/Scriver/src/chat/window.cpp6
-rw-r--r--plugins/Scriver/src/input.cpp4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp4
-rw-r--r--plugins/Scriver/src/msglog.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp8
-rw-r--r--plugins/Scriver/src/msgwindow.cpp16
-rw-r--r--plugins/Scriver/src/utils.cpp16
9 files changed, 30 insertions, 30 deletions
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 254fb28675..f922a731f2 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
TCHAR tszTooltipText[2048];
RECT rect;
- mir_sntprintf(tszTooltipText, _countof(tszTooltipText),
+ mir_sntprintf(tszTooltipText,
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n\n")
_T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 1eb9907c3a..1fab1ef1f8 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -53,7 +53,7 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s
if (pszWordText && pszWordText[0]) {
TCHAR szMenuText[4096];
- mir_sntprintf(szMenuText, _countof(szMenuText), TranslateT("Look up '%s':"), pszWordText);
+ mir_sntprintf(szMenuText, TranslateT("Look up '%s':"), pszWordText);
ModifyMenu(*hMenu, 4, MF_STRING | MF_BYPOSITION, 4, szMenuText);
SetSearchEngineIcons(*hMenu, g_dat.hSearchEngineIconList);
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index b8923a07ec..b67205598c 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -799,7 +799,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO * p
}
if (tszBuf[0] == 0)
- mir_sntprintf(tszBuf, _countof(tszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(tszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui->Status));
@@ -1432,7 +1432,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
char szIndicator = SM_GetStatusIndicator(si, ui);
if (szIndicator > '\0') {
static TCHAR ptszBuf[128];
- mir_sntprintf(ptszBuf, _countof(ptszBuf), _T("%c%s"), szIndicator, ui->pszNick);
+ mir_sntprintf(ptszBuf, _T("%c%s"), szIndicator, ui->pszNick);
SendDlgItemMessage(hwndDlg, IDC_CHAT_LIST, LB_ADDSTRING, 0, (LPARAM)ptszBuf);
}
else SendDlgItemMessage(hwndDlg, IDC_CHAT_LIST, LB_ADDSTRING, 0, (LPARAM)ui->pszNick);
@@ -1641,7 +1641,7 @@ LABEL_SHOWWINDOW:
USERINFO *ui = pci->SM_GetUserFromIndex(parentdat->ptszID, parentdat->pszModule, item);
if (ui != NULL) {
static TCHAR ptszBuf[1024];
- mir_sntprintf(ptszBuf, _countof(ptszBuf), _T("%s: %s\r\n%s: %s\r\n%s: %s"),
+ mir_sntprintf(ptszBuf, _T("%s: %s\r\n%s: %s\r\n%s: %s"),
TranslateT("Nickname"), ui->pszNick,
TranslateT("Unique ID"), ui->pszUID,
TranslateT("Status"), pci->TM_WordToString(parentdat->pStatuses, ui->Status));
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp
index 5801cbbdd5..563c2803da 100644
--- a/plugins/Scriver/src/input.cpp
+++ b/plugins/Scriver/src/input.cpp
@@ -293,8 +293,8 @@ void RegisterKeyBindings()
desc.pszName = strName;
desc.pszDescription = strDesc;
for (int i = 0; i < 9; i++) {
- mir_snprintf(strName, _countof(strName), "Scriver/Nav/Tab %d", i + 1);
- mir_snprintf(strDesc, _countof(strDesc), Translate("Navigate: tab %d"), i + 1);
+ mir_snprintf(strName, "Scriver/Nav/Tab %d", i + 1);
+ mir_snprintf(strDesc, Translate("Navigate: tab %d"), i + 1);
desc.lParam = KB_TAB1 + i;
desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, '1' + i);
Hotkey_Register(&desc);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 0637424ddf..68e31b3ec1 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -302,7 +302,7 @@ static LRESULT CALLBACK LogEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
ptrT pszWord(GetRichTextWord(hwnd, &ptl));
if (pszWord && pszWord[0]) {
TCHAR szMenuText[4096];
- mir_sntprintf(szMenuText, _countof(szMenuText), TranslateT("Look up '%s':"), pszWord);
+ mir_sntprintf(szMenuText, TranslateT("Look up '%s':"), pszWord);
ModifyMenu(hSubMenu, 5, MF_STRING | MF_BYPOSITION, 5, szMenuText);
SetSearchEngineIcons(hMenu, g_dat.hSearchEngineIconList);
}
@@ -1266,7 +1266,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
GetWindowRect(GetDlgItem(hwndDlg, IDC_LOG), &rcLog);
GetClientRect(hwndDlg, &rc);
- POINT pt = { 0, wParam };
+ POINT pt = { 0, (int)wParam };
ScreenToClient(hwndDlg, &pt);
dat->splitterPos = rc.bottom - pt.y;
SendMessage(hwndDlg, WM_SIZE, 0, 0);
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index 32e98e5996..5915bf2acd 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -379,7 +379,7 @@ static char* SetToStyle(int style)
static char szStyle[128];
LOGFONT lf;
LoadMsgDlgFont(style, &lf, NULL);
- mir_snprintf(szStyle, _countof(szStyle), "\\f%u\\cf%u\\b%d\\i%d\\fs%u", style, style, lf.lfWeight >= FW_BOLD ? 1 : 0, lf.lfItalic, 2 * abs(lf.lfHeight) * 74 / logPixelSY);
+ mir_snprintf(szStyle, "\\f%u\\cf%u\\b%d\\i%d\\fs%u", style, style, lf.lfWeight >= FW_BOLD ? 1 : 0, lf.lfItalic, 2 * abs(lf.lfHeight) * 74 / logPixelSY);
return szStyle;
}
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index aefb07949f..701733a6bc 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -129,7 +129,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam)
cle.hDbEvent = hDbEvent;
cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- mir_sntprintf(toolTip, _countof(toolTip), TranslateT("Message from %s"), contactName);
+ mir_sntprintf(toolTip, TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
@@ -208,7 +208,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam)
else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, _countof(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(szTip, TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName(hContact, 0));
if ( ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags2 & SMF2_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn;
tn.szProto = NULL;
@@ -282,7 +282,7 @@ static void RestoreUnreadMessageAlerts(void)
else {
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
- mir_sntprintf(toolTip, _countof(toolTip), TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_sntprintf(toolTip, TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
}
@@ -629,7 +629,7 @@ STDMETHODIMP CREOleCallback::GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEU
STDMETHODIMP CREOleCallback::GetNewStorage(LPSTORAGE *lplpstg)
{
TCHAR sztName[64];
- mir_sntprintf(sztName, _countof(sztName), _T("s%u"), nextStgId++);
+ mir_sntprintf(sztName, _T("s%u"), nextStgId++);
if (pictStg == NULL)
return STG_E_MEDIUMFULL;
return pictStg->CreateStorage(sztName, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, 0, lplpstg);
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index eb48aeb5e7..37cf89bcee 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -1133,14 +1133,14 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
char *szNamePrefix = (!savePerContact && dat->isChat) ? "chat" : "";
if (!dat->windowWasCascaded) {
- mir_snprintf(szSettingName, _countof(szSettingName), "%sx", szNamePrefix);
+ mir_snprintf(szSettingName, "%sx", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.left);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sy", szNamePrefix);
+ mir_snprintf(szSettingName, "%sy", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.top);
}
- mir_snprintf(szSettingName, _countof(szSettingName), "%swidth", szNamePrefix);
+ mir_snprintf(szSettingName, "%swidth", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.right - wp.rcNormalPosition.left);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sheight", szNamePrefix);
+ mir_snprintf(szSettingName, "%sheight", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);
db_set_b(hContact, SRMMMOD, SRMSGSET_TOPMOST, (BYTE)dat->bTopmost);
if (g_dat.lastParent == dat)
@@ -1510,9 +1510,9 @@ int ScriverRestoreWindowPosition(HWND hwnd, MCONTACT hContact, const char *szMod
GetWindowPlacement(hwnd, &wp);
char szSettingName[64];
- mir_snprintf(szSettingName, _countof(szSettingName), "%sx", szNamePrefix);
+ mir_snprintf(szSettingName, "%sx", szNamePrefix);
int x = db_get_dw(hContact, szModule, szSettingName, -1);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sy", szNamePrefix);
+ mir_snprintf(szSettingName, "%sy", szNamePrefix);
int y = db_get_dw(hContact, szModule, szSettingName, -1);
if (x == -1)
return 1;
@@ -1522,9 +1522,9 @@ int ScriverRestoreWindowPosition(HWND hwnd, MCONTACT hContact, const char *szMod
else {
wp.rcNormalPosition.left = x;
wp.rcNormalPosition.top = y;
- mir_snprintf(szSettingName, _countof(szSettingName), "%swidth", szNamePrefix);
+ mir_snprintf(szSettingName, "%swidth", szNamePrefix);
wp.rcNormalPosition.right = wp.rcNormalPosition.left + db_get_dw(hContact, szModule, szSettingName, -1);
- mir_snprintf(szSettingName, _countof(szSettingName), "%sheight", szNamePrefix);
+ mir_snprintf(szSettingName, "%sheight", szNamePrefix);
wp.rcNormalPosition.bottom = wp.rcNormalPosition.top + db_get_dw(hContact, szModule, szSettingName, -1);
}
wp.flags = 0;
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index cea74321c6..f9fac518df 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -375,29 +375,29 @@ void SearchWord(TCHAR * word, int engine)
ptrA wordURL(mir_urlEncode(wordUTF));
switch (engine) {
case SEARCHENGINE_WIKIPEDIA:
- mir_snprintf(szURL, _countof(szURL), "http://en.wikipedia.org/wiki/%s", wordURL);
+ mir_snprintf(szURL, "http://en.wikipedia.org/wiki/%s", wordURL);
break;
case SEARCHENGINE_YAHOO:
- mir_snprintf(szURL, _countof(szURL), "http://search.yahoo.com/search?p=%s&ei=UTF-8", wordURL);
+ mir_snprintf(szURL, "http://search.yahoo.com/search?p=%s&ei=UTF-8", wordURL);
break;
case SEARCHENGINE_FOODNETWORK:
- mir_snprintf(szURL, _countof(szURL), "http://search.foodnetwork.com/search/delegate.do?fnSearchString=%s", wordURL);
+ mir_snprintf(szURL, "http://search.foodnetwork.com/search/delegate.do?fnSearchString=%s", wordURL);
break;
case SEARCHENGINE_BING:
- mir_snprintf(szURL, _countof(szURL), "http://www.bing.com/search?q=%s&form=OSDSRC", wordURL);
+ mir_snprintf(szURL, "http://www.bing.com/search?q=%s&form=OSDSRC", wordURL);
break;
case SEARCHENGINE_GOOGLE_MAPS:
- mir_snprintf(szURL, _countof(szURL), "http://maps.google.com/maps?q=%s&ie=utf-8&oe=utf-8", wordURL);
+ mir_snprintf(szURL, "http://maps.google.com/maps?q=%s&ie=utf-8&oe=utf-8", wordURL);
break;
case SEARCHENGINE_GOOGLE_TRANSLATE:
- mir_snprintf(szURL, _countof(szURL), "http://translate.google.com/?q=%s&ie=utf-8&oe=utf-8", wordURL);
+ mir_snprintf(szURL, "http://translate.google.com/?q=%s&ie=utf-8&oe=utf-8", wordURL);
break;
case SEARCHENGINE_YANDEX:
- mir_snprintf(szURL, _countof(szURL), "http://yandex.ru/yandsearch?text=%s", wordURL);
+ mir_snprintf(szURL, "http://yandex.ru/yandsearch?text=%s", wordURL);
break;
case SEARCHENGINE_GOOGLE:
default:
- mir_snprintf(szURL, _countof(szURL), "http://www.google.com/search?q=%s&ie=utf-8&oe=utf-8", wordURL);
+ mir_snprintf(szURL, "http://www.google.com/search?q=%s&ie=utf-8&oe=utf-8", wordURL);
break;
}