From c4a079a04c99d3ca79e531c7ccd2ceb0800e44ec Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 25 Dec 2014 00:14:19 +0100 Subject: [PATCH] screensaver: add GUI option to change screensaver directory Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cbed13ecd056fc6f371573635417ae8309286f98 Author: vanhofen Date: 2014-12-25 (Thu, 25 Dec 2014) Origin message was: ------------------ - screensaver: add GUI option to change screensaver directory ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 2 ++ data/locale/english.locale | 2 ++ src/gui/osd_setup.cpp | 12 ++++++++++++ src/system/locals.h | 2 ++ src/system/locals_intern.h | 2 ++ 5 files changed, 20 insertions(+) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 4ee859428..e972592df 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1286,6 +1286,7 @@ menu.hint_scan_usalsall Verwenden Sie USALS für alle Satelliten an diesem Tuner menu.hint_scan_useusals Verwenden Sie USALS für diesen Satelliten,\nwenn aktiv, wird Rotorposition ignoriert menu.hint_scrambled_message Bei aktivierter Option erscheint eine Meldung, wenn ein verschlüsselter Sender nicht entschlüsselt werden kann menu.hint_screen_setup Konfigurieren Sie den Bildschirmbereich für die Menüanzeige +menu.hint_screensaver_dir Wählen Sie das Verzeichnis, in dem die Bilder für Ihren Bildschirmschoner gespeichert sind menu.hint_screenshot_count Wählen Sie, wie viele Screenshots erstellt werden sollen menu.hint_screenshot_cover Während der Wiedergabe von Aufnahmen kann ein Screenshot für die Vorschau im Moviebrowser erstellt werden menu.hint_screenshot_dir Wählen Sie das Verzeichnis zum Speichern der Screenshots @@ -2051,6 +2052,7 @@ scants.startnow Kanalsuche starten scants.test Empfangstest scants.transponders Transponder: scrambled_channel Verschlüsselung aktiv +screensaver.dir Bildschirmschoner-Verzeichnis screensetup.lowerright grün = Bildrand unten, rechts screensetup.upperleft rot = Bildrand oben, links screenshot.count Anzahl diff --git a/data/locale/english.locale b/data/locale/english.locale index ed8961ab4..abfc22819 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1290,6 +1290,7 @@ menu.hint_scan_usalsall Use USALS for all satellites on this frontend menu.hint_scan_useusals Use USALS for this satellite,\nif ON, rotor position ignored menu.hint_scrambled_message Show scrambled message, when channel cannot be decoded menu.hint_screen_setup Configure screen margins +menu.hint_screensaver_dir Select directory in which the screensaver has to start. menu.hint_screenshot_count When no GUI on screen, you can save 1-5\nscreenshot serie menu.hint_screenshot_cover ON: When playing record, overwrite single\nscreenshot to show inside MovieBrowser menu.hint_screenshot_dir Select directory to save screenshots @@ -2056,6 +2057,7 @@ scants.startnow start scan scants.test Test signal scants.transponders Transponders: scrambled_channel Scrambled channel +screensaver.dir Screensaver directory screensetup.lowerright green = setup lower right screensetup.upperleft red = setup upper left screenshot.count Count diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index b4a97f363..a49c46f2b 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -322,6 +322,11 @@ int COsdSetup::exec(CMenuTarget* parent, const std::string &actionKey) chooserDir(g_settings.screenshot_dir, true, action_str); return res; } + else if(actionKey=="screensaver_dir") { + const char *action_str = "screensaver"; + chooserDir(g_settings.screensaver_dir, false, action_str); + return res; + } else if(strncmp(actionKey.c_str(), "fontsize.d", 10) == 0) { for (int i = 0; i < FONT_GROUP_COUNT; i++) { if (actionKey == font_sizes_groups[i].actionkey) { @@ -607,6 +612,13 @@ int COsdSetup::showOsdSetup() mc->setHint("", LOCALE_MENU_HINT_SUBCHANNEL_POS); osd_menu->addItem(mc); + osd_menu->addItem(GenericMenuSeparatorLine); + + // screensaver_dir + mf = new CMenuForwarder(LOCALE_SCREENSAVER_DIR, true, g_settings.screensaver_dir, this, "screensaver_dir"); + mf->setHint("", LOCALE_MENU_HINT_SCREENSAVER_DIR); + osd_menu->addItem(mf); + int oldVolumeSize = g_settings.volume_size; int oldInfoClockSize = g_settings.infoClockFontSize; diff --git a/src/system/locals.h b/src/system/locals.h index 699b40583..336cefa5b 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1317,6 +1317,7 @@ typedef enum LOCALE_MENU_HINT_SCAN_USEUSALS, LOCALE_MENU_HINT_SCRAMBLED_MESSAGE, LOCALE_MENU_HINT_SCREEN_SETUP, + LOCALE_MENU_HINT_SCREENSAVER_DIR, LOCALE_MENU_HINT_SCREENSHOT_COUNT, LOCALE_MENU_HINT_SCREENSHOT_COVER, LOCALE_MENU_HINT_SCREENSHOT_DIR, @@ -2083,6 +2084,7 @@ typedef enum LOCALE_SCANTS_TEST, LOCALE_SCANTS_TRANSPONDERS, LOCALE_SCRAMBLED_CHANNEL, + LOCALE_SCREENSAVER_DIR, LOCALE_SCREENSETUP_LOWERRIGHT, LOCALE_SCREENSETUP_UPPERLEFT, LOCALE_SCREENSHOT_COUNT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index baa00f4a2..916fd5811 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1317,6 +1317,7 @@ const char * locale_real_names[] = "menu.hint_scan_useusals", "menu.hint_scrambled_message", "menu.hint_screen_setup", + "menu.hint_screensaver_dir", "menu.hint_screenshot_count", "menu.hint_screenshot_cover", "menu.hint_screenshot_dir", @@ -2083,6 +2084,7 @@ const char * locale_real_names[] = "scants.test", "scants.transponders", "scrambled_channel", + "screensaver.dir", "screensetup.lowerright", "screensetup.upperleft", "screenshot.count",