summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-02-19 19:53:38 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-02-19 19:53:48 +0300
commit13e33b96dab976290ab3438a57f23babf04b3e38 (patch)
treeccaf52cc78df7c28953db05cfcb705171f9fb831 /protocols/JabberG/src
parentc26a815104626be419eeb35669a1824b371839da (diff)
removed WM_JABBER_REFRESH handler restored
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_bookmarks.cpp26
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();