diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-02 13:22:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-02 13:22:29 +0300 |
commit | e6715bd0de37c9fa94dffccebe08a35bda3aaacc (patch) | |
tree | 27c48dd7124516f0feddeeed087f74aad54f8ef4 /protocols/JabberG/src/jabber_bookmarks.cpp | |
parent | 9a2a681890306f05bc443d71f6e70725b099a7cc (diff) |
code cleaning
Diffstat (limited to 'protocols/JabberG/src/jabber_bookmarks.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_bookmarks.cpp | 8 |
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();
}
|