diff options
author | George Hazan <george.hazan@gmail.com> | 2024-02-04 12:23:12 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-02-04 12:23:12 +0300 |
commit | 10a37aafd5b317f73cdaae36a1a00f5b4858a662 (patch) | |
tree | 5e7d4a3621270e5e4febb01c262bdc0c63c91b96 /protocols/IRCG | |
parent | b31af4096a56ad4ada750d2df519023a8cbc6538 (diff) |
fixes #4168 (IRC: list of channels displays topics in Channel column)
Diffstat (limited to 'protocols/IRCG')
-rw-r--r-- | protocols/IRCG/src/channelList.cpp | 70 |
1 files changed, 38 insertions, 32 deletions
diff --git a/protocols/IRCG/src/channelList.cpp b/protocols/IRCG/src/channelList.cpp index efd7c380d2..c2de0eaa10 100644 --- a/protocols/IRCG/src/channelList.cpp +++ b/protocols/IRCG/src/channelList.cpp @@ -177,41 +177,47 @@ public: t = wcsstr(lvm.pszText, strFilterText); } - if (t) { - ++itemCount; - - // Column 0 - LVITEM lvItem; - lvItem.iItem = m_list2.GetItemCount(); - lvItem.mask = LVIF_TEXT | LVIF_PARAM; - - lvItem.iSubItem = 0; - lvItem.pszText = lvm.pszText; - lvItem.lParam = lvItem.iItem; - lvItem.iItem = m_list2.InsertItem(&lvItem); - - // Column 2 - lvm.mask = LVIF_TEXT; - lvm.iSubItem = 1; - lvm.iItem = i; - m_list.GetItem(&lvm); + if (!t) + continue; - lvItem.mask = LVIF_TEXT; - lvItem.iSubItem = 1; - lvItem.pszText = lvm.pszText; - m_list2.SetItem(&lvItem); + ++itemCount; - // Column 4 - lvm.mask = LVIF_TEXT; - lvm.iSubItem = 3; - lvm.iItem = i; - m_list.GetItem(&lvm); + // Column 0 + LVITEM lvItem; + lvItem.iItem = m_list2.GetItemCount(); + lvItem.mask = LVIF_TEXT | LVIF_PARAM; - lvItem.mask = LVIF_TEXT; - lvItem.pszText = lvm.pszText; - lvItem.iSubItem = 3; - m_list2.SetItem(&lvItem); - } + lvm.mask = LVIF_TEXT; + lvm.iSubItem = 0; + lvm.iItem = i; + m_list.GetItem(&lvm); + + lvItem.iSubItem = 0; + lvItem.pszText = lvm.pszText; + lvItem.lParam = lvItem.iItem; + lvItem.iItem = m_list2.InsertItem(&lvItem); + + // Column 2 + lvm.mask = LVIF_TEXT; + lvm.iSubItem = 1; + lvm.iItem = i; + m_list.GetItem(&lvm); + + lvItem.mask = LVIF_TEXT; + lvItem.iSubItem = 1; + lvItem.pszText = lvm.pszText; + m_list2.SetItem(&lvItem); + + // Column 4 + lvm.mask = LVIF_TEXT; + lvm.iSubItem = 3; + lvm.iItem = i; + m_list.GetItem(&lvm); + + lvItem.mask = LVIF_TEXT; + lvItem.pszText = lvm.pszText; + lvItem.iSubItem = 3; + m_list2.SetItem(&lvItem); } // Show the list |