diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-04-09 02:45:09 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-04-09 02:45:09 -0400 |
commit | 44317e2d349acb859821691801692c87433c1b83 (patch) | |
tree | b991824e8e7353cbb5f9f7f0122f634a8171d995 /src/components/channeltabswitcherhandy.hpp | |
parent | 5b806a25894bf183515c64ac8099911da8f4a0c7 (diff) | |
download | abaddon-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.hpp | 6 |
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>; |