aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-25 05:47:23 (GMT)
committerfluxgen <fluxgen>2003-06-25 05:47:23 (GMT)
commitc3939e170e6e7163f0e23234e42084ad19d0c315 (patch)
treed09c13f7d179dea3d6509a1f0312beaed357fb3a /src/Screen.cc
parente2548fe7ae1390216df9c9e16f1f0ca782d72676 (diff)
downloadfluxbox-c3939e170e6e7163f0e23234e42084ad19d0c315.zip
fluxbox-c3939e170e6e7163f0e23234e42084ad19d0c315.tar.bz2
removed toolbarhandler
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc62
1 files changed, 4 insertions, 58 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index d4e7d3c..b2d0190 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.194 2003/06/24 16:30:13 fluxgen Exp $ 25// $Id: Screen.cc,v 1.195 2003/06/25 05:47:23 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -30,8 +30,6 @@
30#include "I18n.hh" 30#include "I18n.hh"
31#include "fluxbox.hh" 31#include "fluxbox.hh"
32#include "ImageControl.hh" 32#include "ImageControl.hh"
33#include "Toolbar.hh"
34#include "ToolbarHandler.hh"
35#include "Window.hh" 33#include "Window.hh"
36#include "Workspace.hh" 34#include "Workspace.hh"
37#include "StringUtil.hh" 35#include "StringUtil.hh"
@@ -305,7 +303,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
305 m_name(screenname), 303 m_name(screenname),
306 m_altname(altscreenname), 304 m_altname(altscreenname),
307 m_resource_manager(rm), 305 m_resource_manager(rm),
308 m_toolbarhandler(0),
309 m_available_workspace_area(new Strut(0, 0, 0, 0)), 306 m_available_workspace_area(new Strut(0, 0, 0, 0)),
310 m_xinerama_headinfo(0) { 307 m_xinerama_headinfo(0) {
311 308
@@ -354,7 +351,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
354 351
355 imageControl().setDither(*resource.image_dither); 352 imageControl().setDither(*resource.image_dither);
356 353
357 // setup windowtheme, toolbartheme for antialias 354 // setup windowtheme for antialias
358 // before we load the theme 355 // before we load the theme
359 356
360 winFrameTheme().font().setAntialias(*resource.antialias); 357 winFrameTheme().font().setAntialias(*resource.antialias);
@@ -418,11 +415,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
418 415
419#endif // SLIT 416#endif // SLIT
420 417
421 // create toolbarhandler for toolbar
422
423 m_toolbarhandler.reset(new ToolbarHandler(*this));
424 418
425 //!! TODO: we shouldn't do this more than once, but since slit/toolbar handles their 419 //!! TODO: we shouldn't do this more than once, but since slit handles their
426 // own resources we must do this. 420 // own resources we must do this.
427 fluxbox->load_rc(*this); 421 fluxbox->load_rc(*this);
428 422
@@ -432,8 +426,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
432 426
433 workspacemenu->setItemSelected(2, true); 427 workspacemenu->setItemSelected(2, true);
434 428
435 // if toolbar needs initialisation, do it in ToolbarHandler instead
436 // so it will work when destroyed later etc
437 429
438 initMenu(); // create and initiate rootmenu 430 initMenu(); // create and initiate rootmenu
439 431
@@ -446,9 +438,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
446 FbTk::ThemeManager::instance().loadTheme(slit()->theme()); 438 FbTk::ThemeManager::instance().loadTheme(slit()->theme());
447#endif // SLIT 439#endif // SLIT
448 440
449 if (toolbar())
450 toolbar()->reconfigure();
451
452 // start with workspace 0 441 // start with workspace 0
453 changeWorkspaceID(0); 442 changeWorkspaceID(0);
454 updateNetizenWorkspaceCount(); 443 updateNetizenWorkspaceCount();
@@ -502,10 +491,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
502 } 491 }
503 } 492 }
504 493
505 if (! isSloppyFocus() && toolbar() != 0) {
506 XSetInputFocus(disp, toolbar()->window().window(),
507 RevertToParent, CurrentTime);
508 }
509 494
510 // set the toolbarhandler after the windows are setup, so it catches their state properly 495 // set the toolbarhandler after the windows are setup, so it catches their state properly
511 496
@@ -552,22 +537,6 @@ BScreen::~BScreen() {
552#endif // XINERAMA 537#endif // XINERAMA
553} 538}
554 539
555const FbTk::Menu &BScreen::toolbarModemenu() const {
556 return m_toolbarhandler->getModeMenu();
557}
558
559FbTk::Menu &BScreen::toolbarModemenu() {
560 return m_toolbarhandler->getModeMenu();
561}
562
563const Toolbar *BScreen::toolbar() const {
564 return m_toolbarhandler->toolbar();
565}
566
567Toolbar *BScreen::toolbar() {
568 return m_toolbarhandler->toolbar();
569}
570
571unsigned int BScreen::currentWorkspaceID() const { 540unsigned int BScreen::currentWorkspaceID() const {
572 return m_current_workspace->workspaceID(); 541 return m_current_workspace->workspaceID();
573} 542}
@@ -633,8 +602,6 @@ void BScreen::reconfigure() {
633 winFrameTheme().font().setAntialias(*resource.antialias); 602 winFrameTheme().font().setAntialias(*resource.antialias);
634 m_menutheme->titleFont().setAntialias(*resource.antialias); 603 m_menutheme->titleFont().setAntialias(*resource.antialias);
635 m_menutheme->frameFont().setAntialias(*resource.antialias); 604 m_menutheme->frameFont().setAntialias(*resource.antialias);
636 if (toolbar() && toolbar()->theme().font().isAntialias() != *resource.antialias)
637 toolbar()->theme().font().setAntialias(*resource.antialias);
638 605
639 // load theme 606 // load theme
640 std::string theme_filename(Fluxbox::instance()->getStyleFilename()); 607 std::string theme_filename(Fluxbox::instance()->getStyleFilename());
@@ -705,8 +672,6 @@ void BScreen::reconfigure() {
705 } 672 }
706 } 673 }
707 674
708 if (toolbar())
709 toolbar()->reconfigure();
710 675
711#ifdef SLIT 676#ifdef SLIT
712 if (slit()) 677 if (slit())
@@ -828,8 +793,6 @@ int BScreen::addWorkspace() {
828 793
829 workspacemenu->update(); 794 workspacemenu->update();
830 saveWorkspaces(m_workspaces_list.size()); 795 saveWorkspaces(m_workspaces_list.size());
831 if (toolbar() != 0)
832 toolbar()->reconfigure();
833 796
834 updateNetizenWorkspaceCount(); 797 updateNetizenWorkspaceCount();
835 798
@@ -856,8 +819,6 @@ int BScreen::removeLastWorkspace() {
856 m_workspaces_list.pop_back(); 819 m_workspaces_list.pop_back();
857 delete wkspc; 820 delete wkspc;
858 821
859 if (toolbar() != 0)
860 toolbar()->reconfigure();
861 822
862 updateNetizenWorkspaceCount(); 823 updateNetizenWorkspaceCount();
863 saveWorkspaces(m_workspaces_list.size()); 824 saveWorkspaces(m_workspaces_list.size());
@@ -2031,8 +1992,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
2031 menu.insert("Slit", &slit()->menu()); 1992 menu.insert("Slit", &slit()->menu());
2032 } 1993 }
2033#endif // SLIT 1994#endif // SLIT
2034 menu.insert(i18n->getMessage(ToolbarSet, ToolbarToolbarTitle, 1995
2035 "Toolbar"), &m_toolbarhandler->getToolbarMenu());
2036 menu.insert(new 1996 menu.insert(new
2037 BoolMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuImageDithering, 1997 BoolMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuImageDithering,
2038 "Image Dithering"), 1998 "Image Dithering"),
@@ -2380,9 +2340,6 @@ void BScreen::updateSize() {
2380 // reset background 2340 // reset background
2381 m_root_theme->reconfigTheme(); 2341 m_root_theme->reconfigTheme();
2382 2342
2383 if (toolbar())
2384 toolbar()->reconfigure();
2385
2386 if (slit()) 2343 if (slit())
2387 slit()->reconfigure(); 2344 slit()->reconfigure();
2388 2345
@@ -2555,14 +2512,3 @@ void BScreen::setOnHead<Slit>(Slit &slit, int head) {
2555 slit.reconfigure(); 2512 slit.reconfigure();
2556} 2513}
2557 2514
2558template <>
2559int BScreen::getOnHead<Toolbar>(Toolbar &tbar) {
2560 return 0;
2561 // return tbar.getOnHead();
2562}
2563
2564template <>
2565void BScreen::setOnHead<Toolbar>(Toolbar &tbar, int head) {
2566 // saveToolbarOnHead(head);
2567 tbar.reconfigure();
2568}