From 935616cab63bae8a380bcc03510c1f9263640778 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 8 Sep 2003 16:37:27 +0000 Subject: iconlist signal to notify when iconlist changed --- src/Screen.cc | 7 ++++++- src/Screen.hh | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 14c0f06..5ce8c73 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.230 2003/08/30 01:02:38 fluxgen Exp $ +// $Id: Screen.cc,v 1.231 2003/09/08 16:37:27 fluxgen Exp $ #include "Screen.hh" @@ -265,6 +265,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, const string &screenname, const string &altscreenname, int scrn, int num_layers) : m_clientlist_sig(*this), // client signal + m_iconlist_sig(*this), // icon list signal m_workspacecount_sig(*this), // workspace count signal m_workspacenames_sig(*this), // workspace names signal m_currentworkspace_sig(*this), // current workspace signal @@ -685,6 +686,8 @@ void BScreen::addIcon(FluxboxWindow *w) { m_icon_list.push_back(w); updateIconMenu(); + + m_iconlist_sig.notify(); } @@ -699,6 +702,8 @@ void BScreen::removeIcon(FluxboxWindow *w) { m_icon_list.erase(erase_it); updateIconMenu(); + + m_iconlist_sig.notify(); } diff --git a/src/Screen.hh b/src/Screen.hh index f19c7b4..de25c7d 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.123 2003/08/25 13:15:53 rathnor Exp $ +// $Id: Screen.hh,v 1.124 2003/09/08 16:37:27 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH @@ -145,6 +145,8 @@ public: //@{ /// client list signal FbTk::Subject &clientListSig() { return m_clientlist_sig; } + /// icon list sig + FbTk::Subject &iconListSig() { return m_iconlist_sig; } /// workspace count signal FbTk::Subject &workspaceCountSig() { return m_workspacecount_sig; } /// workspace names signal @@ -324,6 +326,8 @@ public: void removeConfigMenu(FbTk::Menu &menu); bool isShuttingdown() const { return m_shutdown; } + + enum { ROWSMARTPLACEMENT = 1, COLSMARTPLACEMENT, CASCADEPLACEMENT, UNDERMOUSEPLACEMENT, LEFTRIGHT, RIGHTLEFT, TOPBOTTOM, BOTTOMTOP }; @@ -339,7 +343,7 @@ public: private: BScreen &m_scr; }; - + private: void setupConfigmenu(FbTk::Menu &menu); void createStyleMenu(FbTk::Menu &menu, const char *label, const char *directory); @@ -355,6 +359,7 @@ private: ScreenSubject m_clientlist_sig, ///< client signal + m_iconlist_sig, ///< notify if a window gets iconified/deiconified m_workspacecount_sig, ///< workspace count signal m_workspacenames_sig, ///< workspace names signal m_currentworkspace_sig, ///< current workspace signal -- cgit v0.11.2