From a8b0b3632b4ed6e6fb5f8aa26a6c0ef151a30144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 3 Aug 2016 21:46:52 +0200 Subject: signal title changes so that interested parties (the iconbar ;-) can use/forward them --- src/IconButton.cc | 1 + src/IconButton.hh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/IconButton.cc b/src/IconButton.cc index d1f1451..d2bf4d3 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -238,6 +238,7 @@ void IconButton::refreshEverything(bool setup) { void IconButton::clientTitleChanged() { refreshEverything(true); + m_title_changed.emit(); if (m_has_tooltip) showTooltip(); diff --git a/src/IconButton.hh b/src/IconButton.hh index 36781d1..957374e 100644 --- a/src/IconButton.hh +++ b/src/IconButton.hh @@ -64,6 +64,8 @@ public: bool setOrientation(FbTk::Orientation orient); + const FbTk::Signal<> &titleChanged() { return m_title_changed; } + protected: void drawText(int x, int y, FbTk::FbDrawable *drawable_override); private: @@ -89,6 +91,7 @@ private: // cached pixmaps FbTk::CachedPixmap m_pm; FbTk::SignalTracker m_signals; + FbTk::Signal<> m_title_changed; }; #endif // ICONBUTTON_HH -- cgit v0.11.2