summaryrefslogtreecommitdiff
path: root/src/SendToMenu.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/SendToMenu.hh')
-rw-r--r--src/SendToMenu.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/SendToMenu.hh b/src/SendToMenu.hh
index 0f668a9..1582dd5 100644
--- a/src/SendToMenu.hh
+++ b/src/SendToMenu.hh
@@ -25,6 +25,8 @@
25 25
26#include "FbMenu.hh" 26#include "FbMenu.hh"
27 27
28#include "FbTk/Signal.hh"
29
28namespace FbTk { 30namespace FbTk {
29class Observer; 31class Observer;
30} 32}
@@ -35,7 +37,7 @@ class BScreen;
35 * Creates the "send to menu". 37 * Creates the "send to menu".
36 * Displays all the workspaces for which the current window can be sent to. 38 * Displays all the workspaces for which the current window can be sent to.
37 */ 39 */
38class SendToMenu:public FbMenu { 40class SendToMenu:public FbMenu, private FbTk::SignalTracker {
39public: 41public:
40 /// @param screen the screen on which this menu should be created on. 42 /// @param screen the screen on which this menu should be created on.
41 explicit SendToMenu(BScreen &screen); 43 explicit SendToMenu(BScreen &screen);
@@ -43,6 +45,11 @@ public:
43 /// @see FbTk::Menu 45 /// @see FbTk::Menu
44 void show(); 46 void show();
45private: 47private:
48 /// workspace count changed on screen
49 void workspaceCountChange( BScreen& screen ) {
50 rebuildMenu();
51 }
52
46 /// Rebuild the menu from scratch. 53 /// Rebuild the menu from scratch.
47 void rebuildMenu(); 54 void rebuildMenu();
48 /// listens to signals that makes this instance need to rebuild menu 55 /// listens to signals that makes this instance need to rebuild menu