minor cleaning

This commit is contained in:
fluxgen 2003-05-15 23:30:07 +00:00
parent 988392b1eb
commit 5bbc766232
10 changed files with 153 additions and 218 deletions

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: IconBar.cc,v 1.35 2003/05/15 12:00:43 fluxgen Exp $
// $Id: IconBar.cc,v 1.36 2003/05/15 23:30:06 fluxgen Exp $
#include "IconBar.hh"
@ -162,7 +162,7 @@ IconBar::WindowList *IconBar::delAllIcons() {
void IconBar::loadTheme(unsigned int width, unsigned int height) {
//!! TODO: iconbar style theme
FbTk::ImageControl *image_ctrl = screen().getImageControl();
FbTk::ImageControl &image_ctrl = screen().imageControl();
Pixmap tmp = m_focus_pm;
const FbTk::Texture *texture = &(screen().winFrameTheme().labelFocusTexture());
@ -176,11 +176,11 @@ void IconBar::loadTheme(unsigned int width, unsigned int height) {
m_focus_pixel = texture->color().pixel();
} else {
m_focus_pm =
image_ctrl->renderImage(width, height, *texture);
image_ctrl.renderImage(width, height, *texture);
}
if (tmp)
image_ctrl->removeImage(tmp);
image_ctrl.removeImage(tmp);
}
/**

View file

@ -21,7 +21,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Remember.cc,v 1.15 2003/05/15 12:00:43 fluxgen Exp $
// $Id: Remember.cc,v 1.16 2003/05/15 23:30:06 fluxgen Exp $
#include "Remember.hh"
#include "StringUtil.hh"
@ -100,7 +100,7 @@ FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win) {
BScreen &screen = win.screen();
FbTk::Menu *menu = new FbMenu(*screen.menuTheme(),
screen.screenNumber(),
*screen.getImageControl(),
screen.imageControl(),
*screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()));
menu->disableTitle();
// TODO: nls

View file

@ -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.167 2003/05/15 12:00:44 fluxgen Exp $
// $Id: Screen.cc,v 1.168 2003/05/15 23:26:38 fluxgen Exp $
#include "Screen.hh"
@ -53,6 +53,7 @@
#include "WinClient.hh"
#include "Subject.hh"
#include "FbWinFrame.hh"
#include "SlitResource.hh"
//use GNU extensions
#ifndef _GNU_SOURCE
@ -141,7 +142,7 @@ int anotherWMRunning(Display *display, XErrorEvent *) {
FbTk::Menu *createMenuFromScreen(BScreen &screen) {
FbTk::Menu *menu = new FbMenu(*screen.menuTheme(),
screen.screenNumber(),
*screen.getImageControl(),
screen.imageControl(),
*screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()));
return menu;
}
@ -197,28 +198,6 @@ setFromString(const char *strval) {
setDefaultValue();
}
template<>
void Resource<Slit::Placement>::
setFromString(const char *strval) {
if (strcasecmp(strval, "TopLeft")==0)
m_value = Slit::TOPLEFT;
else if (strcasecmp(strval, "CenterLeft")==0)
m_value = Slit::CENTERLEFT;
else if (strcasecmp(strval, "BottomLeft")==0)
m_value = Slit::BOTTOMLEFT;
else if (strcasecmp(strval, "TopCenter")==0)
m_value = Slit::TOPCENTER;
else if (strcasecmp(strval, "BottomCenter")==0)
m_value = Slit::BOTTOMCENTER;
else if (strcasecmp(strval, "TopRight")==0)
m_value = Slit::TOPRIGHT;
else if (strcasecmp(strval, "CenterRight")==0)
m_value = Slit::CENTERRIGHT;
else if (strcasecmp(strval, "BottomRight")==0)
m_value = Slit::BOTTOMRIGHT;
else
setDefaultValue();
}
template<>
void Resource<ToolbarHandler::ToolbarMode>::
@ -239,16 +218,6 @@ setFromString(const char *strval) {
setDefaultValue();
}
template<>
void Resource<Slit::Direction>::
setFromString(const char *strval) {
if (strcasecmp(strval, "Vertical") == 0)
m_value = Slit::VERTICAL;
else if (strcasecmp(strval, "Horizontal") == 0)
m_value = Slit::HORIZONTAL;
else
setDefaultValue();
}
string Resource<Toolbar::Placement>::
getString() {
@ -295,37 +264,6 @@ getString() {
}
string Resource<Slit::Placement>::
getString() {
switch (m_value) {
case Slit::TOPLEFT:
return string("TopLeft");
break;
case Slit::CENTERLEFT:
return string("CenterLeft");
break;
case Slit::BOTTOMLEFT:
return string("BottomLeft");
break;
case Slit::TOPCENTER:
return string("TopCenter");
break;
case Slit::BOTTOMCENTER:
return string("BottomCenter");
break;
case Slit::TOPRIGHT:
return string("TopRight");
break;
case Slit::CENTERRIGHT:
return string("CenterRight");
break;
case Slit::BOTTOMRIGHT:
return string("BottomRight");
break;
}
//default string
return string("BottomRight");
}
template<>
string Resource<ToolbarHandler::ToolbarMode>::
@ -355,22 +293,6 @@ getString() {
return string("Icons");
}
template<>
string Resource<Slit::Direction>::
getString() {
switch (m_value) {
case Slit::VERTICAL:
return string("Vertical");
break;
case Slit::HORIZONTAL:
return string("Horizontal");
break;
}
// default string
return string("Vertical");
}
namespace {
class AddWorkspaceCmd:public FbTk::Command {
@ -422,6 +344,84 @@ void setupWorkspacemenu(BScreen &scr, FbTk::Menu &menu) {
};
template<>
void Resource<Slit::Placement>::setFromString(const char *strval) {
if (strcasecmp(strval, "TopLeft")==0)
m_value = Slit::TOPLEFT;
else if (strcasecmp(strval, "CenterLeft")==0)
m_value = Slit::CENTERLEFT;
else if (strcasecmp(strval, "BottomLeft")==0)
m_value = Slit::BOTTOMLEFT;
else if (strcasecmp(strval, "TopCenter")==0)
m_value = Slit::TOPCENTER;
else if (strcasecmp(strval, "BottomCenter")==0)
m_value = Slit::BOTTOMCENTER;
else if (strcasecmp(strval, "TopRight")==0)
m_value = Slit::TOPRIGHT;
else if (strcasecmp(strval, "CenterRight")==0)
m_value = Slit::CENTERRIGHT;
else if (strcasecmp(strval, "BottomRight")==0)
m_value = Slit::BOTTOMRIGHT;
else
setDefaultValue();
}
template<>
void Resource<Slit::Direction>::setFromString(const char *strval) {
if (strcasecmp(strval, "Vertical") == 0)
m_value = Slit::VERTICAL;
else if (strcasecmp(strval, "Horizontal") == 0)
m_value = Slit::HORIZONTAL;
else
setDefaultValue();
}
string Resource<Slit::Placement>::getString() {
switch (m_value) {
case Slit::TOPLEFT:
return string("TopLeft");
break;
case Slit::CENTERLEFT:
return string("CenterLeft");
break;
case Slit::BOTTOMLEFT:
return string("BottomLeft");
break;
case Slit::TOPCENTER:
return string("TopCenter");
break;
case Slit::BOTTOMCENTER:
return string("BottomCenter");
break;
case Slit::TOPRIGHT:
return string("TopRight");
break;
case Slit::CENTERRIGHT:
return string("CenterRight");
break;
case Slit::BOTTOMRIGHT:
return string("BottomRight");
break;
}
//default string
return string("BottomRight");
}
template<>
string Resource<Slit::Direction>::getString() {
switch (m_value) {
case Slit::VERTICAL:
return string("Vertical");
break;
case Slit::HORIZONTAL:
return string("Horizontal");
break;
}
// default string
return string("Vertical");
}
template <>
void FbTk::ThemeItem<std::string>::load() { }
@ -483,13 +483,13 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm,
toolbar_on_head(rm, 0, scrname+".toolbar.onhead", altscrname+".Toolbar.onHead"),
toolbar_placement(rm, Toolbar::BOTTOMCENTER,
scrname+".toolbar.placement", altscrname+".Toolbar.Placement"),
slit_auto_hide(rm, false, scrname+".slit.autoHide", altscrname+".Slit.AutoHide"),
slit_placement(rm, Slit::BOTTOMRIGHT,
scrname+".slit.placement", altscrname+".Slit.Placement"),
slit_direction(rm, Slit::VERTICAL, scrname+".slit.direction", altscrname+".Slit.Direction"),
slit_alpha(rm, 255, scrname+".slit.alpha", altscrname+".Slit.Alpha")
{
slit_auto_hide(rm, false,
scrname+".slit.autoHide", altscrname+".Slit.AutoHide"),
slit_placement(rm, Slit::BOTTOMRIGHT,
scrname+".slit.placement", altscrname+".Slit.Placement"),
slit_direction(rm, Slit::VERTICAL,
scrname+".slit.direction", altscrname+".Slit.Direction"),
slit_alpha(rm, 255, scrname+".slit.alpha", altscrname+".Slit.Alpha") {
};
@ -559,16 +559,15 @@ BScreen::BScreen(ResourceManager &rm,
XDefineCursor(disp, rootWindow().window(), fluxbox->getSessionCursor());
image_control =
new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(),
fluxbox->getCacheLife(), fluxbox->getCacheMax());
image_control->installRootColormap();
m_image_control.reset(new FbTk::ImageControl(scrn, true, fluxbox->colorsPerChannel(),
fluxbox->getCacheLife(), fluxbox->getCacheMax()));
imageControl().installRootColormap();
root_colormap_installed = true;
fluxbox->load_rc(*this);
FbTk::Menu::setAlpha(*resource.menu_alpha);
image_control->setDither(*resource.image_dither);
imageControl().setDither(*resource.image_dither);
// setup windowtheme, toolbartheme for antialias
// before we load the theme
@ -608,7 +607,7 @@ BScreen::BScreen(ResourceManager &rm,
geom_pixmap = None;
geom_window.setBackgroundColor(winFrameTheme().titleFocusTexture().color());
} else {
geom_pixmap = image_control->renderImage(geom_w, geom_h,
geom_pixmap = imageControl().renderImage(geom_w, geom_h,
winFrameTheme().titleFocusTexture());
geom_window.setBackgroundPixmap(geom_pixmap);
}
@ -618,7 +617,7 @@ BScreen::BScreen(ResourceManager &rm,
geom_pixmap = None;
geom_window.setBackgroundColor(winFrameTheme().labelFocusTexture().color());
} else {
geom_pixmap = image_control->renderImage(geom_w, geom_h,
geom_pixmap = imageControl().renderImage(geom_w, geom_h,
winFrameTheme().labelFocusTexture());
geom_window.setBackgroundPixmap(geom_pixmap);
}
@ -643,7 +642,7 @@ BScreen::BScreen(ResourceManager &rm,
Fluxbox::instance()->getSlitlistFilename().c_str()));
#endif // SLIT
m_toolbarhandler = new ToolbarHandler(*this, getToolbarMode());
m_toolbarhandler.reset(new ToolbarHandler(*this, toolbarMode()));
setupWorkspacemenu(*this, *workspacemenu);
@ -739,7 +738,7 @@ BScreen::~BScreen() {
return;
if (geom_pixmap != None)
image_control->removeImage(geom_pixmap);
imageControl().removeImage(geom_pixmap);
removeWorkspaceNames();
@ -763,17 +762,15 @@ BScreen::~BScreen() {
for(; n_it != n_it_end; ++n_it) {
delete (*n_it);
}
netizenList.clear();
delete image_control;
}
const FbTk::Menu &BScreen::getToolbarModemenu() const {
const FbTk::Menu &BScreen::toolbarModemenu() const {
return m_toolbarhandler->getModeMenu();
}
FbTk::Menu &BScreen::getToolbarModemenu() {
FbTk::Menu &BScreen::toolbarModemenu() {
return m_toolbarhandler->getModeMenu();
}
@ -861,7 +858,7 @@ void BScreen::reconfigure() {
geom_pixmap = None;
geom_window.setBackgroundColor(winFrameTheme().titleFocusTexture().color());
} else {
geom_pixmap = image_control->renderImage(geom_w, geom_h,
geom_pixmap = imageControl().renderImage(geom_w, geom_h,
winFrameTheme().titleFocusTexture());
geom_window.setBackgroundPixmap(geom_pixmap);
}
@ -871,13 +868,13 @@ void BScreen::reconfigure() {
geom_pixmap = None;
geom_window.setBackgroundColor(winFrameTheme().labelFocusTexture().color());
} else {
geom_pixmap = image_control->renderImage(geom_w, geom_h,
geom_pixmap = imageControl().renderImage(geom_w, geom_h,
winFrameTheme().labelFocusTexture());
geom_window.setBackgroundPixmap(geom_pixmap);
}
}
if (tmp)
image_control->removeImage(tmp);
imageControl().removeImage(tmp);
geom_window.setBorderWidth(m_root_theme->borderWidth());
geom_window.setBorderColor(m_root_theme->borderColor());
@ -936,10 +933,10 @@ void BScreen::reconfigure() {
}
#ifdef SLIT
if (m_slit.get()) {
m_slit->setPlacement(static_cast<Slit::Placement>(getSlitPlacement()));
m_slit->setDirection(static_cast<Slit::Direction>(getSlitDirection()));
m_slit->reconfigure();
if (slit()) {
slit()->setPlacement(static_cast<Slit::Placement>(getSlitPlacement()));
slit()->setDirection(static_cast<Slit::Direction>(getSlitDirection()));
slit()->reconfigure();
}
#endif // SLIT
@ -953,7 +950,7 @@ void BScreen::reconfigure() {
iconList.end(),
mem_fun(&FluxboxWindow::reconfigure));
image_control->timeout();
imageControl().timeout();
}

View file

@ -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.97 2003/05/15 12:00:44 fluxgen Exp $
// $Id: Screen.hh,v 1.98 2003/05/15 23:25:36 fluxgen Exp $
#ifndef SCREEN_HH
#define SCREEN_HH
@ -94,11 +94,11 @@ public:
inline bool doShowWindowPos() const { return *resource.show_window_pos; }
bool antialias() const { return *resource.antialias; }
inline FbTk::ImageControl *getImageControl() { return image_control; }
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 &getToolbarModemenu() const ;
FbTk::Menu &getToolbarModemenu() ;
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; }
@ -180,7 +180,7 @@ public:
inline int getToolbarWidthPercent() const { return *resource.toolbar_width_percent; }
inline Resource<int> &getToolbarWidthPercentResource() { return resource.toolbar_width_percent; }
inline const Resource<int> &getToolbarWidthPercentResource() const { return resource.toolbar_width_percent; }
inline ToolbarHandler::ToolbarMode getToolbarMode() const { return *resource.toolbar_mode; }
inline ToolbarHandler::ToolbarMode toolbarMode() const { return *resource.toolbar_mode; }
inline int getPlacementPolicy() const { return resource.placement_policy; }
inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; }
inline int getRowPlacementDirection() const { return resource.row_direction; }
@ -349,7 +349,7 @@ private:
Pixmap geom_pixmap;
FbTk::FbWindow geom_window;
FbTk::ImageControl *image_control;
std::auto_ptr<FbTk::ImageControl> m_image_control;
std::auto_ptr<FbTk::Menu> m_configmenu;
std::auto_ptr<FbTk::Menu> m_rootmenu;
@ -424,7 +424,7 @@ private:
} resource;
ToolbarHandler *m_toolbarhandler;
std::auto_ptr<ToolbarHandler> m_toolbarhandler;
};

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Slit.cc,v 1.53 2003/05/15 12:00:45 fluxgen Exp $
// $Id: Slit.cc,v 1.54 2003/05/15 23:30:06 fluxgen Exp $
#include "Slit.hh"
@ -264,22 +264,22 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
: m_screen(scr), m_timer(this),
m_slitmenu(*scr.menuTheme(),
scr.screenNumber(),
*scr.getImageControl(),
scr.imageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())),
m_placement_menu(*scr.menuTheme(),
scr.screenNumber(),
*scr.getImageControl(),
scr.imageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())),
m_clientlist_menu(*scr.menuTheme(),
scr.screenNumber(),
*scr.getImageControl(),
scr.imageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())),
m_layermenu(new LayerMenu<Slit>(*scr.menuTheme(),
scr.screenNumber(),
*scr.getImageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
this,
true)),
scr.screenNumber(),
scr.imageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
this,
true)),
//For KDE dock applets
m_kwm1_dockwindow(XInternAtom(FbTk::App::instance()->display(),
"KWM_DOCKWINDOW", False)), //KDE v1.x
@ -337,7 +337,7 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
Slit::~Slit() {
if (frame.pixmap != 0)
screen().getImageControl()->removeImage(frame.pixmap);
screen().imageControl().removeImage(frame.pixmap);
}
@ -643,14 +643,14 @@ void Slit::reconfigure() {
frame.window.show();
Pixmap tmp = frame.pixmap;
FbTk::ImageControl *image_ctrl = screen().getImageControl();
FbTk::ImageControl &image_ctrl = screen().imageControl();
const FbTk::Texture &texture = m_slit_theme->texture();
if (texture.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID) &&
texture.pixmap().drawable() == 0) {
frame.pixmap = None;
frame.window.setBackgroundColor(texture.color());
} else {
frame.pixmap = image_ctrl->renderImage(frame.width, frame.height,
frame.pixmap = image_ctrl.renderImage(frame.width, frame.height,
texture);
if (frame.pixmap == 0)
frame.window.setBackgroundColor(texture.color());
@ -659,7 +659,7 @@ void Slit::reconfigure() {
}
if (tmp)
image_ctrl->removeImage(tmp);
image_ctrl.removeImage(tmp);
clearWindow();
int x, y;

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.cc,v 1.82 2003/05/15 12:00:45 fluxgen Exp $
// $Id: Toolbar.cc,v 1.83 2003/05/15 23:30:03 fluxgen Exp $
#include "Toolbar.hh"
@ -256,10 +256,10 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
m_hide_timer(&hide_handler),
m_toolbarmenu(menu),
m_placementmenu(*scrn.menuTheme(),
scrn.screenNumber(), *scrn.getImageControl()),
scrn.screenNumber(), scrn.imageControl()),
m_layermenu(*scrn.menuTheme(),
scrn.screenNumber(),
*scrn.getImageControl(),
scrn.imageControl(),
*scrn.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
this,
true),
@ -325,7 +325,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi
Toolbar::~Toolbar() {
FbTk::ImageControl &image_ctrl = *screen().getImageControl();
FbTk::ImageControl &image_ctrl = screen().imageControl();
if (frame.base) image_ctrl.removeImage(frame.base);
if (frame.label) image_ctrl.removeImage(frame.label);
if (frame.wlabel) image_ctrl.removeImage(frame.wlabel);
@ -568,7 +568,7 @@ void Toolbar::reconfigure() {
frame.clock.moveResize(next_x + text_x, next_y + text_y,
clock_w, clock_h);
FbTk::ImageControl &image_ctrl = *screen().getImageControl();
FbTk::ImageControl &image_ctrl = screen().imageControl();
Pixmap tmp = frame.base;
const FbTk::Texture *texture = &(m_theme.toolbar());

View file

@ -20,7 +20,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: ToolbarHandler.cc,v 1.12 2003/05/15 12:00:45 fluxgen Exp $
// $Id: ToolbarHandler.cc,v 1.13 2003/05/15 23:30:05 fluxgen Exp $
/**
* The ToolbarHandler class acts as a rough interface to the toolbar.
@ -91,9 +91,9 @@ void setupModeMenu(FbTk::Menu &menu, ToolbarHandler &handler) {
ToolbarHandler::ToolbarHandler(BScreen &screen, ToolbarMode mode)
: m_screen(screen), m_mode(mode), m_toolbar(0), m_current_workspace(0),
m_modemenu(*screen.menuTheme(),
screen.screenNumber(), *screen.getImageControl()),
screen.screenNumber(), screen.imageControl()),
m_toolbarmenu(*screen.menuTheme(),
screen.screenNumber(), *screen.getImageControl())
screen.screenNumber(), screen.imageControl())
{
m_modemenu.setInternalMenu();
setupModeMenu(m_modemenu, *this);

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Window.cc,v 1.177 2003/05/15 12:00:46 fluxgen Exp $
// $Id: Window.cc,v 1.178 2003/05/15 23:30:07 fluxgen Exp $
#include "Window.hh"
@ -236,16 +236,16 @@ FluxboxWindow::FluxboxWindow(WinClient &client, BScreen &scr, FbWinFrameTheme &t
m_screen(scr),
m_timer(this),
display(0),
m_windowmenu(menutheme, scr.screenNumber(), *scr.getImageControl()),
m_windowmenu(menutheme, scr.screenNumber(), scr.imageControl()),
m_layermenu(new LayerMenu<FluxboxWindow>(menutheme,
scr.screenNumber(),
*scr.getImageControl(),
scr.imageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
this,
false)),
m_old_decoration(DECOR_NORMAL),
m_client(&client),
m_frame(new FbWinFrame(tm, *scr.getImageControl(), scr.screenNumber(), 0, 0, 100, 100)),
m_frame(new FbWinFrame(tm, scr.imageControl(), scr.screenNumber(), 0, 0, 100, 100)),
m_layeritem(m_frame->window(), layer),
m_layernum(layer.getLayerNum()),
m_parent(scr.rootWindow()) {
@ -269,16 +269,16 @@ FluxboxWindow::FluxboxWindow(Window w, BScreen &scr, FbWinFrameTheme &tm,
m_screen(scr),
m_timer(this),
display(0),
m_windowmenu(menutheme, scr.screenNumber(), *scr.getImageControl()),
m_windowmenu(menutheme, scr.screenNumber(), scr.imageControl()),
m_layermenu(new LayerMenu<FluxboxWindow>(menutheme,
scr.screenNumber(),
*scr.getImageControl(),
scr.imageControl(),
*scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()),
this,
false)),
m_old_decoration(DECOR_NORMAL),
m_client(new WinClient(w, *this)),
m_frame(new FbWinFrame(tm, *scr.getImageControl(), scr.screenNumber(), 0, 0, 100, 100)),
m_frame(new FbWinFrame(tm, scr.imageControl(), scr.screenNumber(), 0, 0, 100, 100)),
m_layeritem(m_frame->window(), layer),
m_layernum(layer.getLayerNum()),
m_parent(scr.rootWindow()) {

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Workspace.cc,v 1.65 2003/05/15 12:00:46 fluxgen Exp $
// $Id: Workspace.cc,v 1.66 2003/05/15 23:30:07 fluxgen Exp $
#include "Workspace.hh"
@ -115,7 +115,7 @@ Workspace::GroupList Workspace::m_groups;
Workspace::Workspace(BScreen &scrn, FbTk::MultLayers &layermanager, unsigned int i):
m_screen(scrn),
m_lastfocus(0),
m_clientmenu(*scrn.menuTheme(), scrn.screenNumber(), *scrn.getImageControl()),
m_clientmenu(*scrn.menuTheme(), scrn.screenNumber(), scrn.imageControl()),
m_layermanager(layermanager),
m_name(""),
m_id(i),

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: fluxbox.cc,v 1.149 2003/05/15 12:00:46 fluxgen Exp $
// $Id: fluxbox.cc,v 1.150 2003/05/15 23:30:03 fluxgen Exp $
#include "fluxbox.hh"
@ -838,7 +838,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
if ((e->xcrossing.window == e->xcrossing.root) &&
(screen = searchScreen(e->xcrossing.window))) {
screen->getImageControl()->installRootColormap();
screen->imageControl().installRootColormap();
}
@ -902,7 +902,7 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
if (be.button == 1) {
if (! screen->isRootColormapInstalled())
screen->getImageControl()->installRootColormap();
screen->imageControl().installRootColormap();
if (screen->getWorkspacemenu()->isVisible())
screen->getWorkspacemenu()->hide();
@ -2070,68 +2070,6 @@ void Fluxbox::load_rc(BScreen &screen) {
} else
screen.savePlacementPolicy(BScreen::ROWSMARTPLACEMENT);
#ifdef SLIT
sprintf(name_lookup, "session.screen%d.slit.placement", screen_number);
sprintf(class_lookup, "Session.Screen%d.Slit.Placement", screen_number);
if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
&value)) {
if (! strncasecmp(value.addr, "TopLeft", value.size))
screen.saveSlitPlacement(Slit::TOPLEFT);
else if (! strncasecmp(value.addr, "CenterLeft", value.size))
screen.saveSlitPlacement(Slit::CENTERLEFT);
else if (! strncasecmp(value.addr, "BottomLeft", value.size))
screen.saveSlitPlacement(Slit::BOTTOMLEFT);
else if (! strncasecmp(value.addr, "TopCenter", value.size))
screen.saveSlitPlacement(Slit::TOPCENTER);
else if (! strncasecmp(value.addr, "BottomCenter", value.size))
screen.saveSlitPlacement(Slit::BOTTOMCENTER);
else if (! strncasecmp(value.addr, "TopRight", value.size))
screen.saveSlitPlacement(Slit::TOPRIGHT);
else if (! strncasecmp(value.addr, "BottomRight", value.size))
screen.saveSlitPlacement(Slit::BOTTOMRIGHT);
else
screen.saveSlitPlacement(Slit::CENTERRIGHT);
} else
screen.saveSlitPlacement(Slit::CENTERRIGHT);
sprintf(name_lookup, "session.screen%d.slit.direction", screen_number);
sprintf(class_lookup, "Session.Screen%d.Slit.Direction", screen_number);
if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
&value)) {
if (! strncasecmp(value.addr, "Horizontal", value.size))
screen.saveSlitDirection(Slit::HORIZONTAL);
else
screen.saveSlitDirection(Slit::VERTICAL);
} else
screen.saveSlitDirection(Slit::VERTICAL);
sprintf(name_lookup, "session.screen%d.slit.autoHide", screen_number);
sprintf(class_lookup, "Session.Screen%d.Slit.AutoHide", screen_number);
if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
&value)) {
if (! strncasecmp(value.addr, "True", value.size))
screen.saveSlitAutoHide(true);
else
screen.saveSlitAutoHide(false);
} else
screen.saveSlitAutoHide(false);
/*
#ifdef XINERAMA
int tmp_head;
sprintf(name_lookup, "session.screen%d.slit.onHead", screen_number);
sprintf(class_lookup, "Session.Screen%d.Slit.OnHead", screen_number);
if (XrmGetResource(*database, name_lookup, class_lookup, &value_type,
&value)) {
if (sscanf(value.addr, "%d", &tmp_head) != 1)
tmp_head = 0;
} else
tmp_head = 0;
screen->saveSlitOnHead(tmp_head);
#endif // XINERAMA
*/
#endif // SLIT
#ifdef HAVE_STRFTIME
sprintf(name_lookup, "session.screen%d.strftimeFormat", screen_number);
sprintf(class_lookup, "Session.Screen%d.StrftimeFormat", screen_number);