diff options
author | fluxgen <fluxgen> | 2003-12-17 00:45:30 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-17 00:45:30 (GMT) |
commit | c54ab3189df0ab991c2da63ee37337d0b2ab2053 (patch) | |
tree | 62796c9a750c34cbc12d9194d92ea6381342ed9d /src | |
parent | db7ae6eb5a879717593d1190dd0435ae2c32a475 (diff) | |
download | fluxbox_paul-c54ab3189df0ab991c2da63ee37337d0b2ab2053.zip fluxbox_paul-c54ab3189df0ab991c2da63ee37337d0b2ab2053.tar.bz2 |
using menu update
Diffstat (limited to 'src')
-rw-r--r-- | src/SendToMenu.cc | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/SendToMenu.cc b/src/SendToMenu.cc index b1d0e75..2ab2144 100644 --- a/src/SendToMenu.cc +++ b/src/SendToMenu.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: SendToMenu.cc,v 1.5 2003/12/10 23:08:03 fluxgen Exp $ | 23 | // $Id: SendToMenu.cc,v 1.6 2003/12/17 00:45:30 fluxgen Exp $ |
24 | 24 | ||
25 | #include "SendToMenu.hh" | 25 | #include "SendToMenu.hh" |
26 | 26 | ||
@@ -65,20 +65,26 @@ SendToMenu::SendToMenu(FluxboxWindow &win): | |||
65 | } | 65 | } |
66 | 66 | ||
67 | void SendToMenu::update(FbTk::Subject *subj) { | 67 | void SendToMenu::update(FbTk::Subject *subj) { |
68 | // if workspace changed we enable all workspaces except the current one | 68 | if (subj != 0) { |
69 | if (subj != 0 && (subj == &(m_win.screen().currentWorkspaceSig()) || | 69 | // if workspace changed we enable all workspaces except the current one |
70 | subj == &(m_win.workspaceSig()))) { | 70 | if (subj == &(m_win.screen().currentWorkspaceSig()) || |
71 | // enabled all workspaces | 71 | subj == &(m_win.workspaceSig())) { |
72 | const BScreen::Workspaces &wlist = m_win.screen().getWorkspacesList(); | 72 | // enabled all workspaces |
73 | for (size_t i = 0; i < wlist.size(); ++i) | 73 | const BScreen::Workspaces &wlist = m_win.screen().getWorkspacesList(); |
74 | setItemEnabled(i, true); | 74 | for (size_t i = 0; i < wlist.size(); ++i) |
75 | // disable send to on the workspace which the window exist | 75 | setItemEnabled(i, true); |
76 | setItemEnabled(m_win.workspaceNumber(), false); | 76 | // disable send to on the workspace which the window exist |
77 | FbMenu::update(); | 77 | setItemEnabled(m_win.workspaceNumber(), false); |
78 | // we're done | 78 | FbMenu::update(); |
79 | return; | 79 | // we're done |
80 | return; | ||
81 | } else if (subj == &(theme().reconfigSig())) { | ||
82 | // we got reconfig Theme signal, let base menu handle it | ||
83 | FbTk::Menu::update(subj); | ||
84 | return; | ||
85 | } | ||
86 | |||
80 | } | 87 | } |
81 | |||
82 | // rebuild menu | 88 | // rebuild menu |
83 | 89 | ||
84 | removeAll(); | 90 | removeAll(); |