summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_bookmarks.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-02 13:22:29 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-02 13:22:29 +0300
commite6715bd0de37c9fa94dffccebe08a35bda3aaacc (patch)
tree27c48dd7124516f0feddeeed087f74aad54f8ef4 /protocols/JabberG/src/jabber_bookmarks.cpp
parent9a2a681890306f05bc443d71f6e70725b099a7cc (diff)
code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_bookmarks.cpp')
-rw-r--r--protocols/JabberG/src/jabber_bookmarks.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp
index 48cc195e17..396861f691 100644
--- a/protocols/JabberG/src/jabber_bookmarks.cpp
+++ b/protocols/JabberG/src/jabber_bookmarks.cpp
@@ -324,10 +324,10 @@ public:
{
m_lvBookmarks.DeleteAllItems();
- JABBER_LIST_ITEM *item = nullptr;
+ bool bEnable = false;
LISTFOREACH(i, m_proto, LIST_BOOKMARK)
{
- if (item = m_proto->ListGetItemPtrFromIndex(i)) {
+ if (auto *item = m_proto->ListGetItemPtrFromIndex(i)) {
int itemType = mir_strcmpi(item->type, "conference") ? 1 : 0;
m_proto->debugLogA("BOOKMARK #%d: %d %s", i, itemType, item->jid);
@@ -335,10 +335,12 @@ public:
m_lvBookmarks.SetItem(iItem, 1, Utf2T(item->jid));
if (itemType == 0)
m_lvBookmarks.SetItem(iItem, 2, Utf2T(item->nick));
+
+ bEnable = true;
}
}
- if (item) {
+ if (bEnable) {
m_btnEdit.Enable();
m_btnRemove.Enable();
}