all repos — fluxbox @ 6ce5a31ea8bb6dbf6f64260c62d9af153e9d7f30

custom fork of the fluxbox windowmanager

unification for themes.cfg/styles.cfg and the same for menuentries:
  [stylesmenu] and [themesmenu]
  [stylesdir] and [themesdir]
akir akir
commit

6ce5a31ea8bb6dbf6f64260c62d9af153e9d7f30

parent

0f83e449727a16c178b47262f170e879a22c0981

3 files changed, 20 insertions(+), 5 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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)
M src/FbTk/Theme.ccsrc/FbTk/Theme.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ prefix = location;

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
M src/MenuCreator.ccsrc/MenuCreator.cc

@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ // .file or a backup~ file

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 @@ } else if (str_key == "stylesdir" || str_key == "stylesmenu") {

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) {