diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2007-06-03 22:18:54 +0000 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2007-06-03 22:18:54 +0000 |
commit | cd260aabdb23fd97d9cb8b0105e61d90ca844f01 (patch) | |
tree | dac9b3f1a903dac9510974f443e0b376d27e6252 /pages/setup.ecpp | |
parent | 41687a7bbe9c8d304b805a9a5f7e14101f1d75a5 (diff) | |
download | vdr-plugin-live-cd260aabdb23fd97d9cb8b0105e61d90ca844f01.tar.gz vdr-plugin-live-cd260aabdb23fd97d9cb8b0105e61d90ca844f01.tar.bz2 |
- general CSS based themeing support.
- added setup option to select theme.
- added search scheme for themable images and stylesheets.
- added marine (default) and redwine theme.
- documented new features. All developers must read
doc/dev-conventions.txt
Diffstat (limited to 'pages/setup.ecpp')
-rw-r--r-- | pages/setup.ecpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pages/setup.ecpp b/pages/setup.ecpp index b099c0f..43c0de8 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -1,4 +1,5 @@ <%pre> +#include <vdr/tools.h> #include "setup.h" #include "tools.h" @@ -13,6 +14,7 @@ using namespace std; string pass; string times; string startscreen; + string theme; string localnetmask; </%args> <%session scope="global"> @@ -37,6 +39,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); } LiveSetup().SetTimes(times); LiveSetup().SetStartScreen(startscreen); + LiveSetup().SetTheme(theme); LiveSetup().SaveSetup(); } pageTitle = tr("Setup"); @@ -50,6 +53,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); useauth = LiveSetup().GetUseAuth(); times = LiveSetup().GetTimes(); startscreen = LiveSetup().GetStartScreen(); + theme = LiveSetup().GetTheme(); localnetmask = LiveSetup().GetLocalNetMask(); </%cpp> <& pageelems.doc_type &> @@ -130,6 +134,32 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); </tr> <tr> <td class="border" style="border-left: 1px solid black"></td> + <td class="label"><$ tr("Theme") $>:</td> + <td><select name="theme" size="1" id="theme"> +<%cpp> +{ + cReadDir d(USRDIR "/themes"); + struct dirent* e; + string parent(".."); + string current("."); + while ((e = d.Next())) { + if ((current == e->d_name) || (parent == e->d_name)) { + continue; + } + if (DT_DIR != e->d_type) { + continue; + } +</%cpp> + <option value="<$ e->d_name $>" <{ SELECTIF(theme == e->d_name) }>><$ e->d_name $></option> +<%cpp> + } +} +</%cpp> + </select></td> + <td class="border" style="border-right: 1px solid black"></td> + </tr> + <tr> + <td class="border" style="border-left: 1px solid black"></td> <td class="buttonpanel" colspan="2"> <button class="green" type="submit" name="save" onclick="return checksearch();"><$ tr("Save") $></button> </td> |