diff options
Diffstat (limited to 'src/RootTheme.cc')
-rw-r--r-- | src/RootTheme.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/RootTheme.cc b/src/RootTheme.cc index a40732e..049eb27 100644 --- a/src/RootTheme.cc +++ b/src/RootTheme.cc | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include "FbTk/App.hh" | 29 | #include "FbTk/App.hh" |
30 | #include "FbTk/Font.hh" | 30 | #include "FbTk/Font.hh" |
31 | #include "FbTk/Image.hh" | ||
31 | #include "FbTk/ImageControl.hh" | 32 | #include "FbTk/ImageControl.hh" |
32 | #include "FbTk/Resource.hh" | 33 | #include "FbTk/Resource.hh" |
33 | #include "FbTk/FileUtil.hh" | 34 | #include "FbTk/FileUtil.hh" |
@@ -197,6 +198,7 @@ void RootTheme::reconfigTheme() { | |||
197 | // if background argument is a file then | 198 | // if background argument is a file then |
198 | // parse image options and call image setting | 199 | // parse image options and call image setting |
199 | // command specified in the resources | 200 | // command specified in the resources |
201 | std::string img_path = FbTk::Image::locateFile(filename); | ||
200 | filename = FbTk::StringUtil::expandFilename(filename); | 202 | filename = FbTk::StringUtil::expandFilename(filename); |
201 | std::string cmd = realProgramName("fbsetbg") + (m_first ? " -z " : " -Z "); | 203 | std::string cmd = realProgramName("fbsetbg") + (m_first ? " -z " : " -Z "); |
202 | 204 | ||
@@ -204,7 +206,7 @@ void RootTheme::reconfigTheme() { | |||
204 | if (strstr(m_background->options().c_str(), "none") != 0) { | 206 | if (strstr(m_background->options().c_str(), "none") != 0) { |
205 | if (!m_first) | 207 | if (!m_first) |
206 | return; | 208 | return; |
207 | } else if (FbTk::FileUtil::isRegularFile(filename.c_str())) { | 209 | } else if (!img_path.empty()) { |
208 | // parse options | 210 | // parse options |
209 | if (strstr(m_background->options().c_str(), "tiled") != 0) | 211 | if (strstr(m_background->options().c_str(), "tiled") != 0) |
210 | cmd += "-t "; | 212 | cmd += "-t "; |
@@ -215,7 +217,7 @@ void RootTheme::reconfigTheme() { | |||
215 | else | 217 | else |
216 | cmd += "-f "; | 218 | cmd += "-f "; |
217 | 219 | ||
218 | cmd += filename; | 220 | cmd += img_path; |
219 | } else if (FbTk::FileUtil::isDirectory(filename.c_str()) && | 221 | } else if (FbTk::FileUtil::isDirectory(filename.c_str()) && |
220 | strstr(m_background->options().c_str(), "random") != 0) { | 222 | strstr(m_background->options().c_str(), "random") != 0) { |
221 | cmd += "-r " + filename; | 223 | cmd += "-r " + filename; |