From c3939e170e6e7163f0e23234e42084ad19d0c315 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Wed, 25 Jun 2003 05:47:23 +0000
Subject: removed toolbarhandler

---
 src/Screen.cc | 62 ++++-------------------------------------------------------
 src/Screen.hh | 18 +++--------------
 2 files changed, 7 insertions(+), 73 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 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: Screen.cc,v 1.194 2003/06/24 16:30:13 fluxgen Exp $
+// $Id: Screen.cc,v 1.195 2003/06/25 05:47:23 fluxgen Exp $
 
 
 #include "Screen.hh"
@@ -30,8 +30,6 @@
 #include "I18n.hh"
 #include "fluxbox.hh"
 #include "ImageControl.hh"
-#include "Toolbar.hh"
-#include "ToolbarHandler.hh"
 #include "Window.hh"
 #include "Workspace.hh"
 #include "StringUtil.hh"
@@ -305,7 +303,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
     m_name(screenname),
     m_altname(altscreenname),
     m_resource_manager(rm),
-    m_toolbarhandler(0),
     m_available_workspace_area(new Strut(0, 0, 0, 0)),
     m_xinerama_headinfo(0) {
 
@@ -354,7 +351,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
 
     imageControl().setDither(*resource.image_dither);
 
-    // setup windowtheme, toolbartheme for antialias
+    // setup windowtheme for antialias
     // before we load the theme
 
     winFrameTheme().font().setAntialias(*resource.antialias);
@@ -418,11 +415,8 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
 
 #endif // SLIT
 
-    // create toolbarhandler for toolbar
-
-    m_toolbarhandler.reset(new ToolbarHandler(*this));
 
-    //!! TODO: we shouldn't do this more than once, but since slit/toolbar handles their
+    //!! TODO: we shouldn't do this more than once, but since slit handles their
     // own resources we must do this.
     fluxbox->load_rc(*this);
 
@@ -432,8 +426,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
 
     workspacemenu->setItemSelected(2, true);
 
-    // if toolbar needs initialisation, do it in ToolbarHandler instead
-    // so it will work when destroyed later etc
 
     initMenu(); // create and initiate rootmenu
 
@@ -446,9 +438,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
         FbTk::ThemeManager::instance().loadTheme(slit()->theme());
 #endif // SLIT
 
-    if (toolbar())
-        toolbar()->reconfigure();
-
     // start with workspace 0
     changeWorkspaceID(0);
     updateNetizenWorkspaceCount();
@@ -502,10 +491,6 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
         }
     }
 
-    if (! isSloppyFocus() && toolbar() != 0) {
-        XSetInputFocus(disp, toolbar()->window().window(),
-                       RevertToParent, CurrentTime);
-    }
 
     // set the toolbarhandler after the windows are setup, so it catches their state properly
 
@@ -552,22 +537,6 @@ BScreen::~BScreen() {
 #endif // XINERAMA
 }
 
-const FbTk::Menu &BScreen::toolbarModemenu() const {
-    return m_toolbarhandler->getModeMenu();
-}
-
-FbTk::Menu &BScreen::toolbarModemenu() {
-    return m_toolbarhandler->getModeMenu();
-}
-
-const Toolbar *BScreen::toolbar() const {
-    return m_toolbarhandler->toolbar();
-}
-
-Toolbar *BScreen::toolbar() {
-    return m_toolbarhandler->toolbar();
-}
-
 unsigned int BScreen::currentWorkspaceID() const { 
     return m_current_workspace->workspaceID(); 
 }
@@ -633,8 +602,6 @@ void BScreen::reconfigure() {
     winFrameTheme().font().setAntialias(*resource.antialias);
     m_menutheme->titleFont().setAntialias(*resource.antialias);
     m_menutheme->frameFont().setAntialias(*resource.antialias);
-    if (toolbar() && toolbar()->theme().font().isAntialias() != *resource.antialias)
-        toolbar()->theme().font().setAntialias(*resource.antialias);
 
     // load theme
     std::string theme_filename(Fluxbox::instance()->getStyleFilename());
@@ -705,8 +672,6 @@ void BScreen::reconfigure() {
         }
     }
 
-    if (toolbar())
-        toolbar()->reconfigure();
 
 #ifdef SLIT    
     if (slit())
