removed toolbarhandler
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ resource(rm, screenname, altscreenname),
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 @@ FbTk::Menu::setAlpha(*resource.menu_alpha);
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 @@ Fluxbox::instance()->getSlitlistFilename().c_str()));
#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 @@ m_configmenu->setInternalMenu();
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@@ -445,9 +437,6 @@ #ifdef SLIT
if (slit()) // this will load theme and reconfigure slit FbTk::ThemeManager::instance().loadTheme(slit()->theme()); #endif // SLIT - - if (toolbar()) - toolbar()->reconfigure(); // start with workspace 0 changeWorkspaceID(0);@@ -502,10 +491,6 @@ }
} } - 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 @@ }
#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 @@ // setup windowtheme, toolbartheme for antialias
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 @@
} } - if (toolbar()) - toolbar()->reconfigure(); #ifdef SLIT if (slit())@@ -828,8 +793,6 @@ wkspc->workspaceID() + 2); //+2 so we add it after "remove last" item
workspacemenu->update(); saveWorkspaces(m_workspaces_list.size()); - if (toolbar() != 0) - toolbar()->reconfigure(); updateNetizenWorkspaceCount();@@ -856,8 +819,6 @@ //remove last workspace
m_workspaces_list.pop_back(); delete wkspc; - if (toolbar() != 0) - toolbar()->reconfigure(); updateNetizenWorkspaceCount(); saveWorkspaces(m_workspaces_list.size());@@ -2031,8 +1992,7 @@ slit()->menu().setInternalMenu();
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 @@
// reset background m_root_theme->reconfigTheme(); - if (toolbar()) - toolbar()->reconfigure(); - if (slit()) slit()->reconfigure();@@ -2555,14 +2512,3 @@ // slit.saveOnHead(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(); -}
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 <fstream>
#include <memory> class Netizen; -class Toolbar; -class ToolbarHandler; class FbWinFrameTheme; class RootTheme; class WinButtonTheme;@@ -65,7 +63,7 @@ };
/// 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 @@
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 @@
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 @@
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();@@ -426,8 +416,6 @@ Groupables m_expecting_groups;
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;