From e44da5f926c5e61818a130071ecaa5a41d900fc2 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 13 Jul 2006 06:36:05 +0000 Subject: fix background: random so that background.pixmap allows a directory name --- ChangeLog | 3 +++ src/RootTheme.cc | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90f7627..cac729e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/RootTheme.cc b/src/RootTheme.cc index 12c809e..19e8c8d 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc @@ -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 -- cgit v0.11.2