remove lock from RootTheme and redundant loadTheme from fluxbox

This commit is contained in:
markt 2006-07-13 06:45:29 +00:00
parent e44da5f926
commit d32a7af7e6
5 changed files with 2 additions and 11 deletions

View file

@ -1,6 +1,8 @@
(Format: Year/Month/Day)
Changes for 1.0rc3:
*06/07/13:
* Remove some redundant code for loading styles (Mark)
fluxbox.cc Screen.cc RootTheme.cc/hh
* Fix background: random (Mark)
RootTheme.cc
*06/07/10:

View file

@ -109,7 +109,6 @@ RootTheme::RootTheme(const std::string &root_command,
m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())),
m_root_command(root_command),
m_image_ctrl(image_control),
m_lock(false),
m_background_loaded(true) {
Display *disp = FbTk::App::instance()->display();
@ -138,9 +137,6 @@ bool RootTheme::fallback(FbTk::ThemeItem_base &item) {
void RootTheme::reconfigTheme() {
_FB_USES_NLS;
if (m_lock)
return;
// if user specified background in the config then use it
// instead of style background
if (!m_root_command.empty()) {

View file

@ -61,14 +61,11 @@ public:
m_opgc.setLineAttributes(width, line_style, cap_style, join_style);
}
//!! TODO we should need this later
void lock(bool value) { m_lock = value; }
private:
BackgroundItem *m_background;///< background image/texture
FbTk::GContext m_opgc;
const std::string &m_root_command;
FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture
bool m_lock; ///< reconfigure lock
bool m_background_loaded; ///< whether or not the background is present in the style file
};

View file

@ -442,11 +442,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
// else the focus label doesn't get updated
// So we lock root theme temporary so it doesn't uses RootTheme::reconfigTheme
// This must be fixed in the future.
m_root_theme->lock(true);
FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename(),
fluxbox->getStyleOverlayFilename(),
m_root_theme->screenNum());
m_root_theme->lock(false);
m_root_theme->setLineAttributes(*resource.gc_line_width,
*resource.gc_line_style,
*resource.gc_cap_style,

View file

@ -291,8 +291,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
#endif // HAVE_RANDR
load_rc();
// setup theme manager to have our style file ready to be scanned
FbTk::ThemeManager::instance().load(getStyleFilename(), getStyleOverlayFilename());
// setup atom handlers before we create any windows
#ifdef REMEMBER