diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | baserender.c | 1 | ||||
-rw-r--r-- | config.c | 7 | ||||
-rw-r--r-- | config.h | 4 | ||||
-rw-r--r-- | displayreplay.c | 33 | ||||
-rw-r--r-- | displayreplay.h | 9 | ||||
-rw-r--r-- | po/de_DE.po | 11 | ||||
-rw-r--r-- | setup.c | 22 | ||||
-rwxr-xr-x | widgets/system_information/system_information.ubuntu | 11 |
9 files changed, 94 insertions, 7 deletions
@@ -3,6 +3,7 @@ VDR Plugin 'skinflatplus' Revision History 2014-MM-DD: Version 0.5.0 - [fix] femon receiver - do not get data from previous channel +- [fix] display replay jump text position - [add] main menu widgets - there are several widgets that can be displayed in the main menu - Widget weather @@ -23,6 +24,8 @@ VDR Plugin 'skinflatplus' Revision History - use color palette of android material design - default accent color is "Light Blue" - add more default themes: DeepOrange, DeepPurple, Indigo, Red, Teal +- [add] dimm on pause feature + you can set a timeout and the opaque value. If You press pause while replaying the display will be dimmed after the timeout - [update] icons - update many icons with android material design icons - [update] MV-Themes diff --git a/baserender.c b/baserender.c index a8724dbf..64667b84 100644 --- a/baserender.c +++ b/baserender.c @@ -1325,7 +1325,6 @@ tColor cFlatBaseRender::SetAlpha(tColor Color, double am) return ArgbToColor(A, R, G, B); } - void cFlatBaseRender::DecorDrawGlowRectHor(cPixmap *pixmap, int Left, int Top, int Width, int Height, tColor ColorBg) { double Alpha; if( Height < 0 ) { @@ -33,6 +33,10 @@ cFlatConfig::cFlatConfig(void) { RecordingSimpleAspectFormat = true; TimeSecsScale = 1.0; + RecordingDimmOnPause = true; + RecordingDimmOnPauseDelay = 20; + RecordingDimmOnPauseOpaque = 240; + RecordingAdditionalInfoShow = true; EpgAdditionalInfoShow = true; EpgRerunsShow = true; @@ -352,6 +356,9 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "TVScraperReplayInfoPosterSize") == 0) TVScraperReplayInfoPosterSize = atod(Value); else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardUnknown") == 0) MainMenuWidgetDVBDevicesDiscardUnknown = atoi(Value); else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardNotUsed") == 0) MainMenuWidgetDVBDevicesDiscardNotUsed = atoi(Value); + else if (strcmp(Name, "RecordingDimmOnPause") == 0) RecordingDimmOnPause = atoi(Value); + else if (strcmp(Name, "RecordingDimmOnPauseDelay") == 0) RecordingDimmOnPauseDelay = atoi(Value); + else if (strcmp(Name, "RecordingDimmOnPauseOpaque") == 0) RecordingDimmOnPauseOpaque = atoi(Value); else return false; @@ -218,6 +218,10 @@ class cFlatConfig int RecordingAdditionalInfoShow; double TimeSecsScale; + int RecordingDimmOnPause; + int RecordingDimmOnPauseDelay; + int RecordingDimmOnPauseOpaque; + int EpgRerunsShow; int EpgAdditionalInfoShow; int TopBarRecordingShow; diff --git a/displayreplay.c b/displayreplay.c index 0dedbae9..256b923c 100644 --- a/displayreplay.c +++ b/displayreplay.c @@ -7,6 +7,7 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) { total = ""; modeOnly = ModeOnly; + dimmActive = false; ProgressShown = false; CreateFullOsd(); @@ -36,9 +37,12 @@ cFlatDisplayReplay::cFlatDisplayReplay(bool ModeOnly) { osdHeight - labelHeight - Config.decorProgressReplaySize*2 - marginItem*3 - fontHeight - Config.decorBorderReplaySize*2, osdWidth - Config.decorBorderReplaySize*2, fontHeight)); + dimmPixmap = osd->CreatePixmap(8, cRect(0, 0, osdWidth, osdHeight)); + labelPixmap->Fill(Theme.Color(clrReplayBg)); labelJump->Fill(clrTransparent); iconsPixmap->Fill(clrTransparent); + dimmPixmap->Fill(clrTransparent); fontSecs = cFont::CreateFont(Setup.FontOsd, Setup.FontOsdSize * Config.TimeSecsScale * 100.0); @@ -58,6 +62,8 @@ cFlatDisplayReplay::~cFlatDisplayReplay() { osd->DestroyPixmap(iconsPixmap); if( chanEpgImagesPixmap ) osd->DestroyPixmap(chanEpgImagesPixmap); + if( dimmPixmap ) + osd->DestroyPixmap(dimmPixmap); } void cFlatDisplayReplay::SetRecording(const cRecording *Recording) { @@ -81,8 +87,35 @@ void cFlatDisplayReplay::SetTitle(const char *Title) { TopBarSetMenuIcon("extraIcons/Playing"); } +void cFlatDisplayReplay::Action(void) { + time_t curTime; + while( Running() ) { + time(&curTime); + if( (curTime - dimmStartTime) > Config.RecordingDimmOnPauseDelay ) { + dimmActive = true; + dimmPixmap->Fill(ArgbToColor(Config.RecordingDimmOnPauseOpaque, 0, 0, 0)); + Flush(); + Cancel(-1); + return; + } + cCondWait::SleepMs(100); + } +} + void cFlatDisplayReplay::SetMode(bool Play, bool Forward, int Speed) { int left = 0; + if( Play == false && Config.RecordingDimmOnPause ) { + time(&dimmStartTime); + Start(); + } else if( Play == true && Config.RecordingDimmOnPause ) { + Cancel(-1); + while( Active() ) + cCondWait::SleepMs(10); + if( dimmActive ) { + dimmPixmap->Fill(clrTransparent); + Flush(); + } + } if( Setup.ShowReplayMode ) { left = osdWidth - Config.decorBorderReplaySize*2 - (fontHeight * 4 + marginItem * 3); left /= 2; diff --git a/displayreplay.h b/displayreplay.h index d2de306b..1cdd1eb2 100644 --- a/displayreplay.h +++ b/displayreplay.h @@ -3,7 +3,7 @@ #include "baserender.h" #include "services/scraper2vdr.h" -class cFlatDisplayReplay : public cFlatBaseRender, public cSkinDisplayReplay { +class cFlatDisplayReplay : public cFlatBaseRender, public cSkinDisplayReplay, public cThread { private: cString current, total; @@ -12,6 +12,7 @@ class cFlatDisplayReplay : public cFlatBaseRender, public cSkinDisplayReplay { cPixmap *labelJump; cPixmap *iconsPixmap; cPixmap *chanEpgImagesPixmap; + cPixmap *dimmPixmap; cFont *fontSecs; const cRecording *recording; @@ -20,10 +21,16 @@ class cFlatDisplayReplay : public cFlatBaseRender, public cSkinDisplayReplay { int screenHeight; double screenAspect; + // dimm on pause + bool dimmActive; + time_t dimmStartTime; + bool ProgressShown; bool modeOnly; void UpdateInfo(void); void ResolutionAspectDraw(void); + + virtual void Action(void); public: cFlatDisplayReplay(bool ModeOnly); virtual ~cFlatDisplayReplay(); diff --git a/po/de_DE.po b/po/de_DE.po index 4a5c4a6f..0a1859d0 100644 --- a/po/de_DE.po +++ b/po/de_DE.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: vdr-skinflat 0.4.3\n" "Report-Msgid-Bugs-To: <see README>\n" -"POT-Creation-Date: 2014-11-30 14:44+0100\n" +"POT-Creation-Date: 2014-11-30 16:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -693,6 +693,15 @@ msgstr "Menüitem: Fortschritt Größe" msgid "Time seconds font scale" msgstr "Uhrzeit: Sekunden Skalierung" +msgid "Dimm on pause?" +msgstr "Dimmen bei Pause?" + +msgid "Dimm on pause delay" +msgstr "Dimmen bei Pause Verzögerung" + +msgid "Dimm on pause opaque" +msgstr "Dimmen bei Pause Undurchsichtigkeit" + msgid "Replay border by decor-file?" msgstr "Wiedergabe: Rand aus Dekordatei?" @@ -315,6 +315,9 @@ void cFlatSetup::Store(void) { SetupStore("TVScraperReplayInfoPosterSize", dtoa(Config.TVScraperReplayInfoPosterSize)); SetupStore("MainMenuWidgetDVBDevicesDiscardUnknown", Config.MainMenuWidgetDVBDevicesDiscardUnknown); SetupStore("MainMenuWidgetDVBDevicesDiscardNotUsed", Config.MainMenuWidgetDVBDevicesDiscardNotUsed); + SetupStore("RecordingDimmOnPause", Config.RecordingDimmOnPause); + SetupStore("RecordingDimmOnPauseDelay", Config.RecordingDimmOnPauseDelay); + SetupStore("RecordingDimmOnPauseOpaque", Config.RecordingDimmOnPauseOpaque); Config.Init(); } @@ -495,6 +498,9 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "TVScraperReplayInfoPosterSize") == 0) SetupConfig->TVScraperReplayInfoPosterSize = atod(Value); else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardUnknown") == 0) SetupConfig->MainMenuWidgetDVBDevicesDiscardUnknown = atoi(Value); else if (strcmp(Name, "MainMenuWidgetDVBDevicesDiscardNotUsed") == 0) SetupConfig->MainMenuWidgetDVBDevicesDiscardNotUsed = atoi(Value); + else if (strcmp(Name, "RecordingDimmOnPause") == 0) SetupConfig->RecordingDimmOnPause = atoi(Value); + else if (strcmp(Name, "RecordingDimmOnPauseDelay") == 0) SetupConfig->RecordingDimmOnPauseDelay = atoi(Value); + else if (strcmp(Name, "RecordingDimmOnPauseOpaque") == 0) SetupConfig->RecordingDimmOnPauseOpaque = atoi(Value); else return false; return true; @@ -657,6 +663,9 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) { Config.Store("TVScraperReplayInfoPosterSize", dtoa(Config.TVScraperReplayInfoPosterSize), *Filename); Config.Store("MainMenuWidgetDVBDevicesDiscardUnknown", SetupConfig->MainMenuWidgetDVBDevicesDiscardUnknown, *Filename); Config.Store("MainMenuWidgetDVBDevicesDiscardNotUsed", SetupConfig->MainMenuWidgetDVBDevicesDiscardNotUsed, *Filename); + Config.Store("RecordingDimmOnPause", SetupConfig->RecordingDimmOnPause, *Filename); + Config.Store("RecordingDimmOnPauseDelay", SetupConfig->RecordingDimmOnPauseDelay, *Filename); + Config.Store("RecordingDimmOnPauseOpaque", SetupConfig->RecordingDimmOnPauseOpaque, *Filename); cString msg = cString::sprintf("%s %s", tr("saved settings in file:"), *File); Skins.Message(mtInfo, msg); @@ -1040,6 +1049,16 @@ void cFlatSetupReplay::Setup(void) { Add(new cMenuEditPrcItem(tr("Time seconds font scale"), &SetupConfig->TimeSecsScale, 0.003, 0.01, 1)); Add(new cMenuEditBoolItem(tr("Show weather widget"), &SetupConfig->PlaybackWeatherShow)); + Add(new cMenuEditBoolItem(tr("Dimm on pause?"), &SetupConfig->RecordingDimmOnPause)); + if( SetupConfig->RecordingDimmOnPause ) { + Add(new cMenuEditIntItem(tr("Dimm on pause delay"), &SetupConfig->RecordingDimmOnPauseDelay)); + Add(new cMenuEditIntItem(tr("Dimm on pause opaque"), &SetupConfig->RecordingDimmOnPauseOpaque)); + } else { + cString type = cString::sprintf("%s:\t%d", tr("Dimm on pause delay"), SetupConfig->RecordingDimmOnPauseDelay); + Add(new cOsdItem(type, osUnknown, false)); + cString size = cString::sprintf("%s:\t%d", tr("Dimm on pause opaque"), SetupConfig->RecordingDimmOnPauseOpaque); + Add(new cOsdItem(size, osUnknown, false)); + } Add(new cMenuEditBoolItem(tr("Replay border by decor-file?"), &SetupConfig->decorBorderReplayByTheme)); if( SetupConfig->decorBorderReplayByTheme ) { cString type = cString::sprintf("%s:\t%s", tr("Replay border type"), Bordertypes[SetupConfig->decorBorderReplayTypeTheme]); @@ -1080,7 +1099,8 @@ eOSState cFlatSetupReplay::ProcessKey(eKeys Key) { if( Key == kLeft || Key == kRight ) { const char* ItemText = Get(Current())->Text(); if( strstr(ItemText, tr("Replay border by decor-file?")) != NULL || - strstr(ItemText, tr("Replay progress by decor-file?")) != NULL + strstr(ItemText, tr("Replay progress by decor-file?")) != NULL || + strstr(ItemText, tr("Dimm on pause?")) != NULL ) { ItemLastSel = Current(); Setup(); diff --git a/widgets/system_information/system_information.ubuntu b/widgets/system_information/system_information.ubuntu index 36c82896..269b0be9 100755 --- a/widgets/system_information/system_information.ubuntu +++ b/widgets/system_information/system_information.ubuntu @@ -22,8 +22,8 @@ SHOW_VIDEO_USAGE=1 SHOW_VDR_CPU_USAGE=1 SHOW_VDR_MEM_USAGE=1 -SHOW_TEMPERATURES=1 -SHOW_SYSUPDATES=1 +SHOW_TEMPERATURES=0 +SHOW_SYSUPDATES=0 # Position of items # sys_version & kernel_version are drawn in one line @@ -59,6 +59,10 @@ VIDEO_MOUNT="/media/video" # force english output for filters LANG=en_EN +# Get own Path +SELF="$(readlink -m /proc/$$/fd/255)" # $0 +MY_DIR="$(dirname $SELF)" # Path + # delete all files rm -f ${OUTPUTFLDR}/[0-99]* @@ -145,7 +149,8 @@ if [ $SHOW_VDR_MEM_USAGE = 1 ]; then fi if [ $SHOW_TEMPERATURES = 1 ]; then - ./../temperatures/temperatures + TEMPERATURES_DIR="$(readlink -m $MY_DIR/../temperatures)" + bash $TEMPERATURES_DIR/temperatures if [ -f ${OUTPUTFLDRTEMP}/cpu ]; then cp ${OUTPUTFLDRTEMP}/cpu ${OUTPUTFLDR}/${TEMP_CPU_POS}_cpu fi |