fix background: random so that background.pixmap allows a directory name

This commit is contained in:
markt 2006-07-13 06:36:05 +00:00
parent a7da03c022
commit e44da5f926
2 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,8 @@
(Format: Year/Month/Day)
Changes for 1.0rc3:
*06/07/13:
* Fix background: random (Mark)
RootTheme.cc
*06/07/10:
* Next/PrevWindow toolbar buttons break MouseFocus: bug #1519913 (Mark)
WorkspaceCmd.cc FocusControl.cc

View file

@ -180,8 +180,6 @@ void RootTheme::reconfigTheme() {
options += "-t ";
if (strstr(m_background->options().c_str(), "centered") != 0)
options += "-c ";
if (strstr(m_background->options().c_str(), "random") != 0)
options += "-r ";
if (strstr(m_background->options().c_str(), "aspect") != 0)
options += "-a ";
@ -192,6 +190,11 @@ void RootTheme::reconfigTheme() {
FbCommands::ExecuteCmd exec(commandargs, screenNum());
exec.execute();
} else if (FbTk::FileUtil::isDirectory(filename.c_str()) &&
strstr(m_background->options().c_str(), "random") != 0) {
std::string commandargs = "fbsetbg -r " + filename;
FbCommands::ExecuteCmd exec(commandargs, screenNum());
exec.execute();
} else {
// render normal texture with fbsetroot