summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/FbTk/Theme.cc10
-rw-r--r--src/MenuCreator.cc10
3 files changed, 20 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1139bfa..1b84dbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.10: 2Changes for 0.9.10:
3*04/08/26: 3*04/08/26:
4 * Tiny unification (Mathias)
5 - theme.cfg and style.cfg allowed
6 - in menufiles:
7 [stylesdir] and [themesdir] allowed
8 [stylesmenu] and [themesmenu] allowed
4 * Fix bevel on solid colour textures (Simon) 9 * Fix bevel on solid colour textures (Simon)
5 FbTk/Texture.hh/cc FbTk/ThemeItems.hh 10 FbTk/Texture.hh/cc FbTk/ThemeItems.hh
6 * Make arrow in toolbar buttons scalable size (Simon) 11 * Make arrow in toolbar buttons scalable size (Simon)
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) {