summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Theme.cc10
-rw-r--r--src/MenuCreator.cc10
2 files changed, 15 insertions, 5 deletions
diff --git a/src/FbTk/Theme.cc b/src/FbTk/Theme.cc
index 066f9fa..e557d29 100644
--- a/src/FbTk/Theme.cc
+++ b/src/FbTk/Theme.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Theme.cc,v 1.27 2004/06/07 11:46:05 rathnor Exp $ 22// $Id: Theme.cc,v 1.28 2004/08/26 18:26:39 akir Exp $
23 23
24#include "Theme.hh" 24#include "Theme.hh"
25 25
@@ -88,8 +88,12 @@ bool ThemeManager::load(const std::string &filename, int screen_num) {
88 88
89 location.append("/theme.cfg"); 89 location.append("/theme.cfg");
90 if (!Directory::isRegularFile(location)) { 90 if (!Directory::isRegularFile(location)) {
91 cerr<<"Error loading theme file "<<location<<": not a regular file"<<endl; 91 location = prefix;
92 return false; 92 location.append("/style.cfg");
93 if (!Directory::isRegularFile(location)) {
94 cerr<<"Error loading theme file "<<location<<": not a regular file"<<endl;
95 return false;
96 }
93 } 97 }
94 } else { 98 } else {
95 // dirname 99 // dirname
diff --git a/src/MenuCreator.cc b/src/MenuCreator.cc
index 57ef32c..374411d 100644
--- a/src/MenuCreator.cc
+++ b/src/MenuCreator.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: MenuCreator.cc,v 1.10 2004/07/05 09:27:04 fluxgen Exp $ 23// $Id: MenuCreator.cc,v 1.11 2004/08/26 18:26:39 akir Exp $
24 24
25#include "MenuCreator.hh" 25#include "MenuCreator.hh"
26 26
@@ -83,7 +83,8 @@ static void createStyleMenu(FbTk::Menu &parent, const std::string &label,
83 if ((FbTk::Directory::isRegularFile(style) && 83 if ((FbTk::Directory::isRegularFile(style) &&
84 (filelist[file_index][0] != '.') && 84 (filelist[file_index][0] != '.') &&
85 (style[style.length() - 1] != '~')) || 85 (style[style.length() - 1] != '~')) ||
86 FbTk::Directory::isRegularFile(style + "/theme.cfg")) 86 FbTk::Directory::isRegularFile(style + "/theme.cfg") ||
87 FbTk::Directory::isRegularFile(style + "/style.cfg"))
87 parent.insert(new StyleMenuItem(filelist[file_index], style)); 88 parent.insert(new StyleMenuItem(filelist[file_index], style));
88 } 89 }
89 // update menu graphics 90 // update menu graphics
@@ -219,6 +220,11 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
219 createStyleMenu(menu, str_label, 220 createStyleMenu(menu, str_label,
220 str_key == "stylesmenu" ? str_cmd : str_label); 221 str_key == "stylesmenu" ? str_cmd : str_label);
221 } // end of stylesdir 222 } // end of stylesdir
223 else if (str_key == "themesdir" || str_key == "themesmenu") {
224 createStyleMenu(menu, str_label,
225 str_key == "themesmenu" ? str_cmd : str_label);
226 } // end of themesdir
227
222 else if (str_key == "workspaces") { 228 else if (str_key == "workspaces") {
223 BScreen *screen = Fluxbox::instance()->findScreen(screen_number); 229 BScreen *screen = Fluxbox::instance()->findScreen(screen_number);
224 if (screen != 0) { 230 if (screen != 0) {