Getting currently loaded theme name Thread last updated on 2004-05-21 03:42:18

Posted by member 28487 on 2004-05-20 05:05:02

Is there a simple way to do this?
I want to add some theme specific code to my personal.rc, along the lines of
IF LoadedTheme == "austerity"
// run code
ELSE IF LoadedTheme == "another_theme"
// more code
ELSE IF LoadedTheme == "yet_another"
// and some more
ENDIF

I don't think the syntax I've used is right, I suppose thats another thing I am asking.

I know $ThemeDir$ would have the folder name of the theme, which is what I need, but does it store the full path and if so, how can the theme name be retrieved from this?

Thanks.

Posted by member 35 on 2004-05-20 06:27:01 link

there's no string comparison yet in the core, only integer and boolean, why not add the code you want to execute in the themes, instead of the personal file.

anyways, to get the name of the theme use themename

Posted by member 7223 on 2004-05-21 03:42:18 link

just do something like:
include "$personaldir$$themename$.rc"

if it exists, it is include; if it doesn't, it is not :)