diff options
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 55 |
1 files changed, 9 insertions, 46 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index ab1b707..5a62820 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.198 2003/06/30 18:04:48 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.199 2003/07/01 12:39:09 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -227,34 +227,6 @@ void setupWorkspacemenu(BScreen &scr, FbTk::Menu &menu) { | |||
227 | }; | 227 | }; |
228 | 228 | ||
229 | 229 | ||
230 | template <> | ||
231 | void FbTk::ThemeItem<std::string>::load() { } | ||
232 | |||
233 | template <> | ||
234 | void FbTk::ThemeItem<std::string>::setDefaultValue() { | ||
235 | *(*this) = ""; | ||
236 | } | ||
237 | |||
238 | template <> | ||
239 | void FbTk::ThemeItem<std::string>::setFromString(const char *str) { | ||
240 | *(*this) = (str ? str : ""); | ||
241 | } | ||
242 | |||
243 | template <> | ||
244 | void FbTk::ThemeItem<int>::load() { } | ||
245 | |||
246 | template <> | ||
247 | void FbTk::ThemeItem<int>::setDefaultValue() { | ||
248 | *(*this) = 0; | ||
249 | } | ||
250 | |||
251 | template <> | ||
252 | void FbTk::ThemeItem<int>::setFromString(const char *str) { | ||
253 | if (str == 0) | ||
254 | return; | ||
255 | sscanf(str, "%d", &m_value); | ||
256 | } | ||
257 | |||
258 | BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, | 230 | BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, |
259 | const std::string &scrname, | 231 | const std::string &scrname, |
260 | const std::string &altscrname): | 232 | const std::string &altscrname): |
@@ -287,6 +259,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
287 | m_workspacecount_sig(*this), // workspace count signal | 259 | m_workspacecount_sig(*this), // workspace count signal |
288 | m_workspacenames_sig(*this), // workspace names signal | 260 | m_workspacenames_sig(*this), // workspace names signal |
289 | m_currentworkspace_sig(*this), // current workspace signal | 261 | m_currentworkspace_sig(*this), // current workspace signal |
262 | m_reconfigure_sig(*this), // reconfigure signal | ||
290 | m_layermanager(num_layers), | 263 | m_layermanager(num_layers), |
291 | cycling_focus(false), | 264 | cycling_focus(false), |
292 | cycling_last(0), | 265 | cycling_last(0), |
@@ -386,7 +359,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
386 | 359 | ||
387 | renderGeomWindow(); | 360 | renderGeomWindow(); |
388 | 361 | ||
389 | |||
390 | // setup workspaces and workspace menu | 362 | // setup workspaces and workspace menu |
391 | 363 | ||
392 | workspacemenu.reset(createMenuFromScreen(*this)); | 364 | workspacemenu.reset(createMenuFromScreen(*this)); |
@@ -426,12 +398,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
426 | m_configmenu->setInternalMenu(); | 398 | m_configmenu->setInternalMenu(); |
427 | 399 | ||
428 | workspacemenu->setItemSelected(2, true); | 400 | workspacemenu->setItemSelected(2, true); |
429 | 401 | // create and initiate rootmenu | |
430 | 402 | rereadMenu(); | |
431 | initMenu(); // create and initiate rootmenu | 403 | |
432 | |||
433 | //update menus | ||
434 | m_rootmenu->update(); | ||
435 | m_configmenu->update(); | 404 | m_configmenu->update(); |
436 | 405 | ||
437 | #ifdef SLIT | 406 | #ifdef SLIT |
@@ -663,8 +632,7 @@ void BScreen::reconfigure() { | |||
663 | } | 632 | } |
664 | } | 633 | } |
665 | 634 | ||
666 | initMenu(); | 635 | rereadMenu(); |
667 | m_rootmenu->reconfigure(); | ||
668 | 636 | ||
669 | if (restore_menus) { | 637 | if (restore_menus) { |
670 | // restore submenus, no timestamp changed | 638 | // restore submenus, no timestamp changed |
@@ -700,13 +668,13 @@ void BScreen::reconfigure() { | |||
700 | mem_fun(&FluxboxWindow::reconfigure)); | 668 | mem_fun(&FluxboxWindow::reconfigure)); |
701 | 669 | ||
702 | imageControl().timeout(); | 670 | imageControl().timeout(); |
703 | 671 | // notify objects that the screen is reconfigured | |
672 | m_reconfigure_sig.notify(); | ||
704 | } | 673 | } |
705 | 674 | ||
706 | 675 | ||
707 | void BScreen::rereadMenu() { | 676 | void BScreen::rereadMenu() { |
708 | initMenu(); | 677 | initMenu(); |
709 | |||
710 | m_rootmenu->reconfigure(); | 678 | m_rootmenu->reconfigure(); |
711 | } | 679 | } |
712 | 680 | ||
@@ -717,7 +685,6 @@ void BScreen::removeWorkspaceNames() { | |||
717 | 685 | ||
718 | void BScreen::updateWorkspaceNamesAtom() { | 686 | void BScreen::updateWorkspaceNamesAtom() { |
719 | m_workspacenames_sig.notify(); | 687 | m_workspacenames_sig.notify(); |
720 | |||
721 | } | 688 | } |
722 | 689 | ||
723 | void BScreen::addIcon(FluxboxWindow *w) { | 690 | void BScreen::addIcon(FluxboxWindow *w) { |
@@ -731,7 +698,6 @@ void BScreen::removeIcon(FluxboxWindow *w) { | |||
731 | if (! w) | 698 | if (! w) |
732 | return; | 699 | return; |
733 | 700 | ||
734 | |||
735 | Icons::iterator erase_it = remove_if(m_icon_list.begin(), | 701 | Icons::iterator erase_it = remove_if(m_icon_list.begin(), |
736 | m_icon_list.end(), | 702 | m_icon_list.end(), |
737 | bind2nd(equal_to<FluxboxWindow *>(), w)); | 703 | bind2nd(equal_to<FluxboxWindow *>(), w)); |
@@ -915,10 +881,6 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS | |||
915 | changeWorkspaceID(id); | 881 | changeWorkspaceID(id); |
916 | win->setInputFocus(); | 882 | win->setInputFocus(); |
917 | } | 883 | } |
918 | #ifdef DEBUG | ||
919 | cerr<<__FILE__<<": Sending to id = "<<id<<endl; | ||
920 | cerr<<__FILE__<<": win->workspaceId="<<win->workspaceNumber()<<endl; | ||
921 | #endif //DEBUG | ||
922 | 884 | ||
923 | } | 885 | } |
924 | 886 | ||
@@ -990,6 +952,7 @@ void BScreen::updateNetizenWindowFocus() { | |||
990 | for (; it != it_end; ++it) { | 952 | for (; it != it_end; ++it) { |
991 | (*it)->sendWindowFocus(f); | 953 | (*it)->sendWindowFocus(f); |
992 | } | 954 | } |
955 | |||
993 | } | 956 | } |
994 | 957 | ||
995 | 958 | ||