remove lock from RootTheme and redundant loadTheme from fluxbox
This commit is contained in:
parent
e44da5f926
commit
d32a7af7e6
5 changed files with 2 additions and 11 deletions
|
@ -1,6 +1,8 @@
|
||||||
(Format: Year/Month/Day)
|
(Format: Year/Month/Day)
|
||||||
Changes for 1.0rc3:
|
Changes for 1.0rc3:
|
||||||
*06/07/13:
|
*06/07/13:
|
||||||
|
* Remove some redundant code for loading styles (Mark)
|
||||||
|
fluxbox.cc Screen.cc RootTheme.cc/hh
|
||||||
* Fix background: random (Mark)
|
* Fix background: random (Mark)
|
||||||
RootTheme.cc
|
RootTheme.cc
|
||||||
*06/07/10:
|
*06/07/10:
|
||||||
|
|
|
@ -109,7 +109,6 @@ RootTheme::RootTheme(const std::string &root_command,
|
||||||
m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())),
|
m_opgc(RootWindow(FbTk::App::instance()->display(), image_control.screenNumber())),
|
||||||
m_root_command(root_command),
|
m_root_command(root_command),
|
||||||
m_image_ctrl(image_control),
|
m_image_ctrl(image_control),
|
||||||
m_lock(false),
|
|
||||||
m_background_loaded(true) {
|
m_background_loaded(true) {
|
||||||
|
|
||||||
Display *disp = FbTk::App::instance()->display();
|
Display *disp = FbTk::App::instance()->display();
|
||||||
|
@ -138,9 +137,6 @@ bool RootTheme::fallback(FbTk::ThemeItem_base &item) {
|
||||||
void RootTheme::reconfigTheme() {
|
void RootTheme::reconfigTheme() {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
if (m_lock)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// if user specified background in the config then use it
|
// if user specified background in the config then use it
|
||||||
// instead of style background
|
// instead of style background
|
||||||
if (!m_root_command.empty()) {
|
if (!m_root_command.empty()) {
|
||||||
|
|
|
@ -61,14 +61,11 @@ public:
|
||||||
m_opgc.setLineAttributes(width, line_style, cap_style, join_style);
|
m_opgc.setLineAttributes(width, line_style, cap_style, join_style);
|
||||||
}
|
}
|
||||||
|
|
||||||
//!! TODO we should need this later
|
|
||||||
void lock(bool value) { m_lock = value; }
|
|
||||||
private:
|
private:
|
||||||
BackgroundItem *m_background;///< background image/texture
|
BackgroundItem *m_background;///< background image/texture
|
||||||
FbTk::GContext m_opgc;
|
FbTk::GContext m_opgc;
|
||||||
const std::string &m_root_command;
|
const std::string &m_root_command;
|
||||||
FbTk::ImageControl &m_image_ctrl; ///< image control for rendering background texture
|
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
|
bool m_background_loaded; ///< whether or not the background is present in the style file
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -442,11 +442,9 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
|
||||||
// else the focus label doesn't get updated
|
// else the focus label doesn't get updated
|
||||||
// So we lock root theme temporary so it doesn't uses RootTheme::reconfigTheme
|
// So we lock root theme temporary so it doesn't uses RootTheme::reconfigTheme
|
||||||
// This must be fixed in the future.
|
// This must be fixed in the future.
|
||||||
m_root_theme->lock(true);
|
|
||||||
FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename(),
|
FbTk::ThemeManager::instance().load(fluxbox->getStyleFilename(),
|
||||||
fluxbox->getStyleOverlayFilename(),
|
fluxbox->getStyleOverlayFilename(),
|
||||||
m_root_theme->screenNum());
|
m_root_theme->screenNum());
|
||||||
m_root_theme->lock(false);
|
|
||||||
m_root_theme->setLineAttributes(*resource.gc_line_width,
|
m_root_theme->setLineAttributes(*resource.gc_line_width,
|
||||||
*resource.gc_line_style,
|
*resource.gc_line_style,
|
||||||
*resource.gc_cap_style,
|
*resource.gc_cap_style,
|
||||||
|
|
|
@ -291,8 +291,6 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
|
||||||
#endif // HAVE_RANDR
|
#endif // HAVE_RANDR
|
||||||
|
|
||||||
load_rc();
|
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
|
// setup atom handlers before we create any windows
|
||||||
#ifdef REMEMBER
|
#ifdef REMEMBER
|
||||||
|
|
Loading…
Reference in a new issue