diff options
-rw-r--r-- | include/m_srmm_int.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/version.h | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk.h | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_pollserver.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 13 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 35 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 18 | ||||
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 4 |
11 files changed, 54 insertions, 34 deletions
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 0ded3a9d42..7681480c1b 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -62,7 +62,7 @@ struct CustomButtonData : public MZeroedObject bool m_bCanBeHidden, m_bCantBeHidden, m_bHidden, m_bAutoHidden, m_bSeparator, m_bDisabled, m_bPushButton; bool m_bRSided; BYTE m_opFlags; - int m_hLangpack; + int m_iLangId; DWORD m_dwOrigPosition; struct THotkeyItem *m_hotkey; diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h index 2e72242b00..43d4d0ecbd 100644 --- a/protocols/VKontakte/src/version.h +++ b/protocols/VKontakte/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
-#define __RELEASE_NUM 4
-#define __BUILD_NUM 5
+#define __RELEASE_NUM 5
+#define __BUILD_NUM 1
#include <stdver.h>
diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h index e894a6304e..4e4eac7697 100644 --- a/protocols/VKontakte/src/vk.h +++ b/protocols/VKontakte/src/vk.h @@ -88,7 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VK_USER_DEACTIVATE_ACTION 9321
-#define VK_API_VER "5.74"
+#define VK_API_VER "5.76"
#define VER_API CHAR_PARAM("v", VK_API_VER)
#define VK_FEED_USER 2147483647L
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp index 8f92639ab8..735d7c1eb7 100644 --- a/protocols/VKontakte/src/vk_pollserver.cpp +++ b/protocols/VKontakte/src/vk_pollserver.cpp @@ -24,7 +24,7 @@ void CVkProto::RetrievePollingInfo() return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.getLongPollServer.json", true, &CVkProto::OnReceivePollingInfo, AsyncHttpRequest::rpHigh)
<< INT_PARAM("use_ssl", 1)
- << INT_PARAM("lp_version", 2)
+ << INT_PARAM("lp_version", 3)
);
}
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index 2764e3c528..9d7080484b 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -212,7 +212,7 @@ static void InitSetting(wchar_t** ppPointer, char* pszSetting, wchar_t* pszDefau class COptMainDlg : public CDlgBase { - HTREEITEM hListHeading1, hListHeading2, hListHeading3, hListHeading4, hListHeading5, hListHeading6; + HTREEITEM hListHeading1, hListHeading2, hListHeading3, hListHeading4, hListHeading5, hListHeading6 = 0; CCtrlTreeView checkBoxes; @@ -327,7 +327,8 @@ class COptMainDlg : public CDlgBase CheckHeading(hListHeading3); CheckHeading(hListHeading4); CheckHeading(hListHeading5); - CheckHeading(hListHeading6); + if (PopupInstalled) + CheckHeading(hListHeading6); } public: @@ -347,15 +348,17 @@ public: hListHeading3 = InsertBranch(LPGEN("Default events to show in new chat rooms if the 'event filter' is enabled"), db_get_b(0, CHAT_MODULE, "Branch3Exp", 0) ? TRUE : FALSE); hListHeading4 = InsertBranch(LPGEN("Icons to display in the message log"), db_get_b(0, CHAT_MODULE, "Branch4Exp", 0) ? TRUE : FALSE); hListHeading5 = InsertBranch(LPGEN("Icons to display in the tray"), db_get_b(0, CHAT_MODULE, "Branch5Exp", 0) ? TRUE : FALSE); - if (PopupInstalled) - hListHeading6 = InsertBranch(LPGEN("Popups to display"), db_get_b(0, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); FillBranch(hListHeading1, branch1, _countof(branch1), 0); FillBranch(hListHeading2, branch2, _countof(branch2), 0); FillBranch(hListHeading3, branch3, _countof(branch3), 0x03E0); FillBranch(hListHeading4, branch4, _countof(branch4), 0x0000); FillBranch(hListHeading5, branch5, _countof(branch5), 0x1000); - FillBranch(hListHeading6, branch6, _countof(branch6), 0x0000); + + if (PopupInstalled) { + hListHeading6 = InsertBranch(LPGEN("Popups to display"), db_get_b(0, CHAT_MODULE, "Branch6Exp", 0) ? TRUE : FALSE); + FillBranch(hListHeading6, branch6, _countof(branch6), 0x0000); + } FixHeadings(); } diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index d1d63b4562..3413431016 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -548,19 +548,22 @@ void CSrmmWindow::ShowAvatar() SendMessage(m_hwnd, DM_AVATARSIZECHANGE, 0, 0);
}
-void CSrmmWindow::ShowTime()
+void CSrmmWindow::ShowTime(bool bForce)
{
- if (m_hTimeZone) {
- SYSTEMTIME st;
- GetSystemTime(&st);
- if (m_wMinute != st.wMinute) {
+ if (!m_hTimeZone)
+ return;
+
+ SYSTEMTIME st;
+ GetSystemTime(&st);
+ if (m_wMinute != st.wMinute || bForce) {
+ if (m_pOwner->m_tab.GetActivePage() == this) {
wchar_t buf[32];
unsigned i = g_dat.bShowReadChar ? 2 : 1;
TimeZone_PrintDateTime(m_hTimeZone, L"t", buf, _countof(buf), 0);
SendMessage(m_pOwner->m_hwndStatus, SB_SETTEXT, i, (LPARAM)buf);
- m_wMinute = st.wMinute;
}
+ m_wMinute = st.wMinute;
}
}
@@ -586,7 +589,7 @@ void CSrmmWindow::SetupStatusBar() SendMessage(m_pOwner->m_hwndStatus, SB_SETPARTS, i, (LPARAM)statwidths);
UpdateReadChars();
- ShowTime();
+ ShowTime(true);
SendMessage(m_hwnd, DM_STATUSICONCHANGE, 0, 0);
}
@@ -659,10 +662,12 @@ void CSrmmWindow::UpdateTitle() }
else mir_wstrncpy(newtitle, TranslateT("Message session"), _countof(newtitle));
- wchar_t oldtitle[256];
- GetWindowText(m_pOwner->GetHwnd(), oldtitle, _countof(oldtitle));
- if (mir_wstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed
- SetWindowText(m_pOwner->GetHwnd(), newtitle);
+ if (this == m_pOwner->CurrPage()) {
+ wchar_t oldtitle[256];
+ GetWindowText(m_pOwner->GetHwnd(), oldtitle, _countof(oldtitle));
+ if (mir_wstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed
+ SetWindowText(m_pOwner->GetHwnd(), newtitle);
+ }
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -1192,7 +1197,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) m_nFlash++;
}
else if (wParam == TIMERID_TYPE) {
- ShowTime();
+ ShowTime(false);
if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - m_nLastTyping > TIMEOUT_TYPEOFF)
NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
@@ -1386,6 +1391,12 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break;
case DM_UPDATETITLE:
+ if (lParam != 0) {
+ bool bIsMe = (lParam == m_hContact) || (m_bIsMeta && db_mc_getMeta(lParam) == m_hContact);
+ if (!bIsMe)
+ break;
+ }
+
UpdateIcon(wParam);
UpdateTitle();
break;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index a95501bf69..0901f60c96 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -225,14 +225,14 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
if (!strcmp(cws->szModule, "CList"))
- Srmm_Broadcast(DM_UPDATETITLE, (WPARAM)cws, 0);
+ Srmm_Broadcast(DM_UPDATETITLE, (WPARAM)cws, hContact);
else if (hContact) {
if (cws->szSetting && !strcmp(cws->szSetting, "Timezone"))
Srmm_Broadcast(DM_NEWTIMEZONE, (WPARAM)cws, 0);
else {
char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(cws->szModule, szProto))
- Srmm_Broadcast(DM_UPDATETITLE, (WPARAM)cws, 0);
+ Srmm_Broadcast(DM_UPDATETITLE, (WPARAM)cws, hContact);
}
}
return 0;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index a1853a08a2..07917e2736 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -81,7 +81,7 @@ class CSrmmWindow : public CMsgDialog void NotifyTyping(int mode);
void ProcessFileDrop(HDROP hDrop);
void ShowAvatar(void);
- void ShowTime(void);
+ void ShowTime(bool bForce);
void SetupStatusBar(void);
void StreamInEvents(MEVENT hDbEventFirst, int count, bool bAppend);
void UpdateIcon(WPARAM wParam);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 7d19e3b7a9..099a07c086 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -156,6 +156,8 @@ public: CTabbedWindow();
CTabbedWindow* AddPage(MCONTACT hContact, wchar_t *pwszText = nullptr, int iActivate = -1);
+ CMsgDialog* CurrPage() const;
+
void AddPage(SESSION_INFO*, int insertAt = -1);
void FixTabIcons(CMsgDialog*);
void SetMessageHighlight(CChatRoomDlg*);
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index f185a1de1f..8f4595fc1a 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -279,6 +279,11 @@ void CTabbedWindow::AddPage(SESSION_INFO *si, int insertAt) m_tab.ActivatePage(indexfound); } +CMsgDialog* CTabbedWindow::CurrPage() const +{ + return (m_pEmbed != nullptr) ? m_pEmbed : (CMsgDialog*)m_tab.GetActivePage(); +} + void CTabbedWindow::FixTabIcons(CMsgDialog *pDlg) { if (pDlg == nullptr) @@ -287,7 +292,7 @@ void CTabbedWindow::FixTabIcons(CMsgDialog *pDlg) int image = pDlg->GetImageId(); // if tabs are turned off, simply change the window's icon, otherwise set the tab's icon first - if (pDlg != m_pEmbed) { + if (m_pEmbed == nullptr) { int idx = m_tab.GetDlgIndex(pDlg); if (idx == -1) return; @@ -299,14 +304,13 @@ void CTabbedWindow::FixTabIcons(CMsgDialog *pDlg) tci.iImage = image; TabCtrl_SetItem(m_tab.GetHwnd(), idx, &tci); } - - // set the container's icon only if we're processing the current page - if (pDlg != m_tab.GetActivePage()) - return; } - Window_FreeIcon_IcoLib(m_hwnd); - Window_SetProtoIcon_IcoLib(m_hwnd, pDlg->GetProto(), pDlg->GetStatus()); + // set the container's icon only if we're processing the current page + if (pDlg == CurrPage()) { + Window_FreeIcon_IcoLib(m_hwnd); + Window_SetProtoIcon_IcoLib(m_hwnd, pDlg->GetProto(), pDlg->GetStatus()); + } } void CTabbedWindow::SaveWindowPosition(bool bUpdateSession) diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp index 04877338b6..0f2cfe9595 100644 --- a/src/mir_app/src/srmm_toolbar.cpp +++ b/src/mir_app/src/srmm_toolbar.cpp @@ -99,7 +99,7 @@ MIR_APP_DLL(HANDLE) Srmm_AddButton(const BBButton *bbdi, int _hLang) cbd->m_bDisabled = (bbdi->bbbFlags & BBBF_DISABLED) != 0; cbd->m_bPushButton = (bbdi->bbbFlags & BBBF_ISPUSHBUTTON) != 0; - cbd->m_hLangpack = _hLang; + cbd->m_iLangId = _hLang; cbd->m_dwOrigFlags.bit1 = cbd->m_bRSided = (bbdi->bbbFlags & BBBF_ISRSIDEBUTTON) != 0; cbd->m_dwOrigFlags.bit2 = cbd->m_bIMButton = (bbdi->bbbFlags & BBBF_ISIMBUTTON) != 0; @@ -786,7 +786,7 @@ void KillModuleToolbarIcons(int _hLang) { auto T = arButtonsList.rev_iter(); for (auto &cbd : T) - if (cbd->m_hLangpack == _hLang) { + if (cbd->m_iLangId == _hLang) { delete cbd; arButtonsList.remove(T.indexOf(&cbd)); } |