From b9a26f614d8eee40b6caca4eb008ce14f0a80f24 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Thu, 14 Jun 2007 22:16:52 +0000 Subject: - Added option in live setup to disable infobox at all. Fixes #312 --- doc/ChangeLog | 4 ++++ i18n.cpp | 22 ++++++++++++++++++++++ pages/pageelems.ecpp | 6 +++--- pages/setup.ecpp | 36 +++++++++++++++++++++++------------- setup.cpp | 5 ++++- setup.h | 4 +++- 6 files changed, 59 insertions(+), 18 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 272acde..6556c42 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2007-06-15 Dieter Hametner + + * setup.ecpp: added option to disable infobox at all. + 2007-06-14 Dieter Hametner * infobox: Keep update status of infobox in session. This allows diff --git a/i18n.cpp b/i18n.cpp index d4f6c1c..0906e86 100644 --- a/i18n.cpp +++ b/i18n.cpp @@ -1301,6 +1301,28 @@ const tI18nPhrase Phrases[] = { "", // Dansk "", // Czech }, + { "Show dynamic VDR information box", // English + "Zeige eine dynamische VDR Status Box", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "", // Finnish + "", // Polski + "", // Español + "", // Greek + "", // Svenska + "", // Românã + "", // Magyar + "", // Català + "", // Russian + "", // Hrvatski + "", // Eesti + "", // Dansk + "", // Czech + }, { "View the schedule of this channel", // English "Zeige Programm dieses Kanals", // Deutsch "", // Slovenski diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 093255a..26cbf27 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -37,7 +37,7 @@ int update_status(1);
@@ -85,7 +85,7 @@ int update_status(1); <# ---------------------------------------------------------------------- #> <%def infobox_start_update> -<%cpp> { LiveStatusRequest('ibox.xml', 'infobox', <%cpp> if (update_status) { reply.sout() << "true"; } else { reply.sout() << "false"; } )<%cpp> } +<%cpp> if (LiveSetup().GetShowInfoBox()) { LiveStatusRequest('ibox.xml', 'infobox', <%cpp> if (update_status) { reply.sout() << "true"; } else { reply.sout() << "false"; } )<%cpp> } <# ---------------------------------------------------------------------- #> @@ -130,7 +130,7 @@ int update_status(1); <%def ajax_js> - + <%cpp>if (LiveSetup().GetShowInfoBox()) { <%cpp> } <# ---------------------------------------------------------------------- #> diff --git a/pages/setup.ecpp b/pages/setup.ecpp index 4499e98..008bec3 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -9,24 +9,26 @@ using namespace std; <%args> string lastchannel; - bool useauth = 0; + bool useauth = false; string login; string pass; string times; string startscreen; string theme; string localnetmask; + string showInfoBox; int authchanged = 0; <%session scope="global"> bool logged_in(false); <%include>page_init.eh -<{ +<%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -}> + <%cpp> #define SELECTIF(x) reply.out() << ( (x) ? "selected=\"selected\"" : "" ); +#define CHECKIF(x) reply.out() << ( (x) ? "checked=\"checked\"" : "" ); std::string message; @@ -47,6 +49,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); LiveSetup().SetTimes(times); LiveSetup().SetStartScreen(startscreen); LiveSetup().SetTheme(theme); + LiveSetup().SetShowInfoBox(!showInfoBox.empty()); LiveSetup().SaveSetup(); message = tr("Setup saved."); } @@ -64,6 +67,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); startscreen = LiveSetup().GetStartScreen(); theme = LiveSetup().GetTheme(); localnetmask = LiveSetup().GetLocalNetMask(); + showInfoBox = LiveSetup().GetShowInfoBox() ? "1" : ""; <& pageelems.doc_type &> @@ -94,9 +98,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <& menu active=("setup") &>
- - - + + +
@@ -107,7 +111,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
<$ tr("Setup") $>
<$ tr("Use authentication") $>:
- onclick="changeduseauth(this)"/> + CHECKIF(useauth); onclick="changeduseauth(this)"/>