unification for themes.cfg/styles.cfg and the same for menuentries:
[stylesmenu] and [themesmenu] [stylesdir] and [themesdir]
This commit is contained in:
parent
0f83e44972
commit
6ce5a31ea8
3 changed files with 20 additions and 5 deletions
|
@ -1,6 +1,11 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 0.9.10:
|
||||
*04/08/26:
|
||||
* Tiny unification (Mathias)
|
||||
- theme.cfg and style.cfg allowed
|
||||
- in menufiles:
|
||||
[stylesdir] and [themesdir] allowed
|
||||
[stylesmenu] and [themesmenu] allowed
|
||||
* Fix bevel on solid colour textures (Simon)
|
||||
FbTk/Texture.hh/cc FbTk/ThemeItems.hh
|
||||
* Make arrow in toolbar buttons scalable size (Simon)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Theme.cc,v 1.27 2004/06/07 11:46:05 rathnor Exp $
|
||||
// $Id: Theme.cc,v 1.28 2004/08/26 18:26:39 akir Exp $
|
||||
|
||||
#include "Theme.hh"
|
||||
|
||||
|
@ -88,8 +88,12 @@ bool ThemeManager::load(const std::string &filename, int screen_num) {
|
|||
|
||||
location.append("/theme.cfg");
|
||||
if (!Directory::isRegularFile(location)) {
|
||||
cerr<<"Error loading theme file "<<location<<": not a regular file"<<endl;
|
||||
return false;
|
||||
location = prefix;
|
||||
location.append("/style.cfg");
|
||||
if (!Directory::isRegularFile(location)) {
|
||||
cerr<<"Error loading theme file "<<location<<": not a regular file"<<endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// dirname
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: MenuCreator.cc,v 1.10 2004/07/05 09:27:04 fluxgen Exp $
|
||||
// $Id: MenuCreator.cc,v 1.11 2004/08/26 18:26:39 akir Exp $
|
||||
|
||||
#include "MenuCreator.hh"
|
||||
|
||||
|
@ -83,7 +83,8 @@ static void createStyleMenu(FbTk::Menu &parent, const std::string &label,
|
|||
if ((FbTk::Directory::isRegularFile(style) &&
|
||||
(filelist[file_index][0] != '.') &&
|
||||
(style[style.length() - 1] != '~')) ||
|
||||
FbTk::Directory::isRegularFile(style + "/theme.cfg"))
|
||||
FbTk::Directory::isRegularFile(style + "/theme.cfg") ||
|
||||
FbTk::Directory::isRegularFile(style + "/style.cfg"))
|
||||
parent.insert(new StyleMenuItem(filelist[file_index], style));
|
||||
}
|
||||
// update menu graphics
|
||||
|
@ -219,6 +220,11 @@ static void translateMenuItem(Parser &parse, ParseItem &pitem) {
|
|||
createStyleMenu(menu, str_label,
|
||||
str_key == "stylesmenu" ? str_cmd : str_label);
|
||||
} // end of stylesdir
|
||||
else if (str_key == "themesdir" || str_key == "themesmenu") {
|
||||
createStyleMenu(menu, str_label,
|
||||
str_key == "themesmenu" ? str_cmd : str_label);
|
||||
} // end of themesdir
|
||||
|
||||
else if (str_key == "workspaces") {
|
||||
BScreen *screen = Fluxbox::instance()->findScreen(screen_number);
|
||||
if (screen != 0) {
|
||||
|
|
Loading…
Reference in a new issue