summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-07-05 17:09:19 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-07-05 17:09:19 -0400
commit3565ec885ef631fbfe86c5b2da287ecce0ddf23b (patch)
tree870fcd3b65bb9583fe62cafd45c48c630689ec82 /components
parentab2c7bed88a0a6519e17d4515e7402b9e5f9dd55 (diff)
downloadabaddon-portaudio-3565ec885ef631fbfe86c5b2da287ecce0ddf23b.tar.gz
abaddon-portaudio-3565ec885ef631fbfe86c5b2da287ecce0ddf23b.zip
try to fix some weird behavior
Diffstat (limited to 'components')
-rw-r--r--components/channels.cpp10
-rw-r--r--components/channels.hpp1
2 files changed, 9 insertions, 2 deletions
diff --git a/components/channels.cpp b/components/channels.cpp
index 361b668..bde5639 100644
--- a/components/channels.cpp
+++ b/components/channels.cpp
@@ -24,8 +24,9 @@ ChannelList::ChannelList()
m_signal_action_channel_item_select.emit(static_cast<Snowflake>(row[m_columns.m_id]));
}
};
- m_view.signal_row_activated().connect(cb);
- m_view.signal_row_expanded().connect(sigc::mem_fun(*this, &ChannelList::OnRowExpanded));
+ m_view.signal_row_activated().connect(cb, false);
+ m_view.signal_row_collapsed().connect(sigc::mem_fun(*this, &ChannelList::OnRowCollapsed), false);
+ m_view.signal_row_expanded().connect(sigc::mem_fun(*this, &ChannelList::OnRowExpanded), false);
m_view.set_activate_on_single_click(true);
m_view.set_hexpand(true);
@@ -301,6 +302,11 @@ bool ChannelList::IsTextChannel(ChannelType type) {
return type == ChannelType::GUILD_TEXT || type == ChannelType::GUILD_NEWS;
}
+// this should be unncessary but something is behaving strange so its just in case
+void ChannelList::OnRowCollapsed(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &path) {
+ (*iter)[m_columns.m_expanded] = false;
+}
+
void ChannelList::OnRowExpanded(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &path) {
// restore previous expansion
for (auto it = iter->children().begin(); it != iter->children().end(); it++) {
diff --git a/components/channels.hpp b/components/channels.hpp
index f98cafb..4854c98 100644
--- a/components/channels.hpp
+++ b/components/channels.hpp
@@ -131,6 +131,7 @@ protected:
bool IsTextChannel(ChannelType type);
+ void OnRowCollapsed(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &path);
void OnRowExpanded(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &path);
public: