diff options
author | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-09-18 20:27:16 (GMT) |
---|---|---|
committer | Henrik Kinnunen <fluxgen@fluxbox.org> | 2008-09-18 20:27:16 (GMT) |
commit | 2f4db57898920a3f17eaaa2586a39dad76d5c7e8 (patch) | |
tree | d107bebec3ddb8800970dfbc482c493d5e0187ab /src/SendToMenu.hh | |
parent | e4d4717703b365bc14f189bf36b3edb1e4430b90 (diff) | |
download | fluxbox_pavel-2f4db57898920a3f17eaaa2586a39dad76d5c7e8.zip fluxbox_pavel-2f4db57898920a3f17eaaa2586a39dad76d5c7e8.tar.bz2 |
Changed workspace count signal in BScreen to use the new signal system.
Diffstat (limited to 'src/SendToMenu.hh')
-rw-r--r-- | src/SendToMenu.hh | 9 |
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 | |||
28 | namespace FbTk { | 30 | namespace FbTk { |
29 | class Observer; | 31 | class 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 | */ |
38 | class SendToMenu:public FbMenu { | 40 | class SendToMenu:public FbMenu, private FbTk::SignalTracker { |
39 | public: | 41 | public: |
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(); |
45 | private: | 47 | private: |
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 |