aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbCommands.cc9
-rw-r--r--src/FbTk/Theme.cc2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/FbCommands.cc b/src/FbCommands.cc
index e0d0768..49f727c 100644
--- a/src/FbCommands.cc
+++ b/src/FbCommands.cc
@@ -274,10 +274,11 @@ SetStyleCmd::SetStyleCmd(const string &filename):m_filename(filename) {
274} 274}
275 275
276void SetStyleCmd::execute() { 276void SetStyleCmd::execute() {
277 Fluxbox::instance()->saveStyleFilename(m_filename.c_str()); 277 if (FbTk::ThemeManager::instance().load(m_filename,
278 Fluxbox::instance()->save_rc(); 278 Fluxbox::instance()->getStyleOverlayFilename())) {
279 FbTk::ThemeManager::instance().load(m_filename, 279 Fluxbox::instance()->saveStyleFilename(m_filename.c_str());
280 Fluxbox::instance()->getStyleOverlayFilename()); 280 Fluxbox::instance()->save_rc();
281 }
281} 282}
282 283
283REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void); 284REGISTER_COMMAND_WITH_ARGS(keymode, FbCommands::KeyModeCmd, void);
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index 46c9a56..cd478fc 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -117,6 +117,8 @@ bool ThemeManager::unregisterTheme(Theme &tm) {
117bool ThemeManager::load(const string &filename, 117bool ThemeManager::load(const string &filename,
118 const string &overlay_filename, int screen_num) { 118 const string &overlay_filename, int screen_num) {
119 string location = FbTk::StringUtil::expandFilename(filename); 119 string location = FbTk::StringUtil::expandFilename(filename);
120 StringUtil::removeTrailingWhitespace(location);
121 StringUtil::removeFirstWhitespace(location);
120 string prefix = ""; 122 string prefix = "";
121 123
122 if (FileUtil::isDirectory(filename.c_str())) { 124 if (FileUtil::isDirectory(filename.c_str())) {