diff options
author | George Hazan <george.hazan@gmail.com> | 2023-08-01 17:00:31 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-08-01 17:00:36 +0300 |
commit | f3350f5b892a4809faf0703e81cc865190572648 (patch) | |
tree | 2c66a540befa58e1496c178b1338a5c20f18cd65 | |
parent | fe58b618297fcd01fdfcd42fa93ba10ead8c336c (diff) |
NewStory: translateable default value
-rw-r--r-- | plugins/NewStory/src/options.cpp | 6 | ||||
-rw-r--r-- | plugins/NewStory/src/templates.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/connection.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/http.h | 2 | ||||
-rw-r--r-- | protocols/Twitter/src/utility.cpp | 2 |
5 files changed, 6 insertions, 8 deletions
diff --git a/plugins/NewStory/src/options.cpp b/plugins/NewStory/src/options.cpp index 0e32405a02..b57cb06d6d 100644 --- a/plugins/NewStory/src/options.cpp +++ b/plugins/NewStory/src/options.cpp @@ -164,7 +164,7 @@ public: if (m_curr) { replaceStrW(m_curr->tmpValue, nullptr); replaceStrW(m_curr->value, nullptr); - m_edit.SetText(m_curr->defvalue); + m_edit.SetText(TranslateW(m_curr->defvalue)); } UpdatePreview(0); @@ -178,7 +178,7 @@ public: if (m_curr->value) m_edit.SetText(m_curr->value); else - m_edit.SetText(m_curr->defvalue); + m_edit.SetText(TranslateW(m_curr->defvalue)); UpdatePreview(0); } @@ -250,7 +250,7 @@ public: else if (m_curr->value) m_edit.SetText(m_curr->value); else - m_edit.SetText(m_curr->defvalue); + m_edit.SetText(TranslateW(m_curr->defvalue)); UpdatePreview(0); } diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 039d5306cd..9f01361462 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -298,7 +298,7 @@ HICON TemplateInfo::getIcon() const TemplateInfo templates[TPL_COUNT] = { { "tpl/interface/title", LPGENW("Interface"), ICO_NEWSTORY, LPGENW("Window title"), - L"%N - history [%c messages total]", 0, 0, + LPGENW("%N - history [%c messages total]"), 0, 0, { vfGlobal, vfContact, 0, 0, 0 } }, { "tpl/msglog/msg", LPGENW("Message log"), ICO_SENDMSG, LPGENW("Messages"), diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 50d9fd6ad0..bb3d36c620 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -348,7 +348,7 @@ void CTwitterProto::UpdateAvatar(MCONTACT hContact, const CMStringA &url, bool f void CTwitterProto::UpdateFriends()
{
- auto *req = new AsyncHttpRequest(REQUEST_GET, "/friends/list.json");
+ auto *req = new AsyncHttpRequest(REQUEST_GET, CMStringA(FORMAT, "/2/users/%s/followers", m_szMyId.c_str()));
http::response resp = Execute(req);
if (resp.code != 200) {
debugLogA("Friend list reading failed");
diff --git a/protocols/Twitter/src/http.h b/protocols/Twitter/src/http.h index db0f2204b0..dc5c5debed 100644 --- a/protocols/Twitter/src/http.h +++ b/protocols/Twitter/src/http.h @@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once
-#define TWITTER_BASE_URL "https://api.twitter.com/1.1"
-
namespace http
{
struct response
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp index 06b8c10c65..3d380b85a8 100644 --- a/protocols/Twitter/src/utility.cpp +++ b/protocols/Twitter/src/utility.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. http::response CTwitterProto::Execute(AsyncHttpRequest *pReq)
{
if (pReq->m_szUrl[0] == '/')
- pReq->m_szUrl.Insert(0, TWITTER_BASE_URL);
+ pReq->m_szUrl.Insert(0, "https://api.twitter.com/2");
bool bIsJson = false;
if (!pReq->m_szParam.IsEmpty()) {
|