summaryrefslogtreecommitdiff
path: root/src/components/channeltabswitcherhandy.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2022-04-09 02:45:09 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2022-04-09 02:45:09 -0400
commit44317e2d349acb859821691801692c87433c1b83 (patch)
treeb991824e8e7353cbb5f9f7f0122f634a8171d995 /src/components/channeltabswitcherhandy.hpp
parent5b806a25894bf183515c64ac8099911da8f4a0c7 (diff)
downloadabaddon-portaudio-44317e2d349acb859821691801692c87433c1b83.tar.gz
abaddon-portaudio-44317e2d349acb859821691801692c87433c1b83.zip
more tab work
- only one tab for any channel can be open - rudimentary unread indicators - add some css
Diffstat (limited to 'src/components/channeltabswitcherhandy.hpp')
-rw-r--r--src/components/channeltabswitcherhandy.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/channeltabswitcherhandy.hpp b/src/components/channeltabswitcherhandy.hpp
index 53e1624..bc38091 100644
--- a/src/components/channeltabswitcherhandy.hpp
+++ b/src/components/channeltabswitcherhandy.hpp
@@ -12,10 +12,15 @@ class ChannelTabSwitcherHandy : public Gtk::Box {
public:
ChannelTabSwitcherHandy();
+ // no-op if already added
void AddChannelTab(Snowflake id);
+ // switches to existing tab if it exists
void ReplaceActiveTab(Snowflake id);
private:
+ void CheckUnread(Snowflake id);
+ void ClearPage(HdyTabPage *page);
+
HdyTabBar *m_tab_bar;
Gtk::Widget *m_tab_bar_wrapped;
HdyTabView *m_tab_view;
@@ -25,6 +30,7 @@ private:
std::unordered_map<HdyTabPage *, Snowflake> m_pages_rev;
friend void selected_page_notify_cb(HdyTabView *, GParamSpec *, ChannelTabSwitcherHandy *);
+ friend gboolean close_page_cb(HdyTabView *, HdyTabPage *, ChannelTabSwitcherHandy *);
public:
using type_signal_channel_switched_to = sigc::signal<void, Snowflake>;