@@ -828,8 +793,6 @@ int BScreen::addWorkspace() {
 		
     workspacemenu->update();
     saveWorkspaces(m_workspaces_list.size());
-    if (toolbar() != 0)
-        toolbar()->reconfigure();
     
     updateNetizenWorkspaceCount();	
 	
@@ -856,8 +819,6 @@ int BScreen::removeLastWorkspace() {
     m_workspaces_list.pop_back();		
     delete wkspc;
 
-    if (toolbar() != 0)
-        toolbar()->reconfigure();
 
     updateNetizenWorkspaceCount();
     saveWorkspaces(m_workspaces_list.size());
@@ -2031,8 +1992,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
         menu.insert("Slit", &slit()->menu());
     }
 #endif // SLIT
-    menu.insert(i18n->getMessage(ToolbarSet, ToolbarToolbarTitle,
-                                 "Toolbar"), &m_toolbarhandler->getToolbarMenu());
+
     menu.insert(new
                 BoolMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuImageDithering,
                                               "Image Dithering"),
@@ -2380,9 +2340,6 @@ void BScreen::updateSize() {
     // reset background
     m_root_theme->reconfigTheme();
 
-    if (toolbar())
-        toolbar()->reconfigure();
-
     if (slit())
         slit()->reconfigure();
 
@@ -2555,14 +2512,3 @@ void BScreen::setOnHead<Slit>(Slit &slit, int head) {
     slit.reconfigure();
 }
 
-template <>
-int BScreen::getOnHead<Toolbar>(Toolbar &tbar) {
-    return 0;
-    //    return tbar.getOnHead();
-}
-
-template <>
-void BScreen::setOnHead<Toolbar>(Toolbar &tbar, int head) {
-    //    saveToolbarOnHead(head);
-    tbar.reconfigure();
-}
diff --git a/src/Screen.hh b/src/Screen.hh
index 4ee147c..d4cdb3b 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -22,7 +22,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: Screen.hh,v 1.111 2003/06/24 16:29:54 fluxgen Exp $
+// $Id: Screen.hh,v 1.112 2003/06/25 05:46:21 fluxgen Exp $
 
 #ifndef	 SCREEN_HH
 #define	 SCREEN_HH
@@ -45,8 +45,6 @@
 #include <memory>
 
 class Netizen;
-class Toolbar;
-class ToolbarHandler;
 class FbWinFrameTheme;
 class RootTheme;
 class WinButtonTheme;
@@ -65,7 +63,7 @@ class FbWindow;
 
 /// Handles screen connection, screen clients and workspaces
 /**
- Create a toolbar and workspaces, handles switching between workspaces and windows
+ Create workspaces, handles switching between workspaces and windows
  */
 class BScreen : private FbTk::NotCopyable {
 public:
@@ -97,8 +95,6 @@ public:
     inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
     const FbTk::Menu * const getRootmenu() const { return m_rootmenu.get(); }
     FbTk::Menu * const getRootmenu() { return m_rootmenu.get(); }
-    const FbTk::Menu &toolbarModemenu() const;
-    FbTk::Menu &toolbarModemenu();
 	
     inline const std::string &getRootCommand() const { return *resource.rootcommand; }
     inline Fluxbox::FocusModel getFocusModel() const { return *resource.focus_model; }
@@ -106,12 +102,6 @@ public:
     inline Slit *slit() { return m_slit.get(); }
     inline const Slit *slit() const { return m_slit.get(); }
 
-    const Toolbar *toolbar() const;
-    Toolbar *toolbar();
-
-    inline const ToolbarHandler &toolbarHandler() const { return *m_toolbarhandler; }
-    inline ToolbarHandler &toolbarHandler() { return *m_toolbarhandler; }
-
     inline Workspace *getWorkspace(unsigned int w) { return ( w < m_workspaces_list.size() ? m_workspaces_list[w] : 0); }
     inline Workspace *currentWorkspace() { return m_current_workspace; }
 
@@ -266,7 +256,7 @@ public:
     FluxboxWindow* useAutoGroupWindow();
 
     /// updates root window size and resizes/reconfigures screen clients 
-    /// that depends on screen size (toolbar, slit)
+    /// that depends on screen size (slit)
     /// (and maximized windows?)
     void updateSize();
 
@@ -427,8 +417,6 @@ private:
     const std::string m_name, m_altname;
     FbTk::ResourceManager &m_resource_manager;
 
-    std::auto_ptr<ToolbarHandler> m_toolbarhandler;
-
     bool m_xinerama_avail;
     int m_xinerama_num_heads;
 
-- 
cgit v0.11.2