diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-19 19:53:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-19 19:53:48 +0300 |
commit | 13e33b96dab976290ab3438a57f23babf04b3e38 (patch) | |
tree | ccaf52cc78df7c28953db05cfcb705171f9fb831 /protocols/JabberG/src | |
parent | c26a815104626be419eeb35669a1824b371839da (diff) |
removed WM_JABBER_REFRESH handler restored
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_bookmarks.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index 550378b8f7..236419b292 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -342,7 +342,31 @@ public: m_proto->m_ThreadInfo->send(iq);
}
- void OnProtoCheckOnline(WPARAM, LPARAM)
+ void OnProtoRefresh(WPARAM, LPARAM) override
+ {
+ m_lvBookmarks.DeleteAllItems();
+
+ JABBER_LIST_ITEM *item = nullptr;
+ LISTFOREACH(i, m_proto, LIST_BOOKMARK)
+ {
+ if (item = m_proto->ListGetItemPtrFromIndex(i)) {
+ int itemType = mir_strcmpi(item->type, "conference") ? 1 : 0;
+ int iItem = m_lvBookmarks.AddItem(item->name, itemType, (LPARAM)item->jid, itemType);
+ m_lvBookmarks.SetItem(iItem, 1, Utf2T(item->jid));
+ if (itemType == 0)
+ m_lvBookmarks.SetItem(iItem, 2, Utf2T(item->nick));
+ }
+ }
+
+ if (item) {
+ m_btnEdit.Enable();
+ m_btnRemove.Enable();
+ }
+
+ m_btnAdd.Enable();
+ }
+
+ void OnProtoCheckOnline(WPARAM, LPARAM) override
{
if (!m_proto->m_bJabberOnline) {
m_btnAdd.Disable();
|