Compare commits
202 Commits
Author | SHA1 | Date |
---|---|---|
kamel5 | 79a95914f0 | |
kamel5 | 2f64512710 | |
kamel5 | d11d09ca6e | |
Peter Bieringer | 9690f6d8a0 | |
Peter Bieringer | 5e5e5c4fbc | |
kamel5 | 5b61c36484 | |
kamel5 | 7d269ffd85 | |
kamel5 | c6c89529a6 | |
kamel5 | da79cb71b4 | |
kamel5 | 8aeb848044 | |
kamel5 | b55994a8a6 | |
kamel5 | b47f544ad5 | |
kamel5 | 4a89d28f03 | |
kamel5 | 7c47c8e225 | |
kamel5 | ebd99e119c | |
kamel5 | 3c7e014dcc | |
kamel5 | b977e3582a | |
kamel5 | 9b63e8327f | |
kamel5 | a7fc762b3d | |
kamel5 | 596c86c780 | |
kamel5 | d6f5e6808b | |
Peter Bieringer | 0259d38d2f | |
Peter Bieringer | 0b2666f62d | |
Peter Bieringer | d4b1765aaf | |
Peter Bieringer | 3aae0169b4 | |
kamel5 | 0159d536d0 | |
kamel5 | ccba1c23fd | |
kamel5 | 6583c93a6f | |
Peter Bieringer | 2d7a9ab3a3 | |
Peter Bieringer | 4daec64480 | |
Peter Bieringer | 64658a1f56 | |
Peter Bieringer | fce870a315 | |
kamel5 | 09925e6113 | |
kamel5 | 4b2861e030 | |
Peter Bieringer | 39c1062353 | |
Peter Bieringer | 589749731f | |
Peter Bieringer | 1c9fd38cc7 | |
Peter Bieringer | 0ca96e8b3a | |
Peter Bieringer | 700798ba21 | |
kamel5 | 0aeb15d03a | |
kamel5 | 22b24eb455 | |
kamel5 | f5a29826cb | |
kamel5 | 50879fa931 | |
kamel5 | 894b5865cd | |
Peter Bieringer | fda2a4ec74 | |
Peter Bieringer | 4821574437 | |
kamel5 | dc617b52fa | |
kamel5 | cef6ca78a2 | |
kamel5 | 85df1e7f98 | |
kamel5 | 3334263a96 | |
Peter Bieringer | 4d3fa0bc71 | |
Peter Bieringer | cbce894c0c | |
kamel5 | 9a0eac1c4f | |
kamel5 | 5f7337b50c | |
kamel5 | e3becb6c61 | |
kamel5 | fdc8195174 | |
kamel5 | e7ea88c253 | |
kamel5 | 80cb1ec0ef | |
Peter Bieringer | 105fe893a2 | |
kamel5 | 402044d4c4 | |
kamel5 | 99d2bc6a86 | |
kamel5 | 15aa722410 | |
kamel5 | afa9cb77a3 | |
kamel5 | 1fc5379e2e | |
kamel5 | 7a70ed13a7 | |
kamel5 | 808fba2367 | |
kamel5 | 64599db339 | |
kamel5 | 628a28201b | |
kamel5 | 538d59ca4e | |
kamel5 | 78d424d256 | |
kamel5 | cba8fe1eb4 | |
kamel5 | b9093a6dca | |
kamel5 | c3f7a2cfdf | |
kamel5 | 6972a59e1b | |
kamel5 | f8b6b2cf1b | |
kamel5 | 0eaed1eb91 | |
kamel5 | a48427cffc | |
Peter Bieringer | 764f657620 | |
Peter Bieringer | dd30dacb5b | |
Peter Bieringer | 4bebeda1b0 | |
Peter Bieringer | 7d63e95471 | |
kamel5 | 78483aa3d8 | |
Peter Bieringer | 9def7d2b0d | |
Peter Bieringer | ca354a29e6 | |
kamel5 | 452a4384c2 | |
kamel5 | 1c393e23a5 | |
kamel5 | 6aeaf41467 | |
Peter Bieringer | b044321b1f | |
Peter Bieringer | 68d4d6acae | |
Peter Bieringer | 5e269ecaaa | |
Peter Bieringer | ea963c73eb | |
Peter Bieringer | 83c85870fb | |
Peter Bieringer | 6751c4cd4e | |
kamel5 | 4500b62b5c | |
kamel5 | f711a71722 | |
kamel5 | 1315e73217 | |
kamel5 | 858143ce2b | |
kamel5 | 3255936658 | |
Peter Bieringer | 1aead6d400 | |
kamel5 | c9c2d953a5 | |
Peter Bieringer | 646fcad7d5 | |
Peter Bieringer | 91d06d15a2 | |
Peter Bieringer | b9b82875ba | |
Karl Melscher | 16eb7e8e53 | |
Peter Bieringer | 2eef09e6aa | |
kamel5 | 59248ccebb | |
Peter Bieringer | efeb8d69c4 | |
Peter Bieringer | f127c8d948 | |
kamel5 | c0dad5a14f | |
Peter Bieringer | fdc1a7357e | |
kamel5 | bcc24977b0 | |
kamel5 | a4d51d31de | |
kamel5 | ddf861d6f6 | |
kamel5 | 7a6858b8f3 | |
Peter Bieringer | f3f4ee2d48 | |
Peter Bieringer | 66f090afdb | |
Peter Bieringer | 4c4b9f7837 | |
Peter Bieringer | ce520980fd | |
kamel5 | 5dbfd52784 | |
kamel5 | 4c4374ecb2 | |
kamel5 | c5f0b5d3f8 | |
kamel5 | bc9cb23ed7 | |
kamel5 | df8c8e2993 | |
kamel5 | 3fbc601315 | |
kamel5 | 8c9a0d7925 | |
kamel5 | eeb5bfefb2 | |
kamel5 | 029ac7e9e4 | |
kamel5 | 8ebb3610da | |
kamel5 | 5402edd41b | |
kamel5 | 6f14ddae8a | |
kamel5 | f156e44599 | |
kamel5 | 66351a48f9 | |
kamel5 | a685cbb131 | |
kamel5 | 751e903301 | |
kamel5 | 8a04a17fc0 | |
kamel5 | 9278f18cb9 | |
horchi | 5b03953fd1 | |
horchi | 9647640dc7 | |
horchi | e068cb93fd | |
horchi | beeb82bbda | |
louis | c8d54dbe25 | |
louis | f6c11ce9ea | |
louis | 2378bc8c4e | |
louis | 0ef5487e6f | |
louis | e75aaa6f33 | |
louis | 74f7250c74 | |
louis | e114338c4e | |
louis | d9ab1eb1ca | |
louis | cc1efd1d2e | |
louis | ead8056990 | |
louis | 49fbf2c00e | |
louis | 6b77310d70 | |
louis | a2f9e616ee | |
louis | 88982c3230 | |
louis | 6acc22e5c2 | |
louis | dddb273526 | |
louis | b8d055f568 | |
louis | 0ea566bacd | |
louis | 404b9f3add | |
louis | 8c28b0c0fb | |
louis | e3525032e8 | |
louis | 0534a8ae06 | |
louis | 54c385ca11 | |
louis | a79af20c34 | |
louis | 4f3c24df7b | |
louis | 4098ceddbf | |
louis | c4c4a10909 | |
louis | 3391710b8d | |
louis | 3b3046bc33 | |
louis | 3572c27dc9 | |
louis | 3b2944496a | |
louis | 0e04d4eaea | |
louis | f3a27ba22d | |
louis | 0460690ec8 | |
louis | 97a9c7e40f | |
louis | a9cbdf00fe | |
louis | 49823486f6 | |
louis | 754e462bc5 | |
louis | 81fbdacf68 | |
louis | 79623b6571 | |
louis | 7b26d65360 | |
louis | d8a0c880d5 | |
louis | 5d927af79c | |
louis | 87f3d895f7 | |
louis | 75668612be | |
louis | 2b1d941f39 | |
louis | 020984c5f3 | |
louis | 9611f9b011 | |
louis | e3a1577c7c | |
louis | 97d2d5795c | |
louis | ed8273883e | |
louis | aa8370363a | |
louis | 67ce4befdf | |
louis | e2f7852589 | |
louis | a57c44b068 | |
louis | ffb414cdee | |
louis | b41d0f2431 | |
louis | f3db608253 | |
louis | 01945e83fc | |
louis | 32b78b2f57 | |
louis | 8e98ebcd6b | |
louis | 7994fc200a |
128
HISTORY
128
HISTORY
|
@ -67,9 +67,9 @@ Version 0.0.3
|
|||
- fixed Bug that displaychannel was not shown after closing displaymenu with
|
||||
"backspace" (with active menuorg plugin)
|
||||
- fixed Bug with menuselection Patch
|
||||
- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and
|
||||
- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and
|
||||
currentitem
|
||||
- added dedicated tokens for posters and banners in <srapercontent> in
|
||||
- added dedicated tokens for posters and banners in <srapercontent> in
|
||||
displaychannel and displayreplay
|
||||
- added Plugin Interface
|
||||
- fixed crash when clearing a message in displaychannel and displayreplay
|
||||
|
@ -81,7 +81,7 @@ Version 0.0.4
|
|||
|
||||
Version 0.0.5
|
||||
|
||||
- added {channelnumber} and {channelname} Tokens in displaymenudetailepg
|
||||
- added {channelnumber} and {channelname} Tokens in displaymenudetailepg
|
||||
detailheader
|
||||
- fixed {hasicon} Token in displaymenu header
|
||||
- added {newmails} Token in displaychannel statusinfo, mailbox plugin
|
||||
|
@ -111,7 +111,7 @@ Version 0.0.8
|
|||
Version 0.1.0
|
||||
|
||||
- fixed display of color buttons in detailed views
|
||||
- fixed possible Nullpointer access in displaymenurootview
|
||||
- fixed possible Nullpointer access in displaymenurootview
|
||||
- added currentschedule viewelement in displaymenumain
|
||||
- fixed bug that wrong channel was shown in header of whatson
|
||||
if entering from whatsonnow
|
||||
|
@ -180,7 +180,7 @@ Version 0.1.6
|
|||
adds its vakues and potentially overrides valués from globals.xml
|
||||
- check icons, menuicons and skinparts additionally directly in skin folder
|
||||
to allow default images which can be used for all skins
|
||||
- fixed bug that setup variables are sometimes not identified in case two
|
||||
- fixed bug that setup variables are sometimes not identified in case two
|
||||
or more skin names start identically
|
||||
|
||||
Version 0.2.0
|
||||
|
@ -195,7 +195,7 @@ Version 0.2.1
|
|||
- some more nopacity optimizations - thanx@utility
|
||||
- added possibiliy to use submenus in the skin setup menus
|
||||
- reloading active skin directly after closing setup menu so that
|
||||
changes of setup parameters are immediately in use
|
||||
changes of setup parameters are immediately in use
|
||||
|
||||
Version 0.2.2
|
||||
|
||||
|
@ -260,7 +260,7 @@ Version 0.3.3
|
|||
no signal information will be fetched to improve performance.
|
||||
|
||||
Version 0.3.4
|
||||
|
||||
|
||||
- fixed backward compatibility to VDR version < 2.1.1 where
|
||||
cRecording::IsInUse() was introduced
|
||||
- automatically detect type of image if no file extension is available
|
||||
|
@ -270,7 +270,7 @@ Version 0.4.0
|
|||
|
||||
- fixed bug that time was not correctly drawn if a submenu implements
|
||||
its own time display
|
||||
- fixed bug that date was drawn every flush in displayreplay
|
||||
- fixed bug that date was drawn every flush in displayreplay
|
||||
- fixed bug in metrixhd timers menu
|
||||
- fixed bug that datetime was not correctly drawn if a submenu implements
|
||||
its own datetime display
|
||||
|
@ -290,7 +290,7 @@ Version 0.4.2
|
|||
- fixed bug that string tokens are not evaluated in area conditions
|
||||
- added possibility to draw a debug grid in views
|
||||
- added more info if debugImage is activted in config
|
||||
- added possibility for blinking images, texts, rectangles, ellipses
|
||||
- added possibility for blinking images, texts, rectangles, ellipses
|
||||
and slopes
|
||||
- adapted libskindesignerapi makefile for LCLBLD
|
||||
|
||||
|
@ -376,7 +376,7 @@ Version 0.5.3
|
|||
- added SVG Template parsing
|
||||
- fixed memory leak when creating fonts
|
||||
- fixed crash using animated images in plugins
|
||||
- added banner to displaymenuschedulescurrentview and
|
||||
- added banner to displaymenuschedulescurrentview and
|
||||
displaymenureplaycurrentview
|
||||
- immplemented areacontainers to group areas
|
||||
- fixed bug displaying pixmaps with transparency
|
||||
|
@ -406,10 +406,10 @@ Version 0.6.2
|
|||
Version 0.6.3
|
||||
|
||||
- implemented horizontal menus
|
||||
For displaying horizontal menus with VDR <= 2.2.x a VDR
|
||||
patch is required (see /patches/vdr-2.2.0_horizontal_menu.patch
|
||||
in the plugin source directory). Without this patch the keys
|
||||
left/right and up/down are not toggled in horizontal menus.
|
||||
For displaying horizontal menus with VDR <= 2.2.x a VDR
|
||||
patch is required (see /patches/vdr-2.2.0_horizontal_menu.patch
|
||||
in the plugin source directory). Without this patch the keys
|
||||
left/right and up/down are not toggled in horizontal menus.
|
||||
With VDR >= 2.3.1 this patch is not needed anymore.
|
||||
- added possibility to add conditions to <menuitems> elements
|
||||
- added possibility to define a viewelement several times with
|
||||
|
@ -418,7 +418,7 @@ Version 0.6.3
|
|||
- added "valign" option in <drawtextbox>. If the box height is set
|
||||
and the text does not need the complete height, with valign="center"
|
||||
the text can be placed horizontally centered inside the box borders.
|
||||
- implemented optional horizontal main-, recordings- and
|
||||
- implemented optional horizontal main-, recordings- and
|
||||
weatherforecast menu in metrixhd
|
||||
|
||||
Version 0.7.0
|
||||
|
@ -431,3 +431,101 @@ Version 0.7.1
|
|||
- added possibility to define help texts for skin setup parameters
|
||||
|
||||
Version 0.7.2
|
||||
|
||||
Version 1.2.4 (horchi)
|
||||
|
||||
- added compatibility to vdr 2.3.8
|
||||
|
||||
Version 1.2.5 (horchi)
|
||||
|
||||
- added timer type to epg2vdr interface
|
||||
|
||||
Version 1.2.6 (horchi)
|
||||
|
||||
- extended epg2vdr timer interface for schedules
|
||||
|
||||
Version 1.2.7 (horchi)
|
||||
|
||||
- changed menu numbering handling vor mcMain
|
||||
> now only numbers up to 999 are detected as 'Numbering'
|
||||
|
||||
Version 1.2.8 (kamel5)
|
||||
|
||||
- fixed some look sequence reports
|
||||
- Updated Makefile
|
||||
- Optimization for softhdcuvid
|
||||
- Refactor reruns
|
||||
- Update services/epgtimer.h
|
||||
- Refresh imgCache if OsdProvider was changed
|
||||
|
||||
Version 1.2.9
|
||||
- [pbiering] added tokens for framesPerSecond and isHD
|
||||
- [pbiering] improve HD detection code, catch also stream content 9
|
||||
|
||||
Version 1.2.10 (buggy)
|
||||
- [pbiering] added tokens for recordings: isUHD, isRadio
|
||||
- [pbiering] added token for channels: isUHD
|
||||
- [pbiering] expose to displaymenurecordings: recchannelname, recchannelid
|
||||
- [pbiering] retrieve ChannelName from 'info' and fallback via ChannelID from active channel list
|
||||
- [kamel5] Update skin estuary4vdr
|
||||
|
||||
Version 1.2.11 (buggy)
|
||||
- [pbiering] align displayed tuner number (0,1,2 -> 1,2,3)
|
||||
- [pbiering] SVDRP: do not reload in case plugin is not fully initialized (results in VDR crash)
|
||||
- [pbiering] SVDRP: respond with proper error message in case of OSD is active or parsing error
|
||||
- [kamel5] Fixed an error in displayreplay if no recording information are available
|
||||
|
||||
Version 1.2.12
|
||||
- [pbiering] added token for recordings: isRecording
|
||||
- [pbiering] fix crash caused by cVeDmDetailheaderRec::Parse introduced in 1.2.10
|
||||
|
||||
Version 1.2.13
|
||||
- [kamel5] A bug with timeshift in connection with global timers has been fixed
|
||||
- [kamel5] Fixed a bug in timeshift mode that prevented the progress bar from updating in pause mode
|
||||
- [kamel5] Update Skin estuary4vdr
|
||||
- Token eCeMenuSchedulesIT::durationminutes added
|
||||
- Token eLeMenuDefaultIT::devstatus added
|
||||
- [kamel5] An error with the remaining time in the channel display has been fixed
|
||||
- [kamel5] Revision cViewReplay::SetTimeShiftValues
|
||||
- [kamel5] In timeshift mode, the title of the actual playback position is displayed
|
||||
- [kamel5] Add token recstart to displayreplay
|
||||
- [kamel5] Add tokens eventstart and eventstop to eDRRecTitleST
|
||||
- [kamel5] Disabled timeshift display for non timeshift recordings
|
||||
- [kamel5] Add element timeShiftTimes with tokens recstart, playbacktime and timeshiftrest to displayreplay
|
||||
|
||||
Version 1.2.14
|
||||
|
||||
- [kamel5] Revert "Disabled timeshift display for non timeshift recordings"
|
||||
- [kamel5] Add a different display mode to timeshift for currently active timer recordings
|
||||
|
||||
Version 1.2.15
|
||||
|
||||
- [kamel5] Update Update italian tanslation in metrixhd and estuary4vdr
|
||||
- [pbiering] fix tuner device mapping in case tuners are not starting as first device
|
||||
- [kamel5] Fix cutting marks wasn't updated
|
||||
|
||||
Version 1.2.16
|
||||
- [pbiering] add additional recording flag {isInUse} - can be used in skins for e.g. records in cutting/copy(queue)
|
||||
- [pbiering] add additional <vdrstatus> exposing {vdrIsRecordingsHandlersActive} and {vdrIsRecording} - can be used in skins for e.g. IDLE/BUSY REC/FREE
|
||||
- [kamel5] Fix Incorrect detection of a recording that is currently running
|
||||
- [kamel5] Fix segfault with mpv plugin (thx to @lnj at vdr-portal.de)
|
||||
- [kamel5] Update skin estuary4vdr
|
||||
- [pbiering] add {vdrHasTimers} to <vdrstatus> - can be used in skins for e.g. REC/SCHED/FREE (in combination with {vdrIsRecording})
|
||||
- [pbiering] add <vdrstatus> also to displaymenu.xml to be able to display in header
|
||||
- [kamel5] Fix display of recording sign in display channel
|
||||
- [kamel5] Fix a device is currently recording
|
||||
- [kamel5] Fix update timer in the main menu
|
||||
|
||||
Version 1.2.17
|
||||
|
||||
- [kamel5] Fix display of events in channel display
|
||||
- [kamel5] Fix incorrect display of posters and banners in the recording menu
|
||||
- [kamel5] Fix display of the background in the display channel
|
||||
- [kamel5] Add token errors for recordings (VDR >= 2.5.4)
|
||||
- [kamel5] Update Skin estuary4vdr to display errors in recording info
|
||||
- [kamel5] Update Skin estuary4vdr
|
||||
|
||||
Version 1.2.18
|
||||
|
||||
- [pbiering] extend detection of isHD and isUHD in case of stored EPG info (event) is missing any information regarding video (e.g. if EPG is missing on a channel)
|
||||
- [kamel5] Fix compiler error
|
||||
|
|
25
Makefile
25
Makefile
|
@ -70,6 +70,7 @@ OBJS = $(PLUGIN).o \
|
|||
extensions/cairoimage.o \
|
||||
extensions/curlfuncs.o \
|
||||
extensions/fontmanager.o \
|
||||
extensions/globaltimers.o \
|
||||
extensions/imagecache.o \
|
||||
extensions/helpers.o \
|
||||
extensions/imageloader.o \
|
||||
|
@ -80,7 +81,6 @@ OBJS = $(PLUGIN).o \
|
|||
extensions/skinsetup.o \
|
||||
extensions/skinrepo.o \
|
||||
extensions/extrecinfo.o \
|
||||
extensions/timers.o \
|
||||
coreengine/animation.o \
|
||||
coreengine/attribute.o \
|
||||
coreengine/attributes.o \
|
||||
|
@ -138,7 +138,8 @@ $(SOFILE): SUB_LIBS = libskindesignerapi/libskindesignerapi.so.$(shell pkg-confi
|
|||
### Implicit rules:
|
||||
|
||||
%.o: %.c
|
||||
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -std=c++11 -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $<
|
||||
@echo CC $@
|
||||
$(Q)$(CXX) $(CXXFLAGS) $(CPPFLAGS) -std=c++11 -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $<
|
||||
|
||||
### Dependencies:
|
||||
|
||||
|
@ -158,17 +159,21 @@ I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLU
|
|||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
@echo MO $@
|
||||
$(Q)msgfmt -c -o $@ $<
|
||||
|
||||
$(I18Npot): $(wildcard *.c)
|
||||
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
|
||||
@echo GT $@
|
||||
$(Q)xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
|
||||
|
||||
%.po: $(I18Npot)
|
||||
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
|
||||
@echo PO $@
|
||||
$(Q)msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
|
||||
@touch $@
|
||||
|
||||
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
||||
install -D -m644 $< $@
|
||||
@echo IN $@
|
||||
$(Q)install -D -m644 $< $@
|
||||
|
||||
.PHONY: i18n
|
||||
i18n: $(I18Nmo) $(I18Npot)
|
||||
|
@ -178,10 +183,12 @@ install-i18n: $(I18Nmsgs)
|
|||
### Targets:
|
||||
|
||||
$(SOFILE): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) -std=c++11 $(LDFLAGS) -shared $(OBJS) $(LIBS) $(SUB_LIBS) -o $@
|
||||
@echo LD $@
|
||||
$(Q)$(CXX) $(CXXFLAGS) -std=c++11 $(LDFLAGS) -shared $(OBJS) $(LIBS) $(SUB_LIBS) -o $@
|
||||
|
||||
install-lib: $(SOFILE)
|
||||
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
||||
@echo IN $@
|
||||
$(Q)install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
||||
|
||||
install-themes:
|
||||
mkdir -p $(DESTDIR)$(VDRCONFDIR)/themes
|
||||
|
@ -197,7 +204,7 @@ install-scripts:
|
|||
mkdir -p $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR)
|
||||
cp -r scripts/* $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR)
|
||||
|
||||
install: install-subprojects install-lib install-i18n install-themes install-skins install-scripts
|
||||
install: install-lib install-i18n install-themes install-skins install-scripts install-subprojects
|
||||
|
||||
dist: $(I18Npo) clean
|
||||
@-rm -rf $(TMPDIR)/$(ARCHIVE)
|
||||
|
|
17
config.c
17
config.c
|
@ -16,11 +16,14 @@ cDesignerConfig::cDesignerConfig() {
|
|||
debugImageLoading = 0;
|
||||
replaceDecPoint = false;
|
||||
//settings for rerun display
|
||||
useSubtitleRerun = 0;
|
||||
rerunAmount = 10;
|
||||
rerunDistance = 2;
|
||||
rerunMaxChannel = 0;
|
||||
//max number of custom int and string tokens
|
||||
numCustomTokens = 10;
|
||||
//Frames per Second to display animations
|
||||
FPS = 50;
|
||||
//remember current skin and theme, osd size and osd fonts
|
||||
SetSkin();
|
||||
SetOSDSize();
|
||||
|
@ -365,7 +368,7 @@ bool cDesignerConfig::CheckVersion(string name, string &neededVersion) {
|
|||
}
|
||||
splitstring ver(version.c_str());
|
||||
vector<string> tokensVer = ver.split('.', 1);
|
||||
if (tokensVer.size() != 3) {
|
||||
if (tokensVer.size() < 3) {
|
||||
esyslog("skindesigner: incorrect version definition: %s", version.c_str());
|
||||
return false;
|
||||
}
|
||||
|
@ -459,6 +462,16 @@ bool cDesignerConfig::OsdSizeChanged(void) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// If softhddevice is suspended, it gives the video size 0x0
|
||||
// We use this for detect a play mode change and drop the cache, because it is corrupted after being suspended
|
||||
bool cDesignerConfig::PlayModeChanged(void) {
|
||||
if (mode_changed) {
|
||||
mode_changed = 0;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cDesignerConfig::SetOSDFonts(void) {
|
||||
fontFix = Setup.FontFix;
|
||||
fontOsd = Setup.FontOsd;
|
||||
|
@ -508,10 +521,12 @@ bool cDesignerConfig::SetupParse(const char *Name, const char *Value) {
|
|||
else if (!strcasecmp(Name, "LimitChannelLogoCache")) limitLogoCache = atoi(Value);
|
||||
else if (!strcasecmp(Name, "NumberLogosInitially")) numLogosPerSizeInitial = atoi(Value);
|
||||
else if (!strcasecmp(Name, "NumberLogosMax")) numLogosMax = atoi(Value);
|
||||
else if (!strcasecmp(Name, "UseSubtitleRerun")) useSubtitleRerun = atoi(Value);
|
||||
else if (!strcasecmp(Name, "RerunAmount")) rerunAmount = atoi(Value);
|
||||
else if (!strcasecmp(Name, "RerunDistance")) rerunDistance = atoi(Value);
|
||||
else if (!strcasecmp(Name, "RerunMaxChannel")) rerunMaxChannel = atoi(Value);
|
||||
else if (!strcasecmp(Name, "NumCustomTokens")) numCustomTokens = atoi(Value);
|
||||
else if (!strcasecmp(Name, "FPS")) FPS = atoi(Value);
|
||||
else pluginSetupParam = false;
|
||||
|
||||
if (!pluginSetupParam) {
|
||||
|
|
4
config.h
4
config.h
|
@ -92,6 +92,7 @@ public:
|
|||
bool SkinChanged(void);
|
||||
void SetOSDSize(void);
|
||||
bool OsdSizeChanged(void);
|
||||
bool PlayModeChanged(void);
|
||||
void SetOSDFonts(void);
|
||||
bool OsdFontsChanged(void);
|
||||
void SetOsdLanguage(void) { osdLanguage = Setup.OSDLanguage; };
|
||||
|
@ -110,12 +111,15 @@ public:
|
|||
int limitLogoCache;
|
||||
int numLogosMax;
|
||||
int debugImageLoading;
|
||||
int useSubtitleRerun;
|
||||
int rerunAmount;
|
||||
int rerunDistance;
|
||||
int rerunMaxChannel;
|
||||
int numCustomTokens;
|
||||
int FPS;
|
||||
//TemplateReload on Setup Close
|
||||
bool setupCloseDoReload;
|
||||
int mode_changed;
|
||||
};
|
||||
|
||||
#ifdef DEFINE_CONFIG
|
||||
|
|
|
@ -1,220 +1,40 @@
|
|||
#include "../config.h"
|
||||
#include "animation.h"
|
||||
#include <math.h>
|
||||
|
||||
/******************************************************************
|
||||
* cAnimation
|
||||
* cDetacher
|
||||
******************************************************************/
|
||||
cAnimation::cAnimation(cScrollable *scrollable) : cThread("scroller") {
|
||||
this->scrollable = scrollable;
|
||||
this->detachable = NULL;
|
||||
this->fadable = NULL;
|
||||
this->shiftable = NULL;
|
||||
this->blinkable = NULL;
|
||||
waitOnWakeup = false;
|
||||
keepSleeping = false;
|
||||
doAnimation = true;
|
||||
modeIn = false;
|
||||
blinkFunc = -1;
|
||||
}
|
||||
|
||||
cAnimation::cAnimation(cDetachable *detachable, bool wait, bool animation) : cThread("detached") {
|
||||
this->scrollable = NULL;
|
||||
cDetacher::cDetacher(cDetachable *detachable, bool wait, bool animation) : cThread("detacher thread") {
|
||||
this->detachable = detachable;
|
||||
this->fadable = NULL;
|
||||
this->shiftable = NULL;
|
||||
this->blinkable = NULL;
|
||||
waitOnWakeup = wait;
|
||||
keepSleeping = false;
|
||||
doAnimation = animation;
|
||||
modeIn = false;
|
||||
blinkFunc = -1;
|
||||
}
|
||||
|
||||
cAnimation::cAnimation(cFadable *fadable, bool fadein) : cThread("fadable") {
|
||||
this->scrollable = NULL;
|
||||
this->detachable = NULL;
|
||||
this->fadable = fadable;
|
||||
this->shiftable = NULL;
|
||||
this->blinkable = NULL;
|
||||
waitOnWakeup = false;
|
||||
keepSleeping = false;
|
||||
doAnimation = true;
|
||||
modeIn = fadein;
|
||||
blinkFunc = -1;
|
||||
}
|
||||
|
||||
cAnimation::cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool shiftin) : cThread("shiftable") {
|
||||
this->scrollable = NULL;
|
||||
this->detachable = NULL;
|
||||
this->fadable = NULL;
|
||||
this->shiftable = shiftable;
|
||||
this->blinkable = NULL;
|
||||
waitOnWakeup = false;
|
||||
keepSleeping = false;
|
||||
doAnimation = true;
|
||||
modeIn = shiftin;
|
||||
shiftstart = start;
|
||||
shiftend = end;
|
||||
blinkFunc = -1;
|
||||
}
|
||||
|
||||
cAnimation::cAnimation(cBlinkable *blinkable, int func) : cThread("blinking") {
|
||||
this->scrollable = NULL;
|
||||
this->detachable = NULL;
|
||||
this->fadable = NULL;
|
||||
this->shiftable = NULL;
|
||||
this->blinkable = blinkable;
|
||||
waitOnWakeup = false;
|
||||
keepSleeping = false;
|
||||
doAnimation = true;
|
||||
modeIn = false;
|
||||
blinkFunc = func;
|
||||
}
|
||||
|
||||
cAnimation::~cAnimation(void) {
|
||||
cDetacher::~cDetacher(void) {
|
||||
sleepWait.Signal();
|
||||
Cancel(2);
|
||||
}
|
||||
|
||||
void cAnimation::WakeUp(void) {
|
||||
void cDetacher::WakeUp(void) {
|
||||
sleepWait.Signal();
|
||||
}
|
||||
|
||||
void cAnimation::ResetSleep(void) {
|
||||
void cDetacher::ResetSleep(void) {
|
||||
keepSleeping = true;
|
||||
sleepWait.Signal();
|
||||
}
|
||||
|
||||
void cAnimation::Stop(bool deletePixmaps) {
|
||||
void cDetacher::Stop(bool deletePixmaps) {
|
||||
sleepWait.Signal();
|
||||
Cancel(2);
|
||||
if (scrollable && deletePixmaps)
|
||||
scrollable->StopScrolling();
|
||||
}
|
||||
|
||||
void cAnimation::Action(void) {
|
||||
if (scrollable) {
|
||||
Scroll();
|
||||
scrollable->UnregisterAnimation();
|
||||
} else if (detachable) {
|
||||
Detach();
|
||||
} else if (fadable) {
|
||||
Fade();
|
||||
fadable->UnregisterAnimation();
|
||||
} else if (shiftable) {
|
||||
Shift();
|
||||
shiftable->UnregisterAnimation();
|
||||
} else if (blinkable) {
|
||||
blinkable->RegisterAnimation();
|
||||
Blink();
|
||||
blinkable->UnregisterAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
void cAnimation::Sleep(int duration) {
|
||||
//sleep should wake up itself, so no infinit wait allowed
|
||||
if (duration <= 0)
|
||||
void cDetacher::Action(void) {
|
||||
if (!detachable) {
|
||||
return;
|
||||
do {
|
||||
keepSleeping = false;
|
||||
sleepWait.Wait(duration);
|
||||
} while (keepSleeping);
|
||||
}
|
||||
|
||||
void cAnimation::Wait(void) {
|
||||
//wait has to be waked up from outside
|
||||
sleepWait.Wait(0);
|
||||
}
|
||||
|
||||
void cAnimation::Scroll(void) {
|
||||
int delay = scrollable->ScrollDelay();
|
||||
Sleep(delay);
|
||||
scrollable->RegisterAnimation();
|
||||
if (!Running()) return;
|
||||
|
||||
eOrientation orientation = scrollable->ScrollOrientation();
|
||||
int scrollTotal = 0;
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
scrollTotal = scrollable->ScrollWidth();
|
||||
} else if (orientation == eOrientation::vertical) {
|
||||
scrollTotal = scrollable->ScrollHeight();
|
||||
}
|
||||
|
||||
eScrollMode mode = scrollable->ScrollMode();
|
||||
bool carriageReturn = (mode == eScrollMode::carriagereturn) ? true : false;
|
||||
|
||||
eScrollSpeed speed = scrollable->ScrollSpeed();
|
||||
int frameTime = 30;
|
||||
if (speed == eScrollSpeed::slow)
|
||||
frameTime = 50;
|
||||
else if (speed == eScrollSpeed::medium)
|
||||
frameTime = 30;
|
||||
else if (speed == eScrollSpeed::fast)
|
||||
frameTime = 15;
|
||||
|
||||
if (!Running()) return;
|
||||
|
||||
scrollable->StartScrolling();
|
||||
|
||||
int drawPortX = 0;
|
||||
int drawPortY = 0;
|
||||
int scrollDelta = 1;
|
||||
|
||||
bool doSleep = false;
|
||||
while (Running()) {
|
||||
if (doSleep) {
|
||||
Sleep(delay);
|
||||
doSleep = false;
|
||||
}
|
||||
if (!Running()) return;
|
||||
uint64_t now = cTimeMs::Now();
|
||||
|
||||
cPoint drawPortPoint(0,0);
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
|
||||
drawPortX -= scrollDelta;
|
||||
if (abs(drawPortX) > scrollTotal) {
|
||||
Sleep(delay);
|
||||
if (carriageReturn) {
|
||||
drawPortX = 0;
|
||||
doSleep = true;
|
||||
} else {
|
||||
scrollDelta *= -1;
|
||||
drawPortX -= scrollDelta;
|
||||
}
|
||||
}
|
||||
drawPortPoint.SetX(drawPortX);
|
||||
|
||||
} else if (orientation == eOrientation::vertical) {
|
||||
|
||||
drawPortY -= scrollDelta;
|
||||
if (abs(drawPortY) > scrollTotal) {
|
||||
Sleep(delay);
|
||||
drawPortY = 0;
|
||||
doSleep = true;
|
||||
}
|
||||
drawPortPoint.SetY(drawPortY);
|
||||
|
||||
}
|
||||
|
||||
if (!Running()) return;
|
||||
scrollable->SetDrawPort(drawPortPoint);
|
||||
|
||||
if (!Running()) return;
|
||||
scrollable->Flush(true);
|
||||
|
||||
if (orientation == eOrientation::horizontal && !carriageReturn && (drawPortX == 0)) {
|
||||
scrollDelta *= -1;
|
||||
doSleep = true;
|
||||
}
|
||||
|
||||
int delta = cTimeMs::Now() - now;
|
||||
if (delta < frameTime)
|
||||
Sleep(frameTime - delta);
|
||||
}
|
||||
}
|
||||
|
||||
void cAnimation::Detach(void) {
|
||||
if (waitOnWakeup) {
|
||||
Wait();
|
||||
int delay = 50 + detachable->Delay();
|
||||
|
@ -224,155 +44,636 @@ void cAnimation::Detach(void) {
|
|||
if (delay > 0)
|
||||
Sleep(delay);
|
||||
}
|
||||
if (!Running()) return;
|
||||
|
||||
detachable->ParseDetached();
|
||||
if (!Running()) return;
|
||||
detachable->RenderDetached();
|
||||
if (!Running()) return;
|
||||
if (!doAnimation)
|
||||
detachable->Flush(false);
|
||||
detachable->Flush();
|
||||
if (!Running()) return;
|
||||
if (doAnimation) {
|
||||
detachable->StartAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
void cAnimation::Fade(void) {
|
||||
int fadetime = fadable->FadeTime();
|
||||
int frametime = 1000 / FPS;
|
||||
int step = 100.0f / ((double)fadetime / (double)frametime);
|
||||
uint64_t start = cTimeMs::Now();
|
||||
int transparency = 0;
|
||||
if (modeIn) {
|
||||
transparency = 100 - step;
|
||||
} else {
|
||||
transparency = step;
|
||||
}
|
||||
//wait configured delay if not already done by detacher
|
||||
if (!fadable->Detached()) {
|
||||
int delay = fadable->Delay();
|
||||
if (delay > 0)
|
||||
Sleep(delay);
|
||||
}
|
||||
fadable->RegisterAnimation();
|
||||
while (Running() || !modeIn) {
|
||||
uint64_t now = cTimeMs::Now();
|
||||
if (Running() || !modeIn)
|
||||
fadable->SetTransparency(transparency, !modeIn);
|
||||
if (Running() || !modeIn)
|
||||
fadable->Flush(true);
|
||||
int delta = cTimeMs::Now() - now;
|
||||
if ((Running() || !modeIn) && (delta < frametime)) {
|
||||
Sleep(frametime - delta);
|
||||
}
|
||||
if ((int)(now - start) > fadetime) {
|
||||
if ((Running() && modeIn) && transparency > 0) {
|
||||
fadable->SetTransparency(0);
|
||||
fadable->Flush(true);
|
||||
} else if (!modeIn && transparency < 100) {
|
||||
fadable->SetTransparency(100, true);
|
||||
fadable->Flush(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (modeIn) {
|
||||
transparency -= step;
|
||||
if (transparency < 0)
|
||||
transparency = 0;
|
||||
} else {
|
||||
transparency += step;
|
||||
if (transparency > 100)
|
||||
transparency = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cAnimation::Shift(void) {
|
||||
int shifttime = shiftable->ShiftTime();
|
||||
eShiftMode mode = (eShiftMode)shiftable->ShiftMode();
|
||||
//in shiftmode slowedDown shifting is done starting with slowratio % faster
|
||||
//at start. Then speed reduces linear to (100 - slowratio)% at end
|
||||
//for me 60 is a nice value :-)
|
||||
int slowRatio = 60;
|
||||
|
||||
int frametime = 1000 / FPS;
|
||||
int steps = (double)shifttime / (double)frametime;
|
||||
if (steps < 2)
|
||||
void cDetacher::Sleep(int duration) {
|
||||
if (duration <= 0)
|
||||
return;
|
||||
int stepXLinear = 0;
|
||||
int stepYLinear = 0;
|
||||
if (shiftstart.X() == shiftend.X()) {
|
||||
stepYLinear = (shiftend.Y() - shiftstart.Y()) / steps;
|
||||
} else if (shiftstart.Y() == shiftend.Y()) {
|
||||
stepXLinear = (shiftend.X() - shiftstart.X()) / steps;
|
||||
} else {
|
||||
stepXLinear = (shiftend.X() - shiftstart.X()) / steps;
|
||||
stepYLinear = (shiftend.Y() - shiftstart.Y()) / steps;
|
||||
}
|
||||
int stepX = stepXLinear;
|
||||
int stepY = stepYLinear;
|
||||
do {
|
||||
keepSleeping = false;
|
||||
sleepWait.Wait(duration);
|
||||
} while (keepSleeping);
|
||||
}
|
||||
|
||||
cPoint pos;
|
||||
if (modeIn)
|
||||
pos = shiftstart;
|
||||
void cDetacher::Wait(void) {
|
||||
//wait has to be waked up from outside
|
||||
sleepWait.Wait(0);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cAnimaton
|
||||
******************************************************************/
|
||||
cAnimation::cAnimation(void) {
|
||||
started = 0;
|
||||
finished = false;
|
||||
persistent = false;
|
||||
frametime = 1000 / config.FPS;
|
||||
}
|
||||
|
||||
cAnimation::~cAnimation(void) {
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cScroller
|
||||
******************************************************************/
|
||||
cScroller::cScroller(cScrollable *scrollable) {
|
||||
this->scrollable = scrollable;
|
||||
paused = true;
|
||||
pauseTime = 0;
|
||||
scrollingStarted = false;
|
||||
secondDelay = false;
|
||||
delScrollPix = true;
|
||||
Init();
|
||||
}
|
||||
|
||||
cScroller::~cScroller(void) {
|
||||
}
|
||||
|
||||
void cScroller::Init(void) {
|
||||
delay = scrollable->ScrollDelay();
|
||||
orientation = scrollable->ScrollOrientation();
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
scrollLength = scrollable->ScrollWidth();
|
||||
} else if (orientation == eOrientation::vertical) {
|
||||
scrollLength = scrollable->ScrollHeight();
|
||||
}
|
||||
eScrollMode mode = scrollable->ScrollMode();
|
||||
carriageReturn = (mode == eScrollMode::carriagereturn) ? true : false;
|
||||
drawPortX = 0.0f;
|
||||
drawPortY = 0.0f;
|
||||
eScrollSpeed speed = scrollable->ScrollSpeed();
|
||||
if (speed == eScrollSpeed::slow)
|
||||
scrollDelta = 0.5f;
|
||||
else if (speed == eScrollSpeed::fast)
|
||||
scrollDelta = 2.0f;
|
||||
else
|
||||
pos = shiftend;
|
||||
scrollDelta = 1.0f;
|
||||
}
|
||||
|
||||
//wait configured delay if not already done by detacher
|
||||
if (!shiftable->Detached()) {
|
||||
int delay = shiftable->Delay();
|
||||
if (delay > 0)
|
||||
Sleep(delay);
|
||||
void cScroller::Reactivate(void) {}
|
||||
|
||||
void cScroller::SetInitial(void) {
|
||||
scrollable->SetScrollingStarted();
|
||||
}
|
||||
|
||||
bool cScroller::Pause(void) {
|
||||
if (!paused)
|
||||
return false;
|
||||
if ((pauseTime + frametime) > delay) {
|
||||
paused = false;
|
||||
pauseTime = 0;
|
||||
return false;
|
||||
}
|
||||
shiftable->RegisterAnimation();
|
||||
shiftable->SetStartShifting();
|
||||
uint64_t start = cTimeMs::Now();
|
||||
bool finished = false;
|
||||
while (Running() || !modeIn) {
|
||||
uint64_t now = cTimeMs::Now();
|
||||
if (Running() || !modeIn)
|
||||
shiftable->SetPosition(pos, shiftend);
|
||||
if (Running() || !modeIn)
|
||||
shiftable->Flush(true);
|
||||
int delta = cTimeMs::Now() - now;
|
||||
if ((Running() || !modeIn) && (delta < frametime)) {
|
||||
cCondWait::SleepMs(frametime - delta);
|
||||
pauseTime += frametime;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cScroller::Overflow(void) {
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
if (!carriageReturn && (drawPortX >= 1)) {
|
||||
drawPortX = 0;
|
||||
scrollDelta *= -1;
|
||||
paused = true;
|
||||
return true;
|
||||
}
|
||||
if ((int)(now - start) > shifttime) {
|
||||
finished = true;
|
||||
if ((Running() && modeIn) && pos != shiftend) {
|
||||
shiftable->SetPosition(shiftend, shiftend);
|
||||
shiftable->Flush(true);
|
||||
if (carriageReturn && (drawPortX >= 0) && secondDelay) {
|
||||
cPoint drawPortPoint(drawPortX,0);
|
||||
scrollable->SetDrawPort(drawPortPoint);
|
||||
drawPortX = -1;
|
||||
paused = true;
|
||||
secondDelay = false;
|
||||
return true;
|
||||
}
|
||||
if (abs((int)drawPortX) < scrollLength)
|
||||
return false;
|
||||
if (carriageReturn) {
|
||||
drawPortX = 0;
|
||||
secondDelay = true;
|
||||
} else {
|
||||
scrollDelta *= -1;
|
||||
drawPortX -= scrollDelta;
|
||||
}
|
||||
} else if (orientation == eOrientation::vertical) {
|
||||
if ((drawPortY >= 0) && secondDelay) {
|
||||
cPoint drawPortPoint(0, drawPortY);
|
||||
scrollable->SetDrawPort(drawPortPoint);
|
||||
drawPortY = -1;
|
||||
paused = true;
|
||||
secondDelay = false;
|
||||
return true;
|
||||
}
|
||||
if (abs((int)drawPortY) < scrollLength)
|
||||
return false;
|
||||
secondDelay = true;
|
||||
drawPortY = 0;
|
||||
}
|
||||
paused = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void cScroller::SetFinished(void) {
|
||||
finished = true;
|
||||
if (delScrollPix) {
|
||||
scrollable->StopScrolling();
|
||||
}
|
||||
}
|
||||
|
||||
bool cScroller::Tick(void) {
|
||||
if (finished) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Pause())
|
||||
return true;
|
||||
|
||||
if (!scrollingStarted) {
|
||||
scrollable->StartScrolling();
|
||||
scrollingStarted = true;
|
||||
}
|
||||
|
||||
if (Overflow())
|
||||
return true;
|
||||
|
||||
cPoint drawPortPoint(0,0);
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
drawPortX -= scrollDelta;
|
||||
drawPortPoint.SetX(drawPortX);
|
||||
} else if (orientation == eOrientation::vertical) {
|
||||
drawPortY -= scrollDelta;
|
||||
drawPortPoint.SetY(drawPortY);
|
||||
}
|
||||
scrollable->SetDrawPort(drawPortPoint);
|
||||
return true;
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cFader
|
||||
******************************************************************/
|
||||
cFader::cFader(cFadable *fadable) {
|
||||
this->fadable = fadable;
|
||||
fadein = true;
|
||||
fadetime = fadable->FadeTime();
|
||||
step = 100.0f / ((double)fadetime / (double)frametime);
|
||||
transparency = 100;
|
||||
hideWhenFinished = false;
|
||||
}
|
||||
|
||||
cFader::~cFader(void) {
|
||||
}
|
||||
|
||||
void cFader::Reactivate(void) {
|
||||
started = 0;
|
||||
finished = false;
|
||||
fadein = false;
|
||||
}
|
||||
|
||||
void cFader::SetInitial(void) {
|
||||
fadable->SetTransparency(transparency);
|
||||
}
|
||||
|
||||
void cFader::SetFadeOut(void) {
|
||||
fadein = false;
|
||||
transparency = 0;
|
||||
}
|
||||
|
||||
void cFader::SetFinished(void) {
|
||||
finished = true;
|
||||
if (hideWhenFinished)
|
||||
fadable->SetTransparency(100);
|
||||
}
|
||||
|
||||
bool cFader::Tick(void) {
|
||||
if (finished) {
|
||||
if (fadein)
|
||||
fadable->SetTransparency(0);
|
||||
else
|
||||
fadable->SetTransparency(100);
|
||||
return false;
|
||||
}
|
||||
if (!started) {
|
||||
started = cTimeMs::Now();
|
||||
}
|
||||
|
||||
if ((int)(cTimeMs::Now() - started) > fadetime) {
|
||||
if (fadein)
|
||||
fadable->SetTransparency(0);
|
||||
else
|
||||
fadable->SetTransparency(100);
|
||||
finished = true;
|
||||
return false;
|
||||
}
|
||||
fadable->SetTransparency(transparency);
|
||||
if (fadein) {
|
||||
transparency -= step;
|
||||
} else {
|
||||
transparency += step;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cShifter
|
||||
******************************************************************/
|
||||
cShifter::cShifter(cShiftable *shiftable) {
|
||||
this->shiftable = shiftable;
|
||||
step = 0;
|
||||
shiftin = true;
|
||||
shifttime = 0;
|
||||
x = 0.0f;
|
||||
y = 0.0f;
|
||||
stepXLinear = 0.0f;
|
||||
stepYLinear = 0.0f;
|
||||
stepsFast = 0;
|
||||
stepXFast = 0.0f;
|
||||
stepXSlow = 0.0f;
|
||||
stepYFast = 0.0f;
|
||||
stepYSlow = 0.0f;
|
||||
Init();
|
||||
}
|
||||
|
||||
cShifter::~cShifter(void) {
|
||||
}
|
||||
|
||||
void cShifter::Init(void) {
|
||||
shifttime = shiftable->ShiftTime();
|
||||
mode = (eShiftMode)shiftable->ShiftMode();
|
||||
shiftable->ShiftPositions(&start, &end);
|
||||
int steps = (double)shifttime / (double)frametime;
|
||||
if (steps <= 0) steps = 1;
|
||||
float percentFast = 33.3f;
|
||||
float distanceFast = 85.0f;
|
||||
stepsFast = (float)steps * percentFast / 100.0f;
|
||||
if (start.X() == end.X()) {
|
||||
stepYLinear = (float)(end.Y() - start.Y()) / (float)steps;
|
||||
stepYFast = (float)(end.Y() - start.Y()) * distanceFast / 100.0f / (float)stepsFast;
|
||||
stepYSlow = (float)(end.Y() - start.Y()) * (100.0f - distanceFast) / 100.0f / (float)(steps-stepsFast);
|
||||
} else if (start.Y() == end.Y()) {
|
||||
stepXLinear = (float)(end.X() - start.X()) / (float)steps;
|
||||
stepXFast = (float)(end.X() - start.X()) * distanceFast / 100.0f / (float)stepsFast;
|
||||
stepXSlow = (float)(end.X() - start.X()) * (100.0f - distanceFast) / 100.0f / (float)(steps-stepsFast);
|
||||
} else {
|
||||
stepXLinear = (float)(end.X() - start.X()) / (float)steps;
|
||||
stepXFast = (float)(end.X() - start.X()) * distanceFast / 100.0f / (float)stepsFast;
|
||||
stepXSlow = (float)(end.X() - start.X()) * (100.0f - distanceFast) / 100.0f / (float)(steps-stepsFast);
|
||||
stepYLinear = (float)(end.Y() - start.Y()) / (float)steps;
|
||||
stepYFast = (float)(end.Y() - start.Y()) * distanceFast / 100.0f / (float)stepsFast;
|
||||
stepYSlow = (float)(end.Y() - start.Y()) * (100.0f - distanceFast) / 100.0f / (float)(steps-stepsFast);
|
||||
}
|
||||
if (shiftin) {
|
||||
x = start.X();
|
||||
y = start.Y();
|
||||
} else {
|
||||
x = end.X();
|
||||
y = end.Y();
|
||||
}
|
||||
}
|
||||
|
||||
void cShifter::Reactivate(void) {
|
||||
started = 0;
|
||||
finished = false;
|
||||
shiftin = false;
|
||||
step = 0;
|
||||
Init();
|
||||
}
|
||||
|
||||
void cShifter::SetInitial(void) {
|
||||
cPoint pos(x, y);
|
||||
shiftable->SetPosition(pos, end);
|
||||
}
|
||||
|
||||
void cShifter::NextPosition(void) {
|
||||
if (mode == eShiftMode::linear) {
|
||||
if (shiftin) {
|
||||
x += stepXLinear;
|
||||
y += stepYLinear;
|
||||
} else {
|
||||
x -= stepXLinear;
|
||||
y -= stepYLinear;
|
||||
}
|
||||
} else if (mode == eShiftMode::slowedDown) {
|
||||
if (shiftin) {
|
||||
if (step <= stepsFast) {
|
||||
x += stepXFast;
|
||||
y += stepYFast;
|
||||
} else {
|
||||
x += stepXSlow;
|
||||
y += stepYSlow;
|
||||
}
|
||||
} else {
|
||||
if (step <= stepsFast) {
|
||||
x -= stepXFast;
|
||||
y -= stepYFast;
|
||||
} else {
|
||||
x -= stepXSlow;
|
||||
y -= stepYSlow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool cShifter::Tick(void) {
|
||||
if (finished)
|
||||
return false;
|
||||
if (!started) {
|
||||
started = cTimeMs::Now();
|
||||
}
|
||||
if ((int)(cTimeMs::Now() - started) > shifttime) {
|
||||
if (shiftin)
|
||||
shiftable->SetPosition(end, end);
|
||||
else
|
||||
shiftable->SetPosition(start, end);
|
||||
finished = true;
|
||||
return false;
|
||||
}
|
||||
cPoint pos(x, y);
|
||||
shiftable->SetPosition(pos, end);
|
||||
step++;
|
||||
NextPosition();
|
||||
return true;
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cListShifter
|
||||
******************************************************************/
|
||||
cListShifter::cListShifter(cListShiftable *shiftable) {
|
||||
this->shiftable = shiftable;
|
||||
shifttime = shiftable->ListShiftTime();
|
||||
distance = shiftable->ShiftDistance();
|
||||
orientation = shiftable->ShiftOrientation();
|
||||
int steps = (double)shifttime / (double)frametime;
|
||||
if (steps <= 0) steps = 1;
|
||||
step = distance / steps;
|
||||
shiftin = true;
|
||||
fromtop = true;
|
||||
}
|
||||
|
||||
cListShifter::~cListShifter(void) {
|
||||
}
|
||||
|
||||
void cListShifter::Reactivate(void) {}
|
||||
|
||||
void cListShifter::SetInitial(void) {
|
||||
if (shiftin) {
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
if (fromtop) {
|
||||
pos.SetX(-1 * distance);
|
||||
pos.SetY(0);
|
||||
} else {
|
||||
pos.SetX(distance);
|
||||
pos.SetY(0);
|
||||
}
|
||||
} else {
|
||||
if (fromtop) {
|
||||
pos.SetX(0);
|
||||
pos.SetY(-1 * distance);
|
||||
} else {
|
||||
pos.SetX(0);
|
||||
pos.SetY(distance);
|
||||
}
|
||||
}
|
||||
}
|
||||
shiftable->SetIndicatorPosition(pos);
|
||||
}
|
||||
|
||||
void cListShifter::NextPosition(void) {
|
||||
int x = pos.X();
|
||||
int y = pos.Y();
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
if (fromtop) {
|
||||
pos.SetX(x+step);
|
||||
} else {
|
||||
pos.SetX(x-step);
|
||||
}
|
||||
} else {
|
||||
if (fromtop) {
|
||||
pos.SetY(y+step);
|
||||
} else {
|
||||
pos.SetY(y-step);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cListShifter::EndPosition(void) {
|
||||
if (shiftin) {
|
||||
pos.SetX(0);
|
||||
pos.SetY(0);
|
||||
} else {
|
||||
if (orientation == eOrientation::horizontal) {
|
||||
pos.SetX(distance);
|
||||
} else {
|
||||
pos.SetY(distance);
|
||||
}
|
||||
}
|
||||
shiftable->SetIndicatorPosition(pos);
|
||||
}
|
||||
|
||||
bool cListShifter::Tick(void) {
|
||||
if (finished) {
|
||||
EndPosition();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!started) {
|
||||
started = cTimeMs::Now();
|
||||
}
|
||||
|
||||
if ((int)(cTimeMs::Now() - started) > shifttime) {
|
||||
EndPosition();
|
||||
finished = true;
|
||||
return false;
|
||||
}
|
||||
shiftable->SetIndicatorPosition(pos);
|
||||
NextPosition();
|
||||
return true;
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cBlinker
|
||||
******************************************************************/
|
||||
cBlinker::cBlinker(cBlinkable *blinkable, int blinkFunc) {
|
||||
this->blinkable = blinkable;
|
||||
this->blinkFunc = blinkFunc;
|
||||
freq = blinkable->BlinkFreq(blinkFunc);
|
||||
blinkOn = false;
|
||||
paused = true;
|
||||
pauseTime = 0;
|
||||
}
|
||||
|
||||
cBlinker::~cBlinker(void) {
|
||||
}
|
||||
|
||||
void cBlinker::Reactivate(void) {}
|
||||
void cBlinker::SetInitial(void) {}
|
||||
|
||||
bool cBlinker::Pause(void) {
|
||||
if (!paused)
|
||||
return false;
|
||||
if ((pauseTime + frametime) > freq) {
|
||||
paused = false;
|
||||
pauseTime = 0;
|
||||
return false;
|
||||
}
|
||||
pauseTime += frametime;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cBlinker::Tick(void) {
|
||||
if (finished)
|
||||
return false;
|
||||
if (Pause())
|
||||
return true;
|
||||
blinkable->DoBlink(blinkFunc, blinkOn);
|
||||
blinkOn = !blinkOn;
|
||||
paused = true;
|
||||
pauseTime = 0;
|
||||
return true;
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cAnimator
|
||||
******************************************************************/
|
||||
cAnimator::cAnimator(cSdOsd *osd) : cThread("animator thread") {
|
||||
this->osd = osd;
|
||||
timeneeded = 0;
|
||||
timeslice = 1000 / config.FPS;
|
||||
}
|
||||
|
||||
cAnimator::~cAnimator(void) {
|
||||
Stop();
|
||||
}
|
||||
|
||||
void cAnimator::Sleep(uint64_t start) {
|
||||
timeneeded = cTimeMs::Now() - start;
|
||||
int sleepTime = (timeslice - timeneeded) > 0 ? timeslice - timeneeded : 0;
|
||||
if (sleepTime)
|
||||
sleepWait.Wait(sleepTime);
|
||||
}
|
||||
|
||||
void cAnimator::DoTick(bool &animActive) {
|
||||
animLock.Lock();
|
||||
for (cAnimation *animation = animations.First(); animation; animation = animations.Next(animation)) {
|
||||
if (Running()) {
|
||||
bool currentAnimActive = animation->Tick();
|
||||
animActive = animActive || currentAnimActive;
|
||||
}
|
||||
}
|
||||
animLock.Unlock();
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* Cleanup Anims
|
||||
* removes finished anims
|
||||
* remembers persistent anims
|
||||
*****************************************************************************************/
|
||||
void cAnimator::CleanupAnims(void) {
|
||||
bool found;
|
||||
animLock.Lock();
|
||||
do {
|
||||
found = false;
|
||||
for (cAnimation *animation = animations.First(); animation; animation = animations.Next(animation)) {
|
||||
if (!animation->Finished())
|
||||
continue;
|
||||
if (animation->Persistent()) {
|
||||
animations.Del(animation, false);
|
||||
animationsPersistent.Add(animation);
|
||||
} else {
|
||||
animations.Del(animation);
|
||||
}
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
if (mode == eShiftMode::slowedDown) {
|
||||
double t = (double)(now - start) / (double)shifttime;
|
||||
double factor = 1.0f + (double)slowRatio / 100.0f - 2.0f * ((double)slowRatio / 100.0f) * t;
|
||||
stepX = stepXLinear * factor;
|
||||
stepY = stepYLinear * factor;
|
||||
}
|
||||
if (modeIn) {
|
||||
pos.Set(pos.X() + stepX, pos.Y() + stepY);
|
||||
} else {
|
||||
pos.Set(pos.X() - stepX, pos.Y() - stepY);
|
||||
}
|
||||
}
|
||||
if (!finished) {
|
||||
shiftable->SetPosition(shiftend, shiftend);
|
||||
}
|
||||
shiftable->SetEndShifting();
|
||||
} while (found);
|
||||
animLock.Unlock();
|
||||
}
|
||||
|
||||
void cAnimation::Blink(void) {
|
||||
int freq = blinkable->BlinkFreq(blinkFunc);
|
||||
bool blinkOn = false;
|
||||
while (Running()) {
|
||||
Sleep(freq);
|
||||
if (Running())
|
||||
blinkable->DoBlink(blinkFunc, blinkOn);
|
||||
if (Running())
|
||||
blinkable->Flush(true);
|
||||
blinkOn = !blinkOn;
|
||||
/*****************************************************************************************
|
||||
* Main Loop
|
||||
*****************************************************************************************/
|
||||
void cAnimator::Action(void) {
|
||||
while(Running()) {
|
||||
bool animActive = false;
|
||||
uint64_t start = cTimeMs::Now();
|
||||
DoTick(animActive); if (!Running()) break;
|
||||
osd->Flush(); if (!Running()) break;
|
||||
CleanupAnims(); if (!Running()) break;
|
||||
if (!animActive) {
|
||||
pauseWait.Wait();
|
||||
} else {
|
||||
Sleep(start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* Add Animation
|
||||
* if startAnim is set to true, main loop gets waked up
|
||||
*****************************************************************************************/
|
||||
void cAnimator::AddAnimation(cAnimation *animation, bool startAnim) {
|
||||
animation->SetInitial();
|
||||
animLock.Lock();
|
||||
animations.Ins(animation);
|
||||
animLock.Unlock();
|
||||
if (startAnim)
|
||||
pauseWait.Signal();
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* Remove Animation
|
||||
* animation will be set to finished and removed later by Cleanup()
|
||||
*****************************************************************************************/
|
||||
void cAnimator::RemoveAnimation(cAnimation *remove) {
|
||||
animLock.Lock();
|
||||
for (cAnimation *animation = animations.First(); animation; animation = animations.Next(animation)) {
|
||||
if (animation == remove) {
|
||||
animation->SetFinished();
|
||||
break;
|
||||
}
|
||||
}
|
||||
animLock.Unlock();
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* Finish Main Loop
|
||||
*****************************************************************************************/
|
||||
void cAnimator::Stop(void) {
|
||||
if (!Running())
|
||||
return;
|
||||
Cancel(-1);
|
||||
pauseWait.Signal();
|
||||
sleepWait.Signal();
|
||||
Cancel(2);
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* shift or fade out persistent animations
|
||||
*****************************************************************************************/
|
||||
void cAnimator::Finish(void) {
|
||||
bool animActive = true;
|
||||
bool reactivate = true;
|
||||
while(animActive) {
|
||||
animActive = false;
|
||||
uint64_t start = cTimeMs::Now();
|
||||
animLock.Lock();
|
||||
for (cAnimation *animation = animationsPersistent.First(); animation; animation = animationsPersistent.Next(animation)) {
|
||||
if (reactivate)
|
||||
animation->Reactivate();
|
||||
bool currentAnimActive = animation->Tick();
|
||||
animActive = animActive || currentAnimActive;
|
||||
}
|
||||
animLock.Unlock();
|
||||
reactivate = false;
|
||||
if (!animActive)
|
||||
break;
|
||||
osd->Flush();
|
||||
Sleep(start);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,64 @@
|
|||
#include <vdr/skins.h>
|
||||
#include <vdr/thread.h>
|
||||
#include "definitions.h"
|
||||
|
||||
#define FPS 50
|
||||
#include "osdwrapper.h"
|
||||
|
||||
/******************************************************************
|
||||
* cScrollable
|
||||
* Detaching
|
||||
******************************************************************/
|
||||
class cDetachable {
|
||||
protected:
|
||||
cDetachable(void) {};
|
||||
~cDetachable(void) {};
|
||||
public:
|
||||
virtual int Delay(void) = 0;
|
||||
virtual void StartAnimation(void) = 0;
|
||||
virtual void ParseDetached(void) = 0;
|
||||
virtual void RenderDetached(void) = 0;
|
||||
virtual void Flush(void) = 0;
|
||||
};
|
||||
|
||||
class cDetacher : public cThread, public cListObject {
|
||||
private:
|
||||
cCondWait sleepWait;
|
||||
cDetachable *detachable;
|
||||
bool waitOnWakeup;
|
||||
bool keepSleeping;
|
||||
bool doAnimation;
|
||||
void Sleep(int duration);
|
||||
void Wait(void);
|
||||
virtual void Action(void);
|
||||
public:
|
||||
cDetacher(cDetachable *detachable, bool wait, bool animation);
|
||||
~cDetacher(void);
|
||||
void WakeUp(void);
|
||||
void ResetSleep(void);
|
||||
void Stop(bool deletePixmaps);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cAnimation
|
||||
******************************************************************/
|
||||
class cAnimation : public cListObject {
|
||||
protected:
|
||||
uint64_t started;
|
||||
bool finished;
|
||||
bool persistent;
|
||||
int frametime;
|
||||
public:
|
||||
cAnimation(void);
|
||||
virtual ~cAnimation(void);
|
||||
virtual void SetInitial(void) = 0;
|
||||
virtual void Reactivate(void) = 0;
|
||||
virtual bool Tick(void) = 0;
|
||||
bool Finished(void) { return finished; };
|
||||
virtual void SetFinished(void) { finished = true; };
|
||||
void SetPersistent(void) { persistent = true; };
|
||||
bool Persistent(void) { return persistent; };
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* Scrolling
|
||||
******************************************************************/
|
||||
class cScrollable {
|
||||
protected:
|
||||
|
@ -21,70 +74,144 @@ public:
|
|||
virtual eScrollMode ScrollMode(void) = 0;
|
||||
virtual eScrollSpeed ScrollSpeed(void) = 0;
|
||||
virtual eOrientation ScrollOrientation(void) = 0;
|
||||
virtual void SetScrollingStarted(void) = 0;
|
||||
virtual void StartScrolling(void) = 0;
|
||||
virtual void StopScrolling(void) = 0;
|
||||
virtual void SetDrawPort(cPoint &point) = 0;
|
||||
virtual void RegisterAnimation(void) = 0;
|
||||
virtual void UnregisterAnimation(void) = 0;
|
||||
virtual void Flush(bool animFlush) = 0;
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cDetachable
|
||||
******************************************************************/
|
||||
class cDetachable {
|
||||
protected:
|
||||
cDetachable(void) {};
|
||||
~cDetachable(void) {};
|
||||
class cScroller : public cAnimation {
|
||||
private:
|
||||
cScrollable *scrollable;
|
||||
int delay;
|
||||
bool paused;
|
||||
int pauseTime;
|
||||
bool scrollingStarted;
|
||||
bool secondDelay;
|
||||
eOrientation orientation;
|
||||
int scrollLength;
|
||||
bool carriageReturn;
|
||||
float drawPortX;
|
||||
float drawPortY;
|
||||
float scrollDelta;
|
||||
bool delScrollPix;
|
||||
void Init(void);
|
||||
bool Pause(void);
|
||||
bool Overflow(void);
|
||||
public:
|
||||
virtual int Delay(void) = 0;
|
||||
virtual void ParseDetached(void) = 0;
|
||||
virtual void RenderDetached(void) = 0;
|
||||
virtual void StartAnimation(void) = 0;
|
||||
virtual void RegisterAnimation(void) = 0;
|
||||
virtual void UnregisterAnimation(void) = 0;
|
||||
virtual void Flush(bool animFlush) = 0;
|
||||
cScroller(cScrollable *scrollable);
|
||||
~cScroller(void);
|
||||
void SetInitial(void);
|
||||
void Reactivate(void);
|
||||
void SetFinished(void);
|
||||
void UnsetDelScrollPix(void) { delScrollPix = false; };
|
||||
bool Tick(void);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cFadable
|
||||
* Fading
|
||||
******************************************************************/
|
||||
class cFadable {
|
||||
protected:
|
||||
cFadable(void) {};
|
||||
~cFadable(void) {};
|
||||
public:
|
||||
virtual bool Detached(void) = 0;
|
||||
virtual int Delay(void) = 0;
|
||||
virtual int FadeTime(void) = 0;
|
||||
virtual void SetTransparency(int transparency, bool force = false) = 0;
|
||||
virtual void RegisterAnimation(void) = 0;
|
||||
virtual void UnregisterAnimation(void) = 0;
|
||||
virtual void Flush(bool animFlush) = 0;
|
||||
};
|
||||
|
||||
class cFader : public cAnimation {
|
||||
private:
|
||||
cFadable *fadable;
|
||||
bool fadein;
|
||||
int fadetime;
|
||||
int step;
|
||||
int transparency;
|
||||
bool hideWhenFinished;
|
||||
public:
|
||||
cFader(cFadable *fadable);
|
||||
~cFader(void);
|
||||
void SetInitial(void);
|
||||
void Reactivate(void);
|
||||
void SetFadeOut(void);
|
||||
void SetFinished(void);
|
||||
void SetHideWhenFinished(void) { hideWhenFinished = true; };
|
||||
bool Tick(void);
|
||||
};
|
||||
/******************************************************************
|
||||
* cShiftable
|
||||
* Shifting
|
||||
******************************************************************/
|
||||
class cShiftable {
|
||||
protected:
|
||||
cShiftable(void) {};
|
||||
~cShiftable(void) {};
|
||||
public:
|
||||
virtual bool Detached(void) = 0;
|
||||
virtual int Delay(void) = 0;
|
||||
virtual int ShiftTime(void) = 0;
|
||||
virtual int ShiftMode(void) = 0;
|
||||
virtual void ShiftPositions(cPoint *start, cPoint *end) = 0;
|
||||
virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false) = 0;
|
||||
virtual void SetStartShifting(void) = 0;
|
||||
virtual void SetEndShifting(void) = 0;
|
||||
virtual void RegisterAnimation(void) = 0;
|
||||
virtual void UnregisterAnimation(void) = 0;
|
||||
virtual void Flush(bool animFlush) = 0;
|
||||
};
|
||||
|
||||
class cListShiftable {
|
||||
protected:
|
||||
cListShiftable(void) {};
|
||||
~cListShiftable(void) {};
|
||||
public:
|
||||
virtual int ListShiftTime(void) = 0;
|
||||
virtual int ShiftDistance(void) = 0;
|
||||
virtual eOrientation ShiftOrientation(void) = 0;
|
||||
virtual void SetIndicatorPosition(cPoint &position) = 0;
|
||||
};
|
||||
|
||||
class cShifter : public cAnimation {
|
||||
private:
|
||||
cShiftable *shiftable;
|
||||
bool shiftin;
|
||||
cPoint start, end;
|
||||
int shifttime;
|
||||
eShiftMode mode;
|
||||
int step;
|
||||
float stepXLinear, stepYLinear;
|
||||
int stepsFast;
|
||||
float stepXFast, stepXSlow;
|
||||
float stepYFast, stepYSlow;
|
||||
float x, y;
|
||||
void Init(void);
|
||||
void NextPosition(void);
|
||||
public:
|
||||
cShifter(cShiftable *shiftable);
|
||||
~cShifter(void);
|
||||
void SetInitial(void);
|
||||
void Reactivate(void);
|
||||
bool Tick(void);
|
||||
};
|
||||
|
||||
class cListShifter : public cAnimation {
|
||||
private:
|
||||
cListShiftable *shiftable;
|
||||
bool shiftin;
|
||||
bool fromtop;
|
||||
int distance;
|
||||
eOrientation orientation;
|
||||
int shifttime;
|
||||
int step;
|
||||
cPoint pos;
|
||||
void NextPosition(void);
|
||||
void EndPosition(void);
|
||||
public:
|
||||
cListShifter(cListShiftable *shiftable);
|
||||
~cListShifter(void);
|
||||
void SetInitial(void);
|
||||
void Reactivate(void);
|
||||
void SetShiftOut(void) { shiftin = false; };
|
||||
void SetDirection(bool fromTop) { fromtop = fromTop; };
|
||||
bool Tick(void);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cBlinkable
|
||||
* Blinking
|
||||
******************************************************************/
|
||||
class cBlinkable {
|
||||
protected:
|
||||
|
@ -93,48 +220,49 @@ protected:
|
|||
public:
|
||||
virtual int BlinkFreq(int func) = 0;
|
||||
virtual void DoBlink(int func, bool on) = 0;
|
||||
virtual void RegisterAnimation(void) = 0;
|
||||
virtual void UnregisterAnimation(void) = 0;
|
||||
virtual void Flush(bool animFlush) = 0;
|
||||
};
|
||||
|
||||
class cBlinker : public cAnimation {
|
||||
private:
|
||||
cBlinkable *blinkable;
|
||||
int blinkFunc;
|
||||
int freq;
|
||||
bool blinkOn;
|
||||
bool paused;
|
||||
int pauseTime;
|
||||
bool Pause(void);
|
||||
public:
|
||||
cBlinker(cBlinkable *blinkable, int blinkFunc);
|
||||
~cBlinker(void);
|
||||
void SetInitial(void);
|
||||
void Reactivate(void);
|
||||
bool Tick(void);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cAnimation
|
||||
* cAnimator
|
||||
******************************************************************/
|
||||
class cAnimation : public cThread, public cListObject {
|
||||
class cAnimator : public cThread {
|
||||
private:
|
||||
cSdOsd *osd;
|
||||
cCondWait sleepWait;
|
||||
cScrollable *scrollable;
|
||||
cDetachable *detachable;
|
||||
cFadable *fadable;
|
||||
cShiftable *shiftable;
|
||||
cBlinkable *blinkable;
|
||||
bool waitOnWakeup;
|
||||
bool keepSleeping;
|
||||
bool doAnimation;
|
||||
bool modeIn;
|
||||
int blinkFunc;
|
||||
cPoint shiftstart;
|
||||
cPoint shiftend;
|
||||
void Sleep(int duration);
|
||||
void Wait(void);
|
||||
void Scroll(void);
|
||||
void Detach(void);
|
||||
void Blink(void);
|
||||
protected:
|
||||
cCondWait pauseWait;
|
||||
int timeslice;
|
||||
int timeneeded;
|
||||
cMutex animLock;
|
||||
cList<cAnimation> animations;
|
||||
cList<cAnimation> animationsPersistent;
|
||||
void Sleep(uint64_t start);
|
||||
void DoTick(bool &animActive);
|
||||
void CleanupAnims(void);
|
||||
virtual void Action(void);
|
||||
public:
|
||||
cAnimation(cScrollable *scrollable);
|
||||
cAnimation(cDetachable *detachable, bool wait, bool animation);
|
||||
cAnimation(cFadable *fadable, bool fadein);
|
||||
cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool shiftin);
|
||||
cAnimation(cBlinkable *blinkable, int func);
|
||||
~cAnimation(void);
|
||||
void WakeUp(void);
|
||||
void ResetSleep(void);
|
||||
void Fade(void);
|
||||
void Shift(void);
|
||||
void Stop(bool deletePixmaps);
|
||||
cAnimator(cSdOsd *osd);
|
||||
~cAnimator(void);
|
||||
void AddAnimation(cAnimation *animation, bool startAnim = true);
|
||||
void RemoveAnimation(cAnimation *remove);
|
||||
void Stop(void);
|
||||
void Finish(void);
|
||||
};
|
||||
|
||||
#endif //__ANIMATION_H
|
|
@ -30,6 +30,7 @@ cArea::cArea(void) {
|
|||
attribs = new cAreaAttribs((int)eAreaAttribs::count);
|
||||
scrolling = false;
|
||||
isScrolling = false;
|
||||
scrollingStarted = false;
|
||||
scrollFunc = NULL;
|
||||
blinking = false;
|
||||
areaContainer = NULL;
|
||||
|
@ -45,6 +46,7 @@ cArea::cArea(const cArea &other) {
|
|||
attribs = new cAreaAttribs(*other.attribs);
|
||||
//area container is set from outside during cloning of areacontainer
|
||||
areaContainer = NULL;
|
||||
scrollingStarted = false;
|
||||
//scrolling is set from outside by ScrollFunc(), see below
|
||||
scrolling = other.scrolling;
|
||||
isScrolling = false;
|
||||
|
@ -244,6 +246,7 @@ void cArea::Close(void) {
|
|||
pix = NULL;
|
||||
}
|
||||
init = true;
|
||||
scrollingStarted = false;
|
||||
}
|
||||
|
||||
void cArea::Clear(bool forceClearBackground) {
|
||||
|
@ -252,8 +255,21 @@ void cArea::Clear(bool forceClearBackground) {
|
|||
}
|
||||
StopBlinkers();
|
||||
if (pix) {
|
||||
pix->SetDrawPortPoint(cPoint(0,0));
|
||||
pix->Fill(clrTransparent);
|
||||
}
|
||||
scrollingStarted = false;
|
||||
}
|
||||
|
||||
void cArea::ClearWithoutIndicators(void) {
|
||||
if (attribs->IndicatorArea()) {
|
||||
return;
|
||||
}
|
||||
StopBlinkers();
|
||||
if (pix) {
|
||||
pix->Fill(clrTransparent);
|
||||
}
|
||||
scrollingStarted = false;
|
||||
}
|
||||
|
||||
void cArea::Hide(void) {
|
||||
|
@ -335,6 +351,23 @@ void cArea::SetTransparency(int transparency, bool absolute) {
|
|||
}
|
||||
}
|
||||
|
||||
void cArea::SetIndicatorTransparency(int transparency) {
|
||||
if (!attribs->IndicatorArea())
|
||||
return;
|
||||
if (transparency < 0 || transparency > 100)
|
||||
return;
|
||||
int alpha = (100 - transparency)*255/100;
|
||||
if (pix) {
|
||||
pix->SetAlpha(alpha);
|
||||
}
|
||||
}
|
||||
|
||||
void cArea::SetIndicatorPosition(cPoint &pos) {
|
||||
if (!attribs->IndicatorArea())
|
||||
return;
|
||||
SetDrawPort(pos);
|
||||
}
|
||||
|
||||
bool cArea::Scrolling(void) {
|
||||
if (!scrolling)
|
||||
return false;
|
||||
|
@ -425,8 +458,14 @@ void cArea::SetViewPort(cRect &vp) {
|
|||
void cArea::SetPosition(cPoint &pos, cPoint &ref) {
|
||||
if (!pix)
|
||||
return;
|
||||
int x = (attribs->X() - ref.X()) + pos.X();
|
||||
int y = (attribs->Y() - ref.Y()) + pos.Y();
|
||||
int x0 = attribs->X() == -1 ? 0 : attribs->X();
|
||||
int y0 = attribs->Y() == -1 ? 0 : attribs->Y();
|
||||
int x = (x0 - ref.X()) + pos.X();
|
||||
int y = (y0 - ref.Y()) + pos.Y();
|
||||
/* Enable for xineliboutput OSD Bug
|
||||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
*/
|
||||
pix->SetViewPort(cRect(x, y, pix->ViewPort().Width(), pix->ViewPort().Height()));
|
||||
}
|
||||
|
||||
|
@ -491,12 +530,6 @@ void cArea::Debug(bool full) {
|
|||
}
|
||||
}
|
||||
|
||||
void cArea::Flush(bool animFlush) {
|
||||
if (animFlush)
|
||||
sdOsd->AnimatedFlush();
|
||||
else
|
||||
sdOsd->Flush();
|
||||
}
|
||||
/******************************************************************
|
||||
* Private Functions
|
||||
******************************************************************/
|
||||
|
@ -518,11 +551,10 @@ void cArea::CreatePixmap(cRect drawPort) {
|
|||
}
|
||||
|
||||
int layer = attribs->Layer();
|
||||
cRect viewPort(attribs->X(), attribs->Y(), attribs->Width(), attribs->Height());
|
||||
cRect viewPort(attribs->X() == -1 ? 0 : attribs->X(), attribs->Y() == -1 ? 0 : attribs->Y(), attribs->Width(), attribs->Height());
|
||||
pix = sdOsd->CreatePixmap(layer, viewPort, drawPort);
|
||||
if (pix)
|
||||
pix->Clear();
|
||||
|
||||
int pixTransparency = attribs->Transparency();
|
||||
if (pixTransparency > 0) {
|
||||
SetTransparency(pixTransparency, true);
|
||||
|
@ -560,9 +592,9 @@ void cArea::StartBlinkers(void) {
|
|||
continue;
|
||||
}
|
||||
if (f->Blinking()) {
|
||||
cAnimation *blink = new cAnimation((cBlinkable*)this, func);
|
||||
blinkers.Add(blink);
|
||||
blink->Start();
|
||||
cBlinker *blinker = new cBlinker((cBlinkable*)this, func);
|
||||
blinkers.push_back(blinker);
|
||||
cView::AddAnimation(blinker);
|
||||
}
|
||||
func++;
|
||||
}
|
||||
|
@ -570,15 +602,10 @@ void cArea::StartBlinkers(void) {
|
|||
|
||||
void cArea::StopBlinkers(void) {
|
||||
blinking = false;
|
||||
blinkers.Clear();
|
||||
}
|
||||
|
||||
void cArea::RegisterAnimation(void) {
|
||||
sdOsd->AddAnimation();
|
||||
}
|
||||
|
||||
void cArea::UnregisterAnimation(void) {
|
||||
sdOsd->RemoveAnimation();
|
||||
for (list<cBlinker*>::iterator it = blinkers.begin(); it != blinkers.end(); it++) {
|
||||
cView::RemoveAnimation(*it);
|
||||
}
|
||||
blinkers.clear();
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
@ -702,6 +729,12 @@ void cAreaContainer::Clear(bool forceClearBackground) {
|
|||
}
|
||||
}
|
||||
|
||||
void cAreaContainer::ClearWithoutIndicators(void) {
|
||||
for (cArea *area = areas.First(); area; area = areas.Next(area)) {
|
||||
area->ClearWithoutIndicators();
|
||||
}
|
||||
}
|
||||
|
||||
void cAreaContainer::Hide(void) {
|
||||
for (cArea *area = areas.First(); area; area = areas.Next(area)) {
|
||||
area->Hide();
|
||||
|
@ -731,6 +764,18 @@ void cAreaContainer::SetTransparency(int transparency, bool absolute) {
|
|||
}
|
||||
}
|
||||
|
||||
void cAreaContainer::SetIndicatorTransparency(int transparency) {
|
||||
for (cArea *area = areas.First(); area; area = areas.Next(area)) {
|
||||
area->SetIndicatorTransparency(transparency);
|
||||
}
|
||||
}
|
||||
|
||||
void cAreaContainer::SetIndicatorPosition(cPoint &pos) {
|
||||
for (cArea *area = areas.First(); area; area = areas.Next(area)) {
|
||||
area->SetIndicatorPosition(pos);
|
||||
}
|
||||
}
|
||||
|
||||
void cAreaContainer::SetViewPort(cRect &vp) {
|
||||
for (cArea *area = areas.First(); area; area = areas.Next(area)) {
|
||||
area->SetViewPort(vp);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <list>
|
||||
|
||||
#include "osdwrapper.h"
|
||||
#include "definitions.h"
|
||||
|
@ -45,15 +46,19 @@ public:
|
|||
virtual void Close(void) {};
|
||||
virtual void StopBlinkers(void) {};
|
||||
virtual void Clear(bool forceClearBackground = false) {};
|
||||
virtual void ClearWithoutIndicators(void) {};
|
||||
virtual void Hide(void) {};
|
||||
virtual void Show(void) {};
|
||||
virtual void Render(void) {};
|
||||
virtual bool Execute(void) { return true; };
|
||||
virtual void SetTransparency(int transparency, bool absolute = false) {};
|
||||
virtual void SetIndicatorTransparency(int transparency) {};
|
||||
virtual void SetViewPort(cRect &vp) {};
|
||||
virtual void SetPosition(cPoint &pos, cPoint &ref) {};
|
||||
virtual void SetIndicatorPosition(cPoint &pos) {};
|
||||
virtual cRect CoveringArea(void) { return cRect::Null; };
|
||||
virtual bool Scrolling(void) { return false; };
|
||||
virtual bool ScrollingStarted(void) { return false; };
|
||||
virtual cArea *ScrollingArea(void) { return NULL; };
|
||||
virtual cFunction *GetFunction(const char *name) { return NULL; };
|
||||
virtual const char *Name(void) { return NULL; };
|
||||
|
@ -76,8 +81,9 @@ private:
|
|||
cList<cFunction> functions;
|
||||
bool scrolling;
|
||||
bool isScrolling;
|
||||
bool scrollingStarted;
|
||||
cFunction *scrollFunc;
|
||||
cList<cAnimation> blinkers;
|
||||
list<cBlinker*> blinkers;
|
||||
bool blinking;
|
||||
void InitFunctions(void);
|
||||
void CreatePixmap(cRect drawPort = cRect::Null);
|
||||
|
@ -105,14 +111,20 @@ public:
|
|||
int GetWidth(void) { return attribs->Width(); };
|
||||
void Close(void);
|
||||
void Clear(bool forceClearBackground = false);
|
||||
void ClearWithoutIndicators(void);
|
||||
void Hide(void);
|
||||
void Show(void);
|
||||
void Render(void);
|
||||
bool Execute(void);
|
||||
bool IsIndicatorArea(void) { return attribs->IndicatorArea(); };
|
||||
void SetTransparency(int transparency, bool absolute = false);
|
||||
void SetIndicatorTransparency(int transparency);
|
||||
void SetIndicatorPosition(cPoint &pos);
|
||||
cRect CoveringArea(void);
|
||||
//Scrollable
|
||||
bool Scrolling(void);
|
||||
void SetScrollingStarted(void) { scrollingStarted = true; };
|
||||
bool ScrollingStarted(void) { return scrollingStarted; };
|
||||
int ScrollWidth(void);
|
||||
int ScrollHeight(void);
|
||||
int ScrollDelay(void);
|
||||
|
@ -133,11 +145,8 @@ public:
|
|||
void DoBlink(int func, bool on);
|
||||
void StopBlinkers(void);
|
||||
//Common
|
||||
void RegisterAnimation(void);
|
||||
void UnregisterAnimation(void);
|
||||
const char *Name(void) { return attribs->Name(); };
|
||||
bool BackgroundArea(void) { return attribs->BackgroundArea(); };
|
||||
void Flush(bool animFlush);
|
||||
void Debug(bool full = false);
|
||||
};
|
||||
|
||||
|
@ -165,11 +174,14 @@ public:
|
|||
void Cache(void);
|
||||
void Close(void);
|
||||
void Clear(bool forceClearBackground = false);
|
||||
void ClearWithoutIndicators(void);
|
||||
void Hide(void);
|
||||
void Show(void);
|
||||
void Render(void);
|
||||
bool Execute(void);
|
||||
void SetTransparency(int transparency, bool absolute = false);
|
||||
void SetIndicatorTransparency(int transparency);
|
||||
void SetIndicatorPosition(cPoint &pos);
|
||||
void SetViewPort(cRect &vp);
|
||||
void SetPosition(cPoint &pos, cPoint &ref);
|
||||
cRect CoveringArea(void);
|
||||
|
|
|
@ -339,6 +339,14 @@ void cAttributes::SetDirection(int id, const char *val) {
|
|||
attribs[id] = (int)direction;
|
||||
}
|
||||
|
||||
void cAttributes::SetButton(int id, const char *val) {
|
||||
eButtonType button = eButtonType::none;
|
||||
if (!strcmp(val, "left"))
|
||||
button = eButtonType::left;
|
||||
else if (!strcmp(val, "right"))
|
||||
button = eButtonType::right;
|
||||
attribs[id] = (int)button;
|
||||
}
|
||||
/***************************************************************************
|
||||
* Private Functions
|
||||
***************************************************************************/
|
||||
|
|
|
@ -46,6 +46,7 @@ protected:
|
|||
void SetOrientation(int id, const char *val);
|
||||
void SetDirection(int id, const char *val);
|
||||
void SetAlign(int id, const char *val);
|
||||
void SetButton(int id, const char *val);
|
||||
public:
|
||||
cAttributes(int numAttributes);
|
||||
cAttributes(const cAttributes &other);
|
||||
|
|
|
@ -126,15 +126,18 @@ void cViewAttribs::SetOrientationDynamic(int id, const char *val) {
|
|||
***************************************************************************/
|
||||
cViewElementAttribs::cViewElementAttribs(int numAttributes) : cAttributes(numAttributes) {
|
||||
name = NULL;
|
||||
clearOnDisplay = NULL;
|
||||
SetAttributesDefs();
|
||||
}
|
||||
|
||||
cViewElementAttribs::cViewElementAttribs(const cViewElementAttribs &other) : cAttributes(other) {
|
||||
name = NULL;
|
||||
clearOnDisplay = NULL;
|
||||
}
|
||||
|
||||
cViewElementAttribs::~cViewElementAttribs(void) {
|
||||
free(name);
|
||||
free(clearOnDisplay);
|
||||
}
|
||||
|
||||
void cViewElementAttribs::Set(vector<stringpair> &attributes) {
|
||||
|
@ -158,6 +161,8 @@ void cViewElementAttribs::Set(vector<stringpair> &attributes) {
|
|||
SetOrientation(id, attVal);
|
||||
} else if (IdEqual(id, (int)eViewElementAttribs::name)) {
|
||||
name = strdup(attVal);
|
||||
} else if (IdEqual(id, (int)eViewElementAttribs::clearondisplay)) {
|
||||
clearOnDisplay = strdup(attVal);
|
||||
} else {
|
||||
attribCtors[id] = new cNumericExpr(attVal);
|
||||
if (id == (int)eViewElementAttribs::starty + (int)eCommonAttribs::count) {
|
||||
|
@ -178,6 +183,7 @@ void cViewElementAttribs::SetAttributesDefs(void) {
|
|||
attribIDs.insert(pair<string, int>("orientation", (int)eViewElementAttribs::orientation));
|
||||
attribIDs.insert(pair<string, int>("mode", (int)eViewElementAttribs::mode));
|
||||
attribIDs.insert(pair<string, int>("name", (int)eViewElementAttribs::name));
|
||||
attribIDs.insert(pair<string, int>("clearondisplay", (int)eViewElementAttribs::clearondisplay));
|
||||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::delay, "delay"));
|
||||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::fadetime, "fadetime"));
|
||||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::shifttime, "shifttime"));
|
||||
|
@ -188,6 +194,7 @@ void cViewElementAttribs::SetAttributesDefs(void) {
|
|||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::orientation, "orientation"));
|
||||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::mode, "mode"));
|
||||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::name, "name"));
|
||||
attribNames.insert(pair<int, string>((int)eViewElementAttribs::clearondisplay, "clearondisplay"));
|
||||
}
|
||||
|
||||
eOrientation cViewElementAttribs::Orientation(void) {
|
||||
|
@ -233,6 +240,12 @@ void cViewListAttribs::Set(vector<stringpair> &attributes) {
|
|||
determinateFont = strdup(attVal);
|
||||
} else if (IdEqual(id, (int)eViewListAttribs::orientation)) {
|
||||
SetOrientation(id, attVal);
|
||||
} else if (IdEqual(id, (int)eViewListAttribs::shifttype)) {
|
||||
SetShiftType(id, attVal);
|
||||
} else if (IdEqual(id, (int)eViewListAttribs::shiftmode)) {
|
||||
SetShiftMode(id, attVal);
|
||||
} else if (IdEqual(id, (int)eViewListAttribs::button)) {
|
||||
SetButton(id, attVal);
|
||||
} else {
|
||||
attribCtors[id] = new cNumericExpr(attVal);
|
||||
}
|
||||
|
@ -271,13 +284,27 @@ void cViewListAttribs::SetAttributesDefs(void) {
|
|||
attribIDs.insert(pair<string, int>("determinatefont", (int)eViewListAttribs::determinatefont));
|
||||
attribIDs.insert(pair<string, int>("numlistelements", (int)eViewListAttribs::numlistelements));
|
||||
attribIDs.insert(pair<string, int>("orientation", (int)eViewListAttribs::orientation));
|
||||
attribIDs.insert(pair<string, int>("fadetime", (int)eViewListAttribs::fadetime));
|
||||
attribIDs.insert(pair<string, int>("shifttime", (int)eViewListAttribs::shifttime));
|
||||
attribIDs.insert(pair<string, int>("shifttype", (int)eViewListAttribs::shifttype));
|
||||
attribIDs.insert(pair<string, int>("shiftmode", (int)eViewListAttribs::shiftmode));
|
||||
attribIDs.insert(pair<string, int>("startx", (int)eViewListAttribs::startx));
|
||||
attribIDs.insert(pair<string, int>("starty", (int)eViewListAttribs::starty));
|
||||
attribIDs.insert(pair<string, int>("condition", (int)eViewListAttribs::condition));
|
||||
attribIDs.insert(pair<string, int>("button", (int)eViewListAttribs::button));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::align, "align"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::menuitemwidth, "menuitemwidth"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::determinatefont, "determinatefont"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::numlistelements, "numlistelements"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::orientation, "orientation"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::fadetime, "fadetime"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::shifttime, "shifttime"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::shifttype, "shifttype"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::shiftmode, "shiftmode"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::startx, "startx"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::starty, "starty"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::condition, "condition"));
|
||||
attribNames.insert(pair<int, string>((int)eViewListAttribs::button, "button"));
|
||||
}
|
||||
|
||||
void cViewListAttribs::Debug(void) {
|
||||
|
@ -332,6 +359,8 @@ void cAreaAttribs::Set(vector<stringpair> &attributes) {
|
|||
SetScrollSpeed(id, attVal);
|
||||
} else if (IdEqual(id, (int)eAreaAttribs::background)) {
|
||||
SetBool(id, attVal);
|
||||
} else if (IdEqual(id, (int)eAreaAttribs::indicator)) {
|
||||
SetBool(id, attVal);
|
||||
} else if (IdEqual(id, (int)eAreaAttribs::name)) {
|
||||
name = new cTextExpr(attVal);
|
||||
} else {
|
||||
|
@ -354,6 +383,13 @@ bool cAreaAttribs::BackgroundArea(void) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool cAreaAttribs::IndicatorArea(void) {
|
||||
int isIndicator = GetValue((int)eAreaAttribs::indicator);
|
||||
if (isIndicator == 1)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void cAreaAttribs::CheckDynamic(void) {
|
||||
for (int i = (int)eCommonAttribs::x; i <= (int)eCommonAttribs::height; ++i ) {
|
||||
if (attribCtors[i] && attribCtors[i]->Dynamic()) {
|
||||
|
@ -378,6 +414,7 @@ void cAreaAttribs::SetAttributesDefs(void) {
|
|||
attribIDs.insert(pair<string, int>("scrollspeed", (int)eAreaAttribs::scrollspeed));
|
||||
attribIDs.insert(pair<string, int>("delay", (int)eAreaAttribs::delay));
|
||||
attribIDs.insert(pair<string, int>("background", (int)eAreaAttribs::background));
|
||||
attribIDs.insert(pair<string, int>("indicator", (int)eAreaAttribs::indicator));
|
||||
attribIDs.insert(pair<string, int>("name", (int)eAreaAttribs::name));
|
||||
attribIDs.insert(pair<string, int>("scrollheight", (int)eAreaAttribs::scrollheight));
|
||||
attribNames.insert(pair<int, string>((int)eAreaAttribs::layer, "layer"));
|
||||
|
|
|
@ -30,6 +30,7 @@ public:
|
|||
class cViewElementAttribs : public cAttributes {
|
||||
private:
|
||||
char *name;
|
||||
char *clearOnDisplay;
|
||||
void SetAttributesDefs(void);
|
||||
public:
|
||||
cViewElementAttribs(int numAttributes);
|
||||
|
@ -45,6 +46,7 @@ public:
|
|||
int ShiftType(void) { return GetValue((int)eViewElementAttribs::shifttype); };
|
||||
int ShiftMode(void) { return GetValue((int)eViewElementAttribs::shiftmode); };
|
||||
const char *Name(void) { return name; };
|
||||
const char *ClearOnDisplay(void) { return clearOnDisplay; };
|
||||
void Debug(void);
|
||||
};
|
||||
/******************************************************************
|
||||
|
@ -63,6 +65,12 @@ public:
|
|||
const char *DeterminateFont(void);
|
||||
eAlign Align(void);
|
||||
eOrientation Orientation(void);
|
||||
int FadeTime(void) { return GetValue((int)eViewListAttribs::fadetime); };
|
||||
int ShiftTime(void) { return GetValue((int)eViewListAttribs::shifttime); };
|
||||
cPoint ShiftStartpoint(void) { return cPoint(GetValue((int)eViewListAttribs::startx), GetValue((int)eViewListAttribs::starty)); };
|
||||
int ShiftType(void) { return GetValue((int)eViewListAttribs::shifttype); };
|
||||
int ShiftMode(void) { return GetValue((int)eViewListAttribs::shiftmode); };
|
||||
eButtonType Button(void) { return (eButtonType)GetValue((int)eViewListAttribs::button); }
|
||||
void Debug(void);
|
||||
};
|
||||
/******************************************************************
|
||||
|
@ -88,6 +96,7 @@ public:
|
|||
int Layer(void);
|
||||
int ScrollStep(void) { return GetValue((int)eAreaAttribs::scrollheight); };
|
||||
bool BackgroundArea(void);
|
||||
bool IndicatorArea(void);
|
||||
const char *Name(void);
|
||||
void CheckDynamic(void);
|
||||
bool Dynamic(void) {return dynamic; };
|
||||
|
|
|
@ -83,13 +83,13 @@ cCond::cCond(const cCond &other) {
|
|||
compareStrValue = strdup(other.compareStrValue);
|
||||
}
|
||||
|
||||
cCond::~cCond(void) {
|
||||
free(expr);
|
||||
cCond::~cCond(void) {
|
||||
free(expr);
|
||||
free(compareStrValue);
|
||||
}
|
||||
|
||||
void cCond::Debug(void) {
|
||||
esyslog("skindesigner: cond %s, operation %s, type %d", expr,
|
||||
esyslog("skindesigner: cond %s, operation %s, type %d", expr,
|
||||
(operation == eCondOp::tAnd) ? "++" : "||",
|
||||
(int)type);
|
||||
if (constant)
|
||||
|
@ -138,15 +138,15 @@ bool cCondition::True(void) {
|
|||
for (cCond *c = conds.First(); c; c = conds.Next(c)) {
|
||||
bool condTrue = true;
|
||||
//evaluate condition
|
||||
if (c->constant)
|
||||
if (c->constant)
|
||||
{
|
||||
condTrue = c->isTrue;
|
||||
}
|
||||
else if (c->type == eCondType::token)
|
||||
}
|
||||
else if (c->type == eCondType::token)
|
||||
{
|
||||
if (c->tokenType == eCondTokenType::inttoken) {
|
||||
int tokenVal = tokenContainer->IntToken(c->tokenIndex);
|
||||
condTrue = (tokenVal > 0) ? true : false;
|
||||
condTrue = (tokenVal > 0) ? true : false;
|
||||
} else if (c->tokenType == eCondTokenType::stringtoken) {
|
||||
char *tokenVal = tokenContainer->StringToken(c->tokenIndex);
|
||||
if (tokenVal)
|
||||
|
@ -159,8 +159,8 @@ bool cCondition::True(void) {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (c->type == eCondType::negtoken)
|
||||
}
|
||||
else if (c->type == eCondType::negtoken)
|
||||
{
|
||||
if (c->tokenType == eCondTokenType::inttoken) {
|
||||
int tokenVal = tokenContainer->IntToken(c->tokenIndex);
|
||||
|
@ -177,7 +177,7 @@ bool cCondition::True(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (c->type == eCondType::lowerInt || c->type == eCondType::equalInt || c->type == eCondType::greaterInt)
|
||||
else if (c->type == eCondType::lowerInt || c->type == eCondType::equalInt || c->type == eCondType::notequalInt || c->type == eCondType::greaterInt)
|
||||
{
|
||||
if (c->tokenType == eCondTokenType::inttoken) {
|
||||
int tokenVal = tokenContainer->IntToken(c->tokenIndex);
|
||||
|
@ -185,6 +185,8 @@ bool cCondition::True(void) {
|
|||
condTrue = (tokenVal < c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::equalInt)
|
||||
condTrue = (tokenVal == c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::notequalInt)
|
||||
condTrue = (tokenVal != c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::greaterInt)
|
||||
condTrue = (tokenVal > c->compareValue) ? true : false;
|
||||
} else if (c->tokenType == eCondTokenType::stringtoken) {
|
||||
|
@ -195,6 +197,8 @@ bool cCondition::True(void) {
|
|||
condTrue = (intVal < c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::equalInt)
|
||||
condTrue = (intVal == c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::notequalInt)
|
||||
condTrue = (intVal != c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::greaterInt)
|
||||
condTrue = (intVal > c->compareValue) ? true : false;
|
||||
}
|
||||
|
@ -207,13 +211,15 @@ bool cCondition::True(void) {
|
|||
condTrue = (intVal < c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::equalInt)
|
||||
condTrue = (intVal == c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::notequalInt)
|
||||
condTrue = (intVal != c->compareValue) ? true : false;
|
||||
else if (c->type == eCondType::greaterInt)
|
||||
condTrue = (intVal > c->compareValue) ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (c->type == eCondType::isset || c->type == eCondType::empty)
|
||||
else if (c->type == eCondType::isset || c->type == eCondType::empty)
|
||||
{
|
||||
if (c->tokenType == eCondTokenType::stringtoken) {
|
||||
char *tokenVal = tokenContainer->StringToken(c->tokenIndex);
|
||||
|
@ -245,7 +251,7 @@ bool cCondition::True(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (c->type == eCondType::equalString || c->type == eCondType::notEqualString || c->type == eCondType::contains || c->type == eCondType::notContains)
|
||||
else if (c->type == eCondType::equalString || c->type == eCondType::notEqualString || c->type == eCondType::contains || c->type == eCondType::notContains)
|
||||
{
|
||||
if (c->tokenType == eCondTokenType::stringtoken) {
|
||||
char *tokenVal = tokenContainer->StringToken(c->tokenIndex);
|
||||
|
@ -278,7 +284,7 @@ bool cCondition::True(void) {
|
|||
if (c->operation == eCondOp::tAnd) {
|
||||
ok = ok && condTrue;
|
||||
} else if (c->operation == eCondOp::tOr) {
|
||||
ok = ok || condTrue;
|
||||
ok = ok || condTrue;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
@ -308,6 +314,8 @@ void cCondition::Tokenize(void) {
|
|||
type = eCondType::lowerInt;
|
||||
} else if (startswith(cond, "eq({") && endswith(cond, ")")) {
|
||||
type = eCondType::equalInt;
|
||||
} else if (startswith(cond, "noteq({") && endswith(cond, ")")) {
|
||||
type = eCondType::notequalInt;
|
||||
} else if (startswith(cond, "gt({") && endswith(cond, ")")) {
|
||||
type = eCondType::greaterInt;
|
||||
} else if (startswith(cond, "isset{") && endswith(cond, "}")) {
|
||||
|
@ -349,6 +357,7 @@ void cCondition::PrepareTokens(void) {
|
|||
break;
|
||||
case eCondType::lowerInt:
|
||||
case eCondType::equalInt:
|
||||
case eCondType::notequalInt:
|
||||
case eCondType::greaterInt:
|
||||
SetIntegerCond(c);
|
||||
break;
|
||||
|
@ -409,6 +418,8 @@ void cCondition::SetIntegerCond(cCond *c) {
|
|||
c->isTrue = true;
|
||||
else if (c->type == eCondType::equalInt && result == c->compareValue)
|
||||
c->isTrue = true;
|
||||
else if (c->type == eCondType::notequalInt && result != c->compareValue)
|
||||
c->isTrue = true;
|
||||
else if (c->type == eCondType::greaterInt && result > c->compareValue)
|
||||
c->isTrue = true;
|
||||
return;
|
||||
|
@ -459,8 +470,8 @@ void cCondition::SetTokenIndex(cCond *c, const char *token) {
|
|||
/******************************************************************
|
||||
* cSummand
|
||||
******************************************************************/
|
||||
cSummand::cSummand(const char *summand) {
|
||||
this->summand = strdup(summand);
|
||||
cSummand::cSummand(const char *summand) {
|
||||
this->summand = strdup(summand);
|
||||
}
|
||||
|
||||
cSummand::cSummand(const cSummand &other) {
|
||||
|
@ -474,7 +485,7 @@ cSummand::cSummand(const cSummand &other) {
|
|||
}
|
||||
|
||||
cSummand::~cSummand(void) {
|
||||
free(summand);
|
||||
free(summand);
|
||||
}
|
||||
|
||||
void cSummand::Debug(void) {
|
||||
|
@ -553,7 +564,7 @@ bool cNumericExpr::CacheStatic(void) {
|
|||
value = atoi(expr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//check if expression is a percent expression
|
||||
if (PercentValue(expr)) {
|
||||
return true;
|
||||
|
@ -665,7 +676,7 @@ int cNumericExpr::Calculate(void) {
|
|||
if (f->multiplication)
|
||||
factor *= fac;
|
||||
else if (fac)
|
||||
factor /= fac;
|
||||
factor /= fac;
|
||||
}
|
||||
if (s->positive)
|
||||
result += factor;
|
||||
|
@ -711,19 +722,19 @@ bool cNumericExpr::IsNumericExpression(const char *e) {
|
|||
else
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cNumericExpr::PercentValue(const char *e) {
|
||||
if (!e)
|
||||
return e;
|
||||
const char *hit = strchr(e, '%');
|
||||
if (!hit)
|
||||
return false;
|
||||
char buffer[20] = "";
|
||||
if (strlen(e) > 20)
|
||||
return false;
|
||||
strncpy(buffer, e, strlen(e)-1);
|
||||
buffer[strlen(e)-1] = '\0';
|
||||
int val = atoi(buffer);
|
||||
int val;
|
||||
int r = sscanf(e, "%d%%", &val); // use sscanf to retrieve %-value to avoid -Wstringop-overflow
|
||||
if (r != 1)
|
||||
return false; // sscanf parsing problem
|
||||
bool ok = false;
|
||||
if (horizontal && container->Width() > 0) {
|
||||
value = container->Width() * val / 100;
|
||||
|
@ -736,22 +747,22 @@ bool cNumericExpr::PercentValue(const char *e) {
|
|||
}
|
||||
|
||||
char *cNumericExpr::ReplacePercentValue(char *e) {
|
||||
if (!e)
|
||||
return e;
|
||||
const char *hit = strchr(e, '%');
|
||||
if (!hit)
|
||||
return e;
|
||||
char buffer[20] = "";
|
||||
if (strlen(e) > 20)
|
||||
return e;
|
||||
strncpy(buffer, e, strlen(e)-1);
|
||||
buffer[strlen(e)-1] = '\0';
|
||||
int val = atoi(buffer);
|
||||
int val;
|
||||
int r = sscanf(e, "%d%%", &val); // use sscanf to retrieve %-value to avoid -Wstringop-overflow
|
||||
if (r != 1)
|
||||
return e; // sscanf parsing problem
|
||||
double percentVal = (double)val/100.0f;
|
||||
|
||||
char replacement[50] = "";
|
||||
if (horizontal) {
|
||||
sprintf(replacement, "%.5f*{areawidth}", percentVal);
|
||||
snprintf(replacement, sizeof(replacement), "%.5f*{areawidth}", percentVal);
|
||||
} else {
|
||||
sprintf(replacement, "%.5f*{areaheight}", percentVal);
|
||||
snprintf(replacement, sizeof(replacement), "%.5f*{areaheight}", percentVal);
|
||||
}
|
||||
|
||||
int len = strlen(replacement) + 1;
|
||||
|
@ -763,16 +774,19 @@ char *cNumericExpr::ReplacePercentValue(char *e) {
|
|||
}
|
||||
|
||||
char *cNumericExpr::ReplaceToken(char *e, const char* token, int val) {
|
||||
if (!e)
|
||||
return e;
|
||||
char *tokenStart = strstr(e, token);
|
||||
if (!tokenStart) {
|
||||
return e;
|
||||
}
|
||||
char buffer[20] = "";
|
||||
sprintf(buffer, "%d", val);
|
||||
snprintf(buffer, sizeof(buffer), "%d", val);
|
||||
size_t newSize = strlen(e) - strlen(token) + strlen(buffer) + 1;
|
||||
char *replaced = (char*)malloc(newSize);
|
||||
memset(replaced, 0, newSize);
|
||||
size_t beginning = strlen(e) - strlen(tokenStart);
|
||||
if (beginning >= newSize) beginning = newSize - 1; // will never happen but avoid -Wstringop-overflow
|
||||
if (beginning > 0)
|
||||
strncpy(replaced, e, beginning);
|
||||
strcat(replaced, buffer);
|
||||
|
@ -877,7 +891,7 @@ void cNumericExpr::CreateFactors(void) {
|
|||
f->constValue = EvaluateExpressionDouble(sum);
|
||||
s->factors.Add(f);
|
||||
free(sum);
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
bool multiplication = true;
|
||||
char *fac = strtok(sum, delimiterFac);
|
||||
|
@ -895,7 +909,7 @@ void cNumericExpr::CreateFactors(void) {
|
|||
} else if (SetReferenceFactor(f, fac)) {
|
||||
f->multiplication = multiplication;
|
||||
s->factors.Add(f);
|
||||
} else if (SetGeometryFactor(f, fac)) {
|
||||
} else if (SetGeometryFactor(f, fac)) {
|
||||
f->multiplication = multiplication;
|
||||
s->factors.Add(f);
|
||||
} else {
|
||||
|
@ -950,7 +964,7 @@ bool cNumericExpr::SetReferenceFactor(cFactor *f, char *tokenName) {
|
|||
f->type = eFactorType::widthref;
|
||||
} else if (startswith(tokenName, "{height(") && endswith(tokenName, ")}")) {
|
||||
start = 8;
|
||||
f->type = eFactorType::heightref;
|
||||
f->type = eFactorType::heightref;
|
||||
}
|
||||
|
||||
if (start == 0)
|
||||
|
@ -975,7 +989,7 @@ bool cNumericExpr::SetGeometryFactor(cFactor *f, char *tokenName) {
|
|||
f->type = eFactorType::columnwidth;
|
||||
ok = true;
|
||||
} else if (!strcmp(tokenName, "{rowheight}")) {
|
||||
f->type = eFactorType::rowheight;
|
||||
f->type = eFactorType::rowheight;
|
||||
ok = true;
|
||||
}
|
||||
return ok;
|
||||
|
@ -996,7 +1010,7 @@ void cNumericExpr::ConsolidateSummand(void) {
|
|||
s = constSummand;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cNumericExpr::ConsolidateFactors(void) {
|
||||
|
@ -1009,7 +1023,7 @@ void cNumericExpr::ConsolidateFactors(void) {
|
|||
} else {
|
||||
if (f->multiplication)
|
||||
constFactor->constValue *= f->constValue;
|
||||
else
|
||||
else
|
||||
constFactor->constValue /= f->constValue;
|
||||
s->factors.Del(f);
|
||||
f = constFactor;
|
||||
|
@ -1031,7 +1045,7 @@ cColor::cColor(const char *expression) {
|
|||
cColor::cColor(const cColor &other) {
|
||||
globals = other.globals;
|
||||
expr = strdup(other.expr);
|
||||
value = other.value;
|
||||
value = other.value;
|
||||
}
|
||||
|
||||
cColor::~cColor(void) {
|
||||
|
@ -1431,7 +1445,7 @@ bool cTextExpr::ParsePrintfToken(cTextToken *t) {
|
|||
strncpy(buffer, startExpr+1, expLen);
|
||||
buffer[expLen] = '\0';
|
||||
t->printfExpr = strdup(buffer);
|
||||
|
||||
|
||||
//find variables
|
||||
char *startVar = strchr(t->constValue, ',');
|
||||
if (!startVar)
|
||||
|
@ -1514,7 +1528,7 @@ void cTextExpr::DeterminatePrintfToken(cTextToken *t) {
|
|||
}
|
||||
} else if (t->printfVarIndices[i].type == ePrintfVarType::looptoken && loopInfo && loopInfo->row >= 0) {
|
||||
if (tokenContainer->LoopToken(loopInfo->index, loopInfo->row, t->printfVarIndices[i].index)) {
|
||||
results.push_back(atoi(tokenContainer->LoopToken(loopInfo->index, loopInfo->row, t->printfVarIndices[i].index)));
|
||||
results.push_back(atoi(tokenContainer->LoopToken(loopInfo->index, loopInfo->row, t->printfVarIndices[i].index)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1600,8 +1614,8 @@ char *cTextExpr::CopyTextPart(char *start, char *stop, bool incLastChar) {
|
|||
} else {
|
||||
//search end of text
|
||||
char *p = start;
|
||||
while (*p)
|
||||
len++; p++;
|
||||
while (*p) {
|
||||
len++; p++; }
|
||||
len++;
|
||||
}
|
||||
val = (char*)malloc(len+1);
|
||||
|
|
|
@ -32,6 +32,7 @@ enum class eCondType {
|
|||
negtoken,
|
||||
lowerInt,
|
||||
equalInt,
|
||||
notequalInt,
|
||||
greaterInt,
|
||||
isset,
|
||||
empty,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -421,6 +421,7 @@ void cFuncDrawText::Render(cPixmap *p, int x0, int y0, int colWidth, int rowHeig
|
|||
} else if (horAlign == eAlign::center) {
|
||||
x = x0 + (contWidth - TextWidth(funcText)) / 2;
|
||||
}
|
||||
if (x < 0) x = 0;
|
||||
|
||||
int contHeight = rowHeight > 0 ? rowHeight : container.Height();
|
||||
int y = Y() + y0;
|
||||
|
@ -449,7 +450,7 @@ int cFuncDrawText::FuncX(void) {
|
|||
} else if (horAlign == eAlign::center) {
|
||||
x = (container.Width() - TextWidth(funcText)) / 2;
|
||||
}
|
||||
return x;
|
||||
return (x >= 0) ? x : 0 ;
|
||||
}
|
||||
|
||||
int cFuncDrawText::FuncY(void) {
|
||||
|
@ -1170,6 +1171,8 @@ void cFuncLoop::Set(vector<stringpair> &attributes) {
|
|||
SetOrientation(id, attVal);
|
||||
} else if (IdEqual(id, (int)eLoopAttribs::overflow)) {
|
||||
SetOverflow(id, attVal);
|
||||
} else if (IdEqual(id, (int)eLoopAttribs::valign)) {
|
||||
SetAlign(id, attVal);
|
||||
} else {
|
||||
attribCtors[id] = new cNumericExpr(attVal);
|
||||
}
|
||||
|
@ -1235,6 +1238,7 @@ void cFuncLoop::Render(cPixmap *p, int x0, int y0, int cw, int rh) {
|
|||
int maxItems = GetValue((int)eLoopAttribs::maxitems);
|
||||
eOrientation orientation = (eOrientation)GetValue((int)eLoopAttribs::orientation);
|
||||
eOverflowType overflow = (eOverflowType)GetValue((int)eLoopAttribs::overflow);
|
||||
eAlign vAlign = (eAlign)GetValue((int)eLoopAttribs::valign);
|
||||
|
||||
int loopWidth = Width();
|
||||
if (loopWidth <= 0)
|
||||
|
@ -1251,6 +1255,22 @@ void cFuncLoop::Render(cPixmap *p, int x0, int y0, int cw, int rh) {
|
|||
int loopY = Y();
|
||||
int x = (loopX > 0) ? loopX : 0;
|
||||
int y = (loopY > 0) ? loopY : 0;
|
||||
|
||||
//set y position for vertical loop with valign bottom
|
||||
if (orientation == eOrientation::vertical && vAlign == eAlign::bottom) {
|
||||
int actRowheight = (rowHeight > 0) ? rowHeight : RowHeight();
|
||||
if (actRowheight > 0) {
|
||||
float fTotalItems = (float)loopHeight / (float)actRowheight;
|
||||
int totalItems = (int)fTotalItems;
|
||||
if (fTotalItems - (float)totalItems > 0.5f)
|
||||
totalItems++;
|
||||
if (maxItems > 0 && maxItems < totalItems)
|
||||
totalItems = maxItems;
|
||||
if (numRows < totalItems)
|
||||
y += (totalItems - numRows) * actRowheight;
|
||||
}
|
||||
}
|
||||
|
||||
for (int row = 0; row < numRows; ++row) {
|
||||
if (maxItems > 0 && row >= maxItems) {
|
||||
break;
|
||||
|
@ -1312,7 +1332,7 @@ int cFuncLoop::FuncWidth(void) {
|
|||
eOverflowType overflow = (eOverflowType)GetValue((int)eLoopAttribs::overflow);
|
||||
if (overflow == eOverflowType::cut) {
|
||||
int maxItems = GetValue((int)eLoopAttribs::maxitems);
|
||||
numLoops = min(numLoops, maxItems);
|
||||
numLoops = std::min(numLoops, maxItems);
|
||||
}
|
||||
if (numLoops > 0)
|
||||
return numLoops * columnWidth;
|
||||
|
@ -1337,7 +1357,7 @@ int cFuncLoop::FuncHeight(void) {
|
|||
eOverflowType overflow = (eOverflowType)GetValue((int)eLoopAttribs::overflow);
|
||||
if (overflow == eOverflowType::cut) {
|
||||
int maxItems = GetValue((int)eLoopAttribs::maxitems);
|
||||
numLoops = min(numLoops, maxItems);
|
||||
numLoops = std::min(numLoops, maxItems);
|
||||
} else if (overflow == eOverflowType::wrap) {
|
||||
int loopWidth = Width();
|
||||
if (loopWidth <= 0)
|
||||
|
@ -1371,12 +1391,14 @@ void cFuncLoop::SetAttributesDefs(void) {
|
|||
attribIDs.insert(pair<string, int>("rowheight", (int)eLoopAttribs::rowheight));
|
||||
attribIDs.insert(pair<string, int>("name", (int)eLoopAttribs::name));
|
||||
attribIDs.insert(pair<string, int>("orientation", (int)eLoopAttribs::orientation));
|
||||
attribIDs.insert(pair<string, int>("valign", (int)eLoopAttribs::valign));
|
||||
attribIDs.insert(pair<string, int>("overflow", (int)eLoopAttribs::overflow));
|
||||
attribIDs.insert(pair<string, int>("maxitems", (int)eLoopAttribs::maxitems));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::columnwidth, "columnwidth"));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::rowheight, "rowheight"));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::name, "name"));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::orientation, "orientation"));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::valign, "valign"));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::overflow, "overflow"));
|
||||
attribNames.insert(pair<int, string>((int)eLoopAttribs::maxitems, "maxitems"));
|
||||
}
|
||||
|
|
|
@ -187,6 +187,7 @@ public:
|
|||
void Render(cPixmap *p, int x0 = 0, int y0 = 0, int colWidth = 0, int rowHeight = 0);
|
||||
int FuncWidth(void);
|
||||
int FuncHeight(void);
|
||||
int Valign(void) { return GetValue((int)eLoopAttribs::valign); };
|
||||
void Debug(void);
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,28 +8,45 @@
|
|||
/******************************************************************
|
||||
* cListElement
|
||||
******************************************************************/
|
||||
class cListElement : public cViewElement {
|
||||
class cListElement : public cViewElement , public cListShiftable {
|
||||
protected:
|
||||
eMenuCategory menuCat;
|
||||
eOrientation orientation;
|
||||
int num;
|
||||
bool current;
|
||||
bool wasCurrent;
|
||||
bool selectable;
|
||||
bool selectedFromTop;
|
||||
bool suppressAnimation;
|
||||
cListShifter *listShifter;
|
||||
cViewElement *currentElement;
|
||||
char *ParseSeparator(const char *text);
|
||||
void StartListAnimation(void);
|
||||
public:
|
||||
cListElement(void);
|
||||
cListElement(const cListElement &other);
|
||||
virtual ~cListElement(void) {};
|
||||
void SetMenuCategory(eMenuCategory menuCat) { this->menuCat = menuCat; };
|
||||
void SetOrientation(eOrientation orientation) { this->orientation = orientation; };
|
||||
void SetNumber(int number) { num = number; };
|
||||
void SetCurrent(bool cur);
|
||||
bool Current(void) { return current; };
|
||||
bool WasCurrent(void) { return wasCurrent; };
|
||||
void WakeCurrent(void);
|
||||
void SetSelectable(bool sel) { selectable = sel; };
|
||||
void SetSelectedFromTop(void) { selectedFromTop = true; };
|
||||
void SetSelectedFromBottom(void) { selectedFromTop = false; };
|
||||
void SetSuppressAnimation(bool suppress) { suppressAnimation = suppress; };
|
||||
bool DoScroll(void) { return current; };
|
||||
void Render(void);
|
||||
virtual void RenderCurrent(void) { };
|
||||
void Close(void);
|
||||
virtual void Close(void);
|
||||
int ListShiftTime(void) { return ShiftTime(); };
|
||||
int ShiftDistance(void);
|
||||
eOrientation ShiftOrientation(void);
|
||||
void SetIndicatorPosition(cPoint &position);
|
||||
void SetTransparency(int transparency, bool force = false);
|
||||
void StopListAnimation(void);
|
||||
virtual void Clear(bool forceClearBackground = false);
|
||||
};
|
||||
|
||||
|
@ -266,6 +283,8 @@ public:
|
|||
void Set(const cRecording *recording, int level, int total, int New);
|
||||
bool Parse(bool forced = true);
|
||||
void RenderCurrent(void);
|
||||
void Clear(bool forceClearBackground = false);
|
||||
void Close(void);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
|
@ -339,4 +358,35 @@ public:
|
|||
bool Parse(bool forced = true);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cLeChannelList
|
||||
******************************************************************/
|
||||
class cLeChannelList : public cListElement {
|
||||
private:
|
||||
const cChannel *channel;
|
||||
public:
|
||||
cLeChannelList(void);
|
||||
cLeChannelList(const cLeChannelList &other);
|
||||
virtual ~cLeChannelList(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const cChannel *channel);
|
||||
bool Parse(bool forced = true);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cLeGroupList
|
||||
******************************************************************/
|
||||
class cLeGroupList : public cListElement {
|
||||
private:
|
||||
const char *group;
|
||||
int numChannels;
|
||||
public:
|
||||
cLeGroupList(void);
|
||||
cLeGroupList(const cLeGroupList &other);
|
||||
virtual ~cLeGroupList(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const char *group, int numChannels);
|
||||
bool Parse(bool forced = true);
|
||||
};
|
||||
|
||||
#endif //__LISTELEMENTS_H
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
cSdOsd::cSdOsd(void) {
|
||||
osd = NULL;
|
||||
flushLocked = false;
|
||||
animsRunning = 0;
|
||||
animsFlushed = 0;
|
||||
}
|
||||
|
||||
cSdOsd::~cSdOsd(void) {
|
||||
|
@ -19,18 +16,6 @@ void cSdOsd::Unlock(void) {
|
|||
mutex.Unlock();
|
||||
}
|
||||
|
||||
void cSdOsd::LockFlush(void) {
|
||||
Lock();
|
||||
flushLocked = true;
|
||||
Unlock();
|
||||
}
|
||||
|
||||
void cSdOsd::UnlockFlush(void) {
|
||||
Lock();
|
||||
flushLocked = false;
|
||||
Unlock();
|
||||
}
|
||||
|
||||
bool cSdOsd::CreateOsd(int x, int y, int width, int height) {
|
||||
cOsd *newOsd = cOsdProvider::NewOsd(cOsd::OsdLeft() + x, cOsd::OsdTop() + y);
|
||||
if (newOsd) {
|
||||
|
@ -50,10 +35,6 @@ void cSdOsd::DeleteOsd(void) {
|
|||
delete osd;
|
||||
osd = NULL;
|
||||
Unlock();
|
||||
animsRunningMutex.Lock();
|
||||
animsRunning = 0;
|
||||
animsFlushed = 0;
|
||||
animsRunningMutex.Unlock();
|
||||
}
|
||||
|
||||
cPixmap *cSdOsd::CreatePixmap(int layer, cRect &viewPort, cRect &drawPort) {
|
||||
|
@ -69,33 +50,8 @@ void cSdOsd::DestroyPixmap(cPixmap *pix) {
|
|||
}
|
||||
}
|
||||
|
||||
void cSdOsd::AddAnimation(void) {
|
||||
animsRunningMutex.Lock();
|
||||
animsRunning++;
|
||||
animsRunningMutex.Unlock();
|
||||
}
|
||||
|
||||
void cSdOsd::RemoveAnimation(void) {
|
||||
animsRunningMutex.Lock();
|
||||
animsRunning--;
|
||||
animsRunningMutex.Unlock();
|
||||
}
|
||||
|
||||
void cSdOsd::AnimatedFlush(void) {
|
||||
if (osd && !flushLocked) {
|
||||
animsRunningMutex.Lock();
|
||||
if (animsFlushed + 1 >= animsRunning) {
|
||||
animsFlushed = 0;
|
||||
osd->Flush();
|
||||
} else {
|
||||
animsFlushed++;
|
||||
}
|
||||
animsRunningMutex.Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
void cSdOsd::Flush(void) {
|
||||
if (osd && !flushLocked) {
|
||||
if (osd) {
|
||||
osd->Flush();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,24 +8,15 @@ class cSdOsd {
|
|||
private:
|
||||
cOsd *osd;
|
||||
cMutex mutex;
|
||||
bool flushLocked;
|
||||
int animsRunning;
|
||||
int animsFlushed;
|
||||
cMutex animsRunningMutex;
|
||||
public:
|
||||
cSdOsd(void);
|
||||
virtual ~cSdOsd(void);
|
||||
void Lock(void);
|
||||
void Unlock(void);
|
||||
void LockFlush(void);
|
||||
void UnlockFlush(void);
|
||||
bool CreateOsd(int x, int y, int width, int height);
|
||||
void DeleteOsd(void);
|
||||
cPixmap *CreatePixmap(int layer, cRect &viewPort, cRect &drawPort);
|
||||
void DestroyPixmap(cPixmap *pix);
|
||||
void AddAnimation(void);
|
||||
void RemoveAnimation(void);
|
||||
void AnimatedFlush(void);
|
||||
void Flush(void);
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
// --- cView -------------------------------------------------------------
|
||||
|
||||
cAnimator* cView::animator = NULL;
|
||||
|
||||
cView::cView(void) {
|
||||
globals = NULL;
|
||||
viewName = NULL;
|
||||
|
@ -10,8 +12,6 @@ cView::cView(void) {
|
|||
numViewElements = 0;
|
||||
viewElements = NULL;
|
||||
viewElementsHorizontal = NULL;
|
||||
fader = NULL;
|
||||
shifter = NULL;
|
||||
shifting = false;
|
||||
currentTvFrame = NULL;
|
||||
newTvFrame = NULL;
|
||||
|
@ -29,8 +29,8 @@ cView::~cView() {
|
|||
}
|
||||
delete attribs;
|
||||
free(viewName);
|
||||
delete fader;
|
||||
delete shifter;
|
||||
delete animator;
|
||||
animator = NULL;
|
||||
shifting = false;
|
||||
sdOsd.DeleteOsd();
|
||||
}
|
||||
|
@ -141,6 +141,12 @@ bool cView::ValidViewElement(const char *viewElement) {
|
|||
bool cView::ValidViewList(const char *viewList) {
|
||||
if (!strcmp(viewList, "menuitems"))
|
||||
return true;
|
||||
else if (!strcmp(viewList, "channellist"))
|
||||
return true;
|
||||
else if (!strcmp(viewList, "grouplist"))
|
||||
return true;
|
||||
else if (!strcmp(viewList, "groupchannellist"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -162,6 +168,8 @@ void cView::PreCache(void) {
|
|||
continue;
|
||||
viewElements[i]->SetContainer(contX, contY, attribs->Width(), attribs->Height());
|
||||
viewElements[i]->Cache();
|
||||
if (const char *clearOnDisplay = viewElements[i]->ClearOnDisplay())
|
||||
SetClearOnDisplay(i, clearOnDisplay);
|
||||
}
|
||||
if (viewElementsHorizontal) {
|
||||
for (int i=0; i < numViewElements; i++) {
|
||||
|
@ -195,11 +203,27 @@ void cView::PreCache(void) {
|
|||
SetViewElementObjects();
|
||||
}
|
||||
|
||||
void cView::AddAnimation(cAnimation *animation, bool startAnimation) {
|
||||
if (!animator)
|
||||
return;
|
||||
animator->AddAnimation(animation, startAnimation);
|
||||
}
|
||||
|
||||
void cView::RemoveAnimation(cAnimation *animation) {
|
||||
if (!animator)
|
||||
return;
|
||||
animator->RemoveAnimation(animation);
|
||||
}
|
||||
|
||||
bool cView::Init(void) {
|
||||
int osdX = attribs->X();
|
||||
int osdY = attribs->Y();
|
||||
int osdWidth = attribs->Width();
|
||||
int osdHeight = attribs->Height();
|
||||
if (!animator)
|
||||
animator = new cAnimator(&sdOsd);
|
||||
else
|
||||
esyslog("skindesigner: ERROR: animator already exists");
|
||||
return sdOsd.CreateOsd(osdX, osdY, osdWidth, osdHeight);
|
||||
}
|
||||
|
||||
|
@ -209,6 +233,13 @@ void cView::Clear(int ve, bool forceClearBackground) {
|
|||
viewElements[ve]->Clear(forceClearBackground);
|
||||
}
|
||||
|
||||
void cView::SetDirty(int ve) {
|
||||
if (!viewElements[ve])
|
||||
return;
|
||||
viewElements[ve]->SetDirty();
|
||||
viewElements[ve]->SetRestartAnimation();
|
||||
}
|
||||
|
||||
void cView::Render(int ve, bool force) {
|
||||
if (!viewElements[ve])
|
||||
return;
|
||||
|
@ -216,24 +247,30 @@ void cView::Render(int ve, bool force) {
|
|||
viewElements[ve]->Render();
|
||||
}
|
||||
|
||||
void cView::Hide(int ve) {
|
||||
if (!viewElements[ve])
|
||||
return;
|
||||
viewElements[ve]->Hide();
|
||||
}
|
||||
|
||||
void cView::Show(int ve) {
|
||||
if (!viewElements[ve])
|
||||
return;
|
||||
viewElements[ve]->Show();
|
||||
}
|
||||
|
||||
void cView::SetViewelementsAnimOut(void) {
|
||||
for (int i=0; i< numViewElements; i++)
|
||||
if (viewElements[i])
|
||||
viewElements[i]->SetAnimOut();
|
||||
}
|
||||
|
||||
void cView::Close(void) {
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
delete shifter;
|
||||
shifter = NULL;
|
||||
if (initFinished && ShiftTime() > 0) {
|
||||
cRect shiftbox = CoveredArea();
|
||||
cPoint ref = cPoint(shiftbox.X(), shiftbox.Y());
|
||||
cPoint end = ShiftStart(shiftbox);
|
||||
shifter = new cAnimation((cShiftable*)this, end, ref, false);
|
||||
shifter->Shift();
|
||||
delete shifter;
|
||||
shifter = NULL;
|
||||
} else if (initFinished && FadeTime() > 0) {
|
||||
fader = new cAnimation((cFadable*)this, false);
|
||||
fader->Fade();
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
if (animator) {
|
||||
animator->Stop();
|
||||
animator->Finish();
|
||||
delete animator;
|
||||
animator = NULL;
|
||||
}
|
||||
UnScaleTv();
|
||||
ClearVariables();
|
||||
|
@ -242,7 +279,7 @@ void cView::Close(void) {
|
|||
continue;
|
||||
viewElements[i]->Close();
|
||||
}
|
||||
sdOsd.Flush();
|
||||
// sdOsd.Flush();
|
||||
sdOsd.DeleteOsd();
|
||||
}
|
||||
|
||||
|
@ -263,7 +300,16 @@ int cView::ShiftTime(void) {
|
|||
}
|
||||
|
||||
int cView::ShiftMode(void) {
|
||||
return attribs->ShiftMode();
|
||||
int mode = attribs->ShiftMode();
|
||||
if (mode < 0) mode = 0;
|
||||
return mode;
|
||||
}
|
||||
|
||||
void cView::ShiftPositions(cPoint *start, cPoint *end) {
|
||||
cRect shiftbox = CoveredArea();
|
||||
cPoint startPoint = ShiftStart(shiftbox);
|
||||
start->Set(startPoint);
|
||||
end->Set(shiftbox.X(), shiftbox.Y());
|
||||
}
|
||||
|
||||
void cView::SetPosition(cPoint &position, cPoint &reference, bool force) {
|
||||
|
@ -274,32 +320,18 @@ void cView::SetPosition(cPoint &position, cPoint &reference, bool force) {
|
|||
}
|
||||
}
|
||||
|
||||
void cView::RegisterAnimation(void) {
|
||||
sdOsd.AddAnimation();
|
||||
}
|
||||
|
||||
void cView::UnregisterAnimation(void) {
|
||||
sdOsd.RemoveAnimation();
|
||||
}
|
||||
|
||||
void cView::Flush(bool animFlush) {
|
||||
void cView::Flush(void) {
|
||||
if (init) {
|
||||
init = false;
|
||||
StartAnimation();
|
||||
menuInit = true;
|
||||
//LockFlush was set at startup of view to avoid display
|
||||
//of not positioned pixmaps for shifting and fading
|
||||
sdOsd.UnlockFlush();
|
||||
}
|
||||
if (menuInit) {
|
||||
ScaleTv();
|
||||
WakeViewElements();
|
||||
menuInit = false;
|
||||
}
|
||||
if (animFlush)
|
||||
sdOsd.AnimatedFlush();
|
||||
else
|
||||
sdOsd.Flush();
|
||||
sdOsd.Flush();
|
||||
}
|
||||
|
||||
void cView::Debug(void) {
|
||||
|
@ -318,7 +350,6 @@ void cView::Debug(void) {
|
|||
*******************************************************************/
|
||||
void cView::ClearVariables(void) {
|
||||
init = true;
|
||||
initFinished = false;
|
||||
newTvFrame = NULL;
|
||||
currentTvFrame = NULL;
|
||||
menuInit = false;
|
||||
|
@ -332,22 +363,19 @@ int cView::ViewElementId(const char *name) {
|
|||
}
|
||||
|
||||
void cView::StartAnimation(void) {
|
||||
if (ShiftTime() > 0) {
|
||||
cRect shiftbox = CoveredArea();
|
||||
cPoint ref = cPoint(shiftbox.X(), shiftbox.Y());
|
||||
cPoint start = ShiftStart(shiftbox);
|
||||
SetPosition(start, ref);
|
||||
shifter = new cAnimation((cShiftable*)this, start, ref, true);
|
||||
shifter->Start();
|
||||
} else if (FadeTime() > 0) {
|
||||
if (fader)
|
||||
return;
|
||||
SetTransparency(100);
|
||||
sdOsd.Flush();
|
||||
fader = new cAnimation((cFadable*)this, true);
|
||||
fader->Start();
|
||||
if (viewId != eViewType::DisplayMenu &&
|
||||
viewId != eViewType::DisplayPlugin) {
|
||||
if (ShiftTime() > 0) {
|
||||
cShifter *shifter = new cShifter((cShiftable*)this);
|
||||
shifter->SetPersistent();
|
||||
cView::AddAnimation(shifter);
|
||||
} else if (FadeTime() > 0) {
|
||||
cFader *fader = new cFader((cFadable*)this);
|
||||
fader->SetPersistent();
|
||||
cView::AddAnimation(fader);
|
||||
}
|
||||
}
|
||||
initFinished = true;
|
||||
animator->Start();
|
||||
}
|
||||
|
||||
void cView::WakeViewElements(void) {
|
||||
|
@ -435,3 +463,20 @@ void cView::DoScaleTv(const cRect *frame) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cView::SetClearOnDisplay(int ve, const char *clearOnDisplay) {
|
||||
if (!strcmp(clearOnDisplay, "all")) {
|
||||
viewElements[ve]->SetClearAll();
|
||||
return;
|
||||
}
|
||||
vector<int> clearVEs;
|
||||
for (map<string,int>::iterator it = viewElementNames.begin(); it != viewElementNames.end(); it++) {
|
||||
string name = it->first;
|
||||
int id = it->second;
|
||||
if (strstr(clearOnDisplay, name.c_str())) {
|
||||
clearVEs.push_back(id);
|
||||
}
|
||||
}
|
||||
viewElements[ve]->SetClearOnDisplay(clearVEs);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,12 +26,13 @@ using namespace std;
|
|||
class cView : public cFadable, public cShiftable {
|
||||
private:
|
||||
void DoScaleTv(const cRect *frame);
|
||||
void SetClearOnDisplay(int ve, const char *clearOnDisplay);
|
||||
protected:
|
||||
cSdOsd sdOsd;
|
||||
static cAnimator *animator;
|
||||
cViewAttribs *attribs;
|
||||
cRect container;
|
||||
bool init;
|
||||
bool initFinished;
|
||||
eViewType viewId;
|
||||
cGlobals *globals;
|
||||
char *viewName;
|
||||
|
@ -39,8 +40,6 @@ protected:
|
|||
cViewElement **viewElements;
|
||||
cViewElement **viewElementsHorizontal;
|
||||
map<string,int> viewElementNames;
|
||||
cAnimation *fader;
|
||||
cAnimation *shifter;
|
||||
bool shifting;
|
||||
cRect tvFrame;
|
||||
cRect *currentTvFrame;
|
||||
|
@ -73,26 +72,30 @@ public:
|
|||
virtual const cFont *GetTextAreaFont(void) { return NULL; };
|
||||
virtual int GetTextAreaWidth(void) { return 0; };
|
||||
virtual int GetListWidth(void) { return 0; };
|
||||
static void AddAnimation(cAnimation *animation, bool startAnimation = true);
|
||||
static void RemoveAnimation(cAnimation *animation);
|
||||
//View API
|
||||
virtual bool Init(void);
|
||||
void Clear(int ve, bool forceClearBackground = false);
|
||||
void SetDirty(int ve);
|
||||
void Render(int ve, bool force = false);
|
||||
void Hide(int ve);
|
||||
void Show(int ve);
|
||||
virtual void Close(void);
|
||||
virtual void Flush(bool animFlush);
|
||||
virtual void Flush(void);
|
||||
virtual void Debug(void);
|
||||
bool Detached(void) { return false; };
|
||||
int Delay(void) { return 0; };
|
||||
void SetViewelementsAnimOut(void);
|
||||
//Fadable
|
||||
int Delay(void) { return 0; };
|
||||
int FadeTime(void);
|
||||
virtual void SetTransparency(int transparency, bool force = false);
|
||||
//Shiftable
|
||||
int ShiftTime(void);
|
||||
int ShiftMode(void);
|
||||
void ShiftPositions(cPoint *start, cPoint *end);
|
||||
virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false);
|
||||
void SetStartShifting(void) { shifting = true; };
|
||||
void SetEndShifting(void) { shifting = false; };
|
||||
void RegisterAnimation(void);
|
||||
void UnregisterAnimation(void);
|
||||
};
|
||||
|
||||
#endif //__VIEW_H
|
||||
|
|
|
@ -353,13 +353,15 @@ bool cViewDetailEpg::Parse(bool forced) {
|
|||
tokenContainer->AddIntToken((int)eDmDetailedEpgIT::year, sStartTime->tm_year + 1900);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedEpgIT::daynumeric, sStartTime->tm_mday);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedEpgIT::month, sStartTime->tm_mon+1);
|
||||
const cChannel* channel = NULL;
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannels* channels = Channels;
|
||||
channel = Channels->GetByChannelID(event->ChannelID());
|
||||
}
|
||||
#else
|
||||
cChannels* channels = &Channels;
|
||||
channel = Channels.GetByChannelID(event->ChannelID());
|
||||
#endif
|
||||
const cChannel *channel = channels->GetByChannelID(event->ChannelID());
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedEpgST::channelname, channel->Name());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedEpgIT::channelnumber, channel->Number());
|
||||
|
@ -385,7 +387,10 @@ bool cViewDetailEpg::Parse(bool forced) {
|
|||
tokenContainer->AddStringToken((int)eDmDetailedEpgST::vps, *event->GetVpsString());
|
||||
|
||||
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns = LoadReruns();
|
||||
int numReruns = NumReruns(reruns);
|
||||
int numReruns = 0;
|
||||
if (reruns && reruns->Count() > 0)
|
||||
numReruns = reruns->Count();
|
||||
|
||||
vector<int> loopInfo;
|
||||
//num reruns
|
||||
loopInfo.push_back(numReruns);
|
||||
|
@ -395,7 +400,7 @@ bool cViewDetailEpg::Parse(bool forced) {
|
|||
loopInfo.push_back(numActors);
|
||||
tokenContainer->CreateLoopTokenContainer(&loopInfo);
|
||||
if (numReruns > 0) {
|
||||
tokenContainer->AddIntToken((int)eDmDetailedEpgIT::hasreruns, 1);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedEpgIT::hasreruns, numReruns);
|
||||
SetReruns(reruns);
|
||||
}
|
||||
if (scrapInfoAvailable) {
|
||||
|
@ -411,88 +416,75 @@ cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *cViewDetailEpg::LoadR
|
|||
if (!epgSearchPlugin)
|
||||
return NULL;
|
||||
|
||||
if (isempty(event->Title()))
|
||||
if (!event || isempty(event->Title()))
|
||||
return NULL;
|
||||
|
||||
Epgsearch_searchresults_v1_0 data;
|
||||
data.query = (char*)event->Title();
|
||||
std::string strQuery = event->Title();
|
||||
|
||||
if (config.useSubtitleRerun && !isempty(event->ShortText())) {
|
||||
strQuery += "~";
|
||||
strQuery += event->ShortText();
|
||||
}
|
||||
|
||||
data.query = (char *)strQuery.c_str();
|
||||
data.mode = 0;
|
||||
data.channelNr = 0;
|
||||
data.useTitle = true;
|
||||
data.useSubTitle = true;
|
||||
data.useDescription = false;
|
||||
|
||||
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *result = NULL;
|
||||
if (epgSearchPlugin->Service("Epgsearch-searchresults-v1.0", &data))
|
||||
result = data.pResultList;
|
||||
return result;
|
||||
}
|
||||
|
||||
int cViewDetailEpg::NumReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns) {
|
||||
if (!reruns || reruns->Count() < 2)
|
||||
return 0;
|
||||
|
||||
int maxNumReruns = config.rerunAmount;
|
||||
int rerunDistance = config.rerunDistance * 3600;
|
||||
int rerunMaxChannel = config.rerunMaxChannel;
|
||||
|
||||
int i = 0;
|
||||
for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = reruns->First(); r && i < maxNumReruns; r = reruns->Next(r)) {
|
||||
time_t eventStart = event->StartTime();
|
||||
time_t rerunStart = r->event->StartTime();
|
||||
|
||||
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns = NULL;
|
||||
if (epgSearchPlugin->Service("Epgsearch-searchresults-v1.0", &data)) {
|
||||
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *result = data.pResultList;
|
||||
if (result) {
|
||||
for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = result->First(); r && i < maxNumReruns; r = result->Next(r)) {
|
||||
time_t eventStart = event->StartTime();
|
||||
time_t rerunStart = r->event->StartTime();
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannels* channels = Channels;
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(r->event->ChannelID(), true, true);
|
||||
#else
|
||||
cChannels* channels = &Channels;
|
||||
const cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true);
|
||||
#endif
|
||||
const cChannel *channel = channels->GetByChannelID(r->event->ChannelID(), true, true);
|
||||
//check for identical event
|
||||
if ((event->ChannelID() == r->event->ChannelID()) && (eventStart == rerunStart))
|
||||
continue;
|
||||
//check for timely distance
|
||||
if (rerunDistance > 0)
|
||||
if (rerunStart - eventStart < rerunDistance)
|
||||
continue;
|
||||
//check for maxchannel
|
||||
if (rerunMaxChannel > 0)
|
||||
if (channel && channel->Number() > rerunMaxChannel)
|
||||
continue;
|
||||
i++;
|
||||
//check for identical event
|
||||
if ((event->ChannelID() == r->event->ChannelID()) && (eventStart == rerunStart))
|
||||
continue;
|
||||
//check for timely distance
|
||||
if (rerunDistance > 0)
|
||||
if (rerunStart - eventStart < rerunDistance)
|
||||
continue;
|
||||
//check for maxchannel
|
||||
if (rerunMaxChannel > 0)
|
||||
if (channel && channel->Number() > rerunMaxChannel)
|
||||
continue;
|
||||
if (!reruns) reruns = new cList<Epgsearch_searchresults_v1_0::cServiceSearchResult>;
|
||||
reruns->Add(r);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return i;
|
||||
return reruns;
|
||||
}
|
||||
|
||||
void cViewDetailEpg::SetReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns) {
|
||||
if (!reruns || reruns->Count() < 2)
|
||||
if (!reruns || reruns->Count() < 1)
|
||||
return;
|
||||
|
||||
int maxNumReruns = config.rerunAmount;
|
||||
int rerunDistance = config.rerunDistance * 3600;
|
||||
int rerunMaxChannel = config.rerunMaxChannel;
|
||||
|
||||
int i = 0;
|
||||
for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = reruns->First(); r && i < maxNumReruns; r = reruns->Next(r)) {
|
||||
time_t eventStart = event->StartTime();
|
||||
time_t rerunStart = r->event->StartTime();
|
||||
for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = reruns->First(); r; r = reruns->Next(r)) {
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannels* channels = Channels;
|
||||
const cChannel *channel = Channels->GetByChannelID(r->event->ChannelID(), true, true);
|
||||
#else
|
||||
cChannels* channels = &Channels;
|
||||
const cChannel *channel = Channels.GetByChannelID(r->event->ChannelID(), true, true);
|
||||
#endif
|
||||
const cChannel *channel = channels->GetByChannelID(r->event->ChannelID(), true, true);
|
||||
//check for identical event
|
||||
if ((event->ChannelID() == r->event->ChannelID()) && (eventStart == rerunStart))
|
||||
continue;
|
||||
//check for timely distance
|
||||
if (rerunDistance > 0)
|
||||
if (rerunStart - eventStart < rerunDistance)
|
||||
continue;
|
||||
//check for maxchannel
|
||||
if (rerunMaxChannel > 0)
|
||||
if (channel && channel->Number() > rerunMaxChannel)
|
||||
continue;
|
||||
tokenContainer->AddLoopToken(rerunsIndex, i, (int)eRerunsLT::title, r->event->Title());
|
||||
tokenContainer->AddLoopToken(rerunsIndex, i, (int)eRerunsLT::shorttext, r->event->ShortText());
|
||||
tokenContainer->AddLoopToken(rerunsIndex, i, (int)eRerunsLT::start, *(r->event->GetTimeString()));
|
||||
|
@ -511,6 +503,8 @@ void cViewDetailEpg::SetReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearc
|
|||
tokenContainer->AddLoopToken(rerunsIndex, i, (int)eRerunsLT::channelname, "");
|
||||
tokenContainer->AddLoopToken(rerunsIndex, i, (int)eRerunsLT::channelnumber, "");
|
||||
}
|
||||
if (r == reruns->Last())
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -609,6 +603,13 @@ void cViewDetailRec::SetTokenContainer(void) {
|
|||
tokenContainer->DefineIntToken("{recimg1avaialble}", (int)eDmDetailedRecIT::recimg1avaialble);
|
||||
tokenContainer->DefineIntToken("{recimg2avaialble}", (int)eDmDetailedRecIT::recimg2avaialble);
|
||||
tokenContainer->DefineIntToken("{recimg3avaialble}", (int)eDmDetailedRecIT::recimg3avaialble);
|
||||
tokenContainer->DefineIntToken("{fps}", (int)eDmDetailedRecIT::framesPerSecond);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eDmDetailedRecIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eDmDetailedRecIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)eDmDetailedRecIT::isRadio);
|
||||
tokenContainer->DefineIntToken("{isRecording}", (int)eDmDetailedRecIT::isRecording);
|
||||
tokenContainer->DefineIntToken("{isInUse}", (int)eDmDetailedRecIT::isInUse);
|
||||
tokenContainer->DefineIntToken("{errors}", (int)eDmDetailedRecIT::errors);
|
||||
tokenContainer->DefineIntToken("{ismovie}", (int)eScraperIT::ismovie);
|
||||
tokenContainer->DefineIntToken("{moviebudget}", (int)eScraperIT::moviebudget);
|
||||
tokenContainer->DefineIntToken("{movierevenue}", (int)eScraperIT::movierevenue);
|
||||
|
@ -672,6 +673,13 @@ bool cViewDetailRec::Parse(bool forced) {
|
|||
tokenContainer->AddStringToken((int)eDmDetailedRecST::epgname, info->Title());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::shorttext, info->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::description, info->Description());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::framesPerSecond, info->FramesPerSecond());
|
||||
int errors = -1;
|
||||
// ENABLE_ERRORS is only used in VDR-2.5.4 if the coresponding patch is installed, so it can be ignored in other versions
|
||||
#if (defined (APIVERSNUM) && (APIVERSNUM >= 20505)) || defined (ENABLE_ERRORS)
|
||||
errors = info->Errors();
|
||||
#endif
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::errors, errors);
|
||||
const cEvent *event = info->GetEvent();
|
||||
if (event) {
|
||||
cString recDate = event->GetDateString();
|
||||
|
@ -697,6 +705,11 @@ bool cViewDetailRec::Parse(bool forced) {
|
|||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::durationevent, duration);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::durationeventhours, duration / 60);
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::durationeventminutes, *cString::sprintf("%.2d", duration%60));
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isHD, RecordingIsHD(event, tChannelID::InvalidID)); // detect HD from 'info', no fallback to channelID
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isUHD, RecordingIsUHD(event, tChannelID::InvalidID)); // detect UHD from 'info', no fallback to channelID
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); // detect Radio from 'info' and FPS
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isRecording, recording->IsInUse() & ruTimer);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::isInUse, recording->IsInUse());
|
||||
}
|
||||
}
|
||||
SetRecInfos();
|
||||
|
@ -810,21 +823,25 @@ void cViewDetailRec::SetRecInfos(void) {
|
|||
|
||||
const cRecordingInfo *info = recording->Info();
|
||||
if (info) {
|
||||
if (info->ChannelName() && (strlen(info->ChannelName()) > 0)) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::recchannelname, info->ChannelName());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::recchannelid, info->ChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::recchannelnumber, 0); // cannot be provided, for backward compatibility only
|
||||
} else {
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannels* channels = Channels;
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(info->ChannelID());
|
||||
#else
|
||||
cChannels* channels = &Channels;
|
||||
const cChannel *channel = Channels.GetByChannelID(info->ChannelID());
|
||||
#endif
|
||||
const cChannel *channel = channels->GetByChannelID(info->ChannelID());
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::recchannelname, channel->Name());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::recchannelid, *channel->GetChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::recchannelnumber, channel->Number());
|
||||
}
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::recchannelname, channel->Name());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedRecST::recchannelid, *channel->GetChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedRecIT::recchannelnumber, channel->Number());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (index) {
|
||||
int nLastIndex = index->Last();
|
||||
if (nLastIndex) {
|
||||
|
|
|
@ -44,7 +44,6 @@ protected:
|
|||
int rerunsIndex;
|
||||
int actorsIndex;
|
||||
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *LoadReruns(void);
|
||||
int NumReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns);
|
||||
void SetReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns);
|
||||
void SetEpgPictures(int eventId);
|
||||
public:
|
||||
|
@ -112,4 +111,4 @@ public:
|
|||
void Set(skindesignerapi::cTokenContainer *tk);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
#endif //__VIEWDETAIL_H
|
||||
#endif //__VIEWDETAIL_H
|
||||
|
|
|
@ -24,9 +24,73 @@ cViewChannel::cViewChannel(void) {
|
|||
veStatusInfo = NULL;
|
||||
veScraperContent = NULL;
|
||||
veEcmInfo = NULL;
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
veChannelHints = NULL;
|
||||
veChannelDetail = NULL;
|
||||
veChannelListDetail = NULL;
|
||||
veGroupChannelListDetail = NULL;
|
||||
channelList = NULL;
|
||||
groupList = NULL;
|
||||
groupChannelList = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
cViewChannel::~cViewChannel() {
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
delete channelList;
|
||||
delete groupList;
|
||||
delete groupChannelList;
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::SetGlobals(cGlobals *globals) {
|
||||
cView::SetGlobals(globals);
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (channelList)
|
||||
channelList->SetGlobals(globals);
|
||||
if (groupList)
|
||||
groupList->SetGlobals(globals);
|
||||
if (groupChannelList)
|
||||
groupChannelList->SetGlobals(globals);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::PreCache(void) {
|
||||
cView::PreCache();
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (channelList) {
|
||||
channelList->SetContainer(attribs->X(), attribs->Y(), attribs->Width(), attribs->Height());
|
||||
channelList->PreCache();
|
||||
}
|
||||
if (groupList) {
|
||||
groupList->SetContainer(attribs->X(), attribs->Y(), attribs->Width(), attribs->Height());
|
||||
groupList->PreCache();
|
||||
}
|
||||
if (groupChannelList) {
|
||||
groupChannelList->SetContainer(attribs->X(), attribs->Y(), attribs->Width(), attribs->Height());
|
||||
groupChannelList->PreCache();
|
||||
}
|
||||
#endif
|
||||
if (viewElements[(int)eVeDisplayChannel::channellistback])
|
||||
viewElements[(int)eVeDisplayChannel::channellistback]->UnsetStartAnim();
|
||||
if (viewElements[(int)eVeDisplayChannel::grouplistback])
|
||||
viewElements[(int)eVeDisplayChannel::grouplistback]->UnsetStartAnim();
|
||||
if (viewElements[(int)eVeDisplayChannel::groupchannellistback])
|
||||
viewElements[(int)eVeDisplayChannel::groupchannellistback]->UnsetStartAnim();
|
||||
SetViewelementsAnimOut();
|
||||
}
|
||||
|
||||
void cViewChannel::AddChannelViewList(const char *listName, cViewList *viewList) {
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (!strcmp(listName, "channellist"))
|
||||
channelList = dynamic_cast<cViewListChannelList*>(viewList);
|
||||
else if (!strcmp(listName, "grouplist"))
|
||||
groupList = dynamic_cast<cViewListGroupList*>(viewList);
|
||||
else if (!strcmp(listName, "groupchannellist"))
|
||||
groupChannelList = dynamic_cast<cViewListChannelList*>(viewList);
|
||||
else
|
||||
esyslog("skindesigner: invalid view list %s in displaychannel", listName);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::SetViewElements(void) {
|
||||
|
@ -43,6 +107,13 @@ void cViewChannel::SetViewElements(void) {
|
|||
viewElementNames.insert(pair<string, int>("devices", (int)eVeDisplayChannel::devices));
|
||||
viewElementNames.insert(pair<string, int>("currentweather", (int)eVeDisplayChannel::currentweather));
|
||||
viewElementNames.insert(pair<string, int>("scrapercontent", (int)eVeDisplayChannel::scrapercontent));
|
||||
viewElementNames.insert(pair<string, int>("channelhints", (int)eVeDisplayChannel::channelhints));
|
||||
viewElementNames.insert(pair<string, int>("channeldetail", (int)eVeDisplayChannel::channeldetail));
|
||||
viewElementNames.insert(pair<string, int>("channellistback", (int)eVeDisplayChannel::channellistback));
|
||||
viewElementNames.insert(pair<string, int>("channellistdetail", (int)eVeDisplayChannel::channellistdetail));
|
||||
viewElementNames.insert(pair<string, int>("grouplistback", (int)eVeDisplayChannel::grouplistback));
|
||||
viewElementNames.insert(pair<string, int>("groupchannellistback", (int)eVeDisplayChannel::groupchannellistback));
|
||||
viewElementNames.insert(pair<string, int>("groupchannellistdetail", (int)eVeDisplayChannel::groupchannellistdetail));
|
||||
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayChannel::datetime));
|
||||
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayChannel::time));
|
||||
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayChannel::message));
|
||||
|
@ -68,6 +139,7 @@ void cViewChannel::SetViewElementObjects(void) {
|
|||
else if (dynamic_cast<cVeDcEpgInfo*>(viewElements[i]))
|
||||
{
|
||||
veEpgInfo = dynamic_cast<cVeDcEpgInfo*>(viewElements[i]);
|
||||
veEpgInfo->SetGlobalTimers(&globalTimers);
|
||||
}
|
||||
else if (dynamic_cast<cVeDcProgressBar*>(viewElements[i]))
|
||||
{
|
||||
|
@ -76,11 +148,30 @@ void cViewChannel::SetViewElementObjects(void) {
|
|||
else if (dynamic_cast<cVeDcStatusInfo*>(viewElements[i]))
|
||||
{
|
||||
veStatusInfo = dynamic_cast<cVeDcStatusInfo*>(viewElements[i]);
|
||||
veStatusInfo->SetGlobalTimers(&globalTimers);
|
||||
}
|
||||
else if (dynamic_cast<cVeDcScraperContent*>(viewElements[i]))
|
||||
{
|
||||
veScraperContent = dynamic_cast<cVeDcScraperContent*>(viewElements[i]);
|
||||
}
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
else if (dynamic_cast<cVeDcChannelListDetail*>(viewElements[i]))
|
||||
{
|
||||
veChannelListDetail = dynamic_cast<cVeDcChannelListDetail*>(viewElements[i]);
|
||||
}
|
||||
else if (dynamic_cast<cVeDcGroupChannelListDetail*>(viewElements[i]))
|
||||
{
|
||||
veGroupChannelListDetail = dynamic_cast<cVeDcGroupChannelListDetail*>(viewElements[i]);
|
||||
}
|
||||
else if (dynamic_cast<cVeDcChannelHints*>(viewElements[i]))
|
||||
{
|
||||
veChannelHints = dynamic_cast<cVeDcChannelHints*>(viewElements[i]);
|
||||
}
|
||||
else if (dynamic_cast<cVeDcChannelDetail*>(viewElements[i]))
|
||||
{
|
||||
veChannelDetail = dynamic_cast<cVeDcChannelDetail*>(viewElements[i]);
|
||||
}
|
||||
#endif
|
||||
else if (dynamic_cast<cVeDcEcmInfo*>(viewElements[i]))
|
||||
{
|
||||
veEcmInfo = dynamic_cast<cVeDcEcmInfo*>(viewElements[i]);
|
||||
|
@ -98,16 +189,48 @@ void cViewChannel::SetViewElementObjects(void) {
|
|||
|
||||
void cViewChannel::ClearVariables(void) {
|
||||
cView::ClearVariables();
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
viewType = dcDefault;
|
||||
viewTypeLast = dcDefault;
|
||||
initExtended = true;
|
||||
displayList = false;
|
||||
initList = false;
|
||||
channelInput = false;
|
||||
#endif
|
||||
channelChange = false;
|
||||
displayChannelGroups = false;
|
||||
mode = dmDefault;
|
||||
if (veCustomTokens)
|
||||
veCustomTokens->Reset();
|
||||
timersLoaded = false;
|
||||
globalTimers.ClearTimers();
|
||||
}
|
||||
|
||||
void cViewChannel::GetTimers(void) {
|
||||
if (!timersLoaded) {
|
||||
timersLoaded = true;
|
||||
globalTimers.LoadTimers();
|
||||
}
|
||||
}
|
||||
|
||||
void cViewChannel::SetChannel(const cChannel *channel, int number) {
|
||||
channelChange = true;
|
||||
bool wasChannelGroups = displayChannelGroups;
|
||||
displayChannelGroups = false;
|
||||
|
||||
//check if channelgroups have to be cleared
|
||||
bool clearChannelGroups = (mode == dmChannelGroups) ? true : false;
|
||||
mode = dmDefault;
|
||||
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
//check if channel hints have to be cleared
|
||||
if (number) {
|
||||
channelInput = true;
|
||||
} else if (channelInput) {
|
||||
channelInput = false;
|
||||
if (veChannelHints)
|
||||
veChannelHints->Close();
|
||||
}
|
||||
if (veChannelDetail)
|
||||
veChannelDetail->Clear(true);
|
||||
#endif
|
||||
|
||||
if (veChannelInfo) {
|
||||
veChannelInfo->Clear();
|
||||
|
@ -116,24 +239,15 @@ void cViewChannel::SetChannel(const cChannel *channel, int number) {
|
|||
|
||||
if (channel) {
|
||||
if (!channel->GroupSep()) {
|
||||
if (wasChannelGroups)
|
||||
if (clearChannelGroups)
|
||||
Clear((int)eVeDisplayChannel::channelgroup);
|
||||
if (veStatusInfo)
|
||||
veStatusInfo->Set(channel);
|
||||
if (veEcmInfo)
|
||||
veEcmInfo->Set(channel);
|
||||
} else {
|
||||
displayChannelGroups = true;
|
||||
Clear((int)eVeDisplayChannel::channelinfo, true);
|
||||
Clear((int)eVeDisplayChannel::epginfo, true);
|
||||
Clear((int)eVeDisplayChannel::statusinfo, true);
|
||||
Clear((int)eVeDisplayChannel::progressbar, true);
|
||||
Clear((int)eVeDisplayChannel::screenresolution, true);
|
||||
Clear((int)eVeDisplayChannel::signalquality, true);
|
||||
Clear((int)eVeDisplayChannel::audioinfo, true);
|
||||
Clear((int)eVeDisplayChannel::ecminfo, true);
|
||||
Clear((int)eVeDisplayChannel::devices, true);
|
||||
Clear((int)eVeDisplayChannel::customtokens, true);
|
||||
mode = dmChannelGroups;
|
||||
ClearBasic(false);
|
||||
if (veChannelGroup)
|
||||
veChannelGroup->Set(channel);
|
||||
}
|
||||
|
@ -147,9 +261,6 @@ void cViewChannel::SetEvents(const cEvent *present, const cEvent *following) {
|
|||
if (veProgressBar)
|
||||
veProgressBar->Set(present);
|
||||
|
||||
if (!present && !following)
|
||||
return;
|
||||
|
||||
if (veEpgInfo)
|
||||
veEpgInfo->Set(present, following);
|
||||
|
||||
|
@ -166,38 +277,329 @@ void cViewChannel::SetMessage(eMessageType type, const char *text) {
|
|||
}
|
||||
}
|
||||
|
||||
void cViewChannel::Flush(bool animFlush) {
|
||||
if (init) {
|
||||
sdOsd.LockFlush();
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
|
||||
void cViewChannel::SetViewType(eDisplaychannelView viewType) {
|
||||
viewTypeLast = this->viewType;
|
||||
this->viewType = viewType;
|
||||
}
|
||||
|
||||
int cViewChannel::MaxItems(void) {
|
||||
initList = true;
|
||||
if (viewType == dcChannelList && channelList)
|
||||
return channelList->NumItems();
|
||||
else if (viewType == dcGroupsList && groupList)
|
||||
return groupList->NumItems();
|
||||
else if (viewType == dcGroupsChannelList && groupChannelList)
|
||||
return groupChannelList->NumItems();
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool cViewChannel::KeyRightOpensChannellist(void) {
|
||||
if (channelList) {
|
||||
if (channelList->Button() == eButtonType::left)
|
||||
return false;
|
||||
else if (channelList->Button() == eButtonType::right)
|
||||
return true;
|
||||
}
|
||||
if (groupList) {
|
||||
if (groupList->Button() == eButtonType::left)
|
||||
return true;
|
||||
else if (groupList->Button() == eButtonType::right)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void cViewChannel::SetChannelInfo(const cChannel *channel) {
|
||||
if (!channel)
|
||||
return;
|
||||
if (viewType == dcChannelInfo && veChannelDetail) {
|
||||
ClearOnDisplay();
|
||||
veChannelDetail->Set(channel);
|
||||
Render((int)eVeDisplayChannel::channeldetail);
|
||||
} else if (viewType == dcChannelListInfo && veChannelListDetail) {
|
||||
veChannelListDetail->Set(channel);
|
||||
Render((int)eVeDisplayChannel::channellistdetail);
|
||||
} else if (viewType == dcGroupsChannelListInfo && veGroupChannelListDetail) {
|
||||
veGroupChannelListDetail->Set(channel);
|
||||
Render((int)eVeDisplayChannel::groupchannellistdetail);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewChannel::SetChannelList(const cChannel *channel, int index, bool current) {
|
||||
displayList = true;
|
||||
if (viewType == dcChannelList && channelList) {
|
||||
channelList->Set(channel, index, current);
|
||||
} else if (viewType == dcGroupsChannelList && groupChannelList) {
|
||||
groupChannelList->Set(channel, index, current);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewChannel::SetGroupList(const char *group, int numChannels, int index, bool current) {
|
||||
displayList = true;
|
||||
if (groupList) {
|
||||
groupList->Set(group, numChannels, index, current);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewChannel::ClearList(void) {
|
||||
if (viewType == dcChannelList && channelList)
|
||||
channelList->Clear();
|
||||
if (viewType == dcGroupsList && groupList)
|
||||
groupList->Clear();
|
||||
if (viewType == dcGroupsChannelList && groupChannelList)
|
||||
groupChannelList->Clear();
|
||||
}
|
||||
|
||||
void cViewChannel::SetNumChannelHints(int num) {
|
||||
if (veChannelHints)
|
||||
veChannelHints->SetNumHints(num);
|
||||
channelHints = true;
|
||||
}
|
||||
|
||||
void cViewChannel::SetChannelHint(const cChannel *channel) {
|
||||
if (veChannelHints)
|
||||
veChannelHints->SetHint(channel);
|
||||
}
|
||||
|
||||
#endif //USE_ZAPCOCKPIT
|
||||
|
||||
void cViewChannel::Close(void) {
|
||||
bool doAnim = true;
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (viewType != dcDefault || viewTypeLast != dcDefault)
|
||||
doAnim = false;
|
||||
#endif
|
||||
if (doAnim) {
|
||||
animator->Stop();
|
||||
animator->Finish();
|
||||
}
|
||||
delete animator;
|
||||
animator = NULL;
|
||||
UnScaleTv();
|
||||
ClearVariables();
|
||||
for (int i=0; i < numViewElements; i++) {
|
||||
if (!viewElements[i])
|
||||
continue;
|
||||
viewElements[i]->Close();
|
||||
}
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (channelList)
|
||||
channelList->Close();
|
||||
if (groupList)
|
||||
groupList->Close();
|
||||
if (groupChannelList)
|
||||
groupChannelList->Close();
|
||||
#endif
|
||||
// sdOsd.Flush();
|
||||
sdOsd.DeleteOsd();
|
||||
}
|
||||
|
||||
void cViewChannel::ClearBasic(bool clearBackground) {
|
||||
if (clearBackground) {
|
||||
Clear((int)eVeDisplayChannel::background, true);
|
||||
Clear((int)eVeDisplayChannel::currentweather, true);
|
||||
}
|
||||
Clear((int)eVeDisplayChannel::channelinfo, true);
|
||||
Clear((int)eVeDisplayChannel::epginfo, true);
|
||||
Clear((int)eVeDisplayChannel::statusinfo, true);
|
||||
Clear((int)eVeDisplayChannel::scrapercontent, true);
|
||||
Clear((int)eVeDisplayChannel::progressbar, true);
|
||||
Clear((int)eVeDisplayChannel::screenresolution, true);
|
||||
Clear((int)eVeDisplayChannel::signalquality, true);
|
||||
Clear((int)eVeDisplayChannel::audioinfo, true);
|
||||
Clear((int)eVeDisplayChannel::ecminfo, true);
|
||||
Clear((int)eVeDisplayChannel::devices, true);
|
||||
Clear((int)eVeDisplayChannel::customtokens, true);
|
||||
}
|
||||
|
||||
void cViewChannel::ClearExtended(void) {
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
//exit from channel list
|
||||
if ((viewTypeLast == dcChannelList || viewTypeLast == dcChannelListInfo) && viewType == dcDefault && channelList) {
|
||||
channelList->Clear();
|
||||
Clear((int)eVeDisplayChannel::channellistback);
|
||||
Clear((int)eVeDisplayChannel::channellistdetail);
|
||||
SetDirty((int)eVeDisplayChannel::channellistback);
|
||||
initExtended = true;
|
||||
init = true;
|
||||
ShowBasic();
|
||||
}
|
||||
//exit from channellist info to channel list
|
||||
if (viewTypeLast == dcChannelListInfo && viewType == dcChannelList) {
|
||||
Clear((int)eVeDisplayChannel::channellistdetail);
|
||||
SetDirty((int)eVeDisplayChannel::channellistdetail);
|
||||
}
|
||||
//exit from group list
|
||||
if (viewTypeLast == dcGroupsList && viewType == dcDefault && groupList) {
|
||||
groupList->Clear();
|
||||
Clear((int)eVeDisplayChannel::grouplistback);
|
||||
SetDirty((int)eVeDisplayChannel::grouplistback);
|
||||
initExtended = true;
|
||||
init = true;
|
||||
ShowBasic();
|
||||
}
|
||||
//exit from group channel list to group list
|
||||
if (viewTypeLast == dcGroupsChannelList && viewType == dcGroupsList && groupChannelList) {
|
||||
groupChannelList->Clear();
|
||||
Clear((int)eVeDisplayChannel::groupchannellistback);
|
||||
SetDirty((int)eVeDisplayChannel::groupchannellistback);
|
||||
}
|
||||
//exit from groupchannellist info to groupchannel list
|
||||
if (viewTypeLast == dcGroupsChannelListInfo && viewType == dcGroupsChannelList) {
|
||||
Clear((int)eVeDisplayChannel::groupchannellistdetail);
|
||||
SetDirty((int)eVeDisplayChannel::groupchannellistdetail);
|
||||
}
|
||||
//exit from channel list
|
||||
if ((viewTypeLast == dcGroupsChannelList || viewTypeLast == dcGroupsChannelListInfo) && viewType == dcDefault && groupList && groupChannelList) {
|
||||
groupList->Clear();
|
||||
groupChannelList->Clear();
|
||||
Clear((int)eVeDisplayChannel::grouplistback);
|
||||
Clear((int)eVeDisplayChannel::groupchannellistback);
|
||||
Clear((int)eVeDisplayChannel::groupchannellistdetail);
|
||||
SetDirty((int)eVeDisplayChannel::groupchannellistback);
|
||||
SetDirty((int)eVeDisplayChannel::grouplistback);
|
||||
SetDirty((int)eVeDisplayChannel::groupchannellistdetail);
|
||||
initExtended = true;
|
||||
init = true;
|
||||
ShowBasic();
|
||||
}
|
||||
//exit from channel info to channel or group list
|
||||
if (viewTypeLast == dcChannelInfo && (viewType == dcChannelList || viewType == dcGroupsList)) {
|
||||
Clear((int)eVeDisplayChannel::channeldetail, true);
|
||||
}
|
||||
viewTypeLast = dcDefault;
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::ClearOnDisplay(void) {
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (viewType == dcChannelInfo && veChannelDetail) {
|
||||
vector<int> clear = veChannelDetail->GetClearOnDisplay();
|
||||
for (vector<int>::iterator ve = clear.begin(); ve != clear.end(); ve++) {
|
||||
Hide(*ve);
|
||||
}
|
||||
} else {
|
||||
cViewElement *listBack = NULL;
|
||||
if (viewType == dcChannelList)
|
||||
listBack = viewElements[(int)eVeDisplayChannel::channellistback];
|
||||
else if (viewType == dcGroupsList)
|
||||
listBack = viewElements[(int)eVeDisplayChannel::grouplistback];
|
||||
if (!listBack)
|
||||
return;
|
||||
if (listBack->DoClearAll()) {
|
||||
HideBasic();
|
||||
return;
|
||||
}
|
||||
vector<int> clear = listBack->GetClearOnDisplay();
|
||||
for (vector<int>::iterator ve = clear.begin(); ve != clear.end(); ve++) {
|
||||
Hide(*ve);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::DrawBasic(bool initial) {
|
||||
if (initial) {
|
||||
Render((int)eVeDisplayChannel::background);
|
||||
Render((int)eVeDisplayChannel::currentweather);
|
||||
}
|
||||
|
||||
if (!displayChannelGroups) {
|
||||
//normal display
|
||||
if (!shifting) {
|
||||
Render((int)eVeDisplayChannel::channelinfo);
|
||||
Render((int)eVeDisplayChannel::epginfo);
|
||||
Render((int)eVeDisplayChannel::statusinfo);
|
||||
Render((int)eVeDisplayChannel::scrapercontent);
|
||||
Render((int)eVeDisplayChannel::progressbar, channelChange);
|
||||
Render((int)eVeDisplayChannel::screenresolution);
|
||||
Render((int)eVeDisplayChannel::signalquality);
|
||||
Render((int)eVeDisplayChannel::audioinfo);
|
||||
Render((int)eVeDisplayChannel::ecminfo);
|
||||
Render((int)eVeDisplayChannel::devices);
|
||||
Render((int)eVeDisplayChannel::customtokens);
|
||||
Render((int)eVeDisplayChannel::message);
|
||||
Render((int)eVeDisplayChannel::channelinfo);
|
||||
Render((int)eVeDisplayChannel::epginfo);
|
||||
Render((int)eVeDisplayChannel::statusinfo);
|
||||
Render((int)eVeDisplayChannel::scrapercontent);
|
||||
Render((int)eVeDisplayChannel::progressbar, channelChange);
|
||||
Render((int)eVeDisplayChannel::screenresolution);
|
||||
Render((int)eVeDisplayChannel::signalquality);
|
||||
Render((int)eVeDisplayChannel::audioinfo);
|
||||
Render((int)eVeDisplayChannel::ecminfo);
|
||||
Render((int)eVeDisplayChannel::devices);
|
||||
Render((int)eVeDisplayChannel::customtokens);
|
||||
Render((int)eVeDisplayChannel::message);
|
||||
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (channelHints) {
|
||||
channelHints = false;
|
||||
if (veChannelHints) {
|
||||
if (veChannelHints->Active())
|
||||
veChannelHints->Close();
|
||||
veChannelHints->Parse();
|
||||
veChannelHints->Render();
|
||||
}
|
||||
} else {
|
||||
//channelgroup display
|
||||
Render((int)eVeDisplayChannel::channelgroup);
|
||||
}
|
||||
if (!shifting) {
|
||||
Render((int)eVeDisplayChannel::datetime);
|
||||
Render((int)eVeDisplayChannel::time);
|
||||
}
|
||||
channelChange = false;
|
||||
cView::Flush(animFlush);
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::HideBasic(void) {
|
||||
for (int ve = (int)eVeDisplayChannel::background; ve <= (int)eVeDisplayChannel::ecminfo; ve++) {
|
||||
Hide(ve);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewChannel::ShowBasic(void) {
|
||||
for (int ve = (int)eVeDisplayChannel::background; ve <= (int)eVeDisplayChannel::ecminfo; ve++) {
|
||||
Show(ve);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewChannel::DrawExtended(void) {
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (!displayList)
|
||||
return;
|
||||
if (initExtended) {
|
||||
ClearOnDisplay();
|
||||
initExtended = false;
|
||||
}
|
||||
if (viewType == dcChannelList && channelList) {
|
||||
Render((int)eVeDisplayChannel::channellistback);
|
||||
channelList->Draw(mcUndefined);
|
||||
if (initList)
|
||||
channelList->StartAnimation();
|
||||
} else if (viewType == dcGroupsList && groupList) {
|
||||
Render((int)eVeDisplayChannel::grouplistback);
|
||||
groupList->Draw(mcUndefined);
|
||||
if (initList)
|
||||
groupList->StartAnimation();
|
||||
} else if (viewType == dcGroupsChannelList && groupChannelList) {
|
||||
Render((int)eVeDisplayChannel::groupchannellistback);
|
||||
groupChannelList->Draw(mcUndefined);
|
||||
if (initList)
|
||||
groupChannelList->StartAnimation();
|
||||
}
|
||||
displayList = false;
|
||||
initList = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void cViewChannel::Flush(void) {
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
ClearExtended();
|
||||
#endif
|
||||
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
if (viewType < dcChannelList) {
|
||||
#endif
|
||||
//Basic Display Handling
|
||||
if (mode == dmDefault) {
|
||||
DrawBasic(init);
|
||||
} else if (mode == dmChannelGroups) {
|
||||
if (init) {
|
||||
Render((int)eVeDisplayChannel::background);
|
||||
Render((int)eVeDisplayChannel::currentweather);
|
||||
}
|
||||
Render((int)eVeDisplayChannel::channelgroup);
|
||||
}
|
||||
Render((int)eVeDisplayChannel::datetime);
|
||||
Render((int)eVeDisplayChannel::time);
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
}
|
||||
#endif
|
||||
channelChange = false;
|
||||
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
DrawExtended();
|
||||
#endif
|
||||
|
||||
cView::Flush();
|
||||
}
|
||||
|
|
|
@ -2,30 +2,77 @@
|
|||
#define __VIEWDISPLAYCHANNEL_H
|
||||
|
||||
#include "view.h"
|
||||
#include "../extensions/globaltimers.h"
|
||||
|
||||
enum eDisplayMode {
|
||||
dmDefault,
|
||||
dmChannelGroups
|
||||
};
|
||||
|
||||
class cViewChannel : public cView {
|
||||
private:
|
||||
cVeMessage *veMessage;
|
||||
cVeCustomTokens *veCustomTokens;
|
||||
cVeDcChannelInfo *veChannelInfo;
|
||||
cVeDcChannelGroup *veChannelGroup;
|
||||
cVeDcEpgInfo *veEpgInfo;
|
||||
cVeDcProgressBar *veProgressBar;
|
||||
cVeDcStatusInfo *veStatusInfo;
|
||||
cVeDcScraperContent *veScraperContent;
|
||||
cVeDcEcmInfo *veEcmInfo;
|
||||
cVeMessage *veMessage;
|
||||
cVeCustomTokens *veCustomTokens;
|
||||
cVeDcChannelInfo *veChannelInfo;
|
||||
cVeDcChannelGroup *veChannelGroup;
|
||||
cVeDcEpgInfo *veEpgInfo;
|
||||
cVeDcProgressBar *veProgressBar;
|
||||
cVeDcStatusInfo *veStatusInfo;
|
||||
cVeDcScraperContent *veScraperContent;
|
||||
cVeDcEcmInfo *veEcmInfo;
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
cVeDcChannelHints *veChannelHints;
|
||||
cVeDcChannelDetail *veChannelDetail;
|
||||
cVeDcChannelListDetail *veChannelListDetail;
|
||||
cVeDcGroupChannelListDetail *veGroupChannelListDetail;
|
||||
cViewListChannelList *channelList;
|
||||
cViewListGroupList *groupList;
|
||||
cViewListChannelList *groupChannelList;
|
||||
eDisplaychannelView viewType;
|
||||
eDisplaychannelView viewTypeLast;
|
||||
bool initExtended;
|
||||
bool displayList;
|
||||
bool initList;
|
||||
bool channelHints;
|
||||
bool channelInput;
|
||||
#endif
|
||||
bool channelChange;
|
||||
bool displayChannelGroups;
|
||||
eDisplayMode mode;
|
||||
bool timersLoaded;
|
||||
cGlobalTimers globalTimers;
|
||||
void SetViewElements(void);
|
||||
void ClearVariables(void);
|
||||
void SetViewElementObjects(void);
|
||||
void ClearBasic(bool clearBackground);
|
||||
void ClearExtended(void);
|
||||
void ClearOnDisplay(void);
|
||||
void DrawBasic(bool initial);
|
||||
void HideBasic(void);
|
||||
void ShowBasic(void);
|
||||
void DrawExtended(void);
|
||||
public:
|
||||
cViewChannel(void);
|
||||
virtual ~cViewChannel(void);
|
||||
void SetGlobals(cGlobals *globals);
|
||||
void PreCache(void);
|
||||
void AddChannelViewList(const char *listName, cViewList *viewList);
|
||||
void GetTimers(void);
|
||||
void SetChannel(const cChannel *channel, int number);
|
||||
void SetEvents(const cEvent *present, const cEvent *following);
|
||||
void SetMessage(eMessageType type, const char *text);
|
||||
void Flush(bool animFlush);
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
void SetViewType(eDisplaychannelView viewType);
|
||||
int MaxItems(void);
|
||||
bool KeyRightOpensChannellist(void);
|
||||
void SetChannelInfo(const cChannel *channel);
|
||||
void SetChannelList(const cChannel *channel, int index, bool current);
|
||||
void SetGroupList(const char *group, int numChannels, int index, bool current);
|
||||
void ClearList(void);
|
||||
void SetNumChannelHints(int num);
|
||||
void SetChannelHint(const cChannel *channel);
|
||||
#endif
|
||||
void Close(void);
|
||||
void Flush(void);
|
||||
};
|
||||
|
||||
#endif //__VIEWDISPLAYCHANNEL_H
|
||||
#endif //__VIEWDISPLAYCHANNEL_H
|
||||
|
|
|
@ -108,6 +108,7 @@ void cViewMenu::SetViewElements(void) {
|
|||
viewElementNames.insert(pair<string, int>("header", (int)eVeDisplayMenu::header));
|
||||
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayMenu::datetime));
|
||||
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayMenu::time));
|
||||
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenu::vdrstatus));
|
||||
viewElementNames.insert(pair<string, int>("colorbuttons", (int)eVeDisplayMenu::colorbuttons));
|
||||
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayMenu::message));
|
||||
viewElementNames.insert(pair<string, int>("scrollbar", (int)eVeDisplayMenu::scrollbar));
|
||||
|
@ -535,13 +536,11 @@ bool cViewMenu::Init(void) {
|
|||
}
|
||||
|
||||
void cViewMenu::Close(void) {
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
if (FadeTime() > 0) {
|
||||
fader = new cAnimation((cFadable*)this, false);
|
||||
fader->Fade();
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
if (animator) {
|
||||
animator->Stop();
|
||||
animator->Finish();
|
||||
delete animator;
|
||||
animator = NULL;
|
||||
}
|
||||
for (int i=0; i < numSubviews; i++) {
|
||||
if (subViews[i]) {
|
||||
|
@ -558,7 +557,7 @@ void cViewMenu::Close(void) {
|
|||
}
|
||||
UnScaleTv();
|
||||
ClearVariables();
|
||||
sdOsd.Flush();
|
||||
// sdOsd.Flush();
|
||||
sdOsd.DeleteOsd();
|
||||
}
|
||||
|
||||
|
@ -566,10 +565,7 @@ void cViewMenu::Clear(void) {
|
|||
activeSubview->ClearViewList();
|
||||
}
|
||||
|
||||
void cViewMenu::Flush(bool animFlush) {
|
||||
if (init) {
|
||||
sdOsd.LockFlush();
|
||||
}
|
||||
void cViewMenu::Flush(void) {
|
||||
bool staticInitiated = false;
|
||||
if (menuChange) {
|
||||
newTvFrame = activeSubview->GetTvFrame();
|
||||
|
@ -591,7 +587,7 @@ void cViewMenu::Flush(bool animFlush) {
|
|||
detailViewInit = false;
|
||||
}
|
||||
activeSubview->DrawDynamicVEs();
|
||||
cView::Flush(animFlush);
|
||||
cView::Flush();
|
||||
}
|
||||
|
||||
void cViewMenu::SetTransparency(int transparency, bool forceDetached) {
|
||||
|
@ -634,6 +630,7 @@ cSubView::cSubView(const char *name) {
|
|||
header = NULL;
|
||||
datetime = NULL;
|
||||
time = NULL;
|
||||
vdrstatus = NULL;
|
||||
message = NULL;
|
||||
sortmode = NULL;
|
||||
colorbuttons = NULL;
|
||||
|
@ -698,6 +695,10 @@ void cSubView::SetViewElement(eVeDisplayMenu ve, cViewElement *viewElement) {
|
|||
if (!time)
|
||||
time = dynamic_cast<cVeTime*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::vdrstatus:
|
||||
if (!vdrstatus)
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::message:
|
||||
if (!message)
|
||||
message = dynamic_cast<cVeMessage*>(viewElement);
|
||||
|
@ -740,6 +741,10 @@ void cSubView::SetViewElementHorizontal(eVeDisplayMenu ve, cViewElement *viewEle
|
|||
if (!time)
|
||||
time = dynamic_cast<cVeTime*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::vdrstatus:
|
||||
if (!vdrstatus)
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElement);
|
||||
break;
|
||||
case eVeDisplayMenu::message:
|
||||
if (!message)
|
||||
message = dynamic_cast<cVeMessage*>(viewElement);
|
||||
|
@ -871,6 +876,7 @@ void cSubView::Clear(void) {
|
|||
if (background) background->Hide();
|
||||
if (datetime) datetime->Hide();
|
||||
if (time) time->Hide();
|
||||
if (vdrstatus) vdrstatus->Hide();
|
||||
if (header) header->Hide();
|
||||
if (colorbuttons) colorbuttons->Hide();
|
||||
if (scrollbar) scrollbar->Hide();
|
||||
|
@ -907,11 +913,17 @@ void cSubView::DrawDynamicVEs(void) {
|
|||
time->Render();
|
||||
}
|
||||
}
|
||||
if (vdrstatus) {
|
||||
vdrstatus->Show();
|
||||
if (vdrstatus->Parse())
|
||||
vdrstatus->Render();
|
||||
}
|
||||
}
|
||||
|
||||
void cSubView::DrawList(void) {
|
||||
if (viewList) {
|
||||
viewList->Draw(menuCat);
|
||||
viewList->ResetItemCount();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -953,6 +965,11 @@ void cSubView::SetViewElementObjects(void) {
|
|||
else if (viewElements[(int)eVeDisplayMenu::time])
|
||||
time = dynamic_cast<cVeTime*>(viewElements[(int)eVeDisplayMenu::time]);
|
||||
|
||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenu::vdrstatus])
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElementsHorizontal[(int)eVeDisplayMenu::vdrstatus]);
|
||||
else if (viewElements[(int)eVeDisplayMenu::vdrstatus])
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElements[(int)eVeDisplayMenu::vdrstatus]);
|
||||
|
||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenu::message])
|
||||
message = dynamic_cast<cVeMessage*>(viewElementsHorizontal[(int)eVeDisplayMenu::message]);
|
||||
else if (viewElements[(int)eVeDisplayMenu::message])
|
||||
|
@ -990,6 +1007,7 @@ void cSubView::SetViewElements(void) {
|
|||
viewElementNames.insert(pair<string, int>("background", (int)eVeDisplayMenu::background));
|
||||
viewElementNames.insert(pair<string, int>("header", (int)eVeDisplayMenu::header));
|
||||
viewElementNames.insert(pair<string, int>("datetime", (int)eVeDisplayMenu::datetime));
|
||||
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenu::vdrstatus));
|
||||
viewElementNames.insert(pair<string, int>("time", (int)eVeDisplayMenu::time));
|
||||
viewElementNames.insert(pair<string, int>("colorbuttons", (int)eVeDisplayMenu::colorbuttons));
|
||||
viewElementNames.insert(pair<string, int>("message", (int)eVeDisplayMenu::message));
|
||||
|
@ -1063,6 +1081,7 @@ cViewMenuMain::cViewMenuMain(const char *name) : cSubView(name) {
|
|||
load = NULL;
|
||||
memory = NULL;
|
||||
vdrstats = NULL;
|
||||
vdrstatus = NULL;
|
||||
temperatures = NULL;
|
||||
currentSchedule = NULL;
|
||||
lastRecordings = NULL;
|
||||
|
@ -1088,6 +1107,7 @@ void cViewMenuMain::SetViewElements(void) {
|
|||
viewElementNames.insert(pair<string, int>("systemload", (int)eVeDisplayMenuMain::systemload));
|
||||
viewElementNames.insert(pair<string, int>("systemmemory", (int)eVeDisplayMenuMain::systemmemory));
|
||||
viewElementNames.insert(pair<string, int>("vdrstatistics", (int)eVeDisplayMenuMain::vdrstatistics));
|
||||
viewElementNames.insert(pair<string, int>("vdrstatus", (int)eVeDisplayMenuMain::vdrstatus));
|
||||
viewElementNames.insert(pair<string, int>("temperatures", (int)eVeDisplayMenuMain::temperatures));
|
||||
viewElementNames.insert(pair<string, int>("lastrecordings", (int)eVeDisplayMenuMain::lastrecordings));
|
||||
viewElementNames.insert(pair<string, int>("customtokens", (int)eVeDisplayMenuMain::customtokens));
|
||||
|
@ -1137,6 +1157,11 @@ void cViewMenuMain::SetViewElementObjects(void) {
|
|||
else if (viewElements[(int)eVeDisplayMenuMain::vdrstatistics])
|
||||
vdrstats = dynamic_cast<cVeDmVdrstatistics*>(viewElements[(int)eVeDisplayMenuMain::vdrstatistics]);
|
||||
|
||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenuMain::vdrstatus])
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElementsHorizontal[(int)eVeDisplayMenuMain::vdrstatus]);
|
||||
else if (viewElements[(int)eVeDisplayMenuMain::vdrstatus])
|
||||
vdrstatus = dynamic_cast<cVeDmVdrstatus*>(viewElements[(int)eVeDisplayMenuMain::vdrstatus]);
|
||||
|
||||
if (orientation == eOrientation::horizontal && viewElementsHorizontal[(int)eVeDisplayMenuMain::temperatures])
|
||||
temperatures = dynamic_cast<cVeDmTemperatures*>(viewElementsHorizontal[(int)eVeDisplayMenuMain::temperatures]);
|
||||
else if (viewElements[(int)eVeDisplayMenuMain::temperatures])
|
||||
|
@ -1158,6 +1183,7 @@ void cViewMenuMain::SetViewElementObjects(void) {
|
|||
if (load) load->SetDetached();
|
||||
if (memory) memory->SetDetached();
|
||||
if (vdrstats) vdrstats->SetDetached();
|
||||
if (vdrstatus) vdrstatus->SetDetached();
|
||||
if (temperatures) temperatures->SetDetached();
|
||||
if (timers) timers->SetDetached();
|
||||
if (currentSchedule) currentSchedule->SetDetached();
|
||||
|
@ -1194,6 +1220,10 @@ void cViewMenuMain::Clear(void) {
|
|||
vdrstats->Reset();
|
||||
vdrstats->Hide();
|
||||
}
|
||||
|
||||
if (vdrstatus) {
|
||||
vdrstatus->Hide();
|
||||
}
|
||||
|
||||
if (temperatures) {
|
||||
temperatures->Reset();
|
||||
|
@ -1239,11 +1269,6 @@ void cViewMenuMain::DrawStaticVEs(void) {
|
|||
if (discusage->Parse())
|
||||
discusage->Render();
|
||||
}
|
||||
if (timers) {
|
||||
timers->Show();
|
||||
if (timers->Parse())
|
||||
timers->Render();
|
||||
}
|
||||
if (currentSchedule) {
|
||||
currentSchedule->Show();
|
||||
if (currentSchedule->Parse())
|
||||
|
@ -1267,6 +1292,11 @@ void cViewMenuMain::DrawDynamicVEs(void) {
|
|||
lastDrawDynamic = now;
|
||||
}
|
||||
|
||||
if (timers) {
|
||||
timers->Show();
|
||||
if (timers->Parse())
|
||||
timers->Render();
|
||||
}
|
||||
if (devices) {
|
||||
devices->Show();
|
||||
if (devices->Parse())
|
||||
|
@ -1287,6 +1317,11 @@ void cViewMenuMain::DrawDynamicVEs(void) {
|
|||
if (vdrstats->Parse())
|
||||
vdrstats->Render();
|
||||
}
|
||||
if (vdrstatus) {
|
||||
vdrstatus->Show();
|
||||
if (vdrstatus->Parse())
|
||||
vdrstatus->Render();
|
||||
}
|
||||
if (temperatures) {
|
||||
temperatures->Show();
|
||||
if (temperatures->Parse())
|
||||
|
@ -1612,6 +1647,11 @@ void cViewMenuDetail::DrawDynamicVEs(void) {
|
|||
if (time->Parse())
|
||||
time->Render();
|
||||
}
|
||||
if (vdrstatus) {
|
||||
vdrstatus->Show();
|
||||
if (vdrstatus->Parse())
|
||||
vdrstatus->Render();
|
||||
}
|
||||
}
|
||||
|
||||
void cViewMenuDetail::DrawDetailedView(void) {
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
bool Init(void);
|
||||
void Close(void);
|
||||
void Clear(void);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
void SetTransparency(int transparency, bool forceDetached = false);
|
||||
void Debug(void);
|
||||
};
|
||||
|
@ -120,6 +120,7 @@ protected:
|
|||
cVeDmHeader *header;
|
||||
cVeDateTime *datetime;
|
||||
cVeTime *time;
|
||||
cVeDmVdrstatus *vdrstatus;
|
||||
cVeMessage *message;
|
||||
cVeDmSortmode *sortmode;
|
||||
cVeDmColorbuttons *colorbuttons;
|
||||
|
@ -188,6 +189,7 @@ private:
|
|||
cVeDmSystemload *load;
|
||||
cVeDmSystemmemory *memory;
|
||||
cVeDmVdrstatistics *vdrstats;
|
||||
cVeDmVdrstatus *vdrstatus;
|
||||
cVeDmTemperatures *temperatures;
|
||||
cVeDmCurrentschedule *currentSchedule;
|
||||
cVeDmLastrecordings *lastRecordings;
|
||||
|
@ -322,4 +324,4 @@ public:
|
|||
void SetTransparency(int transparency, bool forceDetached = false);
|
||||
};
|
||||
|
||||
#endif //__VIEWDISPLAYMENU_H
|
||||
#endif //__VIEWDISPLAYMENU_H
|
||||
|
|
|
@ -43,12 +43,11 @@ void cViewMessage::SetMessage(eMessageType type, const char *text) {
|
|||
veMessage->Set(type, text);
|
||||
}
|
||||
|
||||
void cViewMessage::Flush(bool animFlush) {
|
||||
void cViewMessage::Flush(void) {
|
||||
if (init) {
|
||||
sdOsd.LockFlush();
|
||||
Render((int)eVeDisplayMessage::background);
|
||||
}
|
||||
Render((int)eVeDisplayMessage::message);
|
||||
cView::Flush(animFlush);
|
||||
cView::Flush();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
cViewMessage(void);
|
||||
virtual ~cViewMessage(void);
|
||||
void SetMessage(eMessageType type, const char *text);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
};
|
||||
|
||||
#endif //__VIEWDISPLAYMESSAGE_H
|
|
@ -352,13 +352,13 @@ void cViewPlugin::ClearTab(int viewId) {
|
|||
tab->Clear();
|
||||
}
|
||||
|
||||
void cViewPlugin::Flush(bool animFlush) {
|
||||
void cViewPlugin::Flush(void) {
|
||||
if (viewChanged) {
|
||||
viewChanged = false;
|
||||
newTvFrame = views[newViewId]->GetTvFrame();
|
||||
menuInit = true;
|
||||
}
|
||||
cView::Flush(animFlush);
|
||||
cView::Flush();
|
||||
}
|
||||
|
||||
bool cViewPlugin::ChannelLogoExists(string channelId) {
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
void TabDown(int viewId);
|
||||
void DisplayTabs(int viewId);
|
||||
void ClearTab(int viewId);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
bool ChannelLogoExists(string channelId);
|
||||
string GetEpgImagePath(void);
|
||||
};
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
cViewReplay::cViewReplay(void) {
|
||||
veCustomTokens = NULL;
|
||||
veTimeshiftTimes = NULL;
|
||||
veEndTime = NULL;
|
||||
veMessage = NULL;
|
||||
veScraperContent = NULL;
|
||||
|
@ -45,6 +46,7 @@ void cViewReplay::SetViewElements(void) {
|
|||
viewElementNames.insert(pair<string, int>("rectitle", (int)eVeDisplayReplay::rectitle));
|
||||
viewElementNames.insert(pair<string, int>("recinfo", (int)eVeDisplayReplay::recinfo));
|
||||
viewElementNames.insert(pair<string, int>("currenttime", (int)eVeDisplayReplay::currenttime));
|
||||
viewElementNames.insert(pair<string, int>("timeshifttimes", (int)eVeDisplayReplay::timeshifttimes));
|
||||
viewElementNames.insert(pair<string, int>("endtime", (int)eVeDisplayReplay::endtime));
|
||||
viewElementNames.insert(pair<string, int>("totaltime", (int)eVeDisplayReplay::totaltime));
|
||||
viewElementNames.insert(pair<string, int>("progressbar", (int)eVeDisplayReplay::progressbar));
|
||||
|
@ -92,6 +94,10 @@ void cViewReplay::SetViewElementObjects(void) {
|
|||
{
|
||||
veTotalTime = dynamic_cast<cVeDrTotalTime*>(viewElements[i]);
|
||||
}
|
||||
else if (dynamic_cast<cVeDrTimeshiftTimes*>(viewElements[i]))
|
||||
{
|
||||
veTimeshiftTimes = dynamic_cast<cVeDrTimeshiftTimes*>(viewElements[i]);
|
||||
}
|
||||
else if (dynamic_cast<cVeDrEndTime*>(viewElements[i]))
|
||||
{
|
||||
veEndTime = dynamic_cast<cVeDrEndTime*>(viewElements[i]);
|
||||
|
@ -135,35 +141,106 @@ void cViewReplay::SetViewElementObjects(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void cViewReplay::PreCache(void) {
|
||||
cView::PreCache();
|
||||
SetViewelementsAnimOut();
|
||||
}
|
||||
|
||||
void cViewReplay::ClearVariables(void) {
|
||||
cView::ClearVariables();
|
||||
recording = NULL;
|
||||
lastEvent = NULL;
|
||||
modeOnly = false;
|
||||
lastFlush = 0;
|
||||
lastFlushModeOnly = 0;
|
||||
message = false;
|
||||
reclength = -1;
|
||||
timeShiftActive = false;
|
||||
timeShiftActive = NoRec;
|
||||
timeShiftFramesTotal = -1;
|
||||
timeShiftLength = -1;
|
||||
timeShiftDuration = "";
|
||||
timeshiftrest = "";
|
||||
if (veCustomTokens)
|
||||
veCustomTokens->Reset();
|
||||
if (veTimeshiftTimes)
|
||||
veTimeshiftTimes->Set(cString(""), cString(""), cString(""));
|
||||
if (veEndTime)
|
||||
veEndTime->Set(cString(""));
|
||||
if (veCutMarks)
|
||||
veCutMarks->Reset();
|
||||
timersLoaded = false;
|
||||
globalTimers.ClearTimers();
|
||||
}
|
||||
|
||||
void cViewReplay::SetTimeShift(int framesTotal, int timeShiftLength) {
|
||||
timeShiftActive = true;
|
||||
timeShiftFramesTotal = framesTotal;
|
||||
this->timeShiftLength = timeShiftLength;
|
||||
void cViewReplay::GetGlobalTimers(void) {
|
||||
if (!timersLoaded) {
|
||||
timersLoaded = true;
|
||||
globalTimers.LoadTimers();
|
||||
}
|
||||
}
|
||||
|
||||
void cViewReplay::SetTimeShiftValues(int current, int total) {
|
||||
timeShiftActive = NoRec;
|
||||
if (!recording)
|
||||
return;
|
||||
#if APIVERSNUM >= 20101
|
||||
int usage = recording->IsInUse();
|
||||
if (usage & ruTimer)
|
||||
timeShiftActive = NormalRec;
|
||||
else {
|
||||
GetGlobalTimers();
|
||||
if (globalTimers.IsRecording(recording))
|
||||
timeShiftActive = NormalRec;
|
||||
}
|
||||
#endif
|
||||
if (!timeShiftActive)
|
||||
return;
|
||||
const char *recName = recording->Name();
|
||||
if (recName && *recName == '@')
|
||||
timeShiftActive = TimeshiftRec;
|
||||
const cRecordingInfo *recInfo = recording->Info();
|
||||
if (!recInfo)
|
||||
return;
|
||||
const cSchedule *Schedule = NULL;
|
||||
if (timeShiftActive == TimeshiftRec) {
|
||||
{
|
||||
LOCK_SCHEDULES_READ;
|
||||
Schedule = Schedules->GetSchedule(recInfo->ChannelID());
|
||||
}
|
||||
if (!Schedule)
|
||||
return;
|
||||
}
|
||||
// Get event at actual recording position
|
||||
const cEvent *event = (timeShiftActive == TimeshiftRec) ? Schedule->GetEventAround(time(0))
|
||||
: recInfo->GetEvent();
|
||||
if (!event)
|
||||
return;
|
||||
// End of live program
|
||||
time_t liveEventStop = event->EndTime();
|
||||
// Begin of timeshift recording
|
||||
time_t recordingStart = time(0) - recording->LengthInSeconds();
|
||||
// actual timeshiftlength in sec
|
||||
timeShiftLength = liveEventStop - recordingStart;
|
||||
// timeshiftlength until end of live program
|
||||
timeShiftFramesTotal = total * ((double)timeShiftLength / (double)recording->LengthInSeconds());
|
||||
// Get event at actual replay position (add 30sec for a better match)
|
||||
int timeShiftSecondsAfter = (int)(recording->LengthInSeconds() * (1.0 - (double)current / (double)total)) + 30;
|
||||
if (timeShiftActive == TimeshiftRec) {
|
||||
const cEvent *eventReplay = Schedule->GetEventAround(time(0) - timeShiftSecondsAfter);
|
||||
// Display title at replay position
|
||||
if (veRecTitle && eventReplay != lastEvent) {
|
||||
veRecTitle->Set(recording, eventReplay, timeShiftActive);
|
||||
veRecTitle->Parse();
|
||||
lastEvent = eventReplay;
|
||||
}
|
||||
}
|
||||
int mins = (timeShiftLength / 60) % 60;
|
||||
int hours = (timeShiftLength / 3600) % 24;
|
||||
timeShiftDuration = cString::sprintf("%d:%02d", hours, mins);
|
||||
mins = (timeShiftSecondsAfter / 60) % 60;
|
||||
hours = (timeShiftSecondsAfter / 3600) % 24;
|
||||
timeshiftrest = cString::sprintf("%d:%02d", hours, mins);
|
||||
}
|
||||
|
||||
void cViewReplay::SetRecording(const cRecording *recording) {
|
||||
this->recording = recording;
|
||||
if (veRecTitle) {
|
||||
veRecTitle->Set(recording);
|
||||
}
|
||||
|
@ -179,44 +256,66 @@ void cViewReplay::SetTitle(const char *title) {
|
|||
if (veRecTitle) {
|
||||
veRecTitle->Set(title);
|
||||
}
|
||||
if (veRecInfo) {
|
||||
veRecInfo->Set(NULL);
|
||||
}
|
||||
if (veScraperContent) {
|
||||
veScraperContent->Set(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewReplay::SetCurrent(const char *current) {
|
||||
if (veCurrentTime)
|
||||
veCurrentTime->Set(current);
|
||||
veCurrentTime->Set(current, timeShiftActive);
|
||||
Render((int)eVeDisplayReplay::currenttime);
|
||||
}
|
||||
|
||||
void cViewReplay::SetTotal(const char *total) {
|
||||
if (veTotalTime)
|
||||
veTotalTime->Set(total, timeShiftActive, *timeShiftDuration);
|
||||
veTotalTime->Set(total, *timeShiftDuration, timeShiftActive);
|
||||
Render((int)eVeDisplayReplay::totaltime);
|
||||
}
|
||||
|
||||
void cViewReplay::SetTimeshiftTimes(int current, int total) {
|
||||
if (!veTimeshiftTimes || !recording)
|
||||
return;
|
||||
time_t recordingStart = 0;
|
||||
time_t playbackTime = 0;
|
||||
if (timeShiftActive) {
|
||||
recordingStart = time(0) - recording->LengthInSeconds();
|
||||
playbackTime = time(0) - (int)(recording->LengthInSeconds() * (1.0 - (double)current / (double)total));
|
||||
} else
|
||||
recordingStart = recording->Start();
|
||||
veTimeshiftTimes->Set(TimeString(recordingStart), TimeString(playbackTime), timeshiftrest, timeShiftActive);
|
||||
Render((int)eVeDisplayReplay::timeshifttimes);
|
||||
}
|
||||
|
||||
void cViewReplay::SetEndTime(int current, int total) {
|
||||
if (!veEndTime)
|
||||
if (!veEndTime || !recording)
|
||||
return;
|
||||
int totalLength = total;
|
||||
int recordingLength = reclength;
|
||||
int recordingLength = recording->LengthInSeconds();
|
||||
if (timeShiftActive && timeShiftFramesTotal > 0) {
|
||||
totalLength = timeShiftFramesTotal;
|
||||
recordingLength = timeShiftLength;
|
||||
}
|
||||
double rest = (double)(totalLength - current) / (double)totalLength;
|
||||
time_t end = time(0) + rest*recordingLength;
|
||||
veEndTime->Set(TimeString(end));
|
||||
time_t end = time(0) + rest * recordingLength;
|
||||
veEndTime->Set(TimeString(end), timeShiftActive);
|
||||
Render((int)eVeDisplayReplay::endtime);
|
||||
}
|
||||
|
||||
void cViewReplay::SetProgressbar(int current, int total) {
|
||||
SetTimeShiftValues(current, total);
|
||||
if (veProgressbar)
|
||||
veProgressbar->Set(current, total, timeShiftActive, timeShiftFramesTotal);
|
||||
Render((int)eVeDisplayReplay::progressbar);
|
||||
}
|
||||
|
||||
void cViewReplay::SetMarks(const cMarks *marks, int current, int total) {
|
||||
if (veCutMarks)
|
||||
veCutMarks->Set(marks, current, total, timeShiftActive, timeShiftFramesTotal);
|
||||
if (!veCutMarks)
|
||||
return;
|
||||
veCutMarks->Set(marks, current, total, timeShiftActive, timeShiftFramesTotal);
|
||||
Render((int)eVeDisplayReplay::cutmarks);
|
||||
}
|
||||
|
||||
|
@ -276,9 +375,8 @@ void cViewReplay::DelayOnPause(void) {
|
|||
veOnPause->ResetSleep();
|
||||
}
|
||||
|
||||
void cViewReplay::Flush(bool animFlush) {
|
||||
void cViewReplay::Flush(void) {
|
||||
if (init) {
|
||||
sdOsd.LockFlush();
|
||||
if (!modeOnly) {
|
||||
Render((int)eVeDisplayReplay::background);
|
||||
Render((int)eVeDisplayReplay::rectitle);
|
||||
|
@ -303,7 +401,7 @@ void cViewReplay::Flush(bool animFlush) {
|
|||
SetProgressModeOnly();
|
||||
}
|
||||
|
||||
cView::Flush(animFlush);
|
||||
cView::Flush();
|
||||
}
|
||||
|
||||
void cViewReplay::SetProgressModeOnly(void) {
|
||||
|
@ -326,4 +424,4 @@ void cViewReplay::SetProgressModeOnly(void) {
|
|||
veProgressModeOnly->Set(fps, current, total);
|
||||
if (veProgressModeOnly->Parse())
|
||||
veProgressModeOnly->Render();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ private:
|
|||
cVeDrScraperContent *veScraperContent;
|
||||
cVeDrCurrentTime *veCurrentTime;
|
||||
cVeDrTotalTime *veTotalTime;
|
||||
cVeDrTimeshiftTimes *veTimeshiftTimes;
|
||||
cVeDrEndTime *veEndTime;
|
||||
cVeDrProgressBar *veProgressbar;
|
||||
cVeDrCutMarks *veCutMarks;
|
||||
|
@ -21,15 +22,21 @@ private:
|
|||
cVeDrJump *veJump;
|
||||
cVeDrOnPause *veOnPause;
|
||||
cVeDrOnPause *veOnPauseModeOnly;
|
||||
const cRecording *recording;
|
||||
const cEvent *lastEvent;
|
||||
bool modeOnly;
|
||||
time_t lastFlush;
|
||||
time_t lastFlushModeOnly;
|
||||
bool message;
|
||||
int reclength;
|
||||
bool timeShiftActive;
|
||||
eRecType_t timeShiftActive;
|
||||
int timeShiftFramesTotal;
|
||||
int timeShiftLength;
|
||||
cString timeshiftrest;
|
||||
cString timeShiftDuration;
|
||||
bool timersLoaded;
|
||||
cGlobalTimers globalTimers;
|
||||
void GetGlobalTimers(void);
|
||||
void SetViewElements(void);
|
||||
void ClearVariables(void);
|
||||
void SetViewElementObjects(void);
|
||||
|
@ -37,13 +44,14 @@ private:
|
|||
public:
|
||||
cViewReplay(void);
|
||||
virtual ~cViewReplay(void);
|
||||
void PreCache(void);
|
||||
void SetModeOnly(bool modeOnly) { this->modeOnly = modeOnly; };
|
||||
void SetRecordingLength(int length) { reclength = length; };
|
||||
void SetTimeShift(int framesTotal, int timeShiftLength);
|
||||
void SetRecording(const cRecording *recording);
|
||||
void SetTimeShiftValues(int current, int total);
|
||||
void SetTitle(const char *title);
|
||||
void SetCurrent(const char *current);
|
||||
void SetTotal(const char *total);
|
||||
void SetTimeshiftTimes(int current, int total);
|
||||
void SetEndTime(int current, int total);
|
||||
void SetProgressbar(int current, int total);
|
||||
void SetMarks(const cMarks *marks, int current, int total);
|
||||
|
@ -53,7 +61,7 @@ public:
|
|||
void StartOnPause(const char *recfilename);
|
||||
void ClearOnPause(void);
|
||||
void DelayOnPause(void);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
};
|
||||
|
||||
#endif //__VIEWDISPLAYREPLAY_H1
|
||||
#endif //__VIEWDISPLAYREPLAY_H1
|
||||
|
|
|
@ -41,14 +41,10 @@ void cViewTracks::ClearVariables(void) {
|
|||
}
|
||||
|
||||
void cViewTracks::Close(void) {
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
if (FadeTime() > 0) {
|
||||
fader = new cAnimation((cFadable*)this, false);
|
||||
fader->Fade();
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
}
|
||||
animator->Stop();
|
||||
animator->Finish();
|
||||
delete animator;
|
||||
animator = NULL;
|
||||
for (int i=0; i < numViewElements; i++) {
|
||||
if (viewElements[i]) {
|
||||
viewElements[i]->Close();
|
||||
|
@ -107,16 +103,19 @@ void cViewTracks::SetCurrentTrack(int index) {
|
|||
change = true;
|
||||
}
|
||||
|
||||
void cViewTracks::Flush(bool animFlush) {
|
||||
void cViewTracks::Flush(void) {
|
||||
if (init) {
|
||||
sdOsd.LockFlush();
|
||||
Render((int)eVeDisplayTracks::background);
|
||||
if (viewList) {
|
||||
viewList->Draw();
|
||||
viewList->StartAnimation(true);
|
||||
}
|
||||
}
|
||||
if (change) {
|
||||
Render((int)eVeDisplayTracks::header);
|
||||
if (viewList)
|
||||
if (viewList && !init)
|
||||
viewList->Draw();
|
||||
change = false;
|
||||
}
|
||||
cView::Flush(animFlush);
|
||||
cView::Flush();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
void SetTracks(const char * const *tracks);
|
||||
void SetAudiochannel(int audioChannel);
|
||||
void SetCurrentTrack(int index);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
};
|
||||
|
||||
#endif //__VIEWDISPLAYTRACKS_H
|
|
@ -40,13 +40,12 @@ void cViewVolume::SetVolume(int current, int total, bool mute) {
|
|||
veVolume->Set(current, total, mute);
|
||||
}
|
||||
|
||||
void cViewVolume::Flush(bool animFlush) {
|
||||
void cViewVolume::Flush(void) {
|
||||
if (init) {
|
||||
sdOsd.LockFlush();
|
||||
Render((int)eVeDisplayVolume::background);
|
||||
}
|
||||
Render((int)eVeDisplayVolume::volume);
|
||||
cView::Flush(animFlush);
|
||||
cView::Flush();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
cViewVolume(void);
|
||||
virtual ~cViewVolume(void);
|
||||
void SetVolume(int current, int total, bool mute);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
};
|
||||
|
||||
#endif //__VIEWDISPLAYVOLUME_H
|
|
@ -13,14 +13,18 @@ cViewElement::cViewElement(void) {
|
|||
scrollingStarted = false;
|
||||
blocked = false;
|
||||
detached = false;
|
||||
doAnimOut = false;
|
||||
doStartAnim = true;
|
||||
waitOnWakeup = true;
|
||||
startAnimation = true;
|
||||
restartAnimation = false;
|
||||
globals = NULL;
|
||||
tokenContainer = NULL;
|
||||
attribs = new cViewElementAttribs((int)eViewElementAttribs::count);
|
||||
clearAll = false;
|
||||
detacher = NULL;
|
||||
fader = NULL;
|
||||
shifter = NULL;
|
||||
fader = NULL;
|
||||
}
|
||||
|
||||
cViewElement::cViewElement(const cViewElement &other) {
|
||||
|
@ -32,12 +36,16 @@ cViewElement::cViewElement(const cViewElement &other) {
|
|||
scrollingStarted = false;
|
||||
blocked = false;
|
||||
detached = false;
|
||||
doAnimOut = other.doAnimOut;
|
||||
doStartAnim = other.doStartAnim;
|
||||
waitOnWakeup = true;
|
||||
startAnimation = true;
|
||||
restartAnimation = false;
|
||||
globals = other.globals;
|
||||
container.Set(other.container.X(), other.container.Y(), other.container.Width(), other.container.Height());
|
||||
tokenContainer = NULL;
|
||||
attribs = new cViewElementAttribs(*other.attribs);
|
||||
clearAll = false;
|
||||
|
||||
for (const cAreaNode *node = other.areaNodes.First(); node; node = other.areaNodes.Next(node)) {
|
||||
if (cArea *a = dynamic_cast<cArea*>((cAreaNode*)node)) {
|
||||
|
@ -48,15 +56,13 @@ cViewElement::cViewElement(const cViewElement &other) {
|
|||
}
|
||||
|
||||
detacher = NULL;
|
||||
fader = NULL;
|
||||
shifter = NULL;
|
||||
fader = NULL;
|
||||
}
|
||||
|
||||
cViewElement::~cViewElement(void) {
|
||||
delete attribs;
|
||||
delete detacher;
|
||||
delete fader;
|
||||
delete shifter;
|
||||
delete tokenContainer;
|
||||
}
|
||||
|
||||
|
@ -101,6 +107,20 @@ cViewElement *cViewElement::CreateViewElement(const char *name, const char *view
|
|||
e = new cVeDcSignalQuality();
|
||||
else if (!strcmp(name, "scrapercontent") && !strcmp(viewname, "displaychannel"))
|
||||
e = new cVeDcScraperContent();
|
||||
else if (!strcmp(name, "channelhints"))
|
||||
e = new cVeDcChannelHints();
|
||||
else if (!strcmp(name, "channeldetail"))
|
||||
e = new cVeDcChannelDetail();
|
||||
else if (!strcmp(name, "channellistback"))
|
||||
e = new cViewElement();
|
||||
else if (!strcmp(name, "grouplistback"))
|
||||
e = new cViewElement();
|
||||
else if (!strcmp(name, "groupchannellistback"))
|
||||
e = new cViewElement();
|
||||
else if (!strcmp(name, "channellistdetail"))
|
||||
e = new cVeDcChannelListDetail();
|
||||
else if (!strcmp(name, "groupchannellistdetail"))
|
||||
e = new cVeDcGroupChannelListDetail();
|
||||
else if (!strcmp(name, "ecminfo"))
|
||||
e = new cVeDcEcmInfo();
|
||||
|
||||
|
@ -127,6 +147,8 @@ cViewElement *cViewElement::CreateViewElement(const char *name, const char *view
|
|||
e = new cVeDmTemperatures();
|
||||
else if (!strcmp(name, "vdrstatistics"))
|
||||
e = new cVeDmVdrstatistics();
|
||||
else if (!strcmp(name, "vdrstatus"))
|
||||
e = new cVeDmVdrstatus();
|
||||
else if (!strcmp(name, "lastrecordings"))
|
||||
e = new cVeDmLastrecordings();
|
||||
else if (!strcmp(name, "detailheaderepg"))
|
||||
|
@ -149,6 +171,8 @@ cViewElement *cViewElement::CreateViewElement(const char *name, const char *view
|
|||
e = new cVeDrCurrentTime();
|
||||
else if (!strcmp(name, "totaltime"))
|
||||
e = new cVeDrTotalTime();
|
||||
else if (!strcmp(name, "timeshifttimes"))
|
||||
e = new cVeDrTimeshiftTimes();
|
||||
else if (!strcmp(name, "endtime"))
|
||||
e = new cVeDrEndTime();
|
||||
else if (!strcmp(name, "progressbar") && !strcmp(viewname, "displayreplay"))
|
||||
|
@ -281,10 +305,7 @@ void cViewElement::Clear(bool forceClearBackground) {
|
|||
}
|
||||
|
||||
void cViewElement::Hide(void) {
|
||||
delete shifter;
|
||||
shifter = NULL;
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
StopAnimation();
|
||||
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
||||
sdOsd->Lock();
|
||||
node->Hide();
|
||||
|
@ -310,12 +331,7 @@ void cViewElement::WakeUp(void) {
|
|||
}
|
||||
|
||||
void cViewElement::Close(void) {
|
||||
delete detacher;
|
||||
detacher = NULL;
|
||||
delete fader;
|
||||
fader = NULL;
|
||||
delete shifter;
|
||||
shifter = NULL;
|
||||
StopAnimation();
|
||||
StopScrolling();
|
||||
for (cAreaNode *node = areaNodes.First(); node; node = areaNodes.Next(node)) {
|
||||
node->StopBlinkers();
|
||||
|
@ -326,6 +342,7 @@ void cViewElement::Close(void) {
|
|||
dirty = true;
|
||||
init = true;
|
||||
startAnimation = true;
|
||||
restartAnimation = false;
|
||||
drawn = false;
|
||||
scrollingStarted = false;
|
||||
blocked = false;
|
||||
|
@ -370,25 +387,26 @@ void cViewElement::Render(void) {
|
|||
cArea *scrollArea = node->ScrollingArea();
|
||||
if (scrollArea) {
|
||||
scrollingStarted = true;
|
||||
cAnimation *scroller = new cAnimation(scrollArea);
|
||||
scrollers.Add(scroller);
|
||||
scroller->Start();
|
||||
cScroller *scroller = new cScroller(scrollArea);
|
||||
scrollers.push_back(scroller);
|
||||
cView::AddAnimation(scroller);
|
||||
}
|
||||
}
|
||||
}
|
||||
dirty = false;
|
||||
drawn = true;
|
||||
if (startAnimation) {
|
||||
if (startAnimation || restartAnimation) {
|
||||
startAnimation = false;
|
||||
restartAnimation = false;
|
||||
StartAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
void cViewElement::StopScrolling(bool deletePixmaps) {
|
||||
for (cAnimation *scroller = scrollers.First(); scroller; scroller = scrollers.Next(scroller)) {
|
||||
scroller->Stop(deletePixmaps);
|
||||
for (list<cScroller*>::iterator it = scrollers.begin(); it != scrollers.end(); it++) {
|
||||
cView::RemoveAnimation(*it);
|
||||
}
|
||||
scrollers.Clear();
|
||||
scrollers.clear();
|
||||
}
|
||||
|
||||
void cViewElement::ParseDetached(void) {
|
||||
|
@ -401,14 +419,14 @@ void cViewElement::RenderDetached(void) {
|
|||
}
|
||||
|
||||
bool cViewElement::Shifting(void) {
|
||||
if (attribs->ShiftTime() >= 0) {
|
||||
if (attribs->ShiftTime() > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cViewElement::Fading(void) {
|
||||
if (attribs->FadeTime() >= 0) {
|
||||
if (attribs->FadeTime() > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -423,25 +441,31 @@ int cViewElement::ShiftTime(void) {
|
|||
}
|
||||
|
||||
int cViewElement::ShiftMode(void) {
|
||||
return attribs->ShiftMode();
|
||||
int mode = attribs->ShiftMode();
|
||||
if (mode < 0) mode = 0;
|
||||
return mode;
|
||||
}
|
||||
|
||||
void cViewElement::ShiftPositions(cPoint *start, cPoint *end) {
|
||||
cRect shiftbox = CoveredArea();
|
||||
cPoint startPoint = ShiftStart(shiftbox);
|
||||
start->Set(startPoint);
|
||||
end->Set(shiftbox.X(), shiftbox.Y());
|
||||
}
|
||||
|
||||
void cViewElement::StartAnimation(void) {
|
||||
shifter = NULL;
|
||||
fader = NULL;
|
||||
if (ShiftTime() > 0) {
|
||||
cRect shiftbox = CoveredArea();
|
||||
cPoint ref = cPoint(shiftbox.X(), shiftbox.Y());
|
||||
cPoint start = ShiftStart(shiftbox);
|
||||
SetPosition(start, ref);
|
||||
sdOsd->Flush();
|
||||
delete shifter;
|
||||
shifter = new cAnimation((cShiftable*)this, start, ref, true);
|
||||
shifter->Start();
|
||||
shifter = new cShifter((cShiftable*)this);
|
||||
if (doAnimOut)
|
||||
shifter->SetPersistent();
|
||||
cView::AddAnimation(shifter, doStartAnim);
|
||||
} else if (FadeTime() > 0) {
|
||||
SetTransparency(100);
|
||||
sdOsd->Flush();
|
||||
delete fader;
|
||||
fader = new cAnimation((cFadable*)this, true);
|
||||
fader->Start();
|
||||
fader = new cFader((cFadable*)this);
|
||||
if (doAnimOut)
|
||||
fader->SetPersistent();
|
||||
cView::AddAnimation(fader, doStartAnim);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -469,19 +493,8 @@ cRect cViewElement::CoveredArea(void) {
|
|||
return unionArea;
|
||||
}
|
||||
|
||||
void cViewElement::RegisterAnimation(void) {
|
||||
sdOsd->AddAnimation();
|
||||
}
|
||||
|
||||
void cViewElement::UnregisterAnimation(void) {
|
||||
sdOsd->RemoveAnimation();
|
||||
}
|
||||
|
||||
void cViewElement::Flush(bool animFlush) {
|
||||
if (animFlush)
|
||||
sdOsd->AnimatedFlush();
|
||||
else
|
||||
sdOsd->Flush();
|
||||
void cViewElement::Flush(void) {
|
||||
sdOsd->Flush();
|
||||
}
|
||||
|
||||
bool cViewElement::Parse(bool forced) {
|
||||
|
@ -493,7 +506,7 @@ bool cViewElement::Parse(bool forced) {
|
|||
}
|
||||
delete detacher;
|
||||
bool isAnimated = (FadeTime() > 0) || (ShiftTime() > 0);
|
||||
detacher = new cAnimation((cDetachable*)this, waitOnWakeup, startAnimation && isAnimated);
|
||||
detacher = new cDetacher((cDetachable*)this, waitOnWakeup, startAnimation && isAnimated);
|
||||
detacher->Start();
|
||||
startAnimation = false;
|
||||
init = false;
|
||||
|
@ -561,3 +574,187 @@ cPoint cViewElement::ShiftStart(cRect &shiftbox) {
|
|||
return start;
|
||||
}
|
||||
|
||||
void cViewElement::StopAnimation(void) {
|
||||
delete detacher;
|
||||
detacher = NULL;
|
||||
if (shifter)
|
||||
cView::RemoveAnimation(shifter);
|
||||
if (fader)
|
||||
cView::RemoveAnimation(fader);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* helper function (did not find any other common place)
|
||||
******************************************************************/
|
||||
bool RecordingIsHD(const cEvent* event, const tChannelID channelID) {
|
||||
// detect HD from 'info'
|
||||
bool isHD = false;
|
||||
int type = -1;
|
||||
|
||||
if (event) {
|
||||
cComponents *Components = (cComponents *)event->Components();
|
||||
if (Components) {
|
||||
// detect HD (see also ETSI EN 300 468)
|
||||
// Stream: 1 = MPEG2-Video, 2 = MPEG2 Audio, 3 = Untertitel, 4 = AC3-Audio, 5 = H.264-Video, 6 = HEAAC-Audio, 7 = DTS/DTS HD audio, 8 = SRM/CPCM data, 9 = HEVC Video, AC4 Audio
|
||||
// Stream == Video(1|5): 01 = 05 = 4:3, 02 = 03 = 06 = 07 = 16:9, 04 = 08 = >16:9, 09 = 0D = HD 4:3, 0A = 0B = 0E = 0F = HD 16:9, 0C = 10 = HD >16:9
|
||||
|
||||
tComponent *Component;
|
||||
// #1: HVEC (stream content: 9)
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
isHD = true; // HVEC is always HD, type 4|5|6|7 would be even UHD (see below dedicated detection function)
|
||||
} else {
|
||||
// #2: H.264 (stream content: 5)
|
||||
Component = Components->GetComponent(0, 5, 0); // recording info: "X 5 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
} else {
|
||||
// #3: MPEG2 (stream content: 1)
|
||||
Component = Components->GetComponent(0, 1, 0); // recording info: "X 1 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 0x09:
|
||||
case 0x0A:
|
||||
case 0x0B:
|
||||
case 0x0C:
|
||||
case 0x0D:
|
||||
case 0x0E:
|
||||
case 0x0F:
|
||||
case 0x10:
|
||||
isHD = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if ((isHD == false) && (type == -1) && (!(channelID == tChannelID::InvalidID))) {
|
||||
// fallback to retrieve via channel (in case of EPG issues)
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(channelID);
|
||||
#else
|
||||
const cChannel *channel = Channels.GetByChannelID(channelID);
|
||||
#endif
|
||||
if (channel) {
|
||||
switch (channel->Vtype()) {
|
||||
case 0x1b: // H.264
|
||||
case 0x24: // H.265
|
||||
isHD = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return isHD;
|
||||
};
|
||||
|
||||
bool RecordingIsUHD(const cEvent* event, const tChannelID channelID) {
|
||||
// detect UHD from 'info'
|
||||
bool isUHD = false;
|
||||
int type = -1;
|
||||
|
||||
if (event) {
|
||||
cComponents *Components = (cComponents *)event->Components();
|
||||
if (Components) {
|
||||
// detect UHD (see also ETSI EN 300 468)
|
||||
// Stream: 9 = HEVC Video, AC4 Audio
|
||||
// Stream == Video(9): 00|01|02|03 = HD, 04|05|06|07 = UHD
|
||||
|
||||
tComponent *Component;
|
||||
// HVEC (stream content: 9)
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
type = Component->type;
|
||||
};
|
||||
|
||||
switch (type) {
|
||||
case 0x04:
|
||||
case 0x05:
|
||||
case 0x06:
|
||||
case 0x07:
|
||||
isUHD = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if ((isUHD == false) && (type == -1) && (!(channelID == tChannelID::InvalidID))) {
|
||||
// fallback to retrieve via channel (in case of EPG issues)
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(channelID);
|
||||
#else
|
||||
const cChannel *channel = Channels.GetByChannelID(channelID);
|
||||
#endif
|
||||
if (channel) {
|
||||
switch (channel->Vtype()) {
|
||||
case 0x24: // H.265
|
||||
isUHD = true;
|
||||
break;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
return isUHD;
|
||||
};
|
||||
|
||||
bool RecordingIsRadio(const cEvent* event, const double FramesPerSecond) {
|
||||
// detect Radio from 'info'
|
||||
bool isRadio = false;
|
||||
bool hasAudio = false;
|
||||
bool hasVideo = false;
|
||||
|
||||
cComponents *Components = (cComponents *)event->Components();
|
||||
if (Components) {
|
||||
// Stream: 1 = MPEG2-Video, 2 = MPEG2 Audio, 3 = Untertitel, 4 = AC3-Audio, 5 = H.264-Video, 6 = HEAAC-Audio, 7 = DTS/DTS HD audio, 8 = SRM/CPCM data, 9 = HEVC Video, AC4 Audio
|
||||
|
||||
tComponent *Component;
|
||||
|
||||
Component = Components->GetComponent(0, 2, 0); // recording info: "X 2 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 4, 0); // recording info: "X 4 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 6, 0); // recording info: "X 6 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 7, 0); // recording info: "X 7 <type>"
|
||||
if (Component) {
|
||||
hasAudio = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 1, 0); // recording info: "X 1 <type>"
|
||||
if (Component) {
|
||||
hasVideo = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 5, 0); // recording info: "X 5 <type>"
|
||||
if (Component) {
|
||||
hasVideo = true;
|
||||
};
|
||||
|
||||
Component = Components->GetComponent(0, 9, 0); // recording info: "X 9 <type>"
|
||||
if (Component) {
|
||||
hasVideo = true;
|
||||
};
|
||||
};
|
||||
|
||||
if ((hasAudio == true) && (hasVideo == false)) {
|
||||
if (FramesPerSecond < 24) { // workaround for issue of missing "X 1" on some SD channels (e.g. RTL)
|
||||
isRadio = true;
|
||||
};
|
||||
};
|
||||
|
||||
return isRadio;
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <list>
|
||||
#include <vdr/tools.h>
|
||||
#include "osdwrapper.h"
|
||||
#include "globals.h"
|
||||
|
@ -24,22 +25,28 @@ protected:
|
|||
bool dirty;
|
||||
bool blocked;
|
||||
bool detached;
|
||||
bool doAnimOut;
|
||||
bool doStartAnim;
|
||||
bool waitOnWakeup;
|
||||
bool scrollingStarted;
|
||||
bool startAnimation;
|
||||
bool restartAnimation;
|
||||
cGlobals *globals;
|
||||
cRect container;
|
||||
cViewElementAttribs *attribs;
|
||||
vector<int> clearOnDisplay;
|
||||
bool clearAll;
|
||||
cList<cAreaNode> areaNodes;
|
||||
skindesignerapi::cTokenContainer *tokenContainer;
|
||||
cList<cAnimation> scrollers;
|
||||
cAnimation *detacher;
|
||||
cAnimation *fader;
|
||||
cAnimation *shifter;
|
||||
list<cScroller*> scrollers;
|
||||
cDetacher *detacher;
|
||||
cShifter *shifter;
|
||||
cFader *fader;
|
||||
void InheritTokenContainer(void);
|
||||
void InheritTokenContainerDeep(void);
|
||||
virtual bool DoScroll(void) { return true; };
|
||||
cPoint ShiftStart(cRect &shiftbox);
|
||||
void StopAnimation(void);
|
||||
public:
|
||||
cViewElement(void);
|
||||
cViewElement(const cViewElement &other);
|
||||
|
@ -50,6 +57,8 @@ public:
|
|||
void SetGlobals(cGlobals *globals);
|
||||
virtual void SetTokenContainer(void);
|
||||
void SetDetached(void) { detached = true; };
|
||||
void SetAnimOut(void) { doAnimOut = true; };
|
||||
void UnsetStartAnim(void) { doStartAnim = false; };
|
||||
void UnsetWaitOnWakeup(void) { waitOnWakeup = false; };
|
||||
bool Detached(void);
|
||||
void SetContainer(int x, int y, int width, int height);
|
||||
|
@ -74,6 +83,11 @@ public:
|
|||
void StopScrolling(bool deletePixmaps = true);
|
||||
eOrientation Orientation(void) { return attribs->Orientation(); };
|
||||
virtual int Delay(void) { return attribs->Delay(); };
|
||||
const char *ClearOnDisplay(void) { return attribs->ClearOnDisplay(); };
|
||||
void SetClearOnDisplay(vector<int> clearOnDisplay) { this->clearOnDisplay = clearOnDisplay; };
|
||||
vector<int> GetClearOnDisplay(void) { return clearOnDisplay; };
|
||||
void SetClearAll(void) { clearAll = true; };
|
||||
bool DoClearAll(void) { return clearAll; };
|
||||
void ParseDetached(void);
|
||||
void RenderDetached(void);
|
||||
bool Shifting(void);
|
||||
|
@ -81,18 +95,26 @@ public:
|
|||
int FadeTime(void);
|
||||
int ShiftTime(void);
|
||||
int ShiftMode(void);
|
||||
void ShiftPositions(cPoint *start, cPoint *end);
|
||||
void StartAnimation(void);
|
||||
void SetRestartAnimation(void) { restartAnimation = true; };
|
||||
virtual void SetTransparency(int transparency, bool force = false);
|
||||
virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false);
|
||||
void SetStartShifting(void) { };
|
||||
void SetEndShifting(void) { };
|
||||
void RegisterAnimation(void);
|
||||
void UnregisterAnimation(void);
|
||||
cRect CoveredArea(void);
|
||||
void Flush(bool animFlush);
|
||||
void Flush(void);
|
||||
virtual bool Parse(bool forced = false);
|
||||
cFunction *GetFunction(const char *name);
|
||||
virtual void Debug(bool full = false);
|
||||
};
|
||||
|
||||
#endif //__VIEWELEMENT_H
|
||||
|
||||
/******************************************************************
|
||||
* helper function (did not find any other common place)
|
||||
******************************************************************/
|
||||
bool RecordingIsHD(const cEvent* event, const tChannelID channelID);
|
||||
bool RecordingIsUHD(const cEvent* event, const tChannelID channelID);
|
||||
bool RecordingIsRadio(const cEvent* event, const double FramesPerSecond);
|
||||
|
||||
#endif //__VIEWELEMENT_H
|
||||
|
|
|
@ -160,12 +160,12 @@ bool cVeMessage::Parse(bool forced) {
|
|||
* cVeDevices
|
||||
******************************************************************/
|
||||
cVeDevices::cVeDevices(void) {
|
||||
lastRefresh = 0;
|
||||
initial = true;
|
||||
devicesIndex = -1;
|
||||
lastSignalStrength = NULL;
|
||||
lastSignalQuality = NULL;
|
||||
recDevices = NULL;
|
||||
lastRecDevices = NULL;
|
||||
}
|
||||
|
||||
cVeDevices::~cVeDevices(void) {
|
||||
|
@ -176,6 +176,8 @@ cVeDevices::~cVeDevices(void) {
|
|||
lastSignalQuality = NULL;
|
||||
delete[] recDevices;
|
||||
recDevices = NULL;
|
||||
delete[] lastRecDevices;
|
||||
lastRecDevices = NULL;
|
||||
mutexDevices.Unlock();
|
||||
}
|
||||
|
||||
|
@ -193,11 +195,13 @@ void cVeDevices::Init(void) {
|
|||
lastSignalStrength = new int[numDevices];
|
||||
lastSignalQuality = new int[numDevices];
|
||||
recDevices = new bool[numDevices];
|
||||
lastRecDevices = new bool[numDevices];
|
||||
mutexDevices.Lock();
|
||||
for (int i=0; i<numDevices; i++) {
|
||||
lastSignalStrength[i] = 0;
|
||||
lastSignalQuality[i] = 0;
|
||||
recDevices[i] = false;
|
||||
lastRecDevices[i] = false;
|
||||
}
|
||||
mutexDevices.Unlock();
|
||||
}
|
||||
|
@ -205,7 +209,6 @@ void cVeDevices::Init(void) {
|
|||
void cVeDevices::Close(void) {
|
||||
devices.clear();
|
||||
initial = true;
|
||||
lastRefresh = 0;
|
||||
numDevices = 0;
|
||||
mutexDevices.Lock();
|
||||
delete[] lastSignalStrength;
|
||||
|
@ -214,6 +217,8 @@ void cVeDevices::Close(void) {
|
|||
lastSignalQuality = NULL;
|
||||
delete[] recDevices;
|
||||
recDevices = NULL;
|
||||
delete[] lastRecDevices;
|
||||
lastRecDevices = NULL;
|
||||
mutexDevices.Unlock();
|
||||
cViewElement::Close();
|
||||
}
|
||||
|
@ -243,17 +248,17 @@ void cVeDevices::SetTokenContainer(void) {
|
|||
bool cVeDevices::Parse(bool forced) {
|
||||
if (!cViewElement::Parse(forced))
|
||||
return false;
|
||||
|
||||
bool changed = false;
|
||||
if (initial) {
|
||||
Init();
|
||||
initial = false;
|
||||
changed = true;
|
||||
} else {
|
||||
//in light modus content is static
|
||||
if (light)
|
||||
return false;
|
||||
//check if drawing is necessary
|
||||
if (cTimeMs::Now() - lastRefresh < 500)
|
||||
return false;
|
||||
bool changed = false;
|
||||
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
const cDevice *device = cDevice::GetDevice(devices[i]);
|
||||
if (!device || !device->NumProvidedSystems()) {
|
||||
|
@ -272,22 +277,15 @@ bool cVeDevices::Parse(bool forced) {
|
|||
if ((signalStrength != lastSigStr) || (signalQuality != lastSigQual)) {
|
||||
changed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!changed) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//check device which currently displays live tv
|
||||
int deviceLiveTV = -1;
|
||||
cDevice *primaryDevice = cDevice::PrimaryDevice();
|
||||
if (primaryDevice) {
|
||||
if (!primaryDevice->Replaying() || primaryDevice->Transferring())
|
||||
deviceLiveTV = cDevice::ActualDevice()->DeviceNumber();
|
||||
else
|
||||
deviceLiveTV = primaryDevice->DeviceNumber();
|
||||
// reset recording devices
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
recDevices[i] = false;
|
||||
}
|
||||
|
||||
// check currently recording devices
|
||||
// BLOCK for LOCK_TIMERS_READ scope !!
|
||||
{
|
||||
|
@ -305,12 +303,40 @@ bool cVeDevices::Parse(bool forced) {
|
|||
const cDevice *recDevice = RecordControl->Device();
|
||||
if (recDevice) {
|
||||
mutexDevices.Lock();
|
||||
if (recDevices)
|
||||
recDevices[recDevice->DeviceNumber()] = true;
|
||||
if (recDevices) {
|
||||
int d = recDevice->DeviceNumber();
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
if (devices[i] == d) {
|
||||
recDevices[i] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
mutexDevices.Unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
} // LOCK_TIMERS_READ
|
||||
|
||||
for (int i = 0; i < numDevices; i++) {
|
||||
if (recDevices[i] != lastRecDevices[i]) {
|
||||
lastRecDevices[i] = recDevices[i];
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!changed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//check device which currently displays live tv
|
||||
int deviceLiveTV = -1;
|
||||
cDevice *primaryDevice = cDevice::PrimaryDevice();
|
||||
if (primaryDevice) {
|
||||
if (!primaryDevice->Replaying() || primaryDevice->Transferring())
|
||||
deviceLiveTV = cDevice::ActualDevice()->DeviceNumber();
|
||||
else
|
||||
deviceLiveTV = primaryDevice->DeviceNumber();
|
||||
}
|
||||
|
||||
//create loop container
|
||||
|
@ -326,7 +352,7 @@ bool cVeDevices::Parse(bool forced) {
|
|||
if (!device || !device->NumProvidedSystems()) {
|
||||
continue;
|
||||
}
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::num, *cString::sprintf("%d", i));
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::num, *cString::sprintf("%d", i + 1));
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::type, *(device->DeviceType()));
|
||||
|
||||
cCamSlot *camSlot = device->CamSlot();
|
||||
|
@ -346,15 +372,9 @@ bool cVeDevices::Parse(bool forced) {
|
|||
signalQuality = device->SignalQuality();
|
||||
}
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::signalstrength, *cString::sprintf("%d", signalStrength));
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::signalstrength, *cString::sprintf("%d", signalQuality));
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::livetv, i == deviceLiveTV ? "1" : "0");
|
||||
|
||||
bool isRecording = false;
|
||||
mutexDevices.Lock();
|
||||
if (recDevices && recDevices[i])
|
||||
isRecording = true;
|
||||
mutexDevices.Unlock();
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::recording, isRecording ? "1" : "0");
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::signalquality, *cString::sprintf("%d", signalQuality));
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::livetv, devices[i] == deviceLiveTV ? "1" : "0");
|
||||
tokenContainer->AddLoopToken(devicesIndex, i, (int)eDevicesLT::recording, (recDevices && recDevices[i]) ? "1" : "0");
|
||||
|
||||
const cChannel *channel = device->GetCurrentlyTunedTransponder();
|
||||
const cSource *source = (channel) ? Sources.Get(channel->Source()) : NULL;
|
||||
|
@ -380,7 +400,6 @@ bool cVeDevices::Parse(bool forced) {
|
|||
}
|
||||
|
||||
SetDirty();
|
||||
lastRefresh = cTimeMs::Now();
|
||||
return true;
|
||||
}
|
||||
/******************************************************************
|
||||
|
@ -538,4 +557,4 @@ bool cVeVolume::Parse(bool forced) {
|
|||
changed = false;
|
||||
SetDirty();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
class cVeDevices : public cViewElement {
|
||||
private:
|
||||
bool light;
|
||||
time_t lastRefresh;
|
||||
vector<int> devices;
|
||||
bool initial;
|
||||
int devicesIndex;
|
||||
|
@ -60,6 +59,7 @@ private:
|
|||
int* lastSignalStrength;
|
||||
int* lastSignalQuality;
|
||||
bool* recDevices;
|
||||
bool* lastRecDevices;
|
||||
void Init(void);
|
||||
public:
|
||||
cVeDevices(void);
|
||||
|
@ -107,4 +107,4 @@ public:
|
|||
void Set(int current, int total, bool mute);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
#endif //__VIEWELEMENTSCOMMON_H
|
||||
#endif //__VIEWELEMENTSCOMMON_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "viewelementsdisplaychannel.h"
|
||||
#include "../config.h"
|
||||
#include "../extensions/helpers.h"
|
||||
#include "../extensions/timers.h"
|
||||
#include "../services/scraper2vdr.h"
|
||||
#include "../services/epgtimer.h"
|
||||
|
||||
/******************************************************************
|
||||
* cVeDcChannelInfo
|
||||
|
@ -111,6 +111,9 @@ const char *cVeDcChannelGroup::GetChannelSep(const cChannel *c, bool prev) {
|
|||
* cVeDcEpgInfo
|
||||
******************************************************************/
|
||||
cVeDcEpgInfo::cVeDcEpgInfo(void) {
|
||||
globalTimers = NULL;
|
||||
current = NULL;
|
||||
next = NULL;
|
||||
}
|
||||
|
||||
cVeDcEpgInfo::~cVeDcEpgInfo(void) {
|
||||
|
@ -140,57 +143,71 @@ void cVeDcEpgInfo::SetTokenContainer(void) {
|
|||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDcEpgInfo::Set(const cEvent *p, const cEvent *f) {
|
||||
bool cVeDcEpgInfo::Parse(bool force) {
|
||||
if (!cViewElement::Parse(force))
|
||||
return false;
|
||||
tokenContainer->Clear();
|
||||
if (p) {
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currenttitle, p->Title());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currentsubtitle, p->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currentstart, *p->GetTimeString());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currentstop, *p->GetEndTimeString());
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentduration, p->Duration() / 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentdurationhours, p->Duration() / 3600);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentdurationminutes, (p->Duration() / 60) % 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentelapsed, (int)round((time(NULL) - p->StartTime())/60));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentremaining, (int)round((p->EndTime() - time(NULL))/60));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentrecording, EventHasTimer(p));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::hasVPS, (bool)p->Vps());
|
||||
if (current) {
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currenttitle, current->Title());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currentsubtitle, current->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currentstart, *current->GetTimeString());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::currentstop, *current->GetEndTimeString());
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentduration, current->Duration() / 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentdurationhours, current->Duration() / 3600);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentdurationminutes, (current->Duration() / 60) % 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentelapsed, (int)round((time(NULL) - current->StartTime())/60));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentremaining, (int)round((current->EndTime() - time(NULL))/60));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::currentrecording, EventHasTimer(current));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::hasVPS, (bool)current->Vps());
|
||||
}
|
||||
if (f) {
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nexttitle, f->Title());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nextsubtitle, f->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nextstart, *f->GetTimeString());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nextstop, *f->GetEndTimeString());
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextduration, f->Duration() / 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextdurationhours, f->Duration() / 3600);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextdurationminutes, (f->Duration() / 60) % 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextrecording, EventHasTimer(f));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::hasVPS, (bool)f->Vps());
|
||||
if (next) {
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nexttitle, next->Title());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nextsubtitle, next->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nextstart, *next->GetTimeString());
|
||||
tokenContainer->AddStringToken((int)eDCEpgInfoST::nextstop, *next->GetEndTimeString());
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextduration, next->Duration() / 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextdurationhours, next->Duration() / 3600);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextdurationminutes, (next->Duration() / 60) % 60);
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::nextrecording, EventHasTimer(next));
|
||||
tokenContainer->AddIntToken((int)eDCEpgInfoIT::hasVPS, (bool)next->Vps());
|
||||
}
|
||||
SetDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
void cVeDcEpgInfo::Close(void) {
|
||||
current = NULL;
|
||||
next = NULL;
|
||||
tokenContainer->Clear();
|
||||
cViewElement::Close();
|
||||
}
|
||||
|
||||
bool cVeDcEpgInfo::EventHasTimer(const cEvent *e) {
|
||||
if (!e) return false;
|
||||
int timerCount = 0;
|
||||
// BLOCK for LOCK_TIMERS_READ scope !!
|
||||
{
|
||||
eTimerMatch TimerMatch = tmNone;
|
||||
const cTimers *timers;
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_READ;
|
||||
timerCount = Timers->Count();
|
||||
#else
|
||||
timerCount = Timers.Count();
|
||||
#endif
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
timers = Timers;
|
||||
}
|
||||
cGlobalSortedTimers SortedTimers(timerCount); // local and remote timers
|
||||
bool hasTimer = e->HasTimer();
|
||||
for (int i = 0; i < SortedTimers.Size() && !hasTimer; i++)
|
||||
if (const cTimer *Timer = SortedTimers[i])
|
||||
if (Timer->Channel()->GetChannelID() == e->ChannelID())
|
||||
#else
|
||||
timers = &Timers;
|
||||
#endif
|
||||
const cTimer *Timer = timers->GetMatch(e, &TimerMatch);
|
||||
if (Timer && Timer->HasFlags(tfActive)) {
|
||||
if (TimerMatch == tmFull)
|
||||
return true;
|
||||
if (TimerMatch == tmPartial) {
|
||||
const char *fileName = Timer->File();
|
||||
if (fileName && *fileName == '@')
|
||||
return true;
|
||||
}
|
||||
}
|
||||
bool hasTimer = false;
|
||||
for (int i = 0; i < globalTimers->Size() && !hasTimer; i++)
|
||||
if (const cTimer *Timer = globalTimers->At(i))
|
||||
if (Timer->Channel() && (Timer->Channel()->GetChannelID() == e->ChannelID()))
|
||||
if (const cEvent *timerEvent = Timer->Event())
|
||||
if (e->EventID() == timerEvent->EventID())
|
||||
hasTimer = true;
|
||||
|
@ -213,6 +230,7 @@ void cVeDcProgressBar::Close(void) {
|
|||
currentLast = -1;
|
||||
startTime = -1;
|
||||
duration = -1;
|
||||
tokenContainer->Clear();
|
||||
cViewElement::Close();
|
||||
}
|
||||
|
||||
|
@ -225,16 +243,19 @@ void cVeDcProgressBar::SetTokenContainer(void) {
|
|||
tokenContainer->DefineIntToken("{remaining}", (int)eDCProgressBarIT::remaining);
|
||||
tokenContainer->DefineIntToken("{permashift}", (int)eDCProgressBarIT::permashift);
|
||||
tokenContainer->DefineIntToken("{livebuffer}", (int)eDCProgressBarIT::livebuffer);
|
||||
tokenContainer->DefineIntToken("{currentremaining}", (int)eDCProgressBarIT::currentremaining);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDcProgressBar::Set(const cEvent *p) {
|
||||
if (!p) {
|
||||
startTime = -1;
|
||||
endTime = -1;
|
||||
duration = -1;
|
||||
return;
|
||||
}
|
||||
startTime = p->StartTime();
|
||||
endTime = p-> EndTime();
|
||||
duration = p->Duration();
|
||||
|
||||
int current = 0;
|
||||
|
@ -258,18 +279,24 @@ void cVeDcProgressBar::Set(const cEvent *p) {
|
|||
} else {
|
||||
tokenContainer->AddIntToken((int)eDCProgressBarIT::permashift, 0);
|
||||
}
|
||||
tokenContainer->AddIntToken((int)eDCProgressBarIT::currentremaining, (int)round((endTime - t) / 60));
|
||||
}
|
||||
|
||||
bool cVeDcProgressBar::Parse(bool force) {
|
||||
if (!cViewElement::Parse(force))
|
||||
return false;
|
||||
|
||||
int current = 0;
|
||||
time_t t = time(NULL);
|
||||
if (t > startTime)
|
||||
current = t - startTime;
|
||||
|
||||
if (!(current > currentLast + 3) && !force && !Dirty())
|
||||
return false;
|
||||
|
||||
currentLast = current;
|
||||
SetDirty();
|
||||
|
||||
if (duration <= 0) {
|
||||
tokenContainer->AddIntToken((int)eDCProgressBarIT::duration, 0);
|
||||
tokenContainer->AddIntToken((int)eDCProgressBarIT::elapsed, 0);
|
||||
|
@ -285,6 +312,7 @@ bool cVeDcProgressBar::Parse(bool force) {
|
|||
} else {
|
||||
tokenContainer->AddIntToken((int)eDCProgressBarIT::permashift, 0);
|
||||
}
|
||||
tokenContainer->AddIntToken((int)eDCProgressBarIT::currentremaining, (int)round((endTime - t) / 60));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -328,21 +356,17 @@ void cVeDcStatusInfo::Set(const cChannel *c) {
|
|||
bool isDolby = c->Dpid(0);
|
||||
bool isEncrypted = c->Ca();
|
||||
bool isRecording = cRecordControls::Active();
|
||||
int timerCount = 0;
|
||||
// BLOCK for LOCK_TIMERS_READ scope !!
|
||||
{
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_READ;
|
||||
timerCount = Timers->Count();
|
||||
#else
|
||||
timerCount = Timers.Count();
|
||||
#endif
|
||||
}
|
||||
cGlobalSortedTimers SortedTimers(timerCount); // local and remote timers
|
||||
for (int i = 0; i < SortedTimers.Size() && !isRecording; i++)
|
||||
if (const cTimer *Timer = SortedTimers[i])
|
||||
|
||||
for (int i = 0; i < globalTimers->Size() && !isRecording; i++) {
|
||||
if (const cTimer *Timer = globalTimers->At(i)) {
|
||||
if (Timer->Recording())
|
||||
isRecording = true;
|
||||
else if (cEpgTimer_Interface_V1* epgTimer = dynamic_cast<cEpgTimer_Interface_V1*>((cTimer*)Timer)) {
|
||||
if (epgTimer->State() == 'R')
|
||||
isRecording = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tokenContainer->AddIntToken((int)eDCStatusInfoIT::isRadio, isRadio);
|
||||
tokenContainer->AddIntToken((int)eDCStatusInfoIT::hasVT, hasVT);
|
||||
|
@ -466,6 +490,7 @@ void cVeDcScreenResolution::SetTokenContainer(void) {
|
|||
tokenContainer->DefineIntToken("{screenwidth}", (int)eDCScreenResolutionIT::screenwidth);
|
||||
tokenContainer->DefineIntToken("{screenheight}", (int)eDCScreenResolutionIT::screenheight);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eDCScreenResolutionIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eDCScreenResolutionIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isWideScreen}", (int)eDCScreenResolutionIT::isWideScreen);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
@ -491,7 +516,8 @@ bool cVeDcScreenResolution::Parse(bool forced) {
|
|||
SetDirty();
|
||||
|
||||
bool isHD = false;
|
||||
string resName = GetScreenResolutionString(screenWidth, screenHeight, &isHD);
|
||||
bool isUHD = false;
|
||||
string resName = GetScreenResolutionString(screenWidth, screenHeight, &isHD, &isUHD);
|
||||
|
||||
bool isWideScreen = false;
|
||||
string aspectName = GetScreenAspectString(aspect, &isWideScreen);
|
||||
|
@ -500,6 +526,7 @@ bool cVeDcScreenResolution::Parse(bool forced) {
|
|||
tokenContainer->AddIntToken((int)eDCScreenResolutionIT::screenwidth, screenWidth);
|
||||
tokenContainer->AddIntToken((int)eDCScreenResolutionIT::screenheight, screenHeight);
|
||||
tokenContainer->AddIntToken((int)eDCScreenResolutionIT::isHD, isHD);
|
||||
tokenContainer->AddIntToken((int)eDCScreenResolutionIT::isUHD, isUHD);
|
||||
tokenContainer->AddIntToken((int)eDCScreenResolutionIT::isWideScreen, isWideScreen);
|
||||
tokenContainer->AddStringToken((int)eDCScreenResolutionST::resolution, resName.c_str());
|
||||
tokenContainer->AddStringToken((int)eDCScreenResolutionST::aspect, aspectName.c_str());
|
||||
|
@ -593,7 +620,8 @@ void cVeDcScraperContent::SetTokenContainer(void) {
|
|||
|
||||
void cVeDcScraperContent::Set(const cEvent *e) {
|
||||
tokenContainer->Clear();
|
||||
SetPosterBanner(tokenContainer, e, NULL);
|
||||
if (e)
|
||||
SetPosterBanner(tokenContainer, e, NULL);
|
||||
SetDirty();
|
||||
}
|
||||
|
||||
|
@ -689,3 +717,261 @@ bool cVeDcEcmInfo::CompareECMInfos(sDVBAPIEcmInfo *ecmInfo) {
|
|||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cVeDcChannelHints
|
||||
******************************************************************/
|
||||
cVeDcChannelHints::cVeDcChannelHints(void) {
|
||||
hints = NULL;
|
||||
numHints = 0;
|
||||
current = 0;
|
||||
hintsIndex = -1;
|
||||
active = false;
|
||||
}
|
||||
|
||||
cVeDcChannelHints::~cVeDcChannelHints(void) {
|
||||
delete[] hints;
|
||||
}
|
||||
|
||||
void cVeDcChannelHints::Close(void) {
|
||||
cViewElement::Close();
|
||||
}
|
||||
|
||||
void cVeDcChannelHints::SetTokenContainer(void) {
|
||||
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||
tokenContainer->DefineIntToken("{numhints}", (int)eDCChannelHintsIT::numhints);
|
||||
tokenContainer->DefineLoopToken("{hints[channelnumber]}", (int)eDCChannelHintsLT::channelnumber);
|
||||
tokenContainer->DefineLoopToken("{hints[channelname]}", (int)eDCChannelHintsLT::channelname);
|
||||
tokenContainer->DefineLoopToken("{hints[channelid]}", (int)eDCChannelHintsLT::channelid);
|
||||
tokenContainer->DefineLoopToken("{hints[channellogoexists]}", (int)eDCChannelHintsLT::channellogoexists);
|
||||
hintsIndex = tokenContainer->LoopIndex("hints");
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDcChannelHints::SetNumHints(int num) {
|
||||
delete[] hints;
|
||||
numHints = num;
|
||||
hints = new const cChannel*[num];
|
||||
current = 0;
|
||||
active = true;
|
||||
SetDirty();
|
||||
}
|
||||
|
||||
|
||||
void cVeDcChannelHints::SetHint(const cChannel *c) {
|
||||
hints[current++] = c;
|
||||
}
|
||||
|
||||
bool cVeDcChannelHints::Parse(bool forced) {
|
||||
if (!cViewElement::Parse(forced))
|
||||
return false;
|
||||
if (!Dirty())
|
||||
return false;
|
||||
if (!hints)
|
||||
return false;
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken((int)eDCChannelHintsIT::numhints, numHints);
|
||||
|
||||
vector<int> loopInfo;
|
||||
loopInfo.push_back(numHints);
|
||||
tokenContainer->CreateLoopTokenContainer(&loopInfo);
|
||||
|
||||
for (int i=0; i < numHints; i++) {
|
||||
if (hints[i]) {
|
||||
tokenContainer->AddLoopToken(hintsIndex, i, (int)eDCChannelHintsLT::channelnumber, *cString::sprintf("%d", hints[i]->Number()));
|
||||
tokenContainer->AddLoopToken(hintsIndex, i, (int)eDCChannelHintsLT::channelname, hints[i]->Name());
|
||||
cString channelID = hints[i]->GetChannelID().ToString();
|
||||
tokenContainer->AddLoopToken(hintsIndex, i, (int)eDCChannelHintsLT::channelid, *channelID);
|
||||
bool logoExists = imgCache->LogoExists(*channelID);
|
||||
tokenContainer->AddLoopToken(hintsIndex, i, (int)eDCChannelHintsLT::channellogoexists, *cString::sprintf("%d", logoExists ? 1 : 0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cVeDcChannelDetail
|
||||
******************************************************************/
|
||||
cVeDcChannelDetail::cVeDcChannelDetail(void) {
|
||||
channel = NULL;
|
||||
}
|
||||
|
||||
cVeDcChannelDetail::~cVeDcChannelDetail(void) {
|
||||
channel = NULL;
|
||||
}
|
||||
|
||||
void cVeDcChannelDetail::Close(void) {
|
||||
channel = NULL;
|
||||
cViewElement::Close();
|
||||
}
|
||||
|
||||
void cVeDcChannelDetail::SetTokenContainer(void) {
|
||||
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||
tokenContainer->DefineStringToken("{channelname}", (int)eDCChannelDetailST::channelname);
|
||||
tokenContainer->DefineStringToken("{currenttitle}", (int)eDCChannelDetailST::currenttitle);
|
||||
tokenContainer->DefineStringToken("{currentshorttext}", (int)eDCChannelDetailST::currentshorttext);
|
||||
tokenContainer->DefineStringToken("{currentdescription}", (int)eDCChannelDetailST::currentdescription);
|
||||
tokenContainer->DefineStringToken("{currentstart}", (int)eDCChannelDetailST::currentstart);
|
||||
tokenContainer->DefineStringToken("{currentstop}", (int)eDCChannelDetailST::currentstop);
|
||||
tokenContainer->DefineStringToken("{currentdurationminutes}", (int)eDCChannelDetailST::currentdurationminutes);
|
||||
tokenContainer->DefineStringToken("{nexttitle}", (int)eDCChannelDetailST::nexttitle);
|
||||
tokenContainer->DefineStringToken("{nextshorttext}", (int)eDCChannelDetailST::nextshorttext);
|
||||
tokenContainer->DefineStringToken("{nextdescription}", (int)eDCChannelDetailST::nextdescription);
|
||||
tokenContainer->DefineStringToken("{nextstart}", (int)eDCChannelDetailST::nextstart);
|
||||
tokenContainer->DefineStringToken("{nextstop}", (int)eDCChannelDetailST::nextstop);
|
||||
tokenContainer->DefineStringToken("{nextdurationminutes}", (int)eDCChannelDetailST::nextdurationminutes);
|
||||
tokenContainer->DefineIntToken("{channelnumber}", (int)eDCChannelDetailIT::channelnumber);
|
||||
tokenContainer->DefineIntToken("{currentduration}", (int)eDCChannelDetailIT::currentduration);
|
||||
tokenContainer->DefineIntToken("{currentdurationhours}", (int)eDCChannelDetailIT::currentdurationhours);
|
||||
tokenContainer->DefineIntToken("{currentelapsed}", (int)eDCChannelDetailIT::currentelapsed);
|
||||
tokenContainer->DefineIntToken("{currentremaining}", (int)eDCChannelDetailIT::currentremaining);
|
||||
tokenContainer->DefineIntToken("{nextduration}", (int)eDCChannelDetailIT::nextduration);
|
||||
tokenContainer->DefineIntToken("{nextdurationhours}", (int)eDCChannelDetailIT::nextdurationhours);
|
||||
tokenContainer->DefineStringToken("{movietitle}", (int)eScraperST::movietitle);
|
||||
tokenContainer->DefineStringToken("{movieoriginalTitle}", (int)eScraperST::movieoriginalTitle);
|
||||
tokenContainer->DefineStringToken("{movietagline}", (int)eScraperST::movietagline);
|
||||
tokenContainer->DefineStringToken("{movieoverview}", (int)eScraperST::movieoverview);
|
||||
tokenContainer->DefineStringToken("{moviegenres}", (int)eScraperST::moviegenres);
|
||||
tokenContainer->DefineStringToken("{moviehomepage}", (int)eScraperST::moviehomepage);
|
||||
tokenContainer->DefineStringToken("{moviereleasedate}", (int)eScraperST::moviereleasedate);
|
||||
tokenContainer->DefineStringToken("{moviepopularity}", (int)eScraperST::moviepopularity);
|
||||
tokenContainer->DefineStringToken("{movievoteaverage}", (int)eScraperST::movievoteaverage);
|
||||
tokenContainer->DefineStringToken("{posterpath}", (int)eScraperST::posterpath);
|
||||
tokenContainer->DefineStringToken("{fanartpath}", (int)eScraperST::fanartpath);
|
||||
tokenContainer->DefineStringToken("{moviecollectionName}", (int)eScraperST::moviecollectionName);
|
||||
tokenContainer->DefineStringToken("{collectionposterpath}", (int)eScraperST::collectionposterpath);
|
||||
tokenContainer->DefineStringToken("{collectionfanartpath}", (int)eScraperST::collectionfanartpath);
|
||||
tokenContainer->DefineStringToken("{seriesname}", (int)eScraperST::seriesname);
|
||||
tokenContainer->DefineStringToken("{seriesoverview}", (int)eScraperST::seriesoverview);
|
||||
tokenContainer->DefineStringToken("{seriesfirstaired}", (int)eScraperST::seriesfirstaired);
|
||||
tokenContainer->DefineStringToken("{seriesnetwork}", (int)eScraperST::seriesnetwork);
|
||||
tokenContainer->DefineStringToken("{seriesgenre}", (int)eScraperST::seriesgenre);
|
||||
tokenContainer->DefineStringToken("{seriesrating}", (int)eScraperST::seriesrating);
|
||||
tokenContainer->DefineStringToken("{seriesstatus}", (int)eScraperST::seriesstatus);
|
||||
tokenContainer->DefineStringToken("{episodetitle}", (int)eScraperST::episodetitle);
|
||||
tokenContainer->DefineStringToken("{episodefirstaired}", (int)eScraperST::episodefirstaired);
|
||||
tokenContainer->DefineStringToken("{episodegueststars}", (int)eScraperST::episodegueststars);
|
||||
tokenContainer->DefineStringToken("{episodeoverview}", (int)eScraperST::episodeoverview);
|
||||
tokenContainer->DefineStringToken("{episoderating}", (int)eScraperST::episoderating);
|
||||
tokenContainer->DefineStringToken("{episodeimagepath}", (int)eScraperST::episodeimagepath);
|
||||
tokenContainer->DefineStringToken("{seasonposterpath}", (int)eScraperST::seasonposterpath);
|
||||
tokenContainer->DefineStringToken("{seriesposter1path}", (int)eScraperST::seriesposter1path);
|
||||
tokenContainer->DefineStringToken("{seriesposter2path}", (int)eScraperST::seriesposter2path);
|
||||
tokenContainer->DefineStringToken("{seriesposter3path}", (int)eScraperST::seriesposter3path);
|
||||
tokenContainer->DefineStringToken("{seriesfanart1path}", (int)eScraperST::seriesfanart1path);
|
||||
tokenContainer->DefineStringToken("{seriesfanart2path}", (int)eScraperST::seriesfanart2path);
|
||||
tokenContainer->DefineStringToken("{seriesfanart3path}", (int)eScraperST::seriesfanart3path);
|
||||
tokenContainer->DefineStringToken("{seriesbanner1path}", (int)eScraperST::seriesbanner1path);
|
||||
tokenContainer->DefineStringToken("{seriesbanner2path}", (int)eScraperST::seriesbanner2path);
|
||||
tokenContainer->DefineStringToken("{seriesbanner3path}", (int)eScraperST::seriesbanner3path);
|
||||
tokenContainer->DefineIntToken("{ismovie}", (int)eScraperIT::ismovie);
|
||||
tokenContainer->DefineIntToken("{moviebudget}", (int)eScraperIT::moviebudget);
|
||||
tokenContainer->DefineIntToken("{movierevenue}", (int)eScraperIT::movierevenue);
|
||||
tokenContainer->DefineIntToken("{movieadult}", (int)eScraperIT::movieadult);
|
||||
tokenContainer->DefineIntToken("{movieruntime}", (int)eScraperIT::movieruntime);
|
||||
tokenContainer->DefineIntToken("{isseries}", (int)eScraperIT::isseries);
|
||||
tokenContainer->DefineIntToken("{posterwidth}", (int)eScraperIT::posterwidth);
|
||||
tokenContainer->DefineIntToken("{posterheight}", (int)eScraperIT::posterheight);
|
||||
tokenContainer->DefineIntToken("{fanartwidth}", (int)eScraperIT::fanartwidth);
|
||||
tokenContainer->DefineIntToken("{fanartheight}", (int)eScraperIT::fanartheight);
|
||||
tokenContainer->DefineIntToken("{movieiscollection}", (int)eScraperIT::movieiscollection);
|
||||
tokenContainer->DefineIntToken("{collectionposterwidth}", (int)eScraperIT::collectionposterwidth);
|
||||
tokenContainer->DefineIntToken("{collectionposterheight}", (int)eScraperIT::collectionposterheight);
|
||||
tokenContainer->DefineIntToken("{collectionfanartwidth}", (int)eScraperIT::collectionfanartwidth);
|
||||
tokenContainer->DefineIntToken("{collectionfanartheight}", (int)eScraperIT::collectionfanartheight);
|
||||
tokenContainer->DefineIntToken("{epgpicavailable}", (int)eScraperIT::epgpicavailable);
|
||||
tokenContainer->DefineIntToken("{episodenumber}", (int)eScraperIT::episodenumber);
|
||||
tokenContainer->DefineIntToken("{episodeseason}", (int)eScraperIT::episodeseason);
|
||||
tokenContainer->DefineIntToken("{episodeimagewidth}", (int)eScraperIT::episodeimagewidth);
|
||||
tokenContainer->DefineIntToken("{episodeimageheight}", (int)eScraperIT::episodeimageheight);
|
||||
tokenContainer->DefineIntToken("{seasonposterwidth}", (int)eScraperIT::seasonposterwidth);
|
||||
tokenContainer->DefineIntToken("{seasonposterheight}", (int)eScraperIT::seasonposterheight);
|
||||
tokenContainer->DefineIntToken("{seriesposter1width}", (int)eScraperIT::seriesposter1width);
|
||||
tokenContainer->DefineIntToken("{seriesposter1height}", (int)eScraperIT::seriesposter1height);
|
||||
tokenContainer->DefineIntToken("{seriesposter2width}", (int)eScraperIT::seriesposter2width);
|
||||
tokenContainer->DefineIntToken("{seriesposter2height}", (int)eScraperIT::seriesposter2height);
|
||||
tokenContainer->DefineIntToken("{seriesposter3width}", (int)eScraperIT::seriesposter3width);
|
||||
tokenContainer->DefineIntToken("{seriesposter3height}", (int)eScraperIT::seriesposter3height);
|
||||
tokenContainer->DefineIntToken("{seriesfanart1width}", (int)eScraperIT::seriesfanart1width);
|
||||
tokenContainer->DefineIntToken("{seriesfanart1height}", (int)eScraperIT::seriesfanart1height);
|
||||
tokenContainer->DefineIntToken("{seriesfanart2width}", (int)eScraperIT::seriesfanart2width);
|
||||
tokenContainer->DefineIntToken("{seriesfanart2height}", (int)eScraperIT::seriesfanart2height);
|
||||
tokenContainer->DefineIntToken("{seriesfanart3width}", (int)eScraperIT::seriesfanart3width);
|
||||
tokenContainer->DefineIntToken("{seriesfanart3height}", (int)eScraperIT::seriesfanart3height);
|
||||
tokenContainer->DefineIntToken("{seriesbanner1width}", (int)eScraperIT::seriesbanner1width);
|
||||
tokenContainer->DefineIntToken("{seriesbanner1height}", (int)eScraperIT::seriesbanner1height);
|
||||
tokenContainer->DefineIntToken("{seriesbanner2width}", (int)eScraperIT::seriesbanner2width);
|
||||
tokenContainer->DefineIntToken("{seriesbanner2height}", (int)eScraperIT::seriesbanner2height);
|
||||
tokenContainer->DefineIntToken("{seriesbanner3width}", (int)eScraperIT::seriesbanner3width);
|
||||
tokenContainer->DefineIntToken("{seriesbanner3height}", (int)eScraperIT::seriesbanner3height);
|
||||
tokenContainer->DefineLoopToken("{actors[name]}", (int)eScraperLT::name);
|
||||
tokenContainer->DefineLoopToken("{actors[role]}", (int)eScraperLT::role);
|
||||
tokenContainer->DefineLoopToken("{actors[thumb]}", (int)eScraperLT::thumb);
|
||||
tokenContainer->DefineLoopToken("{actors[thumbwidth]}", (int)eScraperLT::thumbwidth);
|
||||
tokenContainer->DefineLoopToken("{actors[thumbheight]}", (int)eScraperLT::thumbheight);
|
||||
actorsIndex = tokenContainer->LoopIndex("actors");
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDcChannelDetail::Set(const cChannel *c) {
|
||||
channel = c;
|
||||
}
|
||||
|
||||
bool cVeDcChannelDetail::Parse(bool forced) {
|
||||
if (!cViewElement::Parse(forced))
|
||||
return false;
|
||||
if (!channel)
|
||||
return false;
|
||||
|
||||
SetDirty();
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::channelnumber, channel->Number());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::channelname, channel->Name());
|
||||
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_SCHEDULES_READ;
|
||||
const cSchedules* schedules = Schedules;
|
||||
#else
|
||||
cSchedulesLock schedulesLock;
|
||||
const cSchedules* schedules = (cSchedules*)cSchedules::Schedules(schedulesLock);
|
||||
#endif
|
||||
const cSchedule *schedule = schedules->GetSchedule(channel);
|
||||
if (schedule) {
|
||||
const cEvent *presentEvent = schedule->GetPresentEvent();
|
||||
if (presentEvent) {
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::currenttitle, presentEvent->Title());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::currentshorttext, presentEvent->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::currentdescription, presentEvent->Description());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::currentstart, *presentEvent->GetTimeString());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::currentstop, *presentEvent->GetEndTimeString());
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::currentduration, presentEvent->Duration()/60);
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::currentelapsed, (time(0) - presentEvent->StartTime())/60);
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::currentremaining, presentEvent->Duration()/60 - (time(0) - presentEvent->StartTime())/60);
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::currentdurationhours, presentEvent->Duration() / 3600);
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::currentdurationminutes, *cString::sprintf("%.2d", (presentEvent->Duration() / 60)%60));
|
||||
vector<int> loopInfo;
|
||||
bool scrapInfoAvailable = LoadFullScrapInfo(presentEvent, NULL);
|
||||
int numActors = NumActors();
|
||||
loopInfo.push_back(numActors);
|
||||
tokenContainer->CreateLoopTokenContainer(&loopInfo);
|
||||
if (scrapInfoAvailable) {
|
||||
SetFullScrapInfo(tokenContainer, actorsIndex);
|
||||
}
|
||||
}
|
||||
const cList<cEvent> *events = schedule->Events();
|
||||
if (events && presentEvent) {
|
||||
const cEvent *nextEvent = events->Next(presentEvent);
|
||||
if (nextEvent) {
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::nexttitle, nextEvent->Title());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::nextshorttext, nextEvent->ShortText());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::nextdescription, nextEvent->Description());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::nextstart, *nextEvent->GetTimeString());
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::nextstop, *nextEvent->GetEndTimeString());
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::nextduration, nextEvent->Duration() / 60);
|
||||
tokenContainer->AddIntToken((int)eDCChannelDetailIT::nextdurationhours, nextEvent->Duration() / 3600);
|
||||
tokenContainer->AddStringToken((int)eDCChannelDetailST::nextdurationminutes, *cString::sprintf("%.2d", (nextEvent->Duration() / 60)%60));
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "viewelement.h"
|
||||
#include "../extensions/scrapmanager.h"
|
||||
#include "../extensions/globaltimers.h"
|
||||
#include "../services/dvbapi.h"
|
||||
|
||||
/******************************************************************
|
||||
|
@ -33,13 +34,18 @@ public:
|
|||
******************************************************************/
|
||||
class cVeDcEpgInfo : public cViewElement {
|
||||
private:
|
||||
const cEvent *current;
|
||||
const cEvent *next;
|
||||
cGlobalTimers *globalTimers;
|
||||
bool EventHasTimer(const cEvent *e);
|
||||
public:
|
||||
cVeDcEpgInfo(void);
|
||||
virtual ~cVeDcEpgInfo(void);
|
||||
void SetGlobalTimers(cGlobalTimers *globalTimers) { this->globalTimers = globalTimers; };
|
||||
void SetTokenContainer(void);
|
||||
void Set(const cEvent *p, const cEvent *f);
|
||||
void Set(const cEvent *p, const cEvent *f) { this->current = p; this->next = f; };
|
||||
void Close(void);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
/******************************************************************
|
||||
* cVeDcProgressBar
|
||||
|
@ -48,6 +54,7 @@ class cVeDcProgressBar : public cViewElement {
|
|||
private:
|
||||
int currentLast;
|
||||
int startTime;
|
||||
int endTime;
|
||||
int duration;
|
||||
int GetLiveBuffer(void);
|
||||
public:
|
||||
|
@ -63,10 +70,12 @@ public:
|
|||
******************************************************************/
|
||||
class cVeDcStatusInfo : public cViewElement {
|
||||
private:
|
||||
cGlobalTimers *globalTimers;
|
||||
bool CheckMails(void);
|
||||
public:
|
||||
cVeDcStatusInfo(void);
|
||||
virtual ~cVeDcStatusInfo(void);
|
||||
void SetGlobalTimers(cGlobalTimers *globalTimers) { this->globalTimers = globalTimers; };
|
||||
void SetTokenContainer(void);
|
||||
void Set(const cChannel *c);
|
||||
};
|
||||
|
@ -145,4 +154,53 @@ public:
|
|||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
#endif //__VIEWELEMENTSDC_H
|
||||
/******************************************************************
|
||||
* cVeDcChannelHints
|
||||
******************************************************************/
|
||||
class cVeDcChannelHints : public cViewElement {
|
||||
private:
|
||||
const cChannel **hints;
|
||||
int numHints;
|
||||
int current;
|
||||
int hintsIndex;
|
||||
bool active;
|
||||
public:
|
||||
cVeDcChannelHints(void);
|
||||
virtual ~cVeDcChannelHints(void);
|
||||
void Close(void);
|
||||
void SetTokenContainer(void);
|
||||
void SetNumHints(int num);
|
||||
void SetHint(const cChannel *c);
|
||||
bool Parse(bool forced = false);
|
||||
bool Active(void) { return active; };
|
||||
};
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* cVeDcChannelDetail
|
||||
******************************************************************/
|
||||
class cVeDcChannelDetail : public cViewElement, public cScrapManager {
|
||||
private:
|
||||
const cChannel *channel;
|
||||
int actorsIndex;
|
||||
public:
|
||||
cVeDcChannelDetail(void);
|
||||
virtual ~cVeDcChannelDetail(void);
|
||||
void Close(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const cChannel *c);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
class cVeDcChannelListDetail : public cVeDcChannelDetail {
|
||||
public:
|
||||
cVeDcChannelListDetail(void) {};
|
||||
virtual ~cVeDcChannelListDetail(void) {};
|
||||
};
|
||||
|
||||
class cVeDcGroupChannelListDetail : public cVeDcChannelDetail {
|
||||
public:
|
||||
cVeDcGroupChannelListDetail(void) {};
|
||||
virtual ~cVeDcGroupChannelListDetail(void) {};
|
||||
};
|
||||
#endif //__VIEWELEMENTSDC_H
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include "viewelementsdisplaymenu.h"
|
||||
#include "../config.h"
|
||||
#include <vdr/videodir.h>
|
||||
#include "../extensions/timers.h"
|
||||
#include "../extensions/helpers.h"
|
||||
#include "../extensions/globaltimers.h"
|
||||
#include "../services/epgtimer.h"
|
||||
#include <sys/sysinfo.h>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
@ -303,7 +304,7 @@ void cVeDmScrollbar::SetList(int numDisplayed, int offset, int numMax) {
|
|||
tokenContainer->AddIntToken((int)eDMScrollbarIT::height, barHeight);
|
||||
tokenContainer->AddIntToken((int)eDMScrollbarIT::offset, barOffset);
|
||||
tokenContainer->AddIntToken((int)eDMScrollbarIT::hasprev, (offset == 0) ? 0 : 1);
|
||||
tokenContainer->AddIntToken((int)eDMScrollbarIT::hasnext, (offset + numMax == numDisplayed) ? 0 : 1);
|
||||
tokenContainer->AddIntToken((int)eDMScrollbarIT::hasnext, (offset + numMax >= numDisplayed) ? 0 : 1);
|
||||
SetDirty();
|
||||
}
|
||||
|
||||
|
@ -336,6 +337,7 @@ void cVeDmTimers::SetTokenContainer(void) {
|
|||
tokenContainer->DefineLoopToken("{timers[channelid]}", (int)eDMTimersLT::channelid);
|
||||
tokenContainer->DefineLoopToken("{timers[channellogoexists]}", (int)eDMTimersLT::channellogoexists);
|
||||
tokenContainer->DefineLoopToken("{timers[isremotetimer]}", (int)eDMTimersLT::isremotetimer);
|
||||
tokenContainer->DefineLoopToken("{timers[remotehost]}", (int)eDMTimersLT::remotehost);
|
||||
tokenContainer->DefineIntToken("{numtimers}", (int)eDMTimersIT::numtimers);
|
||||
tokenContainer->DefineIntToken("{numtimerconflicts}", (int)eDMTimersIT::numtimerconflicts);
|
||||
tokenContainer->DefineIntToken("{timer1exists}", (int)eDMTimersIT::timer1exists);
|
||||
|
@ -361,21 +363,15 @@ bool cVeDmTimers::Parse(bool forced) {
|
|||
if (!cViewElement::Parse(forced))
|
||||
return false;
|
||||
tokenContainer->Clear();
|
||||
|
||||
cGlobalTimers globalTimers;
|
||||
globalTimers.LoadTimers();
|
||||
globalTimers.SortTimers();
|
||||
globalTimers.MarkLocalTimers();
|
||||
|
||||
int timerCount = 0;
|
||||
// BLOCK for LOCK_TIMERS_READ scope !!
|
||||
{
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_READ;
|
||||
timerCount = Timers->Count();
|
||||
#else
|
||||
timerCount = Timers.Count();
|
||||
#endif
|
||||
}
|
||||
cGlobalSortedTimers SortedTimers(timerCount); // local and remote timers
|
||||
int numTimers = SortedTimers.Size();
|
||||
int numTimers = globalTimers.Size();
|
||||
tokenContainer->AddIntToken((int)eDMTimersIT::numtimers, numTimers);
|
||||
tokenContainer->AddIntToken((int)eDMTimersIT::numtimerconflicts, SortedTimers.NumTimerConfilicts());
|
||||
tokenContainer->AddIntToken((int)eDMTimersIT::numtimerconflicts, globalTimers.NumTimerConfilicts());
|
||||
for (int i=0; i<15; i++) {
|
||||
if (i < numTimers) {
|
||||
tokenContainer->AddIntToken(i+2, true);
|
||||
|
@ -391,10 +387,12 @@ bool cVeDmTimers::Parse(bool forced) {
|
|||
for (int i = 0; i < numTimers; i++) {
|
||||
if (i >=15)
|
||||
break;
|
||||
const cTimer *Timer = SortedTimers[i];
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::isremotetimer, SortedTimers.IsRemoteTimer(i) ? "1" : "0");
|
||||
const cTimer *Timer = globalTimers[i];
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::isremotetimer, globalTimers.IsRemoteTimer(i) ? "1" : "0");
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::remotehost, globalTimers.RemoteHost(i));
|
||||
const cEvent *event = Timer->Event();
|
||||
if (event) {
|
||||
const char *fileName = Timer->File();
|
||||
if (event && fileName && !(*fileName == '@')) {
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::title, event->Title());
|
||||
} else {
|
||||
const char *File = Setup.FoldersInTimerMenu ? NULL : strrchr(Timer->File(), FOLDERDELIMCHAR);
|
||||
|
@ -412,10 +410,17 @@ bool cVeDmTimers::Parse(bool forced) {
|
|||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::channelid, *channelID);
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::channellogoexists, imgCache->LogoExists(*channelID) ? "1" : "0");
|
||||
}
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::recording, Timer->Recording() ? "1" : "0");
|
||||
bool isRecording = Timer->Recording();
|
||||
if (!isRecording) {
|
||||
if (cEpgTimer_Interface_V1* epgTimer = dynamic_cast<cEpgTimer_Interface_V1*>((cTimer*)Timer)) {
|
||||
if (epgTimer->State() == 'R')
|
||||
isRecording = true;
|
||||
}
|
||||
}
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::recording, isRecording ? "1" : "0");
|
||||
|
||||
cString timerDate("");
|
||||
if (Timer->Recording()) {
|
||||
if (isRecording) {
|
||||
timerDate = cString::sprintf("-%s", *TimeString(Timer->StopTime()));
|
||||
} else {
|
||||
time_t Now = time(NULL);
|
||||
|
@ -434,8 +439,8 @@ bool cVeDmTimers::Parse(bool forced) {
|
|||
timerDate = cString::sprintf("VPS %s", *timerDate);
|
||||
}
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::datetime, *timerDate);
|
||||
tokenContainer->AddLoopToken(timerIndex, i, (int)eDMTimersLT::isremotetimer, SortedTimers.IsRemoteTimer(i) ? "1" : "0");
|
||||
}
|
||||
|
||||
SetDirty();
|
||||
return true;
|
||||
}
|
||||
|
@ -863,6 +868,41 @@ bool cVeDmVdrstatistics::Parse(bool forced) {
|
|||
return true;
|
||||
}
|
||||
/******************************************************************
|
||||
* cVeDmVdrstatus
|
||||
******************************************************************/
|
||||
cVeDmVdrstatus::cVeDmVdrstatus(void) {
|
||||
}
|
||||
|
||||
cVeDmVdrstatus::~cVeDmVdrstatus(void) {
|
||||
}
|
||||
|
||||
void cVeDmVdrstatus::Close(void) {
|
||||
cViewElement::Close();
|
||||
}
|
||||
|
||||
void cVeDmVdrstatus::SetTokenContainer(void) {
|
||||
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||
tokenContainer->DefineIntToken("{vdrIsRecordingsHandlersActive}", (int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive);
|
||||
tokenContainer->DefineIntToken("{vdrIsRecording}", (int)eDMVdrstatusIT::vdrIsRecording);
|
||||
tokenContainer->DefineIntToken("{vdrHasTimers}", (int)eDMVdrstatusIT::vdrHasTimers);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
bool cVeDmVdrstatus::Parse(bool forced) {
|
||||
if (!cViewElement::Parse(forced))
|
||||
return false;
|
||||
|
||||
cGlobalTimers globalTimers;
|
||||
globalTimers.LoadTimers();
|
||||
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecordingsHandlersActive, RecordingsHandler.Active());
|
||||
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrIsRecording, cRecordControls::Active());
|
||||
tokenContainer->AddIntToken((int)eDMVdrstatusIT::vdrHasTimers, (globalTimers.Size() > 0));
|
||||
SetDirty();
|
||||
return true;
|
||||
}
|
||||
/******************************************************************
|
||||
* cVeDmLastrecordings
|
||||
******************************************************************/
|
||||
cVeDmLastrecordings::cVeDmLastrecordings(void) {
|
||||
|
@ -893,20 +933,12 @@ bool cVeDmLastrecordings::Parse(bool forced) {
|
|||
return false;
|
||||
|
||||
tokenContainer->Clear();
|
||||
int numTimers = 0;
|
||||
// BLOCK for LOCK_TIMERS_READ scope !!
|
||||
{
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_READ;
|
||||
numTimers = Timers->Count();
|
||||
#else
|
||||
numTimers = Timers.Count();
|
||||
#endif
|
||||
}
|
||||
|
||||
cGlobalSortedTimers SortedTimers(numTimers); // local and remote timers
|
||||
|
||||
cGlobalTimers globalTimers;
|
||||
globalTimers.LoadTimers();
|
||||
|
||||
//set number of timers so that it is possible to adapt this viewelement accordingly
|
||||
tokenContainer->AddIntToken((int)eDMLastrecordingsIT::numtimers, SortedTimers.Size());
|
||||
tokenContainer->AddIntToken((int)eDMLastrecordingsIT::numtimers, globalTimers.Size());
|
||||
|
||||
list<const cRecording*> orderedRecs;
|
||||
|
||||
|
@ -938,7 +970,7 @@ bool cVeDmLastrecordings::Parse(bool forced) {
|
|||
|
||||
int MAX_RECORDINGS = 10;
|
||||
int availableRecordings = orderedRecs.size();
|
||||
int numRecordings = min(MAX_RECORDINGS, availableRecordings);
|
||||
int numRecordings = std::min(MAX_RECORDINGS, availableRecordings);
|
||||
if (!numRecordings)
|
||||
return true;
|
||||
|
||||
|
@ -954,12 +986,23 @@ bool cVeDmLastrecordings::Parse(bool forced) {
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
string recFullPath = recording->Name() ? recording->Name() : "";
|
||||
string recName = "";
|
||||
string recPath = "";
|
||||
RecName(recFullPath, recName, recPath);
|
||||
string recSeriesName = "";
|
||||
const cRecordingInfo *recInfo = recording->Info();
|
||||
if (recInfo) {
|
||||
recName = recInfo->Title() ? recInfo->Title() : "";
|
||||
if (recInfo->Title() && recInfo->ShortText()) {
|
||||
stringstream ss;
|
||||
ss << recInfo->Title() << " - " << recInfo->ShortText();
|
||||
recSeriesName = ss.str();
|
||||
}
|
||||
} else {
|
||||
string recPath = recording->Name() ? recording->Name() : "";
|
||||
RecName(recPath, recName);
|
||||
}
|
||||
if (recName.size() == 0)
|
||||
recName = recording->Name() ? recording->Name() : "";
|
||||
cString recDuration = cString::sprintf("%d", recording->LengthInSeconds()/60);
|
||||
|
||||
string posterPath = "";
|
||||
int posterWidth = 0;
|
||||
int posterHeight = 0;
|
||||
|
@ -967,7 +1010,7 @@ bool cVeDmLastrecordings::Parse(bool forced) {
|
|||
RecPoster(recording, posterWidth, posterHeight, posterPath, hasPoster);
|
||||
|
||||
tokenContainer->AddLoopToken(recIndex, i, (int)eDMLastrecordingsLT::name, recName.c_str());
|
||||
tokenContainer->AddLoopToken(recIndex, i, (int)eDMLastrecordingsLT::seriesname, recPath.c_str());
|
||||
tokenContainer->AddLoopToken(recIndex, i, (int)eDMLastrecordingsLT::seriesname, recSeriesName.c_str());
|
||||
tokenContainer->AddLoopToken(recIndex, i, (int)eDMLastrecordingsLT::date, *ShortDateString(recording->Start()));
|
||||
tokenContainer->AddLoopToken(recIndex, i, (int)eDMLastrecordingsLT::time, *TimeString(recording->Start()));
|
||||
tokenContainer->AddLoopToken(recIndex, i, (int)eDMLastrecordingsLT::duration, *recDuration);
|
||||
|
@ -980,11 +1023,12 @@ bool cVeDmLastrecordings::Parse(bool forced) {
|
|||
if (i == MAX_RECORDINGS)
|
||||
break;
|
||||
}
|
||||
|
||||
SetDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
void cVeDmLastrecordings::RecName(string &path, string &name, string &folder) {
|
||||
void cVeDmLastrecordings::RecName(string &path, string &name) {
|
||||
size_t delim = path.find_last_of('~');
|
||||
if (delim == string::npos) {
|
||||
name = path;
|
||||
|
@ -997,12 +1041,6 @@ void cVeDmLastrecordings::RecName(string &path, string &name, string &folder) {
|
|||
if (name.find('%') == 0) {
|
||||
name = name.substr(1);
|
||||
}
|
||||
folder = path.substr(0, delim);
|
||||
size_t delim2 = folder.find_last_of('~');
|
||||
if (delim2 == string::npos) {
|
||||
return;
|
||||
}
|
||||
folder = folder.substr(delim2+1);
|
||||
}
|
||||
/******************************************************************
|
||||
* cVeDmDetailheaderEpg
|
||||
|
@ -1164,6 +1202,13 @@ void cVeDmDetailheaderRec::SetTokenContainer(void) {
|
|||
tokenContainer->DefineIntToken("{durationeventhours}", (int)eDmDetailedHeaderRecIT::durationeventhours);
|
||||
tokenContainer->DefineIntToken("{recimgavailable}", (int)eDmDetailedHeaderRecIT::recimgavailable);
|
||||
tokenContainer->DefineIntToken("{recchannelnumber}", (int)eDmDetailedHeaderRecIT::recchannelnumber);
|
||||
tokenContainer->DefineIntToken("{fps}", (int)eDmDetailedHeaderRecIT::framesPerSecond);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eDmDetailedHeaderRecIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eDmDetailedHeaderRecIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRadio}", (int)eDmDetailedHeaderRecIT::isRadio);
|
||||
tokenContainer->DefineIntToken("{isRecording}", (int)eDmDetailedHeaderRecIT::isRecording);
|
||||
tokenContainer->DefineIntToken("{isInUse}", (int)eDmDetailedHeaderRecIT::isInUse);
|
||||
tokenContainer->DefineIntToken("{errors}", (int)eDmDetailedHeaderRecIT::errors);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1228,15 @@ bool cVeDmDetailheaderRec::Parse(bool forced) {
|
|||
if (info) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::epgname, info->Title());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::shorttext, info->ShortText());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::framesPerSecond, info->FramesPerSecond());
|
||||
int errors = -1;
|
||||
// ENABLE_ERRORS is only used in VDR-2.5.4 if the coresponding patch is installed, so it can be ignored in other versions
|
||||
#if (defined (APIVERSNUM) && (APIVERSNUM >= 20505)) || defined (ENABLE_ERRORS)
|
||||
errors = info->Errors();
|
||||
#endif
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::errors, errors);
|
||||
const cEvent *event = info->GetEvent();
|
||||
tChannelID channelID = tChannelID::InvalidID;
|
||||
if (event) {
|
||||
cString recDate = event->GetDateString();
|
||||
cString recTime = event->GetTimeString();
|
||||
|
@ -1208,19 +1261,33 @@ bool cVeDmDetailheaderRec::Parse(bool forced) {
|
|||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::durationevent, duration);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::durationeventhours, duration / 60);
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::durationeventminutes, *cString::sprintf("%.2d", duration%60));
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isRadio, RecordingIsRadio(event, info->FramesPerSecond())); // detect Radio from 'info' and FPS
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isRecording, recording->IsInUse() & ruTimer);
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isInUse, recording->IsInUse());
|
||||
}
|
||||
|
||||
if (info->ChannelName() && (strlen(info->ChannelName()) > 0)) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, info->ChannelName());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, info->ChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, 0); // cannot be provided, for backward compatibility only
|
||||
channelID = info->ChannelID();
|
||||
} else {
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannels* channels = Channels;
|
||||
LOCK_CHANNELS_READ;
|
||||
const cChannel *channel = Channels->GetByChannelID(info->ChannelID());
|
||||
#else
|
||||
cChannels* channels = &Channels;
|
||||
const cChannel *channel = Channels.GetByChannelID(info->ChannelID());
|
||||
#endif
|
||||
const cChannel *channel = channels->GetByChannelID(info->ChannelID());
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, channel->Name());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, *channel->GetChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, channel->Number());
|
||||
if (channel) {
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelname, channel->Name());
|
||||
tokenContainer->AddStringToken((int)eDmDetailedHeaderRecST::recchannelid, *channel->GetChannelID().ToString());
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::recchannelnumber, channel->Number());
|
||||
channelID = channel->GetChannelID();
|
||||
}
|
||||
}
|
||||
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isHD, RecordingIsHD(event, channelID)); // detect HD from 'info'
|
||||
tokenContainer->AddIntToken((int)eDmDetailedHeaderRecIT::isUHD, RecordingIsUHD(event, channelID)); // detect UHD from 'info'
|
||||
}
|
||||
string recImage = "";
|
||||
string path = recording->FileName() ? recording->FileName() : "";
|
||||
|
@ -1320,6 +1387,3 @@ bool cVeDmTablabels::Parse(bool forced) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -178,13 +178,25 @@ public:
|
|||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cVeDmVdrstatus
|
||||
******************************************************************/
|
||||
class cVeDmVdrstatus : public cViewElement {
|
||||
public:
|
||||
cVeDmVdrstatus(void);
|
||||
virtual ~cVeDmVdrstatus(void);
|
||||
void Close(void);
|
||||
void SetTokenContainer(void);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cVeDmLastrecordings
|
||||
******************************************************************/
|
||||
class cVeDmLastrecordings : public cViewElement, public cScrapManager {
|
||||
private:
|
||||
int recIndex;
|
||||
void RecName(string &path, string &name, string &folder);
|
||||
void RecName(string &path, string &name);
|
||||
public:
|
||||
cVeDmLastrecordings(void);
|
||||
virtual ~cVeDmLastrecordings(void);
|
||||
|
@ -253,4 +265,4 @@ public:
|
|||
void SetActiveTab(int activeTab) { SetDirty(); this->activeTab = activeTab; };
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
#endif //__VIEWELEMENTSDM_H
|
||||
#endif //__VIEWELEMENTSDM_H
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
******************************************************************/
|
||||
cVeDrRecTitle::cVeDrRecTitle(void) {
|
||||
recording = NULL;
|
||||
event = NULL;
|
||||
title = NULL;
|
||||
timeShiftActive = NoRec;
|
||||
}
|
||||
|
||||
cVeDrRecTitle::~cVeDrRecTitle(void) {
|
||||
|
@ -21,14 +23,38 @@ void cVeDrRecTitle::SetTokenContainer(void) {
|
|||
tokenContainer->DefineStringToken("{recsubtitle}", (int)eDRRecTitleST::recsubtitle);
|
||||
tokenContainer->DefineStringToken("{recdate}", (int)eDRRecTitleST::recdate);
|
||||
tokenContainer->DefineStringToken("{rectime}", (int)eDRRecTitleST::rectime);
|
||||
tokenContainer->DefineStringToken("{eventstart}", (int)eDRRecTitleST::eventstart);
|
||||
tokenContainer->DefineStringToken("{eventstop}", (int)eDRRecTitleST::eventstop);
|
||||
tokenContainer->DefineIntToken("{timeshift}", (int)eDRRecTitleIT::timeshift);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrRecTitle::Set(const cRecording *recording) {
|
||||
void cVeDrRecTitle::Set(const cRecording *recording, const cEvent *event, eRecType_t timeShiftActive) {
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
if (this->title) {
|
||||
free(this->title);
|
||||
this->title = NULL;
|
||||
}
|
||||
if (this->recording)
|
||||
this->recording = NULL;
|
||||
if (this->event)
|
||||
this->event = NULL;
|
||||
if (!recording)
|
||||
return;
|
||||
this->recording = recording;
|
||||
if (event)
|
||||
this->event = event;
|
||||
}
|
||||
|
||||
void cVeDrRecTitle::Set(const char *title) {
|
||||
if (this->title) {
|
||||
free(this->title);
|
||||
this->title = NULL;
|
||||
}
|
||||
if (this->recording)
|
||||
this->recording = NULL;
|
||||
if (this->event)
|
||||
this->event = NULL;
|
||||
if (!title)
|
||||
return;
|
||||
free(this->title);
|
||||
|
@ -44,17 +70,31 @@ bool cVeDrRecTitle::Parse(bool force) {
|
|||
tokenContainer->Clear();
|
||||
if (recording) {
|
||||
const char *recName = NULL;
|
||||
const char *recShortText = NULL;
|
||||
const cRecordingInfo *recInfo = recording->Info();
|
||||
if (recInfo)
|
||||
if (event) {
|
||||
recName = event->Title();
|
||||
recShortText = event->ShortText();
|
||||
} else if (recInfo) {
|
||||
recName = recInfo->Title();
|
||||
if (!recName)
|
||||
recShortText = recInfo->ShortText();
|
||||
}
|
||||
if (!recName) {
|
||||
recName = recording->Name();
|
||||
recShortText = "";
|
||||
}
|
||||
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::rectitle, recName);
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recInfo ? recInfo->ShortText() : "");
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::recsubtitle, recShortText);
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::recdate, *ShortDateString(recording->Start()));
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::rectime, *TimeString(recording->Start()));
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::rectime, *TimeString(recording->Start()));
|
||||
tokenContainer->AddIntToken((int)eDRRecTitleIT::timeshift, timeShiftActive);
|
||||
if (event) {
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::eventstart, *TimeString(event->StartTime()));
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::eventstop, *TimeString(event->EndTime()));
|
||||
}
|
||||
} else if (title) {
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::rectitle, title);
|
||||
tokenContainer->AddStringToken((int)eDRRecTitleST::rectitle, title);
|
||||
}
|
||||
|
||||
SetDirty();
|
||||
|
@ -78,6 +118,9 @@ void cVeDrRecInfo::SetTokenContainer(void) {
|
|||
tokenContainer->DefineIntToken("{screenwidth}", (int)eDRRecInfoIT::screenwidth);
|
||||
tokenContainer->DefineIntToken("{screenheight}", (int)eDRRecInfoIT::screenheight);
|
||||
tokenContainer->DefineIntToken("{isHD}", (int)eDRRecInfoIT::isHD);
|
||||
tokenContainer->DefineIntToken("{isUHD}", (int)eDRRecInfoIT::isUHD);
|
||||
tokenContainer->DefineIntToken("{isRecording}", (int)eDRRecInfoIT::isRecording);
|
||||
tokenContainer->DefineIntToken("{isInUse}", (int)eDRRecInfoIT::isInUse);
|
||||
tokenContainer->DefineIntToken("{isWideScreen}", (int)eDRRecInfoIT::isWideScreen);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
@ -97,7 +140,8 @@ bool cVeDrRecInfo::Parse(bool force) {
|
|||
double aspect = 0;
|
||||
cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect);
|
||||
bool isHD = false;
|
||||
string resName = GetScreenResolutionString(screenWidth, screenHeight, &isHD);
|
||||
bool isUHD = false;
|
||||
string resName = GetScreenResolutionString(screenWidth, screenHeight, &isHD, &isUHD);
|
||||
bool isWideScreen = false;
|
||||
string aspectName = GetScreenAspectString(aspect, &isWideScreen);
|
||||
|
||||
|
@ -105,6 +149,9 @@ bool cVeDrRecInfo::Parse(bool force) {
|
|||
tokenContainer->AddIntToken((int)eDRRecInfoIT::screenwidth, screenWidth);
|
||||
tokenContainer->AddIntToken((int)eDRRecInfoIT::screenheight, screenHeight);
|
||||
tokenContainer->AddIntToken((int)eDRRecInfoIT::isHD, isHD);
|
||||
tokenContainer->AddIntToken((int)eDRRecInfoIT::isUHD, isUHD);
|
||||
tokenContainer->AddIntToken((int)eDRRecInfoIT::isRecording, recording->IsInUse() & ruTimer);
|
||||
tokenContainer->AddIntToken((int)eDRRecInfoIT::isInUse, recording->IsInUse());
|
||||
tokenContainer->AddIntToken((int)eDRRecInfoIT::isWideScreen, isWideScreen);
|
||||
tokenContainer->AddStringToken((int)eDRRecInfoST::resolution, resName.c_str());
|
||||
tokenContainer->AddStringToken((int)eDRRecInfoST::aspect, aspectName.c_str());
|
||||
|
@ -119,6 +166,7 @@ bool cVeDrRecInfo::Parse(bool force) {
|
|||
cVeDrCurrentTime::cVeDrCurrentTime(void) {
|
||||
changed = true;
|
||||
current = NULL;
|
||||
timeShiftActive = NoRec;
|
||||
}
|
||||
|
||||
cVeDrCurrentTime::~cVeDrCurrentTime(void) {
|
||||
|
@ -128,14 +176,16 @@ cVeDrCurrentTime::~cVeDrCurrentTime(void) {
|
|||
void cVeDrCurrentTime::SetTokenContainer(void) {
|
||||
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||
tokenContainer->DefineStringToken("{reccurrent}", (int)eDRCurrentTimeST::reccurrent);
|
||||
tokenContainer->DefineIntToken("{timeshift}", (int)eDRCurrentTimeIT::timeshift);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrCurrentTime::Set(const char *current) {
|
||||
void cVeDrCurrentTime::Set(const char *current, eRecType_t timeShiftActive) {
|
||||
if (!current)
|
||||
return;
|
||||
free(this->current);
|
||||
this->current = strdup(current);
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
@ -144,6 +194,7 @@ bool cVeDrCurrentTime::Parse(bool force) {
|
|||
return false;
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddStringToken((int)eDRCurrentTimeST::reccurrent, current);
|
||||
tokenContainer->AddIntToken((int)eDRCurrentTimeIT::timeshift, timeShiftActive);
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
|
@ -155,8 +206,8 @@ bool cVeDrCurrentTime::Parse(bool force) {
|
|||
cVeDrTotalTime::cVeDrTotalTime(void) {
|
||||
changed = true;
|
||||
total = NULL;
|
||||
timeshiftActive = false;
|
||||
timeshiftDuration = NULL;
|
||||
timeShiftActive = NoRec;
|
||||
}
|
||||
|
||||
cVeDrTotalTime::~cVeDrTotalTime(void) {
|
||||
|
@ -172,12 +223,12 @@ void cVeDrTotalTime::SetTokenContainer(void) {
|
|||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrTotalTime::Set(const char *total, bool timeshiftActive, const char *timeshiftDuration) {
|
||||
void cVeDrTotalTime::Set(const char *total, const char *timeshiftDuration, eRecType_t timeShiftActive) {
|
||||
if (!total)
|
||||
return;
|
||||
free(this->total);
|
||||
this->total = strdup(total);
|
||||
this->timeshiftActive = timeshiftActive;
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
free(this->timeshiftDuration);
|
||||
this->timeshiftDuration = NULL;
|
||||
if (timeshiftDuration)
|
||||
|
@ -191,7 +242,53 @@ bool cVeDrTotalTime::Parse(bool force) {
|
|||
tokenContainer->Clear();
|
||||
tokenContainer->AddStringToken((int)eDRTotalTimeST::rectotal, total);
|
||||
tokenContainer->AddStringToken((int)eDRTotalTimeST::timeshifttotal, timeshiftDuration);
|
||||
tokenContainer->AddIntToken((int)eDRTotalTimeIT::timeshift, timeshiftActive);
|
||||
tokenContainer->AddIntToken((int)eDRTotalTimeIT::timeshift, timeShiftActive);
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cVeDrTimeshiftTimes
|
||||
******************************************************************/
|
||||
cVeDrTimeshiftTimes::cVeDrTimeshiftTimes(void) {
|
||||
changed = true;
|
||||
start = "";
|
||||
playbacktime = "";
|
||||
timeshiftrest = "";
|
||||
timeShiftActive = NoRec;
|
||||
}
|
||||
|
||||
cVeDrTimeshiftTimes::~cVeDrTimeshiftTimes(void) {
|
||||
}
|
||||
|
||||
void cVeDrTimeshiftTimes::SetTokenContainer(void) {
|
||||
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||
tokenContainer->DefineStringToken("{recstart}", (int)eDRTimeshiftTimesST::recstart);
|
||||
tokenContainer->DefineStringToken("{playbacktime}", (int)eDRTimeshiftTimesST::playbacktime);
|
||||
tokenContainer->DefineStringToken("{timeshiftrest}", (int)eDRTimeshiftTimesST::timeshiftrest);
|
||||
tokenContainer->DefineIntToken("{timeshift}", (int)eDRTimeshiftTimesIT::timeshift);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrTimeshiftTimes::Set(cString start, cString playbacktime, cString timeshiftrest, eRecType_t timeShiftActive) {
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
if (strcmp(*this->start, *start) || strcmp(*this->playbacktime, *playbacktime) || strcmp(*this->timeshiftrest, *timeshiftrest)) {
|
||||
this->start = start;
|
||||
this->playbacktime = playbacktime;
|
||||
this->timeshiftrest = timeshiftrest;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool cVeDrTimeshiftTimes::Parse(bool force) {
|
||||
if (!cViewElement::Parse(force) || !changed)
|
||||
return false;
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::recstart, *start);
|
||||
tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::playbacktime, *playbacktime);
|
||||
tokenContainer->AddStringToken((int)eDRTimeshiftTimesST::timeshiftrest, *timeshiftrest);
|
||||
tokenContainer->AddIntToken((int)eDRTimeshiftTimesIT::timeshift, timeShiftActive);
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
|
@ -201,7 +298,9 @@ bool cVeDrTotalTime::Parse(bool force) {
|
|||
* cVeDrEndTime
|
||||
******************************************************************/
|
||||
cVeDrEndTime::cVeDrEndTime(void) {
|
||||
changed = true;
|
||||
end = "";
|
||||
timeShiftActive = NoRec;
|
||||
}
|
||||
|
||||
cVeDrEndTime::~cVeDrEndTime(void) {
|
||||
|
@ -210,10 +309,12 @@ cVeDrEndTime::~cVeDrEndTime(void) {
|
|||
void cVeDrEndTime::SetTokenContainer(void) {
|
||||
tokenContainer = new skindesignerapi::cTokenContainer();
|
||||
tokenContainer->DefineStringToken("{recend}", (int)eDREndTimeST::recend);
|
||||
tokenContainer->DefineIntToken("{timeshift}", (int)eDREndTimeIT::timeshift);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrEndTime::Set(cString end) {
|
||||
void cVeDrEndTime::Set(cString end, eRecType_t timeShiftActive) {
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
if (strcmp(*this->end, *end)) {
|
||||
this->end = end;
|
||||
changed = true;
|
||||
|
@ -225,6 +326,7 @@ bool cVeDrEndTime::Parse(bool force) {
|
|||
return false;
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddStringToken((int)eDREndTimeST::recend, *end);
|
||||
tokenContainer->AddIntToken((int)eDREndTimeIT::timeshift, timeShiftActive);
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
|
@ -236,8 +338,8 @@ bool cVeDrEndTime::Parse(bool force) {
|
|||
cVeDrProgressBar::cVeDrProgressBar(void) {
|
||||
current = -1;
|
||||
total = -1;
|
||||
timeshiftActive = false;
|
||||
timeshiftTotal = -1;
|
||||
timeShiftActive = NoRec;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
@ -253,13 +355,14 @@ void cVeDrProgressBar::SetTokenContainer(void) {
|
|||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrProgressBar::Set(int current, int total, bool timeshiftActive, int timeshiftTotal) {
|
||||
if (this->current == current)
|
||||
void cVeDrProgressBar::Set(int current, int total, eRecType_t timeShiftActive, int timeshiftTotal) {
|
||||
if (!(this->current != current || this->total != total))
|
||||
return;
|
||||
this->current = current;
|
||||
this->total = total;
|
||||
this->timeshiftActive = timeshiftActive;
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
this->timeshiftTotal = timeshiftTotal;
|
||||
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
@ -270,10 +373,11 @@ bool cVeDrProgressBar::Parse(bool force) {
|
|||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken((int)eDRProgressbarIT::current, current);
|
||||
tokenContainer->AddIntToken((int)eDRProgressbarIT::total, total);
|
||||
tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshift, timeshiftActive);
|
||||
tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshift, timeShiftActive);
|
||||
tokenContainer->AddIntToken((int)eDRProgressbarIT::timeshifttotal, timeshiftTotal);
|
||||
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -282,12 +386,16 @@ bool cVeDrProgressBar::Parse(bool force) {
|
|||
******************************************************************/
|
||||
cVeDrCutMarks::cVeDrCutMarks(void) {
|
||||
cutmarksIndex = -1;
|
||||
lastMarks = NULL;
|
||||
Reset();
|
||||
changed = true;
|
||||
marks = NULL;
|
||||
current = -1;
|
||||
total = -1;
|
||||
numMarksLast = 0;
|
||||
timeShiftActive = NoRec;
|
||||
timeshiftTotal = -1;
|
||||
}
|
||||
|
||||
cVeDrCutMarks::~cVeDrCutMarks(void) {
|
||||
delete[] lastMarks;
|
||||
}
|
||||
|
||||
void cVeDrCutMarks::SetTokenContainer(void) {
|
||||
|
@ -303,34 +411,25 @@ void cVeDrCutMarks::SetTokenContainer(void) {
|
|||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
void cVeDrCutMarks::Set(const cMarks *marks, int current, int total, bool timeshiftActive, int timeshiftTotal) {
|
||||
void cVeDrCutMarks::Set(const cMarks *marks, int current, int total, eRecType_t timeShiftActive, int timeshiftTotal) {
|
||||
int numMarks = marks->Count();
|
||||
if (!(this->current != current || this->total != total || this->marks != marks || numMarksLast != numMarks))
|
||||
return;
|
||||
this->marks = marks;
|
||||
numMarksLast = numMarks;
|
||||
this->current = current;
|
||||
this->total = total;
|
||||
this->timeshiftActive = timeshiftActive;
|
||||
this->timeShiftActive = timeShiftActive;
|
||||
this->timeshiftTotal = timeshiftTotal;
|
||||
}
|
||||
|
||||
void cVeDrCutMarks::Reset(void) {
|
||||
marks = NULL;
|
||||
current = -1;
|
||||
total = -1;
|
||||
numMarksLast = 0;
|
||||
delete[] lastMarks;
|
||||
lastMarks = NULL;
|
||||
markActive = -1;
|
||||
timeshiftActive = false;
|
||||
timeshiftTotal = -1;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
bool cVeDrCutMarks::Parse(bool force) {
|
||||
if (!cViewElement::Parse(force))
|
||||
if (!cViewElement::Parse(force) || !changed)
|
||||
return false;
|
||||
if (!marks || !MarksChanged()) {
|
||||
return false;
|
||||
}
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken((int)eDRCutmarksIT::timeshift, timeshiftActive);
|
||||
tokenContainer->AddIntToken((int)eDRCutmarksIT::timeshift, timeShiftActive);
|
||||
int numMarks = marks->Count();
|
||||
vector<int> cutmarksInfo;
|
||||
cutmarksInfo.push_back(numMarks);
|
||||
|
@ -342,7 +441,7 @@ bool cVeDrCutMarks::Parse(bool force) {
|
|||
for (const cMark *m = marks->First(); m; m = marks->Next(m)) {
|
||||
tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::position, *cString::sprintf("%d", m->Position()));
|
||||
tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::total, *tot);
|
||||
if (timeshiftActive) {
|
||||
if (timeShiftActive) {
|
||||
tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::timeshifttotal, *timeshifttot);
|
||||
}
|
||||
tokenContainer->AddLoopToken(cutmarksIndex, i, (int)eDRCutmarksLT::startmark, isStartMark ? "1" : "0");
|
||||
|
@ -357,61 +456,10 @@ bool cVeDrCutMarks::Parse(bool force) {
|
|||
isStartMark = !isStartMark;
|
||||
}
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cVeDrCutMarks::MarksChanged(void) {
|
||||
bool redraw = false;
|
||||
//if mark was active, we redraw always
|
||||
if (markActive >= 0) {
|
||||
markActive = -1;
|
||||
redraw = true;
|
||||
}
|
||||
//check if current position in recording hits mark exactly
|
||||
for (const cMark *m = marks->First(); m; m = marks->Next(m)) {
|
||||
if (m->Position() == current) {
|
||||
markActive = current;
|
||||
redraw = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (redraw)
|
||||
return true;
|
||||
//if number of marks has changed, redraw
|
||||
int numMarks = marks->Count();
|
||||
if (numMarks != numMarksLast) {
|
||||
RememberMarks();
|
||||
return true;
|
||||
}
|
||||
if (!lastMarks)
|
||||
return false;
|
||||
//if position has changed, redraw
|
||||
int i=0;
|
||||
for (const cMark *m = marks->First(); m; m = marks->Next(m)) {
|
||||
if (m->Position() != lastMarks[i]) {
|
||||
RememberMarks();
|
||||
return true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cVeDrCutMarks::RememberMarks(void) {
|
||||
if (!marks)
|
||||
return;
|
||||
numMarksLast = marks->Count();
|
||||
if (numMarksLast < 1)
|
||||
return;
|
||||
delete[] lastMarks;
|
||||
lastMarks = new int[numMarksLast];
|
||||
int i=0;
|
||||
for (const cMark *m = marks->First(); m; m = marks->Next(m)) {
|
||||
lastMarks[i] = m->Position();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cVeDrControlIcons
|
||||
******************************************************************/
|
||||
|
@ -430,13 +478,21 @@ void cVeDrControlIcons::SetTokenContainer(void) {
|
|||
tokenContainer->DefineIntToken("{play}", (int)eDRControlIconsIT::play);
|
||||
tokenContainer->DefineIntToken("{pause}", (int)eDRControlIconsIT::pause);
|
||||
tokenContainer->DefineIntToken("{forward}", (int)eDRControlIconsIT::forward);
|
||||
tokenContainer->DefineIntToken("{slowforward}", (int)eDRControlIconsIT::slowforward);
|
||||
tokenContainer->DefineIntToken("{forward1x}", (int)eDRControlIconsIT::forward1x);
|
||||
tokenContainer->DefineIntToken("{forward2x}", (int)eDRControlIconsIT::forward2x);
|
||||
tokenContainer->DefineIntToken("{forward3x}", (int)eDRControlIconsIT::forward3x);
|
||||
tokenContainer->DefineIntToken("{slowforward1x}", (int)eDRControlIconsIT::slowforward1x);
|
||||
tokenContainer->DefineIntToken("{slowforward2x}", (int)eDRControlIconsIT::slowforward2x);
|
||||
tokenContainer->DefineIntToken("{slowforward3x}", (int)eDRControlIconsIT::slowforward3x);
|
||||
tokenContainer->DefineIntToken("{rewind}", (int)eDRControlIconsIT::rewind);
|
||||
tokenContainer->DefineIntToken("{slowrewind}", (int)eDRControlIconsIT::slowrewind);
|
||||
tokenContainer->DefineIntToken("{rewind1x}", (int)eDRControlIconsIT::rewind1x);
|
||||
tokenContainer->DefineIntToken("{rewind2x}", (int)eDRControlIconsIT::rewind2x);
|
||||
tokenContainer->DefineIntToken("{rewind3x}", (int)eDRControlIconsIT::rewind3x);
|
||||
tokenContainer->DefineIntToken("{slowrewind1x}", (int)eDRControlIconsIT::slowrewind1x);
|
||||
tokenContainer->DefineIntToken("{slowrewind2x}", (int)eDRControlIconsIT::slowrewind2x);
|
||||
tokenContainer->DefineIntToken("{slowrewind3x}", (int)eDRControlIconsIT::slowrewind3x);
|
||||
InheritTokenContainer();
|
||||
}
|
||||
|
||||
|
@ -454,13 +510,21 @@ bool cVeDrControlIcons::Parse(bool force) {
|
|||
bool isPlay = false;
|
||||
bool isPause = false;
|
||||
bool isFF = false;
|
||||
bool isSlowFF = false;
|
||||
bool isFF1x = false;
|
||||
bool isFF2x = false;
|
||||
bool isFF3x = false;
|
||||
bool isSlowFF1x = false;
|
||||
bool isSlowFF2x = false;
|
||||
bool isSlowFF3x = false;
|
||||
bool isRew = false;
|
||||
bool isSlowRew = false;
|
||||
bool isRew1x = false;
|
||||
bool isRew2x = false;
|
||||
bool isRew3x = false;
|
||||
bool isSlowRew1x = false;
|
||||
bool isSlowRew2x = false;
|
||||
bool isSlowRew3x = false;
|
||||
|
||||
if (speed == -1) {
|
||||
if (play) {
|
||||
|
@ -469,43 +533,69 @@ bool cVeDrControlIcons::Parse(bool force) {
|
|||
isPause = true;
|
||||
}
|
||||
} else if (forward) {
|
||||
if (!play) {
|
||||
isPause = true;
|
||||
}
|
||||
if (speed == 1) {
|
||||
isFF1x = true;
|
||||
if (play)
|
||||
isFF1x = true;
|
||||
else
|
||||
isSlowFF1x = true;
|
||||
} else if (speed == 2) {
|
||||
isFF2x = true;
|
||||
if (play)
|
||||
isFF2x = true;
|
||||
else
|
||||
isSlowFF2x = true;
|
||||
} else if (speed == 3) {
|
||||
isFF3x = true;
|
||||
if (play)
|
||||
isFF3x = true;
|
||||
else
|
||||
isSlowFF3x = true;
|
||||
} else {
|
||||
isFF = true;
|
||||
if (play)
|
||||
isFF = true;
|
||||
else
|
||||
isSlowFF = true;
|
||||
}
|
||||
} else {
|
||||
if (!play) {
|
||||
isPause = true;
|
||||
}
|
||||
if (speed == 1) {
|
||||
isRew1x = true;
|
||||
if (play)
|
||||
isRew1x = true;
|
||||
else
|
||||
isSlowRew1x = true;
|
||||
} else if (speed == 2) {
|
||||
isRew2x = true;
|
||||
if (play)
|
||||
isRew2x = true;
|
||||
else
|
||||
isSlowRew2x = true;
|
||||
} else if (speed == 3) {
|
||||
isRew3x = true;
|
||||
if (play)
|
||||
isRew3x = true;
|
||||
else
|
||||
isSlowRew3x = true;
|
||||
} else {
|
||||
isRew = true;
|
||||
if (play)
|
||||
isRew = true;
|
||||
else
|
||||
isSlowRew = true;
|
||||
}
|
||||
}
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::play, isPlay);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::pause, isPause);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::forward, isFF);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowforward, isSlowFF);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::forward1x, isFF1x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::forward2x, isFF2x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::forward3x, isFF3x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowforward1x, isSlowFF1x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowforward2x, isSlowFF2x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowforward3x, isSlowFF3x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::rewind, isRew);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowrewind, isSlowRew);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::rewind1x, isRew1x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::rewind2x, isRew2x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::rewind3x, isRew3x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowrewind1x, isSlowRew1x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowrewind2x, isSlowRew2x);
|
||||
tokenContainer->AddIntToken((int)eDRControlIconsIT::slowrewind3x, isSlowRew3x);
|
||||
SetDirty();
|
||||
changed = false;
|
||||
return true;
|
||||
|
@ -534,7 +624,7 @@ void cVeDrProgressModeonly::SetTokenContainer(void) {
|
|||
}
|
||||
|
||||
void cVeDrProgressModeonly::Set(double fps, int current, int total) {
|
||||
if (this->current == current)
|
||||
if (!(this->current != current || this->total != total))
|
||||
return;
|
||||
this->fps = fps;
|
||||
this->current = current;
|
||||
|
|
|
@ -4,19 +4,28 @@
|
|||
#include "viewelement.h"
|
||||
#include "../extensions/scrapmanager.h"
|
||||
|
||||
// define recordingtypes
|
||||
enum eRecType_t {
|
||||
NoRec = 0,
|
||||
NormalRec,
|
||||
TimeshiftRec
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cVeDrRecTitle
|
||||
******************************************************************/
|
||||
class cVeDrRecTitle : public cViewElement {
|
||||
private:
|
||||
const cRecording *recording;
|
||||
const cEvent *event;
|
||||
char *title;
|
||||
eRecType_t timeShiftActive;
|
||||
public:
|
||||
cVeDrRecTitle(void);
|
||||
virtual ~cVeDrRecTitle(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const cRecording *recording);
|
||||
void Set(const char *title);
|
||||
void Set(const cRecording *recording = NULL, const cEvent *event = NULL, eRecType_t timeShiftActive = NoRec);
|
||||
void Set(const char *title = NULL);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
|
@ -41,11 +50,12 @@ class cVeDrCurrentTime : public cViewElement {
|
|||
private:
|
||||
bool changed;
|
||||
char *current;
|
||||
eRecType_t timeShiftActive;
|
||||
public:
|
||||
cVeDrCurrentTime(void);
|
||||
virtual ~cVeDrCurrentTime(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const char *current);
|
||||
void Set(const char *current, eRecType_t timeShiftActive = NoRec);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
|
@ -56,13 +66,31 @@ class cVeDrTotalTime : public cViewElement {
|
|||
private:
|
||||
bool changed;
|
||||
char *total;
|
||||
bool timeshiftActive;
|
||||
eRecType_t timeShiftActive;
|
||||
char *timeshiftDuration;
|
||||
public:
|
||||
cVeDrTotalTime(void);
|
||||
virtual ~cVeDrTotalTime(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const char *total, bool timeshiftActive, const char *timeshiftDuration);
|
||||
void Set(const char *total, const char *timeshiftDuration = NULL, eRecType_t timeShiftActive = NoRec);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
/******************************************************************
|
||||
* cVeDrTimeshiftTimes
|
||||
******************************************************************/
|
||||
class cVeDrTimeshiftTimes : public cViewElement {
|
||||
private:
|
||||
cString start;
|
||||
cString playbacktime;
|
||||
cString timeshiftrest;
|
||||
bool changed;
|
||||
eRecType_t timeShiftActive;
|
||||
public:
|
||||
cVeDrTimeshiftTimes(void);
|
||||
virtual ~cVeDrTimeshiftTimes(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(cString start, cString playbacktime, cString timeshiftrest, eRecType_t timeShiftActive = NoRec);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
|
@ -72,12 +100,13 @@ public:
|
|||
class cVeDrEndTime : public cViewElement {
|
||||
private:
|
||||
cString end;
|
||||
eRecType_t timeShiftActive;
|
||||
bool changed;
|
||||
public:
|
||||
cVeDrEndTime(void);
|
||||
virtual ~cVeDrEndTime(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(cString end);
|
||||
void Set(cString end, eRecType_t timeShiftActive = NoRec);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
|
@ -88,14 +117,14 @@ class cVeDrProgressBar : public cViewElement {
|
|||
private:
|
||||
int current;
|
||||
int total;
|
||||
bool timeshiftActive;
|
||||
eRecType_t timeShiftActive;
|
||||
int timeshiftTotal;
|
||||
bool changed;
|
||||
public:
|
||||
cVeDrProgressBar(void);
|
||||
virtual ~cVeDrProgressBar(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(int current, int total, bool timeshiftActive, int timeshiftTotal);
|
||||
void Set(int current, int total, eRecType_t timeShiftActive = NoRec, int timeshiftTotal = 0);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
|
@ -108,19 +137,15 @@ private:
|
|||
const cMarks *marks;
|
||||
int current;
|
||||
int total;
|
||||
bool timeshiftActive;
|
||||
eRecType_t timeShiftActive;
|
||||
int timeshiftTotal;
|
||||
int numMarksLast;
|
||||
int *lastMarks;
|
||||
int markActive;
|
||||
bool MarksChanged(void);
|
||||
void RememberMarks(void);
|
||||
bool changed;
|
||||
public:
|
||||
cVeDrCutMarks(void);
|
||||
virtual ~cVeDrCutMarks(void);
|
||||
void SetTokenContainer(void);
|
||||
void Set(const cMarks *marks, int current, int total, bool timeshiftActive, int timeshiftTotal);
|
||||
void Reset(void);
|
||||
void Set(const cMarks *marks, int current, int total, eRecType_t timeShiftActive = NoRec, int timeshiftTotal = 0);
|
||||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
|
@ -207,4 +232,4 @@ public:
|
|||
bool Parse(bool forced = false);
|
||||
};
|
||||
|
||||
#endif //__VIEWELEMENTSDR_H
|
||||
#endif //__VIEWELEMENTSDR_H
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
#include "viewlist.h"
|
||||
#include "view.h"
|
||||
|
||||
cViewList::cViewList(void) {
|
||||
globals = NULL;
|
||||
attribs = new cViewListAttribs((int)eViewListAttribs::count);
|
||||
numElements = 0;
|
||||
orientation = eOrientation::vertical;
|
||||
cleared = true;
|
||||
itemCount = 0;
|
||||
listElement = NULL;
|
||||
currentElement = NULL;
|
||||
listElements = NULL;
|
||||
plugId = -1;
|
||||
plugMenuId = -1;
|
||||
fader = NULL;
|
||||
shifter = NULL;
|
||||
}
|
||||
|
||||
cViewList::~cViewList(void) {
|
||||
|
@ -66,6 +72,12 @@ cViewList *cViewList::CreateViewList(const char *name) {
|
|||
l = new cViewListAudioTracks();
|
||||
else if (startswith(name, "menuplugin"))
|
||||
l = new cViewListPlugin();
|
||||
else if (startswith(name, "channellist"))
|
||||
l = new cViewListChannelList();
|
||||
else if (startswith(name, "grouplist"))
|
||||
l = new cViewListGroupList();
|
||||
else if (startswith(name, "groupchannellist"))
|
||||
l = new cViewListChannelList();
|
||||
else
|
||||
esyslog("skindesigner: unknown viewlist %s", name);
|
||||
return l;
|
||||
|
@ -91,6 +103,12 @@ cViewElement *cViewList::CreateListElement(const char *name) {
|
|||
le = new cLeAudioTracks();
|
||||
else if (startswith(name, "menuplugin"))
|
||||
le = new cLeMenuPlugin();
|
||||
else if (startswith(name, "channellist"))
|
||||
le = new cLeChannelList();
|
||||
else if (startswith(name, "grouplist"))
|
||||
le = new cLeGroupList();
|
||||
else if (startswith(name, "groupchannellist"))
|
||||
le = new cLeChannelList();
|
||||
else
|
||||
esyslog("skindesigner: unknown viewlist %s", name);
|
||||
return le;
|
||||
|
@ -149,7 +167,7 @@ void cViewList::PreCache(void) {
|
|||
step = width / numElements;
|
||||
}
|
||||
|
||||
int start = 0;
|
||||
int start = y;
|
||||
if (align == eAlign::center) {
|
||||
if (orientation == eOrientation::vertical) {
|
||||
start = y + (height - numElements * step) / 2;
|
||||
|
@ -178,9 +196,15 @@ eOrientation cViewList::Orientation(void) {
|
|||
|
||||
void cViewList::Draw(eMenuCategory menuCat) {
|
||||
int current = -1;
|
||||
int numCalls = 0;
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
listElements[i]->SetMenuCategory(menuCat);
|
||||
if (listElements[i]->Parse()) {
|
||||
if (listElements[i]->Shifting())
|
||||
SetShiftParameters(i, numCalls);
|
||||
if (listElements[i]->Fading() && itemCount == 1) {
|
||||
listElements[i]->SetSuppressAnimation(true);
|
||||
}
|
||||
listElements[i]->Render();
|
||||
if (listElements[i]->Current()) {
|
||||
listElements[i]->RenderCurrent();
|
||||
|
@ -191,10 +215,11 @@ void cViewList::Draw(eMenuCategory menuCat) {
|
|||
if (current >= 0 && listElements[current]) {
|
||||
listElements[current]->WakeCurrent();
|
||||
}
|
||||
|
||||
cleared = false;
|
||||
}
|
||||
|
||||
void cViewList::Clear(void) {
|
||||
cleared = true;
|
||||
if (!listElements)
|
||||
return;
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
|
@ -207,22 +232,63 @@ void cViewList::Clear(void) {
|
|||
}
|
||||
|
||||
void cViewList::Close(void) {
|
||||
if (shifter)
|
||||
cView::RemoveAnimation(shifter);
|
||||
if (fader)
|
||||
cView::RemoveAnimation(fader);
|
||||
if (!listElements)
|
||||
return;
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
listElements[i]->StopBlinking();
|
||||
listElements[i]->StopScrolling();
|
||||
}
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
for (int i = 0; i < numElements; i++)
|
||||
listElements[i]->Close();
|
||||
}
|
||||
|
||||
void cViewList::SetTransparency(int transparency, bool force) {
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
if (listElements[i])
|
||||
listElements[i]->SetTransparency(transparency, force);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewList::SetTransparency(int transparency) {
|
||||
cRect cViewList::CoveredArea(void) {
|
||||
cRect unionArea;
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
if (listElements[i]) {
|
||||
listElements[i]->SetTransparency(transparency);
|
||||
}
|
||||
if (listElements[i])
|
||||
unionArea.Combine(listElements[i]->CoveredArea());
|
||||
}
|
||||
return unionArea;
|
||||
}
|
||||
|
||||
void cViewList::SetPosition(cPoint &position, cPoint &reference, bool force) {
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
if (listElements[i])
|
||||
listElements[i]->SetPosition(position, reference, force);
|
||||
}
|
||||
}
|
||||
|
||||
void cViewList::ShiftPositions(cPoint *start, cPoint *end) {
|
||||
cRect shiftbox = CoveredArea();
|
||||
cPoint startPoint = ShiftStart(shiftbox);
|
||||
start->Set(startPoint);
|
||||
end->Set(shiftbox.X(), shiftbox.Y());
|
||||
}
|
||||
|
||||
void cViewList::StartAnimation(bool animOut) {
|
||||
shifter = NULL;
|
||||
fader = NULL;
|
||||
if (ShiftTime() > 0) {
|
||||
shifter = new cShifter((cShiftable*)this);
|
||||
if (animOut)
|
||||
shifter->SetPersistent();
|
||||
cView::AddAnimation(shifter);
|
||||
} else if (FadeTime() > 0) {
|
||||
fader = new cFader((cFadable*)this);
|
||||
if (animOut)
|
||||
fader->SetPersistent();
|
||||
cView::AddAnimation(fader);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -231,6 +297,58 @@ void cViewList::Debug(void) {
|
|||
attribs->Debug();
|
||||
}
|
||||
|
||||
cPoint cViewList::ShiftStart(cRect &shiftbox) {
|
||||
eShiftType type = (eShiftType)attribs->ShiftType();
|
||||
cPoint start;
|
||||
if (type == eShiftType::none) {
|
||||
start = attribs->ShiftStartpoint();
|
||||
} else if (type == eShiftType::left) {
|
||||
start.SetX(-shiftbox.Width());
|
||||
start.SetY(shiftbox.Y());
|
||||
} else if (type == eShiftType::right) {
|
||||
start.SetX(cOsd::OsdWidth());
|
||||
start.SetY(shiftbox.Y());
|
||||
} else if (type == eShiftType::top) {
|
||||
start.SetX(shiftbox.X());
|
||||
start.SetY(-shiftbox.Height());
|
||||
} else if (type == eShiftType::bottom) {
|
||||
start.SetX(shiftbox.X());
|
||||
start.SetY(cOsd::OsdHeight());
|
||||
}
|
||||
return start;
|
||||
}
|
||||
|
||||
void cViewList::SetShiftParameters(int index, int &call) {
|
||||
if (itemCount == 1) {
|
||||
listElements[index]->SetSuppressAnimation(true);
|
||||
return;
|
||||
}
|
||||
listElements[index]->SetSuppressAnimation(cleared);
|
||||
if (listElements[index]->WasCurrent()) {
|
||||
if (call == 0) {
|
||||
call++;
|
||||
listElements[index]->SetSelectedFromTop();
|
||||
} else if (call == 1) {
|
||||
call++;
|
||||
listElements[index]->SetSelectedFromBottom();
|
||||
}
|
||||
} else if (listElements[index]->Current()) {
|
||||
if (call == 0) {
|
||||
call++;
|
||||
listElements[index]->SetSelectedFromBottom();
|
||||
} else if (call == 1) {
|
||||
call++;
|
||||
listElements[index]->SetSelectedFromTop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cViewList::CheckListAnimation(int index) {
|
||||
itemCount++;
|
||||
if (listElements[index])
|
||||
listElements[index]->StopListAnimation();
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cViewListDefault
|
||||
******************************************************************/
|
||||
|
@ -263,6 +381,7 @@ void cViewListDefault::Prepare(int start, int step) {
|
|||
listDefault[i] = new cLeMenuDefault(*tpl);
|
||||
listElements[i] = listDefault[i];
|
||||
listDefault[i]->SetNumber(i);
|
||||
listDefault[i]->SetOrientation(orientation);
|
||||
listDefault[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
|
@ -345,6 +464,7 @@ void cViewListDefault::SetTabs(int tab1, int tab2, int tab3, int tab4, int tab5)
|
|||
void cViewListDefault::Set(const char *text, int index, bool current, bool selectable) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listDefault[index]->StopScrolling();
|
||||
listDefault[index]->SetCurrent(current);
|
||||
|
@ -388,6 +508,7 @@ void cViewListMain::Prepare(int start, int step) {
|
|||
listMain[i] = new cLeMenuMain(*tpl);
|
||||
listElements[i] = listMain[i];
|
||||
listMain[i]->SetNumber(i);
|
||||
listMain[i]->SetOrientation(orientation);
|
||||
listMain[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
|
@ -423,6 +544,7 @@ void cViewListMain::Prepare(int start, int step) {
|
|||
void cViewListMain::Set(const char *text, int index, bool current, bool selectable) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listMain[index]->StopScrolling();
|
||||
listMain[index]->SetCurrent(current);
|
||||
|
@ -467,6 +589,7 @@ void cViewListSchedules::Prepare(int start, int step) {
|
|||
listSchedules[i] = new cLeMenuSchedules(*tpl);
|
||||
listElements[i] = listSchedules[i];
|
||||
listSchedules[i]->SetNumber(i);
|
||||
listSchedules[i]->SetOrientation(orientation);
|
||||
listSchedules[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
|
@ -503,6 +626,7 @@ void cViewListSchedules::Set(const cEvent *event, int index, bool current, bool
|
|||
const cChannel *channel, bool withDate, eTimerMatch timerMatch) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listSchedules[index]->StopScrolling();
|
||||
listSchedules[index]->SetCurrent(current);
|
||||
|
@ -539,6 +663,7 @@ void cViewListTimers::Prepare(int start, int step) {
|
|||
listTimers[i] = new cLeMenuTimers(*tpl);
|
||||
listElements[i] = listTimers[i];
|
||||
listTimers[i]->SetNumber(i);
|
||||
listTimers[i]->SetOrientation(orientation);
|
||||
listTimers[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
|
@ -574,6 +699,7 @@ void cViewListTimers::Prepare(int start, int step) {
|
|||
void cViewListTimers::Set(const cTimer *timer, int index, bool current, bool selectable) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listTimers[index]->StopScrolling();
|
||||
listTimers[index]->SetCurrent(current);
|
||||
|
@ -609,6 +735,7 @@ void cViewListChannels::Prepare(int start, int step) {
|
|||
listChannels[i] = new cLeMenuChannels(*tpl);
|
||||
listElements[i] = listChannels[i];
|
||||
listChannels[i]->SetNumber(i);
|
||||
listChannels[i]->SetOrientation(orientation);
|
||||
listChannels[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
|
@ -644,6 +771,7 @@ void cViewListChannels::Prepare(int start, int step) {
|
|||
void cViewListChannels::Set(const cChannel *channel, int index, bool current, bool selectable, bool withProvider) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listChannels[index]->StopScrolling();
|
||||
listChannels[index]->SetCurrent(current);
|
||||
|
@ -679,6 +807,7 @@ void cViewListRecordings::Prepare(int start, int step) {
|
|||
listRecordings[i] = new cLeMenuRecordings(*tpl);
|
||||
listElements[i] = listRecordings[i];
|
||||
listRecordings[i]->SetNumber(i);
|
||||
listRecordings[i]->SetOrientation(orientation);
|
||||
listRecordings[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
|
@ -714,6 +843,7 @@ void cViewListRecordings::Prepare(int start, int step) {
|
|||
void cViewListRecordings::Set(const cRecording *recording, int index, bool current, bool selectable, int level, int total, int New) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listRecordings[index]->StopScrolling();
|
||||
listRecordings[index]->SetCurrent(current);
|
||||
|
@ -752,6 +882,7 @@ void cViewListPlugin::Prepare(int start, int step) {
|
|||
listPlugin[i] = new cLeMenuPlugin(*tpl);
|
||||
listElements[i] = listPlugin[i];
|
||||
listPlugin[i]->SetNumber(i);
|
||||
listPlugin[i]->SetOrientation(orientation);
|
||||
listPlugin[i]->SetPlugId(plugId);
|
||||
listPlugin[i]->SetPlugMenuId(plugMenuId);
|
||||
listPlugin[i]->SetTokenContainer();
|
||||
|
@ -792,6 +923,7 @@ void cViewListPlugin::Prepare(int start, int step) {
|
|||
void cViewListPlugin::Set(skindesignerapi::cTokenContainer *tk, int index, bool current, bool selectable) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listPlugin[index]->StopScrolling();
|
||||
listPlugin[index]->SetCurrent(current);
|
||||
|
@ -836,6 +968,7 @@ void cViewListAudioTracks::PreCache(void) {
|
|||
|
||||
void cViewListAudioTracks::SetNumtracks(int numTracks) {
|
||||
this->numTracks = numTracks;
|
||||
this->numElements = numTracks;
|
||||
tokenContainer->Clear();
|
||||
tokenContainer->AddIntToken(0, numTracks);
|
||||
}
|
||||
|
@ -927,3 +1060,121 @@ void cViewListAudioTracks::Draw(void) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cViewListChannelList
|
||||
******************************************************************/
|
||||
cViewListChannelList::cViewListChannelList(void) {
|
||||
listChannelList = NULL;
|
||||
}
|
||||
|
||||
cViewListChannelList::~cViewListChannelList(void) {
|
||||
delete[] listChannelList;
|
||||
}
|
||||
|
||||
void cViewListChannelList::Prepare(int start, int step) {
|
||||
if (!listElement)
|
||||
return;
|
||||
|
||||
cLeChannelList *tpl = dynamic_cast<cLeChannelList*>(listElement);
|
||||
if (!tpl) return;
|
||||
|
||||
listChannelList = new cLeChannelList*[numElements];
|
||||
listElements = new cListElement*[numElements];
|
||||
int pos = start;
|
||||
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
listChannelList[i] = new cLeChannelList(*tpl);
|
||||
listElements[i] = listChannelList[i];
|
||||
listChannelList[i]->SetNumber(i);
|
||||
listChannelList[i]->SetOrientation(orientation);
|
||||
listChannelList[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
x = attribs->X();
|
||||
y = pos;
|
||||
width = attribs->Width();
|
||||
height = step;
|
||||
listChannelList[i]->SetAreaHeight(height);
|
||||
} else {
|
||||
x = pos;
|
||||
y = attribs->Y();
|
||||
width = step;
|
||||
height = attribs->Height();
|
||||
listChannelList[i]->SetAreaWidth(width);
|
||||
}
|
||||
listChannelList[i]->SetContainer(x, y, width, height);
|
||||
listChannelList[i]->Cache();
|
||||
pos += step;
|
||||
}
|
||||
}
|
||||
|
||||
void cViewListChannelList::Set(const cChannel *channel, int index, bool current) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
itemCount++;
|
||||
if (!current)
|
||||
listChannelList[index]->StopScrolling();
|
||||
listChannelList[index]->SetCurrent(current);
|
||||
listChannelList[index]->SetSelectable(true);
|
||||
listChannelList[index]->Set(channel);
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cViewListGroupList
|
||||
******************************************************************/
|
||||
cViewListGroupList::cViewListGroupList(void) {
|
||||
listGroupList = NULL;
|
||||
}
|
||||
|
||||
cViewListGroupList::~cViewListGroupList(void) {
|
||||
delete[] listGroupList;
|
||||
}
|
||||
|
||||
void cViewListGroupList::Prepare(int start, int step) {
|
||||
if (!listElement)
|
||||
return;
|
||||
|
||||
cLeGroupList *tpl = dynamic_cast<cLeGroupList*>(listElement);
|
||||
if (!tpl) return;
|
||||
|
||||
listGroupList = new cLeGroupList*[numElements];
|
||||
listElements = new cListElement*[numElements];
|
||||
int pos = start;
|
||||
|
||||
for (int i = 0; i < numElements; i++) {
|
||||
listGroupList[i] = new cLeGroupList(*tpl);
|
||||
listElements[i] = listGroupList[i];
|
||||
listGroupList[i]->SetNumber(i);
|
||||
listGroupList[i]->SetOrientation(orientation);
|
||||
listGroupList[i]->SetTokenContainer();
|
||||
int x, y, width, height;
|
||||
if (orientation == eOrientation::vertical) {
|
||||
x = attribs->X();
|
||||
y = pos;
|
||||
width = attribs->Width();
|
||||
height = step;
|
||||
listGroupList[i]->SetAreaHeight(height);
|
||||
} else {
|
||||
x = pos;
|
||||
y = attribs->Y();
|
||||
width = step;
|
||||
height = attribs->Height();
|
||||
listGroupList[i]->SetAreaWidth(width);
|
||||
}
|
||||
listGroupList[i]->SetContainer(x, y, width, height);
|
||||
listGroupList[i]->Cache();
|
||||
pos += step;
|
||||
}
|
||||
}
|
||||
|
||||
void cViewListGroupList::Set(const char *group, int numChannels, int index, bool current) {
|
||||
if (index < 0 || index >= numElements)
|
||||
return;
|
||||
CheckListAnimation(index);
|
||||
if (!current)
|
||||
listGroupList[index]->StopScrolling();
|
||||
listGroupList[index]->SetCurrent(current);
|
||||
listGroupList[index]->SetSelectable(true);
|
||||
listGroupList[index]->Set(group, numChannels);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "listelements.h"
|
||||
#include "area.h"
|
||||
|
||||
class cViewList {
|
||||
class cViewList : public cFadable, public cShiftable {
|
||||
protected:
|
||||
int plugId;
|
||||
int plugMenuId;
|
||||
|
@ -16,10 +16,17 @@ protected:
|
|||
skindesignerapi::cTokenContainer *tokenContainer;
|
||||
int numElements;
|
||||
eOrientation orientation;
|
||||
bool cleared;
|
||||
int itemCount;
|
||||
cViewElement *listElement;
|
||||
cViewElement *currentElement;
|
||||
cListElement **listElements;
|
||||
cFader *fader;
|
||||
cShifter *shifter;
|
||||
virtual void Prepare(int start, int step) {};
|
||||
cPoint ShiftStart(cRect &shiftbox);
|
||||
void SetShiftParameters(int index, int &call);
|
||||
void CheckListAnimation(int index);
|
||||
public:
|
||||
cViewList(void);
|
||||
virtual ~cViewList(void);
|
||||
|
@ -39,8 +46,23 @@ public:
|
|||
eOrientation Orientation(void);
|
||||
void Draw(eMenuCategory menuCat);
|
||||
void Clear(void);
|
||||
void ResetItemCount(void) { itemCount = 0; };
|
||||
virtual void Close(void);
|
||||
void SetTransparency(int transparency);
|
||||
eButtonType Button(void) { return attribs->Button(); };
|
||||
//Fadable
|
||||
bool Detached(void) { return false; };
|
||||
int Delay(void) { return 0; };
|
||||
int FadeTime(void) { return attribs->FadeTime(); };
|
||||
void SetTransparency(int transparency, bool force = false);
|
||||
//Shiftable
|
||||
int ShiftTime(void) { return attribs->ShiftTime(); };
|
||||
int ShiftMode(void) { return attribs->ShiftMode(); };
|
||||
void ShiftPositions(cPoint *start, cPoint *end);
|
||||
void SetPosition(cPoint &position, cPoint &reference, bool force = false);
|
||||
void SetStartShifting(void) { };
|
||||
void SetEndShifting(void) { };
|
||||
cRect CoveredArea(void);
|
||||
void StartAnimation(bool animOut = false);
|
||||
void Debug(void);
|
||||
};
|
||||
|
||||
|
@ -154,4 +176,26 @@ public:
|
|||
void SetCurrentTrack(int index);
|
||||
void Draw(void);
|
||||
};
|
||||
|
||||
class cViewListChannelList : public cViewList {
|
||||
private:
|
||||
cLeChannelList **listChannelList;
|
||||
protected:
|
||||
void Prepare(int start, int step);
|
||||
public:
|
||||
cViewListChannelList(void);
|
||||
virtual ~cViewListChannelList(void);
|
||||
void Set(const cChannel *channel, int index, bool current);
|
||||
};
|
||||
|
||||
class cViewListGroupList : public cViewList {
|
||||
private:
|
||||
cLeGroupList **listGroupList;
|
||||
protected:
|
||||
void Prepare(int start, int step);
|
||||
public:
|
||||
cViewListGroupList(void);
|
||||
virtual ~cViewListGroupList(void);
|
||||
void Set(const char *group, int numChannels, int index, bool current);
|
||||
};
|
||||
#endif //__VIEWLIST_H
|
|
@ -40,6 +40,7 @@ bool cXmlParser::ParseView(void) {
|
|||
view->SetAttributes(rootAttribs);
|
||||
|
||||
cViewMenu *menuView = dynamic_cast<cViewMenu*>(view);
|
||||
cViewChannel *channelView = dynamic_cast<cViewChannel*>(view);
|
||||
cViewTracks *tracksView = dynamic_cast<cViewTracks*>(view);
|
||||
|
||||
if (!LevelDown())
|
||||
|
@ -48,6 +49,13 @@ bool cXmlParser::ParseView(void) {
|
|||
do {
|
||||
if (view->ValidViewElement(NodeName())) {
|
||||
ParseViewElement(NodeName());
|
||||
} else if (channelView) {
|
||||
if (view->ValidViewList(NodeName())) {
|
||||
ParseViewList(NULL, NodeName());
|
||||
} else {
|
||||
esyslog("skindesigner: unknown node %s", NodeName());
|
||||
return false;
|
||||
}
|
||||
} else if (menuView) {
|
||||
if (menuView->ValidSubView(NodeName())) {
|
||||
ParseSubView(NodeName());
|
||||
|
@ -334,7 +342,7 @@ void cXmlParser::ParsePluginViewElement(bool isScrollbar, bool isTabLabels) {
|
|||
}
|
||||
}
|
||||
|
||||
void cXmlParser::ParseViewList(cView *subView) {
|
||||
void cXmlParser::ParseViewList(cView *subView, const char *listName) {
|
||||
if (!view)
|
||||
return;
|
||||
|
||||
|
@ -345,7 +353,11 @@ void cXmlParser::ParseViewList(cView *subView) {
|
|||
name = view->GetViewName();
|
||||
|
||||
vector<stringpair> attribs = ParseAttributes();
|
||||
cViewList *viewList = cViewList::CreateViewList(name);
|
||||
cViewList *viewList = NULL;
|
||||
if (!listName)
|
||||
viewList = cViewList::CreateViewList(name);
|
||||
else
|
||||
viewList = cViewList::CreateViewList(listName);
|
||||
viewList->SetAttributes(attribs);
|
||||
|
||||
if (!LevelDown())
|
||||
|
@ -353,7 +365,11 @@ void cXmlParser::ParseViewList(cView *subView) {
|
|||
|
||||
do {
|
||||
if (CheckNodeName("currentelement")) {
|
||||
cViewElement *currentElement = cViewList::CreateCurrentElement(name);
|
||||
cViewElement *currentElement = NULL;
|
||||
if (!listName)
|
||||
currentElement = cViewList::CreateCurrentElement(name);
|
||||
else
|
||||
currentElement = cViewList::CreateCurrentElement(listName);
|
||||
currentElement->SetOsd(sdOsd);
|
||||
vector<stringpair> attribsList = ParseAttributes();
|
||||
currentElement->SetAttributes(attribsList);
|
||||
|
@ -375,7 +391,11 @@ void cXmlParser::ParseViewList(cView *subView) {
|
|||
LevelUp();
|
||||
viewList->AddCurrentElement(currentElement);
|
||||
} else if (CheckNodeName("listelement")) {
|
||||
cViewElement *listElement = cViewList::CreateListElement(name);
|
||||
cViewElement *listElement = NULL;
|
||||
if (!listName)
|
||||
listElement = cViewList::CreateListElement(name);
|
||||
else
|
||||
listElement = cViewList::CreateListElement(listName);
|
||||
listElement->SetOsd(sdOsd);
|
||||
vector<stringpair> attribsList = ParseAttributes();
|
||||
listElement->SetAttributes(attribsList);
|
||||
|
@ -402,8 +422,12 @@ void cXmlParser::ParseViewList(cView *subView) {
|
|||
|
||||
if (subView)
|
||||
subView->AddViewList(viewList);
|
||||
else
|
||||
view->AddViewList(viewList);
|
||||
else if (listName) {
|
||||
cViewChannel *channelView = dynamic_cast<cViewChannel*>(view);
|
||||
channelView->AddChannelViewList(listName, viewList);
|
||||
} else {
|
||||
view->AddViewList(viewList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ private:
|
|||
bool ParseSubView(string name);
|
||||
void ParseViewElement(string name, cView *subView = NULL);
|
||||
void ParsePluginViewElement(bool isScrollbar = false, bool isTabLabels = false);
|
||||
void ParseViewList(cView *subView = NULL);
|
||||
void ParseViewList(cView *subView = NULL, const char *listName = NULL);
|
||||
void ParseViewTab(cView *subView);
|
||||
void ParseViewTabPlugin(void);
|
||||
void ParseGrid(void);
|
||||
|
|
20
designer.c
20
designer.c
|
@ -3,6 +3,7 @@
|
|||
|
||||
cSkinDesigner::cSkinDesigner(string skin, cTheme *theme) : cSkin(skin.c_str(), theme) {
|
||||
init = true;
|
||||
initialized = false;
|
||||
this->skin = skin;
|
||||
|
||||
backupSkin = NULL;
|
||||
|
@ -106,11 +107,11 @@ cSkinDisplayMessage *cSkinDesigner::DisplayMessage(void) {
|
|||
return displayMessage;
|
||||
}
|
||||
|
||||
void cSkinDesigner::Reload(void) {
|
||||
int cSkinDesigner::Reload(void) {
|
||||
dsyslog("skindesigner: forcing full reload of templates");
|
||||
if (cOsd::IsOpen()) {
|
||||
esyslog("skindesigner: OSD is open, close first!");
|
||||
return;
|
||||
return 2;
|
||||
}
|
||||
|
||||
cStopWatch watch;
|
||||
|
@ -120,11 +121,13 @@ void cSkinDesigner::Reload(void) {
|
|||
if (!backupSkin)
|
||||
backupSkin = new cSkinLCARS();
|
||||
useBackupSkin = true;
|
||||
return 1;
|
||||
} else {
|
||||
CacheViews();
|
||||
useBackupSkin = false;
|
||||
watch.Stop("templates reloaded and cache created");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cSkinDesigner::ListAvailableFonts(void) {
|
||||
|
@ -171,6 +174,7 @@ void cSkinDesigner::ListCustomTokens(void) {
|
|||
}
|
||||
|
||||
skindesignerapi::ISkinDisplayPlugin *cSkinDesigner::GetDisplayPlugin(int plugId) {
|
||||
Init();
|
||||
map<int, cViewPlugin*>::iterator hit = pluginViews.find(plugId);
|
||||
if (hit == pluginViews.end())
|
||||
return NULL;
|
||||
|
@ -194,7 +198,7 @@ void cSkinDesigner::Init(void) {
|
|||
config.SetOSDFonts();
|
||||
}
|
||||
dsyslog("skindesigner: initializing skin %s", skin.c_str());
|
||||
|
||||
|
||||
config.CheckDecimalPoint();
|
||||
plgManager->Reset();
|
||||
|
||||
|
@ -212,11 +216,13 @@ void cSkinDesigner::Init(void) {
|
|||
esyslog("skindesigner: error during loading of templates - using LCARS as backup");
|
||||
backupSkin = new cSkinLCARS();
|
||||
useBackupSkin = true;
|
||||
initialized = true;
|
||||
} else {
|
||||
CacheViews();
|
||||
watch.Stop("templates loaded and caches created");
|
||||
}
|
||||
init = false;
|
||||
initialized = true;
|
||||
}
|
||||
else if (config.OsdFontsChanged())
|
||||
{
|
||||
|
@ -235,6 +241,14 @@ void cSkinDesigner::Init(void) {
|
|||
watch.Stop("templates loaded and caches created");
|
||||
}
|
||||
}
|
||||
else if (config.PlayModeChanged())
|
||||
{
|
||||
dsyslog ("skindesigner: drop image cache");
|
||||
if (imgCache)
|
||||
delete imgCache;
|
||||
imgCache = new cImageCache();
|
||||
imgCache->SetPathes();
|
||||
}
|
||||
}
|
||||
|
||||
void cSkinDesigner::DeleteViews(void) {
|
||||
|
|
|
@ -22,6 +22,7 @@ class cSkinDesigner;
|
|||
class cSkinDesigner : public cSkin {
|
||||
private:
|
||||
bool init;
|
||||
bool initialized;
|
||||
string skin;
|
||||
cSkinLCARS *backupSkin;
|
||||
bool useBackupSkin;
|
||||
|
@ -51,7 +52,8 @@ public:
|
|||
virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks);
|
||||
virtual cSkinDisplayMessage *DisplayMessage(void);
|
||||
void ActivateBackupSkin(void) { useBackupSkin = true; };
|
||||
void Reload(void);
|
||||
int Reload(void);
|
||||
bool Initialized(void) { return initialized; };
|
||||
void ListAvailableFonts(void);
|
||||
bool SetCustomIntToken(string option);
|
||||
bool SetCustomStringToken(string option);
|
||||
|
|
|
@ -29,8 +29,72 @@ void cSDDisplayChannel::SetMessage(eMessageType Type, const char *Text) {
|
|||
view->SetMessage(Type, Text);
|
||||
}
|
||||
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
|
||||
void cSDDisplayChannel::SetViewType(eDisplaychannelView ViewType) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetViewType(ViewType);
|
||||
}
|
||||
|
||||
int cSDDisplayChannel::MaxItems(void) {
|
||||
if (!ok)
|
||||
return 0;
|
||||
return view->MaxItems();
|
||||
}
|
||||
|
||||
bool cSDDisplayChannel::KeyRightOpensChannellist(void) {
|
||||
if (!ok)
|
||||
return true;
|
||||
return view->KeyRightOpensChannellist();
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::SetChannelInfo(const cChannel *Channel) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetChannelInfo(Channel);
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::SetChannelList(const cChannel *Channel, int Index, bool Current) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetChannelList(Channel, Index, Current);
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::SetGroupList(const char *Group, int NumChannels, int Index, bool Current) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetGroupList(Group, NumChannels, Index, Current);
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::SetGroupChannelList(const cChannel *Channel, int Index, bool Current) {
|
||||
if (!ok)
|
||||
return;
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::ClearList(void) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->ClearList();
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::SetNumChannelHints(int Num) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetNumChannelHints(Num);
|
||||
}
|
||||
|
||||
void cSDDisplayChannel::SetChannelHint(const cChannel *Channel) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetChannelHint(Channel);
|
||||
}
|
||||
|
||||
#endif //USE_ZAPCOCKPIT
|
||||
|
||||
void cSDDisplayChannel::Flush(void) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->Flush(false);
|
||||
view->GetTimers();
|
||||
view->Flush();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,11 @@
|
|||
#include "coreengine/definitions.h"
|
||||
#include "coreengine/viewdisplaychannel.h"
|
||||
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
class cSDDisplayChannel : public cSkinDisplayChannelExtended {
|
||||
#else
|
||||
class cSDDisplayChannel : public cSkinDisplayChannel {
|
||||
#endif
|
||||
private:
|
||||
cViewChannel *view;
|
||||
bool ok;
|
||||
|
@ -16,6 +20,18 @@ public:
|
|||
virtual void SetChannel(const cChannel *Channel, int Number);
|
||||
virtual void SetEvents(const cEvent *Present, const cEvent *Following);
|
||||
virtual void SetMessage(eMessageType Type, const char *Text);
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
virtual void SetViewType(eDisplaychannelView ViewType);
|
||||
virtual int MaxItems(void);
|
||||
virtual bool KeyRightOpensChannellist(void);
|
||||
virtual void SetChannelInfo(const cChannel *Channel);
|
||||
virtual void SetChannelList(const cChannel *Channel, int Index, bool Current);
|
||||
virtual void SetGroupList(const char *Group, int NumChannels, int Index, bool Current);
|
||||
virtual void SetGroupChannelList(const cChannel *Channel, int Index, bool Current);
|
||||
virtual void ClearList(void);
|
||||
virtual void SetNumChannelHints(int Num);
|
||||
virtual void SetChannelHint(const cChannel *Channel);
|
||||
#endif
|
||||
virtual void Flush(void);
|
||||
};
|
||||
#endif //__DISPLAYCHANNEL_H
|
||||
|
|
|
@ -69,7 +69,7 @@ void cSDDisplayMenu::SetMessage(eMessageType Type, const char *Text) {
|
|||
view->SetMessage(Type, Text);
|
||||
}
|
||||
|
||||
bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) {
|
||||
bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch, bool TimerActive) {
|
||||
if (!view)
|
||||
return false;
|
||||
if (Index == 0) {
|
||||
|
@ -165,7 +165,7 @@ bool cSDDisplayMenu::SetPluginText(skindesignerapi::cTokenContainer *tk) {
|
|||
|
||||
void cSDDisplayMenu::Flush(void) {
|
||||
if (view)
|
||||
view->Flush(false);
|
||||
view->Flush();
|
||||
}
|
||||
|
||||
void cSDDisplayMenu::SetCurrentRecording(void) {
|
||||
|
@ -180,4 +180,4 @@ void cSDDisplayMenu::SetCurrentRecording(void) {
|
|||
return;
|
||||
}
|
||||
view->SetCurrentRecording(recording->FileName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,8 @@ public:
|
|||
virtual void SetTitle(const char *Title);
|
||||
virtual void SetButtons(const char *Red, const char *Green = NULL, const char *Yellow = NULL, const char *Blue = NULL);
|
||||
virtual void SetMessage(eMessageType Type, const char *Text);
|
||||
virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch);
|
||||
virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch, bool TimerActive);
|
||||
virtual bool SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) { return SetItemEvent(Event, Index, Current, Selectable, Channel, WithDate, TimerMatch, true); }
|
||||
virtual bool SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable);
|
||||
virtual bool SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider);
|
||||
virtual bool SetItemRecording(const cRecording *Recording, int Index, bool Current, bool Selectable, int Level, int Total, int New);
|
||||
|
|
|
@ -21,5 +21,5 @@ void cSDDisplayMessage::SetMessage(eMessageType Type, const char *Text) {
|
|||
void cSDDisplayMessage::Flush(void) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->Flush(false);
|
||||
view->Flush();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "displayreplay.h"
|
||||
|
||||
cSDDisplayReplay::cSDDisplayReplay(cViewReplay *replayView, bool ModeOnly) {
|
||||
init = true;
|
||||
view = replayView;
|
||||
ok = view->Init();
|
||||
if (!ok)
|
||||
|
@ -16,15 +15,12 @@ cSDDisplayReplay::~cSDDisplayReplay() {
|
|||
void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
|
||||
if (ok) {
|
||||
view->SetRecording(Recording);
|
||||
if (init) {
|
||||
view->SetRecordingLength(Recording->LengthInSeconds());
|
||||
SetTimeShiftValues(Recording);
|
||||
init = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cSDDisplayReplay::SetTitle(const char *Title) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->SetTitle(Title);
|
||||
}
|
||||
|
||||
|
@ -49,7 +45,9 @@ void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
|
|||
void cSDDisplayReplay::SetProgress(int Current, int Total) {
|
||||
if (ok) {
|
||||
view->SetProgressbar(Current, Total);
|
||||
view->SetMarks(marks, Current, Total);
|
||||
if (marks)
|
||||
view->SetMarks(marks, Current, Total);
|
||||
view->SetTimeshiftTimes(Current, Total);
|
||||
view->SetEndTime(Current, Total);
|
||||
view->DelayOnPause();
|
||||
}
|
||||
|
@ -78,32 +76,5 @@ void cSDDisplayReplay::SetMessage(eMessageType Type, const char *Text) {
|
|||
void cSDDisplayReplay::Flush(void) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->Flush(false);
|
||||
}
|
||||
|
||||
void cSDDisplayReplay::SetTimeShiftValues(const cRecording *recording) {
|
||||
//check for instant recording
|
||||
const char *recName = recording->Name();
|
||||
if (recName && *recName == '@')
|
||||
return;
|
||||
bool isTimeShift = false;
|
||||
#if APIVERSNUM >= 20101
|
||||
int usage = recording->IsInUse();
|
||||
if (usage & ruTimer)
|
||||
isTimeShift = true;
|
||||
#endif
|
||||
if (!isTimeShift)
|
||||
return;
|
||||
const cRecordingInfo *recInfo = recording->Info();
|
||||
if (!recInfo)
|
||||
return;
|
||||
const cEvent *event = recInfo->GetEvent();
|
||||
if (!event)
|
||||
return;
|
||||
double fps = recording->FramesPerSecond();
|
||||
time_t liveEventStop = event->EndTime();
|
||||
time_t recordingStart = time(0) - recording->LengthInSeconds();
|
||||
int framesTotal = (liveEventStop - recordingStart)*fps;
|
||||
int recLength = liveEventStop - recordingStart;
|
||||
view->SetTimeShift(framesTotal, recLength);
|
||||
view->Flush();
|
||||
}
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
class cSDDisplayReplay : public cSkinDisplayReplay {
|
||||
private:
|
||||
bool ok;
|
||||
bool init;
|
||||
cViewReplay *view;
|
||||
void SetTimeShiftValues(const cRecording *recording);
|
||||
public:
|
||||
cSDDisplayReplay(cViewReplay *replayView, bool ModeOnly);
|
||||
virtual ~cSDDisplayReplay();
|
||||
|
|
|
@ -27,5 +27,5 @@ void cSDDisplayTracks::SetAudioChannel(int AudioChannel) {
|
|||
void cSDDisplayTracks::Flush(void) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->Flush(false);
|
||||
view->Flush();
|
||||
}
|
||||
|
|
|
@ -22,5 +22,5 @@ void cSDDisplayVolume::SetVolume(int Current, int Total, bool Mute) {
|
|||
void cSDDisplayVolume::Flush(void) {
|
||||
if (!ok)
|
||||
return;
|
||||
view->Flush(false);
|
||||
view->Flush();
|
||||
}
|
||||
|
|
|
@ -40,6 +40,12 @@
|
|||
width CDATA #REQUIRED
|
||||
height CDATA #REQUIRED
|
||||
align (left|top|center|bottom|right) #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
menuitemwidth CDATA #IMPLIED
|
||||
numlistelements CDATA #REQUIRED
|
||||
orientation CDATA #REQUIRED
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
<!ELEMENT displaychannel (background | channelinfo | epginfo | progressbar | progressbarback |
|
||||
statusinfo | audioinfo | ecminfo | screenresolution | channelgroup |
|
||||
signalquality | signalqualityback | devices | currentweather | scrapercontent |
|
||||
signalquality | signalqualityback | devices | currentweather |
|
||||
scrapercontent | channelhints | channeldetail | channellistdetail |
|
||||
channellistback | channellist | grouplistback | grouplist |
|
||||
groupchannellistback | groupchannellist | groupchannellistdetail |
|
||||
datetime | time | message | customtokens)* >
|
||||
<!ATTLIST displaychannel
|
||||
x CDATA #REQUIRED
|
||||
|
@ -220,6 +223,163 @@
|
|||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channelhints (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST channelhints
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channeldetail (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST channeldetail
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
clearondisplay CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channellistback (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST channellistback
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
clearondisplay CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT grouplistback (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST grouplistback
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
clearondisplay CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT groupchannellistback (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST groupchannellistback
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channellist (listelement)>
|
||||
<!ATTLIST channellist
|
||||
x CDATA #REQUIRED
|
||||
y CDATA #REQUIRED
|
||||
width CDATA #REQUIRED
|
||||
height CDATA #REQUIRED
|
||||
align (left|top|center|bottom|right) #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
numlistelements CDATA #REQUIRED
|
||||
orientation CDATA #REQUIRED
|
||||
condition CDATA #IMPLIED
|
||||
button CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT grouplist (listelement)>
|
||||
<!ATTLIST grouplist
|
||||
x CDATA #REQUIRED
|
||||
y CDATA #REQUIRED
|
||||
width CDATA #REQUIRED
|
||||
height CDATA #REQUIRED
|
||||
align (left|top|center|bottom|right) #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
numlistelements CDATA #REQUIRED
|
||||
orientation CDATA #REQUIRED
|
||||
condition CDATA #IMPLIED
|
||||
button CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT groupchannellist (listelement)>
|
||||
<!ATTLIST groupchannellist
|
||||
x CDATA #REQUIRED
|
||||
y CDATA #REQUIRED
|
||||
width CDATA #REQUIRED
|
||||
height CDATA #REQUIRED
|
||||
align (left|top|center|bottom|right) #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
numlistelements CDATA #REQUIRED
|
||||
orientation CDATA #REQUIRED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT listelement (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST listelement
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT channellistdetail (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST channellistdetail
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT groupchannellistdetail (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST groupchannellistdetail
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT datetime (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST datetime
|
||||
delay CDATA #IMPLIED
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<!ENTITY % functions SYSTEM "functions.dtd">
|
||||
|
||||
<!ELEMENT displaymenu (background,header,datetime,time*,message,sortmode*,colorbuttons,scrollbar*,
|
||||
<!ELEMENT displaymenu (background,header,datetime,time*,vdrstatus*,message,sortmode*,colorbuttons,scrollbar*,
|
||||
menudefault,menumain*,menusetup*,menuschedules*,
|
||||
menutimers*,menuchannels*,menurecordings*,
|
||||
menudetailedepg,menudetailedrecording,
|
||||
|
@ -218,6 +218,20 @@
|
|||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT vdrstatus (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST vdrstatus
|
||||
delay CDATA #IMPLIED
|
||||
orientation CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT currentschedule (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST currentschedule
|
||||
delay CDATA #IMPLIED
|
||||
|
@ -316,7 +330,7 @@
|
|||
>
|
||||
|
||||
<!ELEMENT menumain (background | header | datetime | time | colorbuttons | scrollbar | sortmode | timers |
|
||||
discusage | devices | systemload | systemmemory | vdrstatistics | temperatures | currentschedule |
|
||||
discusage | devices | systemload | systemmemory | vdrstatistics | vdrstatus | temperatures | currentschedule |
|
||||
currentweather | lastrecordings | customtokens | menuitems)*>
|
||||
<!ATTLIST menumain
|
||||
x CDATA #REQUIRED
|
||||
|
@ -468,6 +482,8 @@
|
|||
|
||||
<!ELEMENT listelement (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST listelement
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
>
|
||||
|
||||
|
@ -499,4 +515,4 @@
|
|||
debug (true|false) #IMPLIED
|
||||
>
|
||||
|
||||
%functions;
|
||||
%functions;
|
||||
|
|
|
@ -117,6 +117,8 @@
|
|||
|
||||
<!ELEMENT listelement (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST listelement
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
>
|
||||
|
||||
|
@ -125,6 +127,11 @@
|
|||
condition CDATA #IMPLIED
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!ELEMENT displayreplay (background | backgroundmodeonly |datetime | time |
|
||||
scrapercontent | currentweather | rectitle | recinfo | currenttime |
|
||||
totaltime | endtime | progressbar | cutmarks | controlicons |
|
||||
totaltime | timeshifttimes | endtime | progressbar | cutmarks | controlicons |
|
||||
controliconsmodeonly | progressmodeonly | jump | message | onpause |
|
||||
onpausemodeonly | customtokens)*>
|
||||
<!ATTLIST displayreplay
|
||||
|
@ -153,6 +153,19 @@
|
|||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT timeshifttimes (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST timeshifttimes
|
||||
delay CDATA #IMPLIED
|
||||
fadetime CDATA #IMPLIED
|
||||
shifttime CDATA #IMPLIED
|
||||
shifttype CDATA #IMPLIED
|
||||
shiftmode CDATA #IMPLIED
|
||||
startx CDATA #IMPLIED
|
||||
starty CDATA #IMPLIED
|
||||
debug CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT endtime (areacontainer|area|areascroll)*>
|
||||
<!ATTLIST endtime
|
||||
delay CDATA #IMPLIED
|
||||
|
@ -289,4 +302,4 @@
|
|||
condition CDATA #IMPLIED
|
||||
>
|
||||
|
||||
%functions;
|
||||
%functions;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
transparency CDATA #IMPLIED
|
||||
condition CDATA #IMPLIED
|
||||
background (true|false) #IMPLIED
|
||||
indicator (true|false) #IMPLIED
|
||||
debug (true|false) #IMPLIED
|
||||
>
|
||||
|
||||
|
@ -50,8 +51,8 @@
|
|||
|
||||
<!ELEMENT loop (drawtext|drawtextbox|drawtextvertical|drawimage|drawrectangle|drawellipse|drawslope)+>
|
||||
<!ATTLIST loop
|
||||
x CDATA #REQUIRED
|
||||
y CDATA #REQUIRED
|
||||
x CDATA #IMPLIED
|
||||
y CDATA #IMPLIED
|
||||
width CDATA #IMPLIED
|
||||
height CDATA #IMPLIED
|
||||
columnwidth CDATA #IMPLIED
|
||||
|
@ -60,6 +61,7 @@
|
|||
orientation (horizontal|vertical|absolute) #REQUIRED
|
||||
overflow (linewrap|cut) #IMPLIED
|
||||
maxitems CDATA #IMPLIED
|
||||
valign (top|bottom) #IMPLIED
|
||||
debug (true|false) #IMPLIED
|
||||
>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ bool cExtRecInfo::Parse(void) {
|
|||
}
|
||||
StripXmlTag(mediaInfoXml, resWidth, "res_width");
|
||||
StripXmlTag(mediaInfoXml, resHeight, "res_height");
|
||||
resString = GetScreenResolutionString(resWidth, resHeight, &isHD);
|
||||
resString = GetScreenResolutionString(resWidth, resHeight, &isHD, &isUHD);
|
||||
StripXmlTag(mediaInfoXml, aspectratio, "aspectratio");
|
||||
isWideScreen = !aspectratio.compare("16:9");
|
||||
StripXmlTag(mediaInfoXml, codec, "codec");
|
||||
|
|
|
@ -23,6 +23,7 @@ public:
|
|||
int resHeight;
|
||||
string resString;
|
||||
bool isHD;
|
||||
bool isUHD;
|
||||
string aspectratio;
|
||||
bool isWideScreen;
|
||||
string codec;
|
||||
|
@ -33,4 +34,4 @@ public:
|
|||
vector< tAudioTrack > tracks;
|
||||
};
|
||||
|
||||
#endif // __EXTRECINFO_H
|
||||
#endif // __EXTRECINFO_H
|
||||
|
|
|
@ -0,0 +1,257 @@
|
|||
#include "globaltimers.h"
|
||||
#include "../services/epgsearch.h"
|
||||
#include "../services/remotetimers.h"
|
||||
#include "../services/epgtimer.h"
|
||||
|
||||
static int CompareTimers(const void *a, const void *b) {
|
||||
return (*(const cTimer **)a)->Compare(**(const cTimer **)b);
|
||||
}
|
||||
|
||||
bool cGlobalTimers::initial = true;
|
||||
cRemoteTimerRefresh *cGlobalTimers::remoteTimerRefresh = NULL;
|
||||
|
||||
cGlobalTimers::cGlobalTimers(void) : cVector<const cTimer*>(0) {
|
||||
pEpg2Vdr = cPluginManager::GetPlugin("epg2vdr");
|
||||
pRemoteTimers = cPluginManager::GetPlugin("remotetimers");
|
||||
pEpgSearch = cPluginManager::GetPlugin("epgsearch");
|
||||
localTimer = NULL;
|
||||
isEpg2VdrTimers = false;
|
||||
}
|
||||
|
||||
cGlobalTimers::~cGlobalTimers(void) {
|
||||
if (localTimer) {
|
||||
delete[] localTimer;
|
||||
}
|
||||
ClearTimers();
|
||||
}
|
||||
|
||||
void cGlobalTimers::LoadTimers(void) {
|
||||
isEpg2VdrTimers = false;
|
||||
bool epg2vdrOk = false;
|
||||
if (pEpg2Vdr) {
|
||||
epg2vdrOk = SetEpg2VdrTimers();
|
||||
}
|
||||
if (!epg2vdrOk) {
|
||||
SetLocalTimers();
|
||||
if (pRemoteTimers) {
|
||||
SetRemoteTimers(initial);
|
||||
}
|
||||
}
|
||||
initial = false;
|
||||
}
|
||||
|
||||
void cGlobalTimers::SortTimers(void) {
|
||||
Sort(CompareTimers);
|
||||
}
|
||||
|
||||
void cGlobalTimers::MarkLocalTimers(void) {
|
||||
if (isEpg2VdrTimers)
|
||||
return;
|
||||
|
||||
if (localTimer) {
|
||||
delete[] localTimer;
|
||||
localTimer = NULL;
|
||||
}
|
||||
const cTimers* timers;
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
timers = Timers;
|
||||
}
|
||||
#else
|
||||
timers = &Timers;
|
||||
#endif
|
||||
int numTimers = Size();
|
||||
if (numTimers > 0) {
|
||||
localTimer = new bool[numTimers];
|
||||
for (int i=0; i < numTimers; i++) {
|
||||
if (!pRemoteTimers) {
|
||||
localTimer[i] = true;
|
||||
} else {
|
||||
localTimer[i] = false;
|
||||
for (const cTimer *Timer = timers->First(); Timer; Timer = timers->Next(Timer)) {
|
||||
if (Timer == At(i)) {
|
||||
localTimer[i] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cGlobalTimers::SetLocalTimers(void) {
|
||||
const cTimers* timers;
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
{
|
||||
LOCK_TIMERS_READ;
|
||||
timers = Timers;
|
||||
}
|
||||
#else
|
||||
timers = &Timers;
|
||||
#endif
|
||||
for (const cTimer *Timer = timers->First(); Timer; Timer = timers->Next(Timer)) {
|
||||
if (Timer && Timer->HasFlags(tfActive))
|
||||
Append(Timer);
|
||||
}
|
||||
}
|
||||
|
||||
void cGlobalTimers::SetRemoteTimers(bool initial) {
|
||||
if (initial) {
|
||||
cString errorMsg;
|
||||
pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg);
|
||||
}
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_SCHEDULES_READ;
|
||||
const cSchedules* schedules = Schedules;
|
||||
#else
|
||||
cSchedulesLock schedulesLock;
|
||||
const cSchedules* schedules = (cSchedules*)cSchedules::Schedules(schedulesLock);
|
||||
#endif
|
||||
cTimer* remoteTimer = NULL;
|
||||
while (pRemoteTimers->Service("RemoteTimers::ForEach-v1.0", &remoteTimer) && remoteTimer != NULL) {
|
||||
remoteTimer->SetEventFromSchedule(schedules); // make sure the event is current
|
||||
if (remoteTimer->HasFlags(tfActive))
|
||||
Append(remoteTimer);
|
||||
}
|
||||
}
|
||||
|
||||
bool cGlobalTimers::SetEpg2VdrTimers(void) {
|
||||
bool ok = false;
|
||||
cEpgTimer_Service_V1 data;
|
||||
if (pEpg2Vdr->Service(EPG2VDR_TIMER_SERVICE, &data)) {
|
||||
for (std::list<cEpgTimer_Interface_V1*>::iterator it = data.epgTimers.begin(); it != data.epgTimers.end(); ++it) {
|
||||
ok = true;
|
||||
isEpg2VdrTimers = true;
|
||||
if ((*it)->HasFlags(tfActive)) {
|
||||
Append(*it);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
int cGlobalTimers::NumTimerConfilicts(void) {
|
||||
int numConflicts = 0;
|
||||
if (pEpgSearch) {
|
||||
Epgsearch_lastconflictinfo_v1_0 *serviceData = new Epgsearch_lastconflictinfo_v1_0;
|
||||
if (serviceData) {
|
||||
serviceData->nextConflict = 0;
|
||||
serviceData->relevantConflicts = 0;
|
||||
serviceData->totalConflicts = 0;
|
||||
pEpgSearch->Service("Epgsearch-lastconflictinfo-v1.0", serviceData);
|
||||
if (serviceData->relevantConflicts > 0) {
|
||||
numConflicts = serviceData->relevantConflicts;
|
||||
}
|
||||
delete serviceData;
|
||||
}
|
||||
}
|
||||
return numConflicts;
|
||||
}
|
||||
|
||||
bool cGlobalTimers::IsRemoteTimer(int i) {
|
||||
if (isEpg2VdrTimers) {
|
||||
cEpgTimer_Interface_V1* epgTimer;
|
||||
if (epgTimer = dynamic_cast<cEpgTimer_Interface_V1*>((cTimer*)At(i)))
|
||||
return !epgTimer->isLocal();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
if (!localTimer)
|
||||
return true;
|
||||
if (i >= Size())
|
||||
return true;
|
||||
return !(localTimer[i]);
|
||||
}
|
||||
|
||||
const char* cGlobalTimers::RemoteHost(int i) {
|
||||
if (isEpg2VdrTimers) {
|
||||
cEpgTimer_Interface_V1* epgTimer;
|
||||
if (epgTimer = dynamic_cast<cEpgTimer_Interface_V1*>((cTimer*)At(i)))
|
||||
return epgTimer->VdrName();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
bool cGlobalTimers::IsRecording(const cRecording *rec) {
|
||||
if (!rec || !rec->Name())
|
||||
return false;
|
||||
std::string recName = rec->Name();
|
||||
time_t recstart = rec->Start();
|
||||
int size = Size();
|
||||
for (int i=0; i<size; i++) {
|
||||
const cTimer *t = At(i);
|
||||
const char *timerFile = t->File();
|
||||
if (!t->Matches() || !timerFile)
|
||||
continue;
|
||||
if (recName.find(timerFile) != std::string::npos) {
|
||||
time_t timerstart = t->StartTime();
|
||||
if (recstart == timerstart)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void cGlobalTimers::ClearTimers(void) {
|
||||
if (isEpg2VdrTimers) {
|
||||
int size = Size();
|
||||
for (int i=0; i<size; i++) {
|
||||
delete At(i);
|
||||
}
|
||||
}
|
||||
Clear();
|
||||
}
|
||||
|
||||
void cGlobalTimers::StartRefreshThread(void) {
|
||||
if (remoteTimerRefresh == NULL) {
|
||||
remoteTimerRefresh = new cRemoteTimerRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
void cGlobalTimers::StopRefreshThread(void) {
|
||||
if (!remoteTimerRefresh)
|
||||
return;
|
||||
delete remoteTimerRefresh;
|
||||
remoteTimerRefresh = NULL;
|
||||
initial = true;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* cRemoteTimerRefresh
|
||||
*************************************************************************/
|
||||
cRemoteTimerRefresh::cRemoteTimerRefresh(): cThread("skindesigner: RemoteTimers::RefreshTimers") {
|
||||
pRemoteTimers = cPluginManager::GetPlugin("remotetimers");
|
||||
if (pRemoteTimers)
|
||||
Start();
|
||||
}
|
||||
|
||||
cRemoteTimerRefresh::~cRemoteTimerRefresh(void) {
|
||||
Cancel(-1);
|
||||
while (Active())
|
||||
cCondWait::SleepMs(10);
|
||||
}
|
||||
|
||||
void cRemoteTimerRefresh::Action(void) {
|
||||
#define REFESH_INTERVALL_MS 30000
|
||||
int sleepSlice = 1000;
|
||||
int slept = 0;
|
||||
while (Running()) {
|
||||
while (Running() && slept < REFESH_INTERVALL_MS) {
|
||||
cCondWait::SleepMs(sleepSlice);
|
||||
slept += sleepSlice;
|
||||
}
|
||||
slept = 0;
|
||||
// make sure that no timer is currently being edited
|
||||
if (!cOsd::IsOpen() && Running()) {
|
||||
cString errorMsg;
|
||||
pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg);
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_WRITE;
|
||||
Timers->SetModified();
|
||||
#else
|
||||
Timers.SetModified();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef __GLOBALTIMERS_H
|
||||
#define __GLOBALTIMERS_H
|
||||
|
||||
#include <vdr/timers.h>
|
||||
#include <vdr/plugin.h>
|
||||
|
||||
class cRemoteTimerRefresh;
|
||||
|
||||
class cGlobalTimers : public cVector<const cTimer *> {
|
||||
private:
|
||||
static bool initial;
|
||||
static cRemoteTimerRefresh *remoteTimerRefresh;
|
||||
bool *localTimer;
|
||||
cPlugin *pEpg2Vdr;
|
||||
cPlugin *pRemoteTimers;
|
||||
cPlugin *pEpgSearch;
|
||||
bool isEpg2VdrTimers;
|
||||
void SetLocalTimers(void);
|
||||
void SetRemoteTimers(bool initial);
|
||||
bool SetEpg2VdrTimers(void);
|
||||
public:
|
||||
cGlobalTimers(void);
|
||||
virtual ~cGlobalTimers(void);
|
||||
void LoadTimers(void);
|
||||
void SortTimers(void);
|
||||
void MarkLocalTimers(void);
|
||||
int NumTimerConfilicts(void);
|
||||
bool IsRemoteTimer(int i);
|
||||
const char* RemoteHost(int i);
|
||||
bool IsRecording(const cRecording *rec);
|
||||
void ClearTimers(void);
|
||||
static void StartRefreshThread(void);
|
||||
static void StopRefreshThread(void);
|
||||
};
|
||||
|
||||
class cRemoteTimerRefresh: public cThread {
|
||||
private:
|
||||
cPlugin* pRemoteTimers;
|
||||
protected:
|
||||
virtual void Action(void);
|
||||
public:
|
||||
cRemoteTimerRefresh(void);
|
||||
virtual ~cRemoteTimerRefresh(void);
|
||||
};
|
||||
#endif //__GLOBALTIMERS_H
|
|
@ -198,29 +198,43 @@ string GetTimeString(int seconds) {
|
|||
|
||||
|
||||
//View Helpers
|
||||
string GetScreenResolutionString(int width, int height, bool *isHD) {
|
||||
string GetScreenResolutionString(int width, int height, bool *isHD, bool *isUHD) {
|
||||
// TODO: try to get more information from information sources about interlace/progressive
|
||||
// cDevice::PrimaryDevice()->GetVideoSize is NOT providing enough information
|
||||
*isHD = false; // default
|
||||
*isUHD = false; // default
|
||||
string name = "";
|
||||
switch (width) {
|
||||
case 1920:
|
||||
case 1440:
|
||||
name = "hd1080i";
|
||||
switch (height) {
|
||||
case 4320: // 7680 x 4320 = 8K UHD
|
||||
name = "uhd4320p";
|
||||
*isHD = true;
|
||||
*isUHD = true;
|
||||
break;
|
||||
case 2160: // 3840 x 2160 = 4K UHD
|
||||
name = "uhd2160p";
|
||||
*isHD = true;
|
||||
*isUHD = true;
|
||||
break;
|
||||
case 1440: // 2560 x 1440 = QHD
|
||||
name = "hd1440p";
|
||||
*isHD = true;
|
||||
break;
|
||||
case 1280:
|
||||
if (height == 720)
|
||||
name = "hd720p";
|
||||
else
|
||||
name = "hd1080i";
|
||||
case 1080:
|
||||
name = "hd1080i"; // 'i' is default, 'p' can't be detected currently
|
||||
*isHD = true;
|
||||
break;
|
||||
case 720:
|
||||
name = "sd576i";
|
||||
name = "hd720p"; // 'i' is not defined in standards
|
||||
*isHD = true;
|
||||
break;
|
||||
case 544:
|
||||
name = "sd480i";
|
||||
case 576:
|
||||
name = "sd576i"; // assumed 'i'
|
||||
break;
|
||||
case 480:
|
||||
name = "sd480i"; // assumed 'i'
|
||||
break;
|
||||
default:
|
||||
name = "sd576i";
|
||||
name = "unknown";
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
string GetTimeString(int seconds);
|
||||
|
||||
string GetScreenResolutionString(int width, int height, bool *isHD);
|
||||
string GetScreenResolutionString(int width, int height, bool *isHD, bool *isUHD);
|
||||
string GetScreenAspectString(double aspect, bool *isWideScreen);
|
||||
|
||||
#endif // __HELPERS_H
|
||||
|
|
|
@ -178,14 +178,22 @@ cImageImporterSVG::cImageImporterSVG() {
|
|||
|
||||
cImageImporterSVG::~cImageImporterSVG() {
|
||||
if (handle) {
|
||||
#if LIBRSVG_CHECK_VERSION (2, 46, 0)
|
||||
// rsvg_handle_close is deprecated since version 2.46 and looks like even not required if used with rsvg_handle_new_from_file
|
||||
#else
|
||||
rsvg_handle_close(handle, NULL);
|
||||
#endif
|
||||
g_object_unref(handle);
|
||||
}
|
||||
}
|
||||
|
||||
bool cImageImporterSVG::LoadImage(const char *path) {
|
||||
if (handle) {
|
||||
#if LIBRSVG_CHECK_VERSION (2, 46, 0)
|
||||
// rsvg_handle_close is deprecated since version 2.46 and looks like even not required if used with rsvg_handle_new_from_file
|
||||
#else
|
||||
rsvg_handle_close(handle, NULL);
|
||||
#endif
|
||||
g_object_unref(handle);
|
||||
}
|
||||
|
||||
|
@ -521,3 +529,5 @@ void cSVGTemplate::ReplaceTokens(string &line, size_t tokenStart, size_t tokenEn
|
|||
std::replace( svgAlpha.begin(), svgAlpha.end(), ',', '.');
|
||||
line.replace(hitAlpha, hitAlphaEnd - hitAlpha + 2, svgAlpha);
|
||||
}
|
||||
|
||||
// vim: ts=4 sw=4 et
|
||||
|
|
|
@ -1,134 +0,0 @@
|
|||
#include "timers.h"
|
||||
#include "../services/epgsearch.h"
|
||||
#include "../services/remotetimers.h"
|
||||
|
||||
static int CompareTimers(const void *a, const void *b) {
|
||||
return (*(const cTimer **)a)->Compare(**(const cTimer **)b);
|
||||
}
|
||||
|
||||
cGlobalSortedTimers::cGlobalSortedTimers(int timerCount, bool forceRefresh) : cVector<const cTimer*>(timerCount) {
|
||||
static bool initial = true;
|
||||
static cRemoteTimerRefresh *remoteTimerRefresh = NULL;
|
||||
localTimer = NULL;
|
||||
|
||||
if (forceRefresh)
|
||||
initial = true;
|
||||
//check if remotetimers plugin is available
|
||||
static cPlugin* pRemoteTimers = cPluginManager::GetPlugin("remotetimers");
|
||||
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_READ;
|
||||
LOCK_SCHEDULES_READ;
|
||||
const cTimers* timers = Timers;
|
||||
const cSchedules* schedules = Schedules;
|
||||
#else
|
||||
const cTimers* timers = &Timers;
|
||||
cSchedulesLock schedulesLock;
|
||||
const cSchedules* schedules = (cSchedules*)cSchedules::Schedules(schedulesLock);
|
||||
#endif
|
||||
|
||||
if (pRemoteTimers && initial) {
|
||||
cString errorMsg;
|
||||
pRemoteTimers->Service("RemoteTimers::RefreshTimers-v1.0", &errorMsg);
|
||||
initial = false;
|
||||
}
|
||||
|
||||
for (const cTimer *Timer = timers->First(); Timer; Timer = timers->Next(Timer)) {
|
||||
if (Timer->HasFlags(tfActive))
|
||||
Append(Timer);
|
||||
}
|
||||
|
||||
//if remotetimers plugin is available, take timers also from him
|
||||
if (pRemoteTimers) {
|
||||
cTimer* remoteTimer = NULL;
|
||||
while (pRemoteTimers->Service("RemoteTimers::ForEach-v1.0", &remoteTimer) && remoteTimer != NULL) {
|
||||
remoteTimer->SetEventFromSchedule(schedules); // make sure the event is current
|
||||
if (remoteTimer->HasFlags(tfActive))
|
||||
Append(remoteTimer);
|
||||
}
|
||||
}
|
||||
|
||||
Sort(CompareTimers);
|
||||
|
||||
int numTimers = Size();
|
||||
if (numTimers > 0) {
|
||||
localTimer = new bool[numTimers];
|
||||
for (int i=0; i < numTimers; i++) {
|
||||
if (!pRemoteTimers) {
|
||||
localTimer[i] = true;
|
||||
} else {
|
||||
localTimer[i] = false;
|
||||
for (const cTimer *Timer = timers->First(); Timer; Timer = timers->Next(Timer)) {
|
||||
if (Timer == At(i)) {
|
||||
localTimer[i] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pRemoteTimers && (remoteTimerRefresh == NULL))
|
||||
remoteTimerRefresh = new cRemoteTimerRefresh();
|
||||
}
|
||||
|
||||
cGlobalSortedTimers::~cGlobalSortedTimers(void) {
|
||||
if (localTimer) {
|
||||
delete[] localTimer;
|
||||
}
|
||||
}
|
||||
|
||||
bool cGlobalSortedTimers::IsRemoteTimer(int i) {
|
||||
if (!localTimer)
|
||||
return true;
|
||||
if (i >= Size())
|
||||
return true;
|
||||
return !(localTimer[i]);
|
||||
}
|
||||
|
||||
|
||||
int cGlobalSortedTimers::NumTimerConfilicts(void) {
|
||||
int numConflicts = 0;
|
||||
cPlugin *p = cPluginManager::GetPlugin("epgsearch");
|
||||
if (p) {
|
||||
Epgsearch_lastconflictinfo_v1_0 *serviceData = new Epgsearch_lastconflictinfo_v1_0;
|
||||
if (serviceData) {
|
||||
serviceData->nextConflict = 0;
|
||||
serviceData->relevantConflicts = 0;
|
||||
serviceData->totalConflicts = 0;
|
||||
p->Service("Epgsearch-lastconflictinfo-v1.0", serviceData);
|
||||
if (serviceData->relevantConflicts > 0) {
|
||||
numConflicts = serviceData->relevantConflicts;
|
||||
}
|
||||
delete serviceData;
|
||||
}
|
||||
}
|
||||
return numConflicts;
|
||||
}
|
||||
|
||||
cRemoteTimerRefresh::cRemoteTimerRefresh(): cThread("skindesigner: RemoteTimers::RefreshTimers") {
|
||||
Start();
|
||||
}
|
||||
|
||||
cRemoteTimerRefresh::~cRemoteTimerRefresh(void) {
|
||||
Cancel(-1);
|
||||
while (Active())
|
||||
cCondWait::SleepMs(10);
|
||||
}
|
||||
|
||||
void cRemoteTimerRefresh::Action(void) {
|
||||
#define REFESH_INTERVALL_MS 30000
|
||||
while (Running()) {
|
||||
cCondWait::SleepMs(REFESH_INTERVALL_MS);
|
||||
// make sure that no timer is currently being edited
|
||||
if (!cOsd::IsOpen()) {
|
||||
cGlobalSortedTimers(true);
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
LOCK_TIMERS_WRITE;
|
||||
Timers->SetModified();
|
||||
#else
|
||||
Timers.SetModified();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef __NOPACITY_TIMERS_H
|
||||
#define __NOPACITY_TIMERS_H
|
||||
|
||||
#include <vdr/timers.h>
|
||||
#include <vdr/plugin.h>
|
||||
|
||||
class cGlobalSortedTimers : public cVector<const cTimer *> {
|
||||
private:
|
||||
bool *localTimer;
|
||||
public:
|
||||
cGlobalSortedTimers(int timerCount, bool forceRefresh = false);
|
||||
virtual ~cGlobalSortedTimers(void);
|
||||
bool IsRemoteTimer(int i);
|
||||
int NumTimerConfilicts(void);
|
||||
};
|
||||
|
||||
class cRemoteTimerRefresh: public cThread {
|
||||
protected:
|
||||
virtual void Action(void);
|
||||
public:
|
||||
cRemoteTimerRefresh(void);
|
||||
virtual ~cRemoteTimerRefresh(void);
|
||||
};
|
||||
#endif //__NOPACITY_TIMERS_H
|
|
@ -3,7 +3,7 @@
|
|||
NAME = skindesignerapi
|
||||
LIBNAME = lib$(NAME)
|
||||
MAJOR = 0
|
||||
MINOR = 1.1
|
||||
MINOR = 1.2
|
||||
VERSION = $(MAJOR).$(MINOR)
|
||||
|
||||
SONAME = $(LIBNAME).so.$(MAJOR)
|
||||
|
@ -32,7 +32,8 @@ OBJS = $(SRCS:.c=.o)
|
|||
all: ${TARGET_LIB} ${LIBNAME}.pc
|
||||
|
||||
%.o: %.c
|
||||
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
|
||||
@echo CC $@
|
||||
$(Q)$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
|
||||
|
||||
# Dependencies:
|
||||
|
||||
|
@ -46,7 +47,8 @@ $(DEPFILE): Makefile
|
|||
# The main lib
|
||||
|
||||
$(TARGET_LIB): $(OBJS)
|
||||
$(CXX) ${LDFLAGS} -o $@ $^
|
||||
@echo LD $@
|
||||
$(Q)$(CXX) ${LDFLAGS} -o $@ $^
|
||||
if [ -n "$(LCLBLD)" ] ; then \
|
||||
ln -s $(TARGET_LIB) $(LIBNAME).so ; \
|
||||
ln -s $(TARGET_LIB) $(SONAME) ; \
|
||||
|
|
|
@ -198,5 +198,5 @@ skindesignerapi::cViewTab *skindesignerapi::cOsdView::GetViewTabs(void) {
|
|||
|
||||
void skindesignerapi::cOsdView::Display(void) {
|
||||
if (displayPlugin)
|
||||
displayPlugin->Flush(false);
|
||||
displayPlugin->Flush();
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
virtual void TabDown(int viewId) = 0;
|
||||
virtual void DisplayTabs(int viewId) = 0;
|
||||
virtual void ClearTab(int viewId) = 0;
|
||||
virtual void Flush(bool animFlush) = 0;
|
||||
virtual void Flush(void) = 0;
|
||||
virtual bool ChannelLogoExists(string channelId) = 0;
|
||||
virtual string GetEpgImagePath(void) = 0;
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
19
po/de_DE.po
19
po/de_DE.po
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: vdr-skindesigner 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2016-01-20 18:31+0100\n"
|
||||
"POT-Creation-Date: 2020-07-15 13:04+0200\n"
|
||||
"PO-Revision-Date: 2014-09-27 11:02+0200\n"
|
||||
"Last-Translator: Louis Braun <louis.braun@gmx.de>\n"
|
||||
"Language-Team: \n"
|
||||
|
@ -45,8 +45,11 @@ msgstr "eines nach dem anderen"
|
|||
msgid "at one go"
|
||||
msgstr "alle auf einmal"
|
||||
|
||||
msgid "Updating Skinrepositories"
|
||||
msgstr "Aktualisiere Skinrepositories"
|
||||
|
||||
msgid "Downloading Skin Screenshots..."
|
||||
msgstr ""
|
||||
msgstr "Lade Skin Screenshots..."
|
||||
|
||||
msgid "Install Skin"
|
||||
msgstr "Installiere Skin"
|
||||
|
@ -69,7 +72,7 @@ msgstr "oder höher"
|
|||
msgid "needed"
|
||||
msgstr "benötigt"
|
||||
|
||||
msgid "No Git Repsoitory available"
|
||||
msgid "No Git Repository available"
|
||||
msgstr "Kein Git Repository verfügbar"
|
||||
|
||||
msgid "Skin is running and can't be deleted"
|
||||
|
@ -84,12 +87,18 @@ msgstr "Skin gelöscht"
|
|||
msgid "Plugin Setup"
|
||||
msgstr ""
|
||||
|
||||
msgid "Frames per Second to display animations"
|
||||
msgstr "Frames pro Sekunde für Animationen"
|
||||
|
||||
msgid "Maximum number of custom tokens"
|
||||
msgstr "Maximale Anzahl Custom Tokens"
|
||||
|
||||
msgid "Reruns"
|
||||
msgstr "Wiederholungen"
|
||||
|
||||
msgid "Use Subtitle for reruns"
|
||||
msgstr "Untertitel vergleichen"
|
||||
|
||||
msgid "Maximum number of reruns to display"
|
||||
msgstr "Anzahl anzuzeigender Wiederholungen"
|
||||
|
||||
|
@ -165,6 +174,9 @@ msgstr "Skin Vorschau"
|
|||
msgid "Help"
|
||||
msgstr "Hilfe"
|
||||
|
||||
msgid "Preview"
|
||||
msgstr ""
|
||||
|
||||
msgid "Author"
|
||||
msgstr "Autor"
|
||||
|
||||
|
@ -173,4 +185,3 @@ msgstr "Benutze Schriftarten"
|
|||
|
||||
msgid "Supported Plugins"
|
||||
msgstr "Unterstützte Plugins"
|
||||
|
||||
|
|
92
po/fi_FI.po
92
po/fi_FI.po
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: vdr-skindesigner 0.2.0\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2016-01-20 18:31+0100\n"
|
||||
"POT-Creation-Date: 2020-07-15 13:04+0200\n"
|
||||
"PO-Revision-Date: 2015-01-25 01:25+0200\n"
|
||||
"Last-Translator: Rolf Ahrenberg\n"
|
||||
"Language-Team: Finnish\n"
|
||||
|
@ -16,28 +16,28 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "Skin successfully installed"
|
||||
msgstr ""
|
||||
msgstr "Ulkoasun asennus onnistui"
|
||||
|
||||
msgid "Skin NOT successfully installed"
|
||||
msgstr ""
|
||||
msgstr "Ulkoasun asennus epäonnistui"
|
||||
|
||||
msgid "Timeout"
|
||||
msgstr ""
|
||||
msgstr "Aikakatkaisu"
|
||||
|
||||
msgid "Installing Skin"
|
||||
msgstr ""
|
||||
msgstr "Asennetaan ulkoasua"
|
||||
|
||||
msgid "sec"
|
||||
msgstr ""
|
||||
msgstr "s"
|
||||
|
||||
msgid "Skin successfully updated"
|
||||
msgstr ""
|
||||
msgstr "Ulkoasu päivitetty onnistuneesti"
|
||||
|
||||
msgid "Skin already up to date"
|
||||
msgstr ""
|
||||
msgstr "Ulkoasu on ajantasalla"
|
||||
|
||||
msgid "Updating Skin from Git"
|
||||
msgstr ""
|
||||
msgstr "Päivitetään ulkoasua git-projektista"
|
||||
|
||||
msgid "after one another"
|
||||
msgstr "yksi kerrallaan"
|
||||
|
@ -45,53 +45,62 @@ msgstr "yksi kerrallaan"
|
|||
msgid "at one go"
|
||||
msgstr "kaikki kerralla"
|
||||
|
||||
msgid "Downloading Skin Screenshots..."
|
||||
msgid "Updating Skinrepositories"
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading Skin Screenshots..."
|
||||
msgstr "Ladataan kuvakaappauksia ulkoasusta..."
|
||||
|
||||
msgid "Install Skin"
|
||||
msgstr ""
|
||||
msgstr "Asenna ulkoasu"
|
||||
|
||||
msgid "Update"
|
||||
msgstr ""
|
||||
msgstr "Päivitä"
|
||||
|
||||
msgid "Delete Skin"
|
||||
msgstr ""
|
||||
msgstr "Poista ulkoasu"
|
||||
|
||||
msgid "Skin Designer"
|
||||
msgstr "Skin Designer -ulkoasu"
|
||||
msgstr "Skin Designer -ulkoasut"
|
||||
|
||||
msgid "version"
|
||||
msgstr ""
|
||||
msgstr "versio"
|
||||
|
||||
msgid "or higher"
|
||||
msgstr ""
|
||||
msgstr "tai uudempi"
|
||||
|
||||
msgid "needed"
|
||||
msgstr ""
|
||||
msgstr "vaaditaan"
|
||||
|
||||
msgid "No Git Repsoitory available"
|
||||
msgstr ""
|
||||
msgid "No Git Repository available"
|
||||
msgstr "Git-projekti ei käytettävissä"
|
||||
|
||||
msgid "Skin is running and can't be deleted"
|
||||
msgstr ""
|
||||
msgstr "Käytössä olevaa ulkoasua ei voida poistaa"
|
||||
|
||||
msgid "Really delete skin"
|
||||
msgstr ""
|
||||
msgstr "Poistetaanko ulkoasu"
|
||||
|
||||
msgid "Skin deleted"
|
||||
msgstr ""
|
||||
msgstr "Ulkoasu poistettu"
|
||||
|
||||
msgid "Plugin Setup"
|
||||
msgstr "Yleiset"
|
||||
|
||||
msgid "Maximum number of custom tokens"
|
||||
msgid "Frames per Second to display animations"
|
||||
msgstr ""
|
||||
|
||||
msgid "Maximum number of custom tokens"
|
||||
msgstr "Mukautettujen tokenien maksimimäärä"
|
||||
|
||||
msgid "Reruns"
|
||||
msgstr "Uusinnat"
|
||||
|
||||
msgid "Use Subtitle for reruns"
|
||||
msgstr ""
|
||||
|
||||
msgid "Maximum number of reruns to display"
|
||||
msgstr "Maksimissaan näytettävät uusinnat"
|
||||
msgstr "Näytettävien uusintojen maksimimäärä"
|
||||
|
||||
msgid "Minimum timely distance of rerun (in hours)"
|
||||
msgstr "Minimikesto uusintojen välillä [h]"
|
||||
|
@ -103,22 +112,22 @@ msgid "no limit"
|
|||
msgstr "ei rajoitusta"
|
||||
|
||||
msgid "Image Loading"
|
||||
msgstr "Kuvat"
|
||||
msgstr "Kuvien lataus"
|
||||
|
||||
msgid "Debug Image Loading"
|
||||
msgstr "Debuggaa kuvien latausta"
|
||||
|
||||
msgid "Cache icons, skinparts and logos at start"
|
||||
msgstr ""
|
||||
msgstr "Täytä välimuisti käynnistyessä"
|
||||
|
||||
msgid "Limit Channel Logo Cache"
|
||||
msgstr "Rajoita kanavalogojen välimuistia"
|
||||
|
||||
msgid "Number to cache initially (per size)"
|
||||
msgstr "Oletuksena välimuistissa pidettävät logot"
|
||||
msgstr "Oletuksena välimuistissa pidettävät kuvat"
|
||||
|
||||
msgid "Number to cache in maximum"
|
||||
msgstr "Maksimissaan välimuistissa pidettävät logot"
|
||||
msgstr "Maksimissaan välimuistissa pidettävät kuvat"
|
||||
|
||||
msgid "Cache Statistics"
|
||||
msgstr "Välimuisti"
|
||||
|
@ -133,13 +142,13 @@ msgid "size"
|
|||
msgstr "koko"
|
||||
|
||||
msgid "MB"
|
||||
msgstr ""
|
||||
msgstr "MB"
|
||||
|
||||
msgid "int. memory"
|
||||
msgstr ""
|
||||
msgstr "sisäinen muisti"
|
||||
|
||||
msgid "high level memory"
|
||||
msgstr ""
|
||||
msgstr "korkean tason muisti"
|
||||
|
||||
msgid "logos"
|
||||
msgstr "logo(a)"
|
||||
|
@ -157,25 +166,22 @@ msgid "has no setup"
|
|||
msgstr "ei asetuksia"
|
||||
|
||||
msgid "Install new skins"
|
||||
msgstr ""
|
||||
msgstr "Asenna uusia ulkoasuja"
|
||||
|
||||
msgid "Preview Skin"
|
||||
msgstr ""
|
||||
msgstr "Esikatsele ulkoasu"
|
||||
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
msgstr "Opaste"
|
||||
|
||||
msgid "Preview"
|
||||
msgstr "Esikatsele"
|
||||
|
||||
msgid "Author"
|
||||
msgstr ""
|
||||
msgstr "Tekijä"
|
||||
|
||||
msgid "Used Fonts"
|
||||
msgstr ""
|
||||
msgstr "Käytetyt kirjasimet"
|
||||
|
||||
msgid "Supported Plugins"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "byte"
|
||||
#~ msgstr "tavu(a)"
|
||||
|
||||
#~ msgid "Menu Item display method"
|
||||
#~ msgstr "Valikkorivien esitystapa"
|
||||
msgstr "Tuetut laajennokset"
|
||||
|
|
16
po/it_IT.po
16
po/it_IT.po
|
@ -6,7 +6,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: vdr-skindesigner 0.0.1\n"
|
||||
"Report-Msgid-Bugs-To: <see README>\n"
|
||||
"POT-Creation-Date: 2015-08-14 17:02+0200\n"
|
||||
"POT-Creation-Date: 2020-07-15 13:04+0200\n"
|
||||
"PO-Revision-Date: 2015-08-09 11:02+0200\n"
|
||||
"Last-Translator: fiveten_59\n"
|
||||
"Language-Team: Italian\n"
|
||||
|
@ -45,6 +45,9 @@ msgstr "in serie"
|
|||
msgid "at one go"
|
||||
msgstr "in una volta sola"
|
||||
|
||||
msgid "Updating Skinrepositories"
|
||||
msgstr ""
|
||||
|
||||
msgid "Downloading Skin Screenshots..."
|
||||
msgstr "Downloading Skin Screenshots..."
|
||||
|
||||
|
@ -69,7 +72,7 @@ msgstr "o maggiore"
|
|||
msgid "needed"
|
||||
msgstr "necessario"
|
||||
|
||||
msgid "No Git Repsoitory available"
|
||||
msgid "No Git Repository available"
|
||||
msgstr "Nessun Git Repository disponibile"
|
||||
|
||||
msgid "Skin is running and can't be deleted"
|
||||
|
@ -84,12 +87,18 @@ msgstr "Skin eliminata"
|
|||
msgid "Plugin Setup"
|
||||
msgstr "Plugin Setup"
|
||||
|
||||
msgid "Frames per Second to display animations"
|
||||
msgstr ""
|
||||
|
||||
msgid "Maximum number of custom tokens"
|
||||
msgstr "Numero massimo di token personalizzati"
|
||||
|
||||
msgid "Reruns"
|
||||
msgstr "Riavvii"
|
||||
|
||||
msgid "Use Subtitle for reruns"
|
||||
msgstr ""
|
||||
|
||||
msgid "Maximum number of reruns to display"
|
||||
msgstr "NUmero massimo di riavvii da visualizzare"
|
||||
|
||||
|
@ -165,6 +174,9 @@ msgstr "Anteprima Skin"
|
|||
msgid "Help"
|
||||
msgstr "Aiuto"
|
||||
|
||||
msgid "Preview"
|
||||
msgstr ""
|
||||
|
||||
msgid "Author"
|
||||
msgstr "Autore"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2004-2007 Christian Wieninger
|
||||
/* -*- c++ -*-
|
||||
Copyright (C) 2004-2013 Christian Wieninger
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
@ -24,10 +24,6 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
|
|||
#ifndef EPGSEARCHSERVICES_INC
|
||||
#define EPGSEARCHSERVICES_INC
|
||||
|
||||
// Added by Andreas Mair (mail _AT_ andreas _DOT_ vdr-developer _DOT_ org)
|
||||
#define EPGSEARCH_SEARCHRESULTS_SERVICE_STRING_ID "Epgsearch-searchresults-v1.0"
|
||||
#define EPGSEARCH_LASTCONFLICTINFO_SERVICE_STRING_ID "Epgsearch-lastconflictinfo-v1.0"
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
@ -35,133 +31,172 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
|
|||
#include <vdr/osdbase.h>
|
||||
|
||||
// Data structure for service "Epgsearch-search-v1.0"
|
||||
struct Epgsearch_search_v1_0
|
||||
{
|
||||
struct Epgsearch_search_v1_0 {
|
||||
// in
|
||||
char* query; // search term
|
||||
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
||||
int channelNr; // channel number to search in (0=any)
|
||||
bool useTitle; // search in title
|
||||
bool useSubTitle; // search in subtitle
|
||||
bool useDescription; // search in description
|
||||
char* query; // search term
|
||||
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
||||
int channelNr; // channel number to search in (0=any)
|
||||
bool useTitle; // search in title
|
||||
bool useSubTitle; // search in subtitle
|
||||
bool useDescription; // search in description
|
||||
// out
|
||||
cOsdMenu* pResultMenu; // pointer to the menu of results
|
||||
cOsdMenu* pResultMenu; // pointer to the menu of results
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-exttimeredit-v1.0"
|
||||
struct Epgsearch_exttimeredit_v1_0
|
||||
{
|
||||
struct Epgsearch_exttimeredit_v1_0 {
|
||||
// in
|
||||
cTimer* timer; // pointer to the timer to edit
|
||||
bool bNew; // flag that indicates, if this is a new timer or an existing one
|
||||
const cEvent* event; // pointer to the event corresponding to this timer (may be NULL)
|
||||
cTimer* timer; // pointer to the timer to edit
|
||||
bool bNew; // flag that indicates, if this is a new timer or an existing one
|
||||
const cEvent* event; // pointer to the event corresponding to this timer (may be NULL)
|
||||
// out
|
||||
cOsdMenu* pTimerMenu; // pointer to the menu of results
|
||||
cOsdMenu* pTimerMenu; // pointer to the menu of results
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-enablesearchtimers-v1.0"
|
||||
struct Epgsearch_enablesearchtimers_v1_0 {
|
||||
// in
|
||||
bool enable; // enable search timer thread?
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-updatesearchtimers-v1.0"
|
||||
struct Epgsearch_updatesearchtimers_v1_0
|
||||
{
|
||||
struct Epgsearch_updatesearchtimers_v1_0 {
|
||||
// in
|
||||
bool showMessage; // inform via osd when finished?
|
||||
bool showMessage; // inform via osd when finished?
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-osdmessage-v1.0"
|
||||
struct Epgsearch_osdmessage_v1_0
|
||||
{
|
||||
struct Epgsearch_osdmessage_v1_0 {
|
||||
// in
|
||||
char* message; // the message to display
|
||||
eMessageType type;
|
||||
char* message; // the message to display
|
||||
eMessageType type;
|
||||
};
|
||||
|
||||
// Data structure for service "EpgsearchMenu-v1.0"
|
||||
struct EpgSearchMenu_v1_0
|
||||
{
|
||||
struct EpgSearchMenu_v1_0 {
|
||||
// in
|
||||
// out
|
||||
cOsdMenu* Menu; // pointer to the menu
|
||||
cOsdMenu* Menu; // pointer to the menu
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-lastconflictinfo-v1.0"
|
||||
struct Epgsearch_lastconflictinfo_v1_0
|
||||
{
|
||||
struct Epgsearch_lastconflictinfo_v1_0 {
|
||||
// in
|
||||
// out
|
||||
time_t nextConflict; // next conflict date, 0 if none
|
||||
int relevantConflicts; // number of relevant conflicts
|
||||
int totalConflicts; // total number of conflicts
|
||||
time_t nextConflict; // next conflict date, 0 if none
|
||||
int relevantConflicts; // number of relevant conflicts
|
||||
int totalConflicts; // total number of conflicts
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-searchresults-v1.0"
|
||||
struct Epgsearch_searchresults_v1_0
|
||||
{
|
||||
struct Epgsearch_searchresults_v1_0 {
|
||||
// in
|
||||
char* query; // search term
|
||||
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
||||
int channelNr; // channel number to search in (0=any)
|
||||
bool useTitle; // search in title
|
||||
bool useSubTitle; // search in subtitle
|
||||
bool useDescription; // search in description
|
||||
char* query; // search term
|
||||
int mode; // search mode (0=phrase, 1=and, 2=or, 3=regular expression)
|
||||
int channelNr; // channel number to search in (0=any)
|
||||
bool useTitle; // search in title
|
||||
bool useSubTitle; // search in subtitle
|
||||
bool useDescription; // search in description
|
||||
// out
|
||||
|
||||
class cServiceSearchResult : public cListObject
|
||||
{
|
||||
public:
|
||||
const cEvent* event;
|
||||
cServiceSearchResult(const cEvent* Event) : event(Event) {}
|
||||
};
|
||||
class cServiceSearchResult : public cListObject
|
||||
{
|
||||
public:
|
||||
const cEvent* event;
|
||||
cServiceSearchResult(const cEvent* Event) : event(Event) {}
|
||||
};
|
||||
|
||||
cList<cServiceSearchResult>* pResultList; // pointer to the results
|
||||
cList<cServiceSearchResult>* pResultList; // pointer to the results
|
||||
};
|
||||
|
||||
// Data structure for service "Epgsearch-switchtimer-v1.0"
|
||||
struct Epgsearch_switchtimer_v1_0
|
||||
{
|
||||
struct Epgsearch_switchtimer_v1_0 {
|
||||
// in
|
||||
const cEvent* event;
|
||||
int mode; // mode (0=query existance, 1=add/modify, 2=delete)
|
||||
const cEvent* event;
|
||||
int mode; // mode (0=query existence, 1=add/modify, 2=delete)
|
||||
// in/out
|
||||
int switchMinsBefore;
|
||||
int announceOnly;
|
||||
// out
|
||||
bool success; // result
|
||||
int switchMinsBefore;
|
||||
int announceOnly;
|
||||
// out
|
||||
bool success; // result
|
||||
};
|
||||
|
||||
// Data structures for service "Epgsearch-services-v1.0"
|
||||
class cServiceHandler
|
||||
{
|
||||
public:
|
||||
virtual std::list<std::string> SearchTimerList() = 0;
|
||||
// returns a list of search timer entries in the same format as used in epgsearch.conf
|
||||
virtual int AddSearchTimer(const std::string&) = 0;
|
||||
// adds a new search timer and returns its ID (-1 on error)
|
||||
virtual bool ModSearchTimer(const std::string&) = 0;
|
||||
// edits an existing search timer and returns success
|
||||
virtual bool DelSearchTimer(int) = 0;
|
||||
// deletes search timer with given ID and returns success
|
||||
virtual std::list<std::string> QuerySearchTimer(int) = 0;
|
||||
// returns the search result of the searchtimer with given ID in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
||||
virtual std::list<std::string> QuerySearch(std::string) = 0;
|
||||
// returns the search result of the searchtimer with given settings in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
||||
virtual std::list<std::string> ExtEPGInfoList() = 0;
|
||||
// returns a list of extended EPG categories in the same format as used in epgsearchcats.conf
|
||||
virtual std::list<std::string> ChanGrpList() = 0;
|
||||
// returns a list of channel groups maintained by epgsearch
|
||||
virtual std::list<std::string> BlackList() = 0;
|
||||
// returns a list of blacklists in the same format as used in epgsearchblacklists.conf
|
||||
virtual std::set<std::string> DirectoryList() = 0;
|
||||
// List of all recording directories used in recordings, timers, search timers or in epgsearchdirs.conf
|
||||
virtual ~cServiceHandler() {}
|
||||
// Read a setup value
|
||||
virtual std::string ReadSetupValue(const std::string& entry) = 0;
|
||||
// Write a setup value
|
||||
virtual bool WriteSetupValue(const std::string& entry, const std::string& value) = 0;
|
||||
public:
|
||||
virtual std::list<std::string> SearchTimerList() = 0;
|
||||
// returns a list of search timer entries in the same format as used in epgsearch.conf
|
||||
virtual int AddSearchTimer(const std::string&) = 0;
|
||||
// adds a new search timer and returns its ID (-1 on error)
|
||||
virtual bool ModSearchTimer(const std::string&) = 0;
|
||||
// edits an existing search timer and returns success
|
||||
virtual bool DelSearchTimer(int) = 0;
|
||||
// deletes search timer with given ID and returns success
|
||||
virtual std::list<std::string> QuerySearchTimer(int) = 0;
|
||||
// returns the search result of the searchtimer with given ID in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
||||
virtual std::list<std::string> QuerySearch(std::string) = 0;
|
||||
// returns the search result of the searchtimer with given settings in the same format as used in SVDRP command 'QRYS' (->MANUAL)
|
||||
virtual std::list<std::string> ExtEPGInfoList() = 0;
|
||||
// returns a list of extended EPG categories in the same format as used in epgsearchcats.conf
|
||||
virtual std::list<std::string> ChanGrpList() = 0;
|
||||
// returns a list of channel groups maintained by epgsearch
|
||||
virtual std::list<std::string> BlackList() = 0;
|
||||
// returns a list of blacklists in the same format as used in epgsearchblacklists.conf
|
||||
virtual std::set<std::string> DirectoryList() = 0;
|
||||
// List of all recording directories used in recordings, timers, search timers or in epgsearchdirs.conf
|
||||
virtual ~cServiceHandler() {}
|
||||
// Read a setup value
|
||||
virtual std::string ReadSetupValue(const std::string& entry) = 0;
|
||||
// Write a setup value
|
||||
virtual bool WriteSetupValue(const std::string& entry, const std::string& value) = 0;
|
||||
};
|
||||
|
||||
struct Epgsearch_services_v1_0
|
||||
{
|
||||
struct Epgsearch_services_v1_0 {
|
||||
// in/out
|
||||
std::unique_ptr<cServiceHandler> handler;
|
||||
#if __cplusplus < 201103L
|
||||
std::auto_ptr<cServiceHandler> handler;
|
||||
#else
|
||||
std::unique_ptr<cServiceHandler> handler;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Data structures for service "Epgsearch-services-v1.1"
|
||||
class cServiceHandler_v1_1 : public cServiceHandler
|
||||
{
|
||||
public:
|
||||
// Get timer conflicts
|
||||
virtual std::list<std::string> TimerConflictList(bool relOnly = false) = 0;
|
||||
// Check if a conflict check is advised
|
||||
virtual bool IsConflictCheckAdvised() = 0;
|
||||
};
|
||||
|
||||
struct Epgsearch_services_v1_1 {
|
||||
// in/out
|
||||
#if __cplusplus < 201103L
|
||||
std::auto_ptr<cServiceHandler_v1_1> handler;
|
||||
#else
|
||||
std::unique_ptr<cServiceHandler_v1_1> handler;
|
||||
#endif
|
||||
};
|
||||
|
||||
// Data structures for service "Epgsearch-services-v1.2"
|
||||
class cServiceHandler_v1_2 : public cServiceHandler_v1_1
|
||||
{
|
||||
public:
|
||||
// List of all recording directories used in recordings, timers (and optionally search timers or in epgsearchdirs.conf)
|
||||
virtual std::set<std::string> ShortDirectoryList() = 0;
|
||||
// Evaluate an expression against an event
|
||||
virtual std::string Evaluate(const std::string& expr, const cEvent* event) = 0;
|
||||
};
|
||||
|
||||
struct Epgsearch_services_v1_2 {
|
||||
// in/out
|
||||
#if __cplusplus < 201103L
|
||||
std::auto_ptr<cServiceHandler_v1_2> handler;
|
||||
#else
|
||||
std::unique_ptr<cServiceHandler_v1_2> handler;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
* service.h: EPG2VDR plugin for the Video Disk Recorder
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SERVICE_H_
|
||||
#define _SERVICE_H_
|
||||
|
||||
#include <vdr/timers.h>
|
||||
#include <vdr/epg.h>
|
||||
|
||||
#include <list>
|
||||
|
||||
//***************************************************************************
|
||||
// Timer - Skin Interface
|
||||
//***************************************************************************
|
||||
|
||||
class cEpgTimer_Interface_V1 : public cTimer
|
||||
{
|
||||
public:
|
||||
|
||||
enum TimerType
|
||||
{
|
||||
ttRecord = 'R', // Aufnahme-Timer
|
||||
ttView = 'V', // Umschalt-Timer
|
||||
ttSearch = 'S' // Such-Timer
|
||||
};
|
||||
|
||||
cEpgTimer_Interface_V1(bool Instant = false, bool Pause = false, const cChannel* Channel = 0)
|
||||
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
|
||||
: cTimer(Instant, Pause, Channel) {}
|
||||
#else
|
||||
: cTimer(Instant, Pause, (cChannel*)Channel) {}
|
||||
#endif
|
||||
|
||||
long TimerId() const { return timerid; }
|
||||
long EventId() const { return eventid; }
|
||||
const char* VdrName() const { return vdrName ? vdrName : ""; }
|
||||
const char* VdrUuid() const { return vdrUuid ? vdrUuid : ""; }
|
||||
int isVdrRunning() const { return vdrRunning; }
|
||||
int isLocal() const { return local; }
|
||||
int isRemote() const { return !isLocal(); }
|
||||
int isRecordTimer() const { return type == ttRecord; }
|
||||
int isSwithTimer() const { return type == ttView; }
|
||||
char State() const { return state; }
|
||||
int hasState(char s) const { return state == s; }
|
||||
const char* StateInfo() const { return stateInfo ? stateInfo : ""; }
|
||||
char Action() const { return action; }
|
||||
char Type() const { return type; }
|
||||
time_t CreateTime() const { return createTime; }
|
||||
time_t ModTime() const { return modTime; }
|
||||
|
||||
protected:
|
||||
|
||||
long timerid;
|
||||
long eventid;
|
||||
|
||||
char* vdrName;
|
||||
char* vdrUuid;
|
||||
int local;
|
||||
int vdrRunning;
|
||||
|
||||
char state;
|
||||
char* stateInfo;
|
||||
char action;
|
||||
|
||||
char type;
|
||||
time_t createTime;
|
||||
time_t modTime;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
// Timer Service
|
||||
//***************************************************************************
|
||||
|
||||
struct cEpgTimer_Service_V1
|
||||
{
|
||||
std::list<cEpgTimer_Interface_V1*> epgTimers;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
// Timer Detail Service
|
||||
//***************************************************************************
|
||||
|
||||
struct cTimer_Detail_V1
|
||||
{
|
||||
long eventid;
|
||||
int hastimer;
|
||||
int local;
|
||||
char type;
|
||||
};
|
||||
|
||||
#define EPG2VDR_TIMER_DETAIL_SERVICE "Epg2Vdr_Timer_Detail_Service-v1.0"
|
||||
#define EPG2VDR_TIMER_SERVICE "Epg2Vdr_Timer_Service-v1.0"
|
||||
|
||||
#ifdef EPG2VDR
|
||||
|
||||
//***************************************************************************
|
||||
//***************************************************************************
|
||||
//***************************************************************************
|
||||
// EPG2VDR Internal Stuff
|
||||
//***************************************************************************
|
||||
|
||||
//***************************************************************************
|
||||
// Class cEpgTimer
|
||||
//***************************************************************************
|
||||
|
||||
class cEpgTimer : public cEpgTimer_Interface_V1
|
||||
{
|
||||
public:
|
||||
|
||||
cEpgTimer(bool Instant = false, bool Pause = false, const cChannel* Channel = 0);
|
||||
virtual ~cEpgTimer();
|
||||
|
||||
void setTimerId(long id) { timerid = id; }
|
||||
void setEventId(long id) { eventid = id; }
|
||||
void setAction(char a) { action = a; }
|
||||
void setType(char t) { type = t; }
|
||||
void setCreateTime(time_t t) { createTime = t; }
|
||||
void setModTime(time_t t) { modTime = t; }
|
||||
void setState(char s, const char* info);
|
||||
void setVdr(const char* name, const char* uuid = 0, int running = 0);
|
||||
};
|
||||
|
||||
#endif // EPG2VDR
|
||||
|
||||
//***************************************************************************
|
||||
|
||||
#endif // _SERVICE_H_
|
23
setup.c
23
setup.c
|
@ -119,6 +119,8 @@ eOSState cInstallManager::ProcessInstallationStatus(void) {
|
|||
}
|
||||
|
||||
// --- cSkinDesignerSetup -----------------------------------------------------------
|
||||
bool cSkinDesignerSetup::skinrepoUpdated = false;
|
||||
|
||||
cSkinDesignerSetup::cSkinDesignerSetup(skindesignerapi::cPluginStructure *skinPreviewStruct) {
|
||||
this->skinPreviewStruct = skinPreviewStruct;
|
||||
numLogosPerSizeInitial = config.numLogosPerSizeInitial;
|
||||
|
@ -126,12 +128,21 @@ cSkinDesignerSetup::cSkinDesignerSetup(skindesignerapi::cPluginStructure *skinPr
|
|||
limitLogoCache = config.limitLogoCache;
|
||||
numLogosMax = config.numLogosMax;
|
||||
debugImageLoading = config.debugImageLoading;
|
||||
useSubtitleRerun = config.useSubtitleRerun;
|
||||
rerunAmount = config.rerunAmount;
|
||||
rerunDistance = config.rerunDistance;
|
||||
rerunMaxChannel = config.rerunMaxChannel;
|
||||
numCustomTokens = config.numCustomTokens;
|
||||
FPS = config.FPS;
|
||||
menuDisplayStyle[0] = tr("after one another");
|
||||
menuDisplayStyle[1] = tr("at one go");
|
||||
#ifndef DO_NOT_USE_SKININSTALLER
|
||||
if (!skinrepoUpdated) {
|
||||
Skins.Message(mtStatus, *cString::sprintf("%s...", tr("Updating Skinrepositories")));
|
||||
skinrepoUpdated = true;
|
||||
config.ReadSkinRepos();
|
||||
}
|
||||
#endif
|
||||
Setup();
|
||||
}
|
||||
|
||||
|
@ -231,7 +242,7 @@ eOSState cSkinDesignerSetup::ProcessKey(eKeys Key) {
|
|||
}
|
||||
Skins.Message(mtStatus, *cString::sprintf("%s ...", tr("Updating Skin from Git")));
|
||||
} else {
|
||||
Skins.Message(mtStatus, tr("No Git Repsoitory available"));
|
||||
Skins.Message(mtStatus, tr("No Git Repository available"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -259,10 +270,12 @@ void cSkinDesignerSetup::Store(void) {
|
|||
config.limitLogoCache = limitLogoCache;
|
||||
config.numLogosMax = numLogosMax;
|
||||
config.debugImageLoading = debugImageLoading;
|
||||
config.useSubtitleRerun = useSubtitleRerun;
|
||||
config.rerunAmount = rerunAmount;
|
||||
config.rerunDistance = rerunDistance;
|
||||
config.rerunMaxChannel = rerunMaxChannel;
|
||||
config.numCustomTokens = numCustomTokens;
|
||||
config.FPS = FPS;
|
||||
|
||||
config.InitSetupIterator();
|
||||
cSkinSetup *skinSetup = NULL;
|
||||
|
@ -283,10 +296,12 @@ void cSkinDesignerSetup::Store(void) {
|
|||
SetupStore("LimitChannelLogoCache", limitLogoCache);
|
||||
SetupStore("NumberLogosInitially", numLogosPerSizeInitial);
|
||||
SetupStore("NumberLogosMax", numLogosMax);
|
||||
SetupStore("UseSubtitleRerun", useSubtitleRerun);
|
||||
SetupStore("RerunAmount", rerunAmount);
|
||||
SetupStore("RerunDistance", rerunDistance);
|
||||
SetupStore("RerunMaxChannel", rerunMaxChannel);
|
||||
SetupStore("NumCustomTokens", numCustomTokens);
|
||||
SetupStore("FPS", FPS);
|
||||
}
|
||||
|
||||
cOsdItem *cSkinDesignerSetup::InfoItem(const char *label) {
|
||||
|
@ -299,9 +314,11 @@ cOsdItem *cSkinDesignerSetup::InfoItem(const char *label) {
|
|||
void cSkinDesignerSetup::PluginSetup(void) {
|
||||
Add(InfoItem(tr("Plugin Setup")));
|
||||
|
||||
Add(new cMenuEditIntItem(tr("Frames per Second to display animations"), &FPS, 10, 60));
|
||||
Add(new cMenuEditIntItem(tr("Maximum number of custom tokens"), &numCustomTokens, 0, 100));
|
||||
|
||||
Add(InfoItem(tr("Reruns")));
|
||||
Add(new cMenuEditBoolItem(tr("Use Subtitle for reruns"), &useSubtitleRerun));
|
||||
Add(new cMenuEditIntItem(tr("Maximum number of reruns to display"), &rerunAmount, 1, 100));
|
||||
Add(new cMenuEditIntItem(tr("Minimum timely distance of rerun (in hours)"), &rerunDistance, 0, 1000));
|
||||
Add(new cMenuEditIntItem(tr("Limit Channel Numbers"), &rerunMaxChannel, 0, 1000, tr("no limit")));
|
||||
|
@ -441,7 +458,7 @@ eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
|
|||
}
|
||||
Skins.Message(mtStatus, *cString::sprintf("%s ...", tr("Updating Skin from Git")));
|
||||
} else {
|
||||
Skins.Message(mtStatus, tr("No Git Repsoitory available"));
|
||||
Skins.Message(mtStatus, tr("No Git Repository available"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -528,7 +545,7 @@ void cSkindesignerSkinSetup::ShowButtons(int current, bool force) {
|
|||
// --- cSkindesignerSkinPreview -----------------------------------------------------------
|
||||
|
||||
cSkindesignerSkinPreview::cSkindesignerSkinPreview(string skin, skindesignerapi::cPluginStructure *plugStruct) :
|
||||
cSkindesignerOsdMenu(plugStruct, *cString::sprintf("%s: %s \"%s\"", trVDR("Preview"), tr("Skin"), skin.c_str())) {
|
||||
cSkindesignerOsdMenu(plugStruct, *cString::sprintf("%s: %s \"%s\"", tr("Preview"), tr("Skin"), skin.c_str())) {
|
||||
currentSkin = skin;
|
||||
FirstCallCleared();
|
||||
Set();
|
||||
|
|
5
setup.h
5
setup.h
|
@ -38,16 +38,19 @@ public:
|
|||
// --- cSkinDesignerSetup -----------------------------------------------------------
|
||||
class cSkinDesignerSetup : public cMenuSetupPage, cInstallManager {
|
||||
private:
|
||||
static bool skinrepoUpdated;
|
||||
skindesignerapi::cPluginStructure *skinPreviewStruct;
|
||||
int numLogosPerSizeInitial;
|
||||
int cacheImagesInitial;
|
||||
int limitLogoCache;
|
||||
int numLogosMax;
|
||||
int debugImageLoading;
|
||||
int useSubtitleRerun;
|
||||
int rerunAmount;
|
||||
int rerunDistance;
|
||||
int rerunMaxChannel;
|
||||
int numCustomTokens;
|
||||
int FPS;
|
||||
const char *menuDisplayStyle[2];
|
||||
void Setup(void);
|
||||
virtual void Store(void);
|
||||
|
@ -122,4 +125,4 @@ public:
|
|||
static void DefineTokens(skindesignerapi::cTokenContainer *tk);
|
||||
void Display(void);
|
||||
};
|
||||
#endif //__SKINDESIGNER_SETUP_H
|
||||
#endif //__SKINDESIGNER_SETUP_H
|
||||
|
|
|
@ -7,19 +7,20 @@
|
|||
*/
|
||||
#include <getopt.h>
|
||||
#include <vdr/plugin.h>
|
||||
#include <vdr/device.h>
|
||||
|
||||
#define DEFINE_CONFIG 1
|
||||
#include "config.h"
|
||||
#include "designer.h"
|
||||
#include "setup.h"
|
||||
#include "libskindesignerapi/skindesignerapi.h"
|
||||
#include "extensions/globaltimers.h"
|
||||
|
||||
#if defined(APIVERSNUM) && APIVERSNUM < 20200
|
||||
#error "VDR-2.2.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
|
||||
static const char *VERSION = "1.0.2";
|
||||
static const char *VERSION = "1.2.18";
|
||||
static const char *DESCRIPTION = trNOOP("Skin Designer");
|
||||
|
||||
class cPluginSkinDesigner : public cPlugin, public skindesignerapi::SkindesignerAPI {
|
||||
|
@ -111,8 +112,9 @@ bool cPluginSkinDesigner::Initialize(void) {
|
|||
bool cPluginSkinDesigner::Start(void) {
|
||||
cXmlParser::InitLibXML();
|
||||
cImageImporterSVG::InitLibRSVG();
|
||||
cGlobalTimers::StartRefreshThread();
|
||||
bool trueColorAvailable = true;
|
||||
|
||||
|
||||
if (!cOsdProvider::SupportsTrueColor()) {
|
||||
esyslog("skindesigner: No TrueColor OSD found! Using default Skin LCARS!");
|
||||
trueColorAvailable = false;
|
||||
|
@ -151,11 +153,13 @@ bool cPluginSkinDesigner::Start(void) {
|
|||
}
|
||||
config.TranslateSetup();
|
||||
config.SetSkinSetupParameters();
|
||||
config.ReadSkinRepos();
|
||||
|
||||
if (!skinAvailable) {
|
||||
esyslog("skindesigner: no skins found! Using default Skin LCARS!");
|
||||
}
|
||||
#ifdef USE_ZAPCOCKPIT
|
||||
dsyslog("skindesigner: zapcockpit patch available");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -164,12 +168,28 @@ void cPluginSkinDesigner::Stop(void) {
|
|||
delete fontManager;
|
||||
delete plgManager;
|
||||
cXmlParser::CleanupLibXML();
|
||||
cGlobalTimers::StopRefreshThread();
|
||||
}
|
||||
|
||||
void cPluginSkinDesigner::Housekeeping(void) {
|
||||
}
|
||||
|
||||
void cPluginSkinDesigner::MainThreadHook(void) {
|
||||
int w, h;
|
||||
double a;
|
||||
static int mode;
|
||||
cDevice::PrimaryDevice()->GetVideoSize(w, h, a);
|
||||
|
||||
if (!w && !h && !mode) {
|
||||
mode = 1;
|
||||
config.mode_changed = 1;
|
||||
dsyslog("skindesigner: w %d h %d mode changed to %d\n", w, h, mode);
|
||||
}
|
||||
else if (w && h && mode) {
|
||||
mode = 0;
|
||||
config.mode_changed = 1;
|
||||
dsyslog("skindesigner: w %d h %d mode changed to %d\n", w, h, mode);
|
||||
}
|
||||
}
|
||||
|
||||
cString cPluginSkinDesigner::Active(void) {
|
||||
|
@ -216,10 +236,11 @@ const char **cPluginSkinDesigner::SVDRPHelpPages(void) {
|
|||
}
|
||||
|
||||
cString cPluginSkinDesigner::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) {
|
||||
|
||||
|
||||
cSkinDesigner *activeSkin = NULL;
|
||||
cSkinDesigner *availableSkin = NULL;
|
||||
config.InitSkinRefsIterator();
|
||||
int result = 0;
|
||||
while (availableSkin = config.GetNextSkinRef()) {
|
||||
string activeSkinName = Setup.OSDSkin;
|
||||
string currentSkinName = availableSkin->Description();
|
||||
|
@ -235,6 +256,10 @@ cString cPluginSkinDesigner::SVDRPCommand(const char *Command, const char *Optio
|
|||
}
|
||||
|
||||
if (strcasecmp(Command, "RELD") == 0) {
|
||||
if (!activeSkin->Initialized()) {
|
||||
ReplyCode = 503;
|
||||
return "SKINDESIGNER reload of templates and caches failed: initialization not finished.";
|
||||
}
|
||||
config.ClearSkinSetups();
|
||||
config.InitSkinIterator();
|
||||
string skin = "";
|
||||
|
@ -243,9 +268,21 @@ cString cPluginSkinDesigner::SVDRPCommand(const char *Command, const char *Optio
|
|||
}
|
||||
config.TranslateSetup();
|
||||
config.SetSkinSetupParameters();
|
||||
activeSkin->Reload();
|
||||
ReplyCode = 250;
|
||||
return "SKINDESIGNER reload of templates and caches forced.";
|
||||
result = activeSkin->Reload();
|
||||
switch (result) {
|
||||
case 0:
|
||||
ReplyCode = 250;
|
||||
return "SKINDESIGNER reload of templates and caches forced.";
|
||||
case 1:
|
||||
ReplyCode = 501;
|
||||
return "SKINDESIGNER reload of templates and caches failed: error during loading - using LCARS as backup.";
|
||||
case 2:
|
||||
ReplyCode = 503;
|
||||
return "SKINDESIGNER reload of templates and caches failed: OSD is open, close first.";
|
||||
default:
|
||||
ReplyCode = 500;
|
||||
return "SKINDESIGNER reload of templates and caches failed: unknown reason (check code).";
|
||||
};
|
||||
} else if (strcasecmp(Command, "DLIC") == 0) {
|
||||
if (imgCache)
|
||||
delete imgCache;
|
||||
|
|
|
@ -21,274 +21,499 @@
|
|||
<token name="tr(reruns)">
|
||||
<trans lang="en_EN">Reruns</trans>
|
||||
<trans lang="de_DE">Wiederholungen</trans>
|
||||
<trans lang="fi_FI">Uusinnat</trans>
|
||||
<trans lang="hu_HU">Ismétlés</trans>
|
||||
<trans lang="it_IT">Repliche</trans>
|
||||
</token>
|
||||
<token name="tr(rerunsof)">
|
||||
<trans lang="en_EN">Reruns of</trans>
|
||||
<trans lang="de_DE">Wiederholungen von</trans>
|
||||
<trans lang="fi_FI">Uusinnat:</trans>
|
||||
<trans lang="hu_HU">Ismétlés:</trans>
|
||||
<trans lang="it_IT">Repliche:</trans>
|
||||
</token>
|
||||
<token name="tr(actors)">
|
||||
<trans lang="en_EN">Actors</trans>
|
||||
<trans lang="de_DE">Schauspieler</trans>
|
||||
<trans lang="fi_FI">Näyttelijät</trans>
|
||||
<trans lang="hu_HU">Szereplők</trans>
|
||||
<trans lang="it_IT">Attori</trans>
|
||||
</token>
|
||||
<token name="tr(episode)">
|
||||
<trans lang="en_EN">Episode</trans>
|
||||
<trans lang="de_DE">Folge</trans>
|
||||
<trans lang="fi_FI">Jakso</trans>
|
||||
<trans lang="hu_HU">Epizód</trans>
|
||||
<trans lang="it_IT">Episodio</trans>
|
||||
</token>
|
||||
<token name="tr(season)">
|
||||
<trans lang="en_EN">Season</trans>
|
||||
<trans lang="de_DE">Staffel</trans>
|
||||
<trans lang="fi_FI">Kausi</trans>
|
||||
<trans lang="hu_HU">Évad</trans>
|
||||
<trans lang="it_IT">Stagione</trans>
|
||||
</token>
|
||||
<token name="tr(gueststars)">
|
||||
<trans lang="en_EN">Guest Stars</trans>
|
||||
<trans lang="de_DE">Gaststars</trans>
|
||||
<trans lang="fi_FI">Vierailevat tähdet</trans>
|
||||
<trans lang="hu_HU">Vendégszereplők</trans>
|
||||
<trans lang="it_IT">Guest Stars</trans>
|
||||
</token>
|
||||
<token name="tr(seriesfirstaired)">
|
||||
<trans lang="en_EN">Series First Aired</trans>
|
||||
<trans lang="de_DE">Erstausstrahlung der Serie</trans>
|
||||
<trans lang="fi_FI">Sarjan ensiesitys</trans>
|
||||
<trans lang="hu_HU">A sorozat bemutatása</trans>
|
||||
<trans lang="it_IT">Prima uscita della serie</trans>
|
||||
</token>
|
||||
<token name="tr(episodefirstaired)">
|
||||
<trans lang="en_EN">Episode First Aired</trans>
|
||||
<trans lang="de_DE">Erstausstrahlung der Episode</trans>
|
||||
<trans lang="fi_FI">Jakson ensiesitys</trans>
|
||||
<trans lang="hu_HU">Az epizód bemutatása</trans>
|
||||
<trans lang="it_IT">Prima uscita dell'episodio</trans>
|
||||
</token>
|
||||
<token name="tr(network)">
|
||||
<trans lang="en_EN">Network</trans>
|
||||
<trans lang="de_DE">TV Station</trans>
|
||||
<trans lang="fi_FI">TV-kanava</trans>
|
||||
<trans lang="hu_HU">TV csatorna</trans>
|
||||
<trans lang="it_IT">Bouquet</trans>
|
||||
</token>
|
||||
<token name="tr(genre)">
|
||||
<trans lang="en_EN">Genre</trans>
|
||||
<trans lang="de_DE">Genre</trans>
|
||||
<trans lang="fi_FI">Genre</trans>
|
||||
<trans lang="hu_HU">Műfaj</trans>
|
||||
<trans lang="it_IT">Genere</trans>
|
||||
</token>
|
||||
<token name="tr(status)">
|
||||
<trans lang="en_EN">Status</trans>
|
||||
<trans lang="de_DE">Status</trans>
|
||||
<trans lang="fi_FI">Status</trans>
|
||||
<trans lang="hu_HU">Állapot</trans>
|
||||
<trans lang="it_IT">Stato</trans>
|
||||
</token>
|
||||
<token name="tr(rating)">
|
||||
<trans lang="en_EN">Rating</trans>
|
||||
<trans lang="de_DE">Bewertung</trans>
|
||||
<trans lang="fi_FI">Luokitus</trans>
|
||||
<trans lang="hu_HU">Korhatár</trans>
|
||||
<trans lang="it_IT">Voto</trans>
|
||||
</token>
|
||||
<token name="tr(episoderating)">
|
||||
<trans lang="en_EN">Episode Rating</trans>
|
||||
<trans lang="de_DE">Bewertung der Folge</trans>
|
||||
<trans lang="fi_FI">Jakson luokitus</trans>
|
||||
<trans lang="hu_HU">Az epizód korhatára</trans>
|
||||
<trans lang="it_IT">Voto episodio</trans>
|
||||
</token>
|
||||
<token name="tr(recinfo)">
|
||||
<trans lang="en_EN">Recording Information</trans>
|
||||
<trans lang="de_DE">Aufnahme Informationen</trans>
|
||||
<trans lang="fi_FI">Tallenteen tiedot</trans>
|
||||
<trans lang="hu_HU">Felvétel információk</trans>
|
||||
<trans lang="it_IT">Informazione registrazione</trans>
|
||||
</token>
|
||||
<token name="tr(seriesgalery)">
|
||||
<trans lang="en_EN">Series Galery</trans>
|
||||
<trans lang="de_DE">Serien Galerie</trans>
|
||||
<trans lang="fi_FI">Sarjagalleria</trans>
|
||||
<trans lang="hu_HU">Sorozat galériája</trans>
|
||||
<trans lang="it_IT">Catalogo Serie</trans>
|
||||
</token>
|
||||
<token name="tr(moviegalery)">
|
||||
<trans lang="en_EN">Movie Galery</trans>
|
||||
<trans lang="de_DE">Spielfilm Galerie</trans>
|
||||
<trans lang="fi_FI">Elokuvagalleria</trans>
|
||||
<trans lang="hu_HU">Film galériája</trans>
|
||||
<trans lang="it_IT">Catalogo Film</trans>
|
||||
</token>
|
||||
<token name="tr(originaltitle)">
|
||||
<trans lang="en_EN">Original Title</trans>
|
||||
<trans lang="de_DE">Originaltitel</trans>
|
||||
<trans lang="fi_FI">Alkuperäinen nimike</trans>
|
||||
<trans lang="hu_HU">Eredeti cím</trans>
|
||||
<trans lang="it_IT">Titolo originale</trans>
|
||||
</token>
|
||||
<token name="tr(budget)">
|
||||
<trans lang="en_EN">Budget</trans>
|
||||
<trans lang="de_DE">Budget</trans>
|
||||
<trans lang="fi_FI">Budjetti</trans>
|
||||
<trans lang="hu_HU">Költségvetés</trans>
|
||||
<trans lang="it_IT">Budget</trans>
|
||||
</token>
|
||||
<token name="tr(revenue)">
|
||||
<trans lang="en_EN">Revenue</trans>
|
||||
<trans lang="de_DE">Einnahmen</trans>
|
||||
<trans lang="fi_FI">Tuotto</trans>
|
||||
<trans lang="hu_HU">Bevétel</trans>
|
||||
<trans lang="it_IT">Incassi</trans>
|
||||
</token>
|
||||
<token name="tr(adult)">
|
||||
<trans lang="en_EN">Adult</trans>
|
||||
<trans lang="de_DE">Nur für Erwachsene</trans>
|
||||
<trans lang="fi_FI">Vain aikuisille</trans>
|
||||
<trans lang="hu_HU">Felnőtt</trans>
|
||||
<trans lang="it_IT">Adulto</trans>
|
||||
</token>
|
||||
<token name="tr(releasedate)">
|
||||
<trans lang="en_EN">Release Date</trans>
|
||||
<trans lang="de_DE">Erscheinungsdatum</trans>
|
||||
<trans lang="fi_FI">Julkaisupäivämäärä</trans>
|
||||
<trans lang="hu_HU">Megjelenés Dátuma</trans>
|
||||
<trans lang="it_IT">Data di produzione</trans>
|
||||
</token>
|
||||
<token name="tr(runtime)">
|
||||
<trans lang="en_EN">Runtime</trans>
|
||||
<trans lang="de_DE">Laufzeit</trans>
|
||||
<trans lang="fi_FI">Kesto</trans>
|
||||
<trans lang="hu_HU">Hossz</trans>
|
||||
<trans lang="it_IT">Durata</trans>
|
||||
</token>
|
||||
<token name="tr(popularity)">
|
||||
<trans lang="en_EN">Popularity</trans>
|
||||
<trans lang="de_DE">Popularität</trans>
|
||||
<trans lang="fi_FI">Suosio</trans>
|
||||
<trans lang="hu_HU">Népszerűség</trans>
|
||||
<trans lang="it_IT">Popolarità</trans>
|
||||
</token>
|
||||
<token name="tr(voteaverage)">
|
||||
<trans lang="en_EN">Vote Average</trans>
|
||||
<trans lang="de_DE">Durchschnittliche Wertung</trans>
|
||||
<trans lang="fi_FI">Keskimääräinen arvosana</trans>
|
||||
<trans lang="hu_HU">Szavazatok átlaga</trans>
|
||||
<trans lang="it_IT">Voto medio</trans>
|
||||
</token>
|
||||
<token name="tr(homepage)">
|
||||
<trans lang="en_EN">Homepage</trans>
|
||||
<trans lang="de_DE">Homepage</trans>
|
||||
<trans lang="fi_FI">Kotisivu</trans>
|
||||
<trans lang="hu_HU">Honlap</trans>
|
||||
<trans lang="it_IT">Homepage</trans>
|
||||
</token>
|
||||
<token name="tr(recsize)">
|
||||
<trans lang="en_EN">Recording size</trans>
|
||||
<trans lang="de_DE">Größe der Aufnahme</trans>
|
||||
<trans lang="fi_FI">Tallenteen koko</trans>
|
||||
<trans lang="hu_HU">Felvétel mérete</trans>
|
||||
<trans lang="it_IT">Dimensione registrazione</trans>
|
||||
</token>
|
||||
<token name="tr(recsizecutted)">
|
||||
<trans lang="en_EN">Cutted Recording Size</trans>
|
||||
<trans lang="de_DE">Größe der geschnittenen Aufnahme</trans>
|
||||
<trans lang="fi_FI">Leikatun tallenteen koko</trans>
|
||||
<trans lang="hu_HU">Vágott felvétel mérete</trans>
|
||||
<trans lang="it_IT">Dimensione registrazione tagliata</trans>
|
||||
</token>
|
||||
<token name="tr(reclength)">
|
||||
<trans lang="en_EN">Recording Length</trans>
|
||||
<trans lang="de_DE">Länge der Aufnahme</trans>
|
||||
<trans lang="fi_FI">Tallenteen pituus</trans>
|
||||
<trans lang="hu_HU">Felvétel hossza</trans>
|
||||
<trans lang="it_IT">Lunghezza registrazione</trans>
|
||||
</token>
|
||||
<token name="tr(reclengthcutted)">
|
||||
<trans lang="en_EN">Cutted Recording Length</trans>
|
||||
<trans lang="de_DE">Länge der geschnittenen Aufnahme</trans>
|
||||
<trans lang="fi_FI">Leikatun tallenteen pituus</trans>
|
||||
<trans lang="hu_HU">Vágott felvétel hossza</trans>
|
||||
<trans lang="it_IT">Lunghezza registrazione tagliata</trans>
|
||||
</token>
|
||||
<token name="tr(bitrate)">
|
||||
<trans lang="en_EN">Bit Rate</trans>
|
||||
<trans lang="de_DE">Bitrate</trans>
|
||||
<trans lang="fi_FI">Bittinopeus</trans>
|
||||
<trans lang="hu_HU">Bitráta</trans>
|
||||
<trans lang="it_IT">Bit rate</trans>
|
||||
</token>
|
||||
<token name="tr(format)">
|
||||
<trans lang="en_EN">Format</trans>
|
||||
<trans lang="de_DE">Format</trans>
|
||||
<trans lang="fi_FI">Formaatti</trans>
|
||||
<trans lang="hu_HU">Formátum</trans>
|
||||
<trans lang="it_IT">Formato</trans>
|
||||
</token>
|
||||
<token name="tr(errors)">
|
||||
<trans lang="en_EN">Errors</trans>
|
||||
<trans lang="de_DE">Fehler</trans>
|
||||
<trans lang="fi_FI">Virhe</trans>
|
||||
<trans lang="hu_HU">Hiba</trans>
|
||||
<trans lang="it_IT">Errore</trans>
|
||||
</token>
|
||||
<token name="tr(searchtimer)">
|
||||
<trans lang="en_EN">Searchtimer</trans>
|
||||
<trans lang="de_DE">Suchtimer</trans>
|
||||
<trans lang="fi_FI">Hakuajastin</trans>
|
||||
<trans lang="hu_HU">Időzítő kereső</trans>
|
||||
<trans lang="it_IT">Cerca timer</trans>
|
||||
</token>
|
||||
<token name="tr(start)">
|
||||
<trans lang="en_EN">start</trans>
|
||||
<trans lang="de_DE">Beginn</trans>
|
||||
<trans lang="fi_FI">Alkaa</trans>
|
||||
<trans lang="hu_HU">Rajt</trans>
|
||||
<trans lang="it_IT">Inizio</trans>
|
||||
</token>
|
||||
<token name="tr(rest)">
|
||||
<trans lang="en_EN">rest</trans>
|
||||
<trans lang="de_DE">Rest</trans>
|
||||
<trans lang="fi_FI">Loput</trans>
|
||||
<trans lang="hu_HU">Maradék</trans>
|
||||
<trans lang="it_IT">Riposo</trans>
|
||||
</token>
|
||||
<token name="tr(playback)">
|
||||
<trans lang="en_EN">playback</trans>
|
||||
<trans lang="de_DE">Wiedergabe</trans>
|
||||
<trans lang="fi_FI">Toisto</trans>
|
||||
<trans lang="hu_HU">Lejátszás</trans>
|
||||
<trans lang="it_IT">Riproduzione</trans>
|
||||
</token>
|
||||
<token name="tr(end)">
|
||||
<trans lang="en_EN">end</trans>
|
||||
<trans lang="de_DE">Ende</trans>
|
||||
<trans lang="fi_FI">Loppu</trans>
|
||||
<trans lang="hu_HU">vég</trans>
|
||||
<trans lang="it_IT">fine</trans>
|
||||
</token>
|
||||
<token name="tr(activetimers)">
|
||||
<trans lang="en_EN">active timers</trans>
|
||||
<trans lang="de_DE">aktive Timer</trans>
|
||||
<trans lang="fi_FI">aktiivista ajastinta</trans>
|
||||
<trans lang="hu_HU">aktív időzítők</trans>
|
||||
<trans lang="it_IT">timer attivi</trans>
|
||||
</token>
|
||||
<token name="tr(activetimer)">
|
||||
<trans lang="en_EN">active timer</trans>
|
||||
<trans lang="de_DE">aktiver Timer</trans>
|
||||
<trans lang="fi_FI">aktiivinen ajastin</trans>
|
||||
<trans lang="hu_HU">aktív időzítő</trans>
|
||||
<trans lang="it_IT">timer attivo</trans>
|
||||
</token>
|
||||
<token name="tr(lastrecs)">
|
||||
<trans lang="en_EN">last recordings</trans>
|
||||
<trans lang="de_DE">Neueste Aufnahmen</trans>
|
||||
<trans lang="fi_FI">Uusimmat tallenteet</trans>
|
||||
<trans lang="hu_HU">utolsó felvételek</trans>
|
||||
<trans lang="it_IT">ultime registrazioni</trans>
|
||||
</token>
|
||||
<token name="tr(sysinfo)">
|
||||
<trans lang="en_EN">system information</trans>
|
||||
<trans lang="de_DE">System Informationen</trans>
|
||||
<trans lang="fi_FI">Järjestelmätiedot</trans>
|
||||
<trans lang="hu_HU">rendszer információ</trans>
|
||||
<trans lang="it_IT">info di sistema</trans>
|
||||
</token>
|
||||
<token name="tr(disc)">
|
||||
<trans lang="en_EN">disc</trans>
|
||||
<trans lang="de_DE">HDD</trans>
|
||||
<trans lang="fi_FI">levy</trans>
|
||||
<trans lang="hu_HU">Lemez</trans>
|
||||
<trans lang="it_IT">disco</trans>
|
||||
</token>
|
||||
<token name="tr(free)">
|
||||
<trans lang="en_EN">free</trans>
|
||||
<trans lang="de_DE">frei</trans>
|
||||
<trans lang="fi_FI">vapaana</trans>
|
||||
<trans lang="hu_HU">szabad</trans>
|
||||
<trans lang="it_IT">libero</trans>
|
||||
</token>
|
||||
<token name="tr(load)">
|
||||
<trans lang="en_EN">load</trans>
|
||||
<trans lang="de_DE">load</trans>
|
||||
<trans lang="fi_FI">kuorma</trans>
|
||||
<trans lang="hu_HU">terh.</trans>
|
||||
<trans lang="it_IT">load</trans>
|
||||
</token>
|
||||
<token name="tr(vdrcpu)">
|
||||
<trans lang="en_EN">VDR CPU</trans>
|
||||
<trans lang="de_DE">VDR CPU</trans>
|
||||
<trans lang="fi_FI">VDR CPU</trans>
|
||||
<trans lang="hu_HU">VDR CPU</trans>
|
||||
<trans lang="it_IT">VDR CPU</trans>
|
||||
</token>
|
||||
<token name="tr(volume)">
|
||||
<trans lang="en_EN">Volume</trans>
|
||||
<trans lang="de_DE">Lautstärke</trans>
|
||||
<trans lang="fi_FI">Äänenvoimakkuus</trans>
|
||||
<trans lang="hu_HU">Hangerő</trans>
|
||||
<trans lang="it_IT">Volume</trans>
|
||||
</token>
|
||||
<token name="tr(temp)">
|
||||
<trans lang="en_EN">Temperature</trans>
|
||||
<trans lang="de_DE">Temperatur</trans>
|
||||
<trans lang="fi_FI">Lämpötila</trans>
|
||||
<trans lang="hu_HU">Hőmérséklet</trans>
|
||||
<trans lang="it_IT">Temperatura</trans>
|
||||
</token>
|
||||
<token name="tr(apparenttemp)">
|
||||
<trans lang="en_EN">Felt Temperature</trans>
|
||||
<trans lang="de_DE">Gefühlte Temperatur</trans>
|
||||
<trans lang="fi_FI">Koettu lämpötila</trans>
|
||||
<trans lang="hu_HU">Érzékelt hőmérséklet</trans>
|
||||
<trans lang="it_IT">Temperatura percepita</trans>
|
||||
</token>
|
||||
<token name="tr(todaymin)">
|
||||
<trans lang="en_EN">minimum today</trans>
|
||||
<trans lang="de_DE">heutiges Minimum</trans>
|
||||
<trans lang="fi_FI">alin tänään</trans>
|
||||
<trans lang="hu_HU">mai minimum</trans>
|
||||
<trans lang="it_IT">minima oggi</trans>
|
||||
</token>
|
||||
<token name="tr(todaymax)">
|
||||
<trans lang="en_EN">maximum today</trans>
|
||||
<trans lang="de_DE">heutiges Maximum</trans>
|
||||
<trans lang="fi_FI">ylin tänään</trans>
|
||||
<trans lang="hu_HU">mai maximum</trans>
|
||||
<trans lang="it_IT">massima oggi</trans>
|
||||
</token>
|
||||
<token name="tr(precipitationprobability)">
|
||||
<trans lang="en_EN">Precipitation Prob.</trans>
|
||||
<trans lang="de_DE">Regenwahrsch.</trans>
|
||||
<trans lang="fi_FI">Sateen todennäköisyys</trans>
|
||||
<trans lang="hu_HU">Csapadék valósz.</trans>
|
||||
<trans lang="it_IT">Prob.precipitazioni</trans>
|
||||
</token>
|
||||
<token name="tr(precipitationintensity)">
|
||||
<trans lang="en_EN">Precipitation Intensity</trans>
|
||||
<trans lang="de_DE">Regenmenge</trans>
|
||||
<trans lang="fi_FI">Sademäärä</trans>
|
||||
<trans lang="hu_HU">Csapadék intenzitása</trans>
|
||||
<trans lang="it_IT">Intensità precipitazioni</trans>
|
||||
</token>
|
||||
<token name="tr(humidity)">
|
||||
<trans lang="en_EN">Humidity</trans>
|
||||
<trans lang="de_DE">Luftfeuchtigkeit</trans>
|
||||
</token>
|
||||
<token name="tr(apparenttemp)">
|
||||
<trans lang="en_EN">Felt Temperature</trans>
|
||||
<trans lang="de_DE">Gefühlte Temperatur</trans>
|
||||
<trans lang="fi_FI">Ilmankosteus</trans>
|
||||
<trans lang="hu_HU">Páratartalom</trans>
|
||||
<trans lang="it_IT">Umidità</trans>
|
||||
</token>
|
||||
<token name="tr(windbearing)">
|
||||
<trans lang="en_EN">Wind Bearing</trans>
|
||||
<trans lang="de_DE">Windrichtung</trans>
|
||||
<trans lang="fi_FI">Tuulen suunta</trans>
|
||||
<trans lang="hu_HU">Szélirány</trans>
|
||||
<trans lang="it_IT">Direzione vento</trans>
|
||||
</token>
|
||||
<token name="tr(windspeed)">
|
||||
<trans lang="en_EN">Wind Speed</trans>
|
||||
<trans lang="de_DE">Windgeschwindigkeit</trans>
|
||||
<trans lang="fi_FI">Tuulen nopeus</trans>
|
||||
<trans lang="hu_HU">Szélsebesség</trans>
|
||||
<trans lang="it_IT">Velocità vento</trans>
|
||||
</token>
|
||||
<token name="tr(cloudcover)">
|
||||
<trans lang="en_EN">Cloud Cover</trans>
|
||||
<trans lang="de_DE">Bewölkung</trans>
|
||||
<trans lang="fi_FI">Pilvipeitto</trans>
|
||||
<trans lang="hu_HU">Felhőzet</trans>
|
||||
<trans lang="it_IT">Copertura nuvole</trans>
|
||||
</token>
|
||||
<token name="tr(pressure)">
|
||||
<trans lang="en_EN">Pressure</trans>
|
||||
<trans lang="de_DE">Luftdruck</trans>
|
||||
<trans lang="fi_FI">Ilmanpaine</trans>
|
||||
<trans lang="hu_HU">Légnyomás</trans>
|
||||
<trans lang="it_IT">Pressione</trans>
|
||||
</token>
|
||||
<token name="tr(ozone)">
|
||||
<trans lang="en_EN">Ozone</trans>
|
||||
<trans lang="de_DE">Ozon</trans>
|
||||
<trans lang="fi_FI">Otsooni</trans>
|
||||
<trans lang="hu_HU">Ózon</trans>
|
||||
<trans lang="it_IT">Ozono</trans>
|
||||
</token>
|
||||
<token name="tr(visibility)">
|
||||
<trans lang="en_EN">visibility</trans>
|
||||
<trans lang="de_DE">Sicht</trans>
|
||||
<trans lang="fi_FI">Näkyvyys</trans>
|
||||
<trans lang="hu_HU">látástávolság</trans>
|
||||
<trans lang="it_IT">visibilità</trans>
|
||||
</token>
|
||||
<token name="tr(conditions)">
|
||||
<trans lang="en_EN">Weather Conditions</trans>
|
||||
<trans lang="de_DE">Wetterlage</trans>
|
||||
<trans lang="fi_FI">Säätila</trans>
|
||||
<trans lang="hu_HU">Időjárási feltételek</trans>
|
||||
<trans lang="it_IT">Condizioni del tempo</trans>
|
||||
</token>
|
||||
<token name="tr(from)">
|
||||
<trans lang="en_EN">from</trans>
|
||||
<trans lang="de_DE">aus</trans>
|
||||
<trans lang="fi_FI">alkaen</trans>
|
||||
<trans lang="hu_HU">-tól/-től</trans>
|
||||
<trans lang="it_IT">da</trans>
|
||||
</token>
|
||||
<token name="tr(felt)">
|
||||
<trans lang="en_EN">felt</trans>
|
||||
<trans lang="de_DE">gefühlt</trans>
|
||||
<trans lang="fi_FI">tuntuu</trans>
|
||||
<trans lang="hu_HU">érzékelt</trans>
|
||||
<trans lang="it_IT">percepita</trans>
|
||||
</token>
|
||||
<token name="tr(min)">
|
||||
<trans lang="en_EN">min</trans>
|
||||
<trans lang="de_DE">min</trans>
|
||||
<trans lang="fi_FI">min</trans>
|
||||
<trans lang="hu_HU">min</trans>
|
||||
<trans lang="it_IT">min</trans>
|
||||
</token>
|
||||
<token name="tr(max)">
|
||||
<trans lang="en_EN">max</trans>
|
||||
<trans lang="de_DE">max</trans>
|
||||
<trans lang="fi_FI">max</trans>
|
||||
<trans lang="hu_HU">max</trans>
|
||||
<trans lang="it_IT">max</trans>
|
||||
</token>
|
||||
<token name="tr(for)">
|
||||
<trans lang="en_EN">for</trans>
|
||||
<trans lang="de_DE">für</trans>
|
||||
<trans lang="fi_FI">:</trans>
|
||||
<trans lang="hu_HU">mert</trans>
|
||||
<trans lang="it_IT">per</trans>
|
||||
</token>
|
||||
<token name="tr(endsat)">
|
||||
<trans lang="en_EN">ends at</trans>
|
||||
<trans lang="de_DE">endet um</trans>
|
||||
<trans lang="fi_FI">loppuen</trans>
|
||||
<trans lang="hu_HU">végződik</trans>
|
||||
<trans lang="it_IT">finisce alle</trans>
|
||||
</token>
|
||||
<token name="tr(author)">
|
||||
<trans lang="en_EN">Author</trans>
|
||||
<trans lang="de_DE">Autor</trans>
|
||||
<trans lang="fi_FI">Tekijä</trans>
|
||||
<trans lang="hu_HU">Szerző</trans>
|
||||
<trans lang="it_IT">Autore</trans>
|
||||
</token>
|
||||
<token name="tr(supportedplugins)">
|
||||
<trans lang="en_EN">Supported Plugins</trans>
|
||||
<trans lang="de_DE">Unterstützte Plugins</trans>
|
||||
<trans lang="fi_FI">Tuetut laajennokset</trans>
|
||||
<trans lang="hu_HU">Támogatott Beépülő Modulok</trans>
|
||||
<trans lang="it_IT">Plugins supportati</trans>
|
||||
</token>
|
||||
<token name="tr(usedfonts)">
|
||||
<trans lang="en_EN">Used Fonts</trans>
|
||||
<trans lang="de_DE">Benutzte Schriftarten</trans>
|
||||
<trans lang="fi_FI">Käytetyt kirjasimet</trans>
|
||||
<trans lang="hu_HU">használható betűtípusok</trans>
|
||||
<trans lang="it_IT">Font utilizzati</trans>
|
||||
</token>
|
||||
<token name="tr(installed)">
|
||||
<trans lang="en_EN">installled</trans>
|
||||
<trans lang="de_DE">installiert</trans>
|
||||
<trans lang="fi_FI">asennettu</trans>
|
||||
<trans lang="hu_HU">telepített</trans>
|
||||
<trans lang="it_IT">installato</trans>
|
||||
</token>
|
||||
<token name="tr(notinstalled)">
|
||||
<trans lang="en_EN">NOT installled</trans>
|
||||
<trans lang="de_DE">NICHT installiert</trans>
|
||||
<trans lang="fi_FI">ei asennettu</trans>
|
||||
<trans lang="hu_HU">Nincs telepítve</trans>
|
||||
<trans lang="it_IT">NON installato</trans>
|
||||
</token>
|
||||
</translations>
|
||||
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="512px"
|
||||
height="512px"
|
||||
viewBox="0 0 512 512"
|
||||
style="enable-background:new 0 0 512 512;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="ico_timer_isactive.svg"><metadata
|
||||
id="metadata43"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs41" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1304"
|
||||
inkscape:window-height="848"
|
||||
id="namedview39"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-394.84746"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="302"
|
||||
inkscape:window-y="113"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:document-rotation="0" /><g
|
||||
id="g3"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1"><path
|
||||
d="M256,0C114.609,0,0,114.609,0,256c0,141.391,114.609,256,256,256c141.391,0,256-114.609,256-256 C512,114.609,397.391,0,256,0z M256,472c-119.297,0-216-96.703-216-216S136.703,40,256,40s216,96.703,216,216S375.297,472,256,472z "
|
||||
id="path5"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /><path
|
||||
d="M336,256c0,44.188-35.812,80-80,80c-44.188,0-80-35.812-80-80c0-44.188,35.812-80,80-80C300.188,176,336,211.812,336,256z"
|
||||
id="path7"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /></g><g
|
||||
id="g9" /><g
|
||||
id="g11" /><g
|
||||
id="g13" /><g
|
||||
id="g15" /><g
|
||||
id="g17" /><g
|
||||
id="g19" /><g
|
||||
id="g21" /><g
|
||||
id="g23" /><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /><g
|
||||
id="g37" /><path
|
||||
style="fill:#00ff00;stroke-width:2.16949"
|
||||
d="M 215.72807,507.53308 C 162.71961,498.62211 115.11053,474.12463 76.893336,436.09498 39.36807,398.75387 14.112943,351.03911 5.386094,300.99567 c -4.1222903,-23.63898 -4.1222903,-66.35236 0,-89.99133 C 14.008253,161.56122 39.263887,113.48953 75.833077,76.915237 113.15643,39.586666 154.06344,17.595366 209.35593,5.1343523 217.69335,3.2553845 235.24157,2.2725166 258.16949,2.4003239 289.26436,2.5736565 296.6974,3.3268912 314.76087,8.1350626 390.2236,28.221883 445.8588,71.540834 481.2437,137.76271 500.63865,174.05982 509.83051,212.07808 509.83051,256 c 0,53.98027 -12.71674,96.03922 -42.96516,142.10169 -14.45842,22.01739 -45.63955,53.62066 -66.63035,67.53244 -56.44714,37.41066 -122.27803,52.35994 -184.50693,41.89895 z m 79.32278,-38.26109 c 66.69474,-11.18388 124.35288,-54.9441 155.23134,-117.81436 16.81999,-34.24642 21.42302,-54.7568 21.42302,-95.45763 0,-40.70084 -4.60303,-61.2112 -21.42302,-95.45763 C 416.54007,91.841508 351.24449,46.646652 276.63579,40.351623 183.74995,32.514478 102.19857,78.121277 61.717797,160.54237 44.897813,194.7888 40.29479,215.29916 40.29479,256 c 0,40.70083 4.603023,61.21121 21.423007,95.45763 43.386713,88.33777 134.566653,134.37628 233.333053,117.81436 z"
|
||||
id="path96" /><path
|
||||
style="fill:#008000;stroke-width:2.16949"
|
||||
d="m 236.3213,332.35775 c -21.769,-6.17206 -40.50373,-21.79987 -51.22581,-42.73063 -5.50062,-10.73785 -6.11244,-14.10376 -6.11244,-33.62712 0,-19.6807 0.58931,-22.85864 6.3474,-34.22928 7.84645,-15.49455 23.47217,-30.4091 39.82358,-38.01108 10.36368,-4.81822 15.44018,-5.76739 30.84597,-5.76739 15.40578,0 20.48229,0.94917 30.84597,5.76739 16.35141,7.60198 31.97713,22.51653 39.82357,38.01108 5.7581,11.37064 6.34741,14.54858 6.34741,34.22928 0,19.6807 -0.58931,22.85864 -6.34741,34.22928 -7.77464,15.35277 -23.49443,30.4473 -39.19346,37.63455 -14.31303,6.55273 -36.89604,8.53663 -51.15478,4.49392 z"
|
||||
id="path98" /><path
|
||||
style="fill:#ffff00;stroke-width:2.16949"
|
||||
d="M 206.10169,504.49124 C 127.20566,487.59493 62.205776,436.20317 27.173029,363.02238 21.843258,351.88888 14.804192,333.99322 11.530661,323.25424 5.8131936,304.49781 5.578785,301.84906 5.578785,256 c 0,-45.84906 0.2344086,-48.4978 5.951876,-67.25424 C 32.549044,119.79392 80.874604,60.902059 141.75428,30.048987 162.90057,19.332308 198.31759,7.9640136 219.39566,5.1273468 248.93064,1.1525593 296.54254,3.8115829 320,10.745884 c 72.79019,21.517644 127.55914,65.552215 160.24491,128.837896 20.42019,39.53725 27.5415,69.6386 27.5415,116.41622 0,45.37717 -6.91577,75.78975 -25.65361,112.81356 -44.0919,87.12047 -131.07015,140.2941 -228.64308,139.77956 -19.26328,-0.10158 -35.11652,-1.47383 -47.38803,-4.10188 z M 310.59295,466.68002 C 373.25941,450.78337 423.80264,408.85996 452.57467,348.9124 468.66334,315.39107 471.4995,301.46686 471.4995,256 c 0,-45.46685 -2.83616,-59.39108 -18.92483,-92.91239 C 405.84324,65.720986 300.90058,18.252796 195.48196,46.798152 137.02428,62.627376 88.47007,103.99464 59.922035,162.29263 43.457751,195.91436 40.500501,210.18286 40.500501,256 c 0,43.90222 2.572306,57.57609 16.612895,88.31095 32.071417,70.20436 94.044494,116.96666 169.055394,127.56216 22.18618,3.13387 61.01346,0.74552 84.42416,-5.19309 z"
|
||||
id="path100" /><path
|
||||
style="fill:#800000;stroke-width:2.16949"
|
||||
d="m 231.62056,329.87503 c -19.432,-7.47847 -37.58534,-24.44505 -46.3932,-43.36027 -4.18771,-8.99327 -5.12103,-14.57144 -5.13837,-30.71062 -0.019,-17.67761 0.66622,-21.09692 6.61232,-32.99612 7.49464,-14.9981 22.76182,-29.97136 38.42543,-37.68566 8.56481,-4.21817 13.67353,-5.05456 30.87326,-5.05456 17.19972,0 22.30844,0.83639 30.87326,5.05456 15.66361,7.7143 30.93078,22.68756 38.42542,37.68566 5.95268,11.91235 6.63352,15.31908 6.63352,33.19198 0,17.8729 -0.68084,21.27963 -6.63352,33.19198 -7.46529,14.93937 -22.8392,30.05422 -38.06767,37.42619 -12.70572,6.15074 -43.41742,7.94939 -55.61045,3.25686 z"
|
||||
id="path120" /><path
|
||||
style="fill:#800000;stroke-width:2.16949"
|
||||
d="M 206.32865,503.22148 C 158.10069,492.75939 111.99781,467.4798 78.101693,432.91084 50.677575,404.94234 30.547679,372.08509 14.90829,329.76271 L 7.6930601,310.23729 7.6431391,257.08475 C 7.5934779,204.20898 7.6256812,203.83618 13.827422,185.49153 44.840309,93.7559 112.14814,31.18172 203.02701,9.5980336 c 21.63974,-5.1394252 69.64126,-6.079541 96.35674,-1.8871583 33.36001,5.2350907 78.134,25.1103657 109.1443,48.4493957 41.18678,30.998062 74.69251,79.915619 89.32754,130.415999 11.175,38.56104 11.13977,100.34395 -0.0794,139.05859 -26.26219,90.62535 -105.25138,161.57427 -197.86537,177.72481 -23.1306,4.03363 -74.7021,3.95748 -93.58227,-0.13819 z M 309.79013,467.66631 C 375.70909,451.32822 430.02995,404.43826 457.83235,339.87573 469.90119,311.84957 471.81579,300.36534 471.81579,256 c 0,-44.36534 -1.9146,-55.84957 -13.98344,-83.87572 C 430.3918,108.40199 377.49031,62.322634 311.27148,44.463759 286.98023,37.912535 244.2084,36.308376 217.61088,40.951016 143.11647,53.954133 84.368657,101.71226 53.152017,174.64529 41.988799,200.72649 40.1504,212.39437 40.162805,257.08475 c 0.01237,44.84798 1.467919,53.42624 14.047115,82.79098 28.54943,66.64548 86.63006,114.9025 157.3155,130.70755 21.33213,4.7698 73.49908,3.22124 98.26471,-2.91697 z"
|
||||
id="path878" /></svg>
|
After Width: | Height: | Size: 7.5 KiB |
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="512px"
|
||||
height="512px"
|
||||
viewBox="0 0 512 512"
|
||||
style="enable-background:new 0 0 512 512;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="ico_rec_inactive.svg"><metadata
|
||||
id="metadata43"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs41" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1304"
|
||||
inkscape:window-height="848"
|
||||
id="namedview39"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-394.84746"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="233"
|
||||
inkscape:window-y="123"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:document-rotation="0" /><g
|
||||
id="g3"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1"><path
|
||||
d="M256,0C114.609,0,0,114.609,0,256c0,141.391,114.609,256,256,256c141.391,0,256-114.609,256-256 C512,114.609,397.391,0,256,0z M256,472c-119.297,0-216-96.703-216-216S136.703,40,256,40s216,96.703,216,216S375.297,472,256,472z "
|
||||
id="path5"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /><path
|
||||
d="M336,256c0,44.188-35.812,80-80,80c-44.188,0-80-35.812-80-80c0-44.188,35.812-80,80-80C300.188,176,336,211.812,336,256z"
|
||||
id="path7"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /></g><g
|
||||
id="g9" /><g
|
||||
id="g11" /><g
|
||||
id="g13" /><g
|
||||
id="g15" /><g
|
||||
id="g17" /><g
|
||||
id="g19" /><g
|
||||
id="g21" /><g
|
||||
id="g23" /><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /><g
|
||||
id="g37" /><path
|
||||
style="fill:#00ff00;stroke-width:2.16949"
|
||||
d="M 215.72807,507.53308 C 162.71961,498.62211 115.11053,474.12463 76.893336,436.09498 39.36807,398.75387 14.112943,351.03911 5.386094,300.99567 c -4.1222903,-23.63898 -4.1222903,-66.35236 0,-89.99133 C 14.008253,161.56122 39.263887,113.48953 75.833077,76.915237 113.15643,39.586666 154.06344,17.595366 209.35593,5.1343523 217.69335,3.2553845 235.24157,2.2725166 258.16949,2.4003239 289.26436,2.5736565 296.6974,3.3268912 314.76087,8.1350626 390.2236,28.221883 445.8588,71.540834 481.2437,137.76271 500.63865,174.05982 509.83051,212.07808 509.83051,256 c 0,53.98027 -12.71674,96.03922 -42.96516,142.10169 -14.45842,22.01739 -45.63955,53.62066 -66.63035,67.53244 -56.44714,37.41066 -122.27803,52.35994 -184.50693,41.89895 z m 79.32278,-38.26109 c 66.69474,-11.18388 124.35288,-54.9441 155.23134,-117.81436 16.81999,-34.24642 21.42302,-54.7568 21.42302,-95.45763 0,-40.70084 -4.60303,-61.2112 -21.42302,-95.45763 C 416.54007,91.841508 351.24449,46.646652 276.63579,40.351623 183.74995,32.514478 102.19857,78.121277 61.717797,160.54237 44.897813,194.7888 40.29479,215.29916 40.29479,256 c 0,40.70083 4.603023,61.21121 21.423007,95.45763 43.386713,88.33777 134.566653,134.37628 233.333053,117.81436 z"
|
||||
id="path96" /><path
|
||||
style="fill:#008000;stroke-width:2.16949"
|
||||
d="m 236.3213,332.35775 c -21.769,-6.17206 -40.50373,-21.79987 -51.22581,-42.73063 -5.50062,-10.73785 -6.11244,-14.10376 -6.11244,-33.62712 0,-19.6807 0.58931,-22.85864 6.3474,-34.22928 7.84645,-15.49455 23.47217,-30.4091 39.82358,-38.01108 10.36368,-4.81822 15.44018,-5.76739 30.84597,-5.76739 15.40578,0 20.48229,0.94917 30.84597,5.76739 16.35141,7.60198 31.97713,22.51653 39.82357,38.01108 5.7581,11.37064 6.34741,14.54858 6.34741,34.22928 0,19.6807 -0.58931,22.85864 -6.34741,34.22928 -7.77464,15.35277 -23.49443,30.4473 -39.19346,37.63455 -14.31303,6.55273 -36.89604,8.53663 -51.15478,4.49392 z"
|
||||
id="path98" /><path
|
||||
style="fill:#008000;stroke-width:2.16949"
|
||||
d="M 206.10169,504.49124 C 127.20566,487.59493 62.205776,436.20317 27.173029,363.02238 21.843258,351.88888 14.804192,333.99322 11.530661,323.25424 5.8131936,304.49781 5.578785,301.84906 5.578785,256 c 0,-45.84906 0.2344086,-48.4978 5.951876,-67.25424 C 32.549044,119.79392 80.874604,60.902059 141.75428,30.048987 162.90057,19.332308 198.31759,7.9640136 219.39566,5.1273468 248.93064,1.1525593 296.54254,3.8115829 320,10.745884 c 72.79019,21.517644 127.55914,65.552215 160.24491,128.837896 20.42019,39.53725 27.5415,69.6386 27.5415,116.41622 0,45.37717 -6.91577,75.78975 -25.65361,112.81356 -44.0919,87.12047 -131.07015,140.2941 -228.64308,139.77956 -19.26328,-0.10158 -35.11652,-1.47383 -47.38803,-4.10188 z M 310.59295,466.68002 C 373.25941,450.78337 423.80264,408.85996 452.57467,348.9124 468.66334,315.39107 471.4995,301.46686 471.4995,256 c 0,-45.46685 -2.83616,-59.39108 -18.92483,-92.91239 C 405.84324,65.720986 300.90058,18.252796 195.48196,46.798152 137.02428,62.627376 88.47007,103.99464 59.922035,162.29263 43.457751,195.91436 40.500501,210.18286 40.500501,256 c 0,43.90222 2.572306,57.57609 16.612895,88.31095 32.071417,70.20436 94.044494,116.96666 169.055394,127.56216 22.18618,3.13387 61.01346,0.74552 84.42416,-5.19309 z"
|
||||
id="path100" /></svg>
|
After Width: | Height: | Size: 5.6 KiB |
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="512px"
|
||||
height="512px"
|
||||
viewBox="0 0 512 512"
|
||||
style="enable-background:new 0 0 512 512;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="ico_rec_switch.svg"><metadata
|
||||
id="metadata43"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs41" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1304"
|
||||
inkscape:window-height="848"
|
||||
id="namedview39"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.4609375"
|
||||
inkscape:cx="-394.84746"
|
||||
inkscape:cy="256"
|
||||
inkscape:window-x="233"
|
||||
inkscape:window-y="123"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:document-rotation="0" /><g
|
||||
id="g3"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1"><path
|
||||
d="M256,0C114.609,0,0,114.609,0,256c0,141.391,114.609,256,256,256c141.391,0,256-114.609,256-256 C512,114.609,397.391,0,256,0z M256,472c-119.297,0-216-96.703-216-216S136.703,40,256,40s216,96.703,216,216S375.297,472,256,472z "
|
||||
id="path5"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /><path
|
||||
d="M336,256c0,44.188-35.812,80-80,80c-44.188,0-80-35.812-80-80c0-44.188,35.812-80,80-80C300.188,176,336,211.812,336,256z"
|
||||
id="path7"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /></g><g
|
||||
id="g9" /><g
|
||||
id="g11" /><g
|
||||
id="g13" /><g
|
||||
id="g15" /><g
|
||||
id="g17" /><g
|
||||
id="g19" /><g
|
||||
id="g21" /><g
|
||||
id="g23" /><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /><g
|
||||
id="g37" /><path
|
||||
style="fill:#00ff00;stroke-width:2.16949"
|
||||
d="M 215.72807,507.53308 C 162.71961,498.62211 115.11053,474.12463 76.893336,436.09498 39.36807,398.75387 14.112943,351.03911 5.386094,300.99567 c -4.1222903,-23.63898 -4.1222903,-66.35236 0,-89.99133 C 14.008253,161.56122 39.263887,113.48953 75.833077,76.915237 113.15643,39.586666 154.06344,17.595366 209.35593,5.1343523 217.69335,3.2553845 235.24157,2.2725166 258.16949,2.4003239 289.26436,2.5736565 296.6974,3.3268912 314.76087,8.1350626 390.2236,28.221883 445.8588,71.540834 481.2437,137.76271 500.63865,174.05982 509.83051,212.07808 509.83051,256 c 0,53.98027 -12.71674,96.03922 -42.96516,142.10169 -14.45842,22.01739 -45.63955,53.62066 -66.63035,67.53244 -56.44714,37.41066 -122.27803,52.35994 -184.50693,41.89895 z m 79.32278,-38.26109 c 66.69474,-11.18388 124.35288,-54.9441 155.23134,-117.81436 16.81999,-34.24642 21.42302,-54.7568 21.42302,-95.45763 0,-40.70084 -4.60303,-61.2112 -21.42302,-95.45763 C 416.54007,91.841508 351.24449,46.646652 276.63579,40.351623 183.74995,32.514478 102.19857,78.121277 61.717797,160.54237 44.897813,194.7888 40.29479,215.29916 40.29479,256 c 0,40.70083 4.603023,61.21121 21.423007,95.45763 43.386713,88.33777 134.566653,134.37628 233.333053,117.81436 z"
|
||||
id="path96" /><path
|
||||
style="fill:#008000;stroke-width:2.16949"
|
||||
d="m 236.3213,332.35775 c -21.769,-6.17206 -40.50373,-21.79987 -51.22581,-42.73063 -5.50062,-10.73785 -6.11244,-14.10376 -6.11244,-33.62712 0,-19.6807 0.58931,-22.85864 6.3474,-34.22928 7.84645,-15.49455 23.47217,-30.4091 39.82358,-38.01108 10.36368,-4.81822 15.44018,-5.76739 30.84597,-5.76739 15.40578,0 20.48229,0.94917 30.84597,5.76739 16.35141,7.60198 31.97713,22.51653 39.82357,38.01108 5.7581,11.37064 6.34741,14.54858 6.34741,34.22928 0,19.6807 -0.58931,22.85864 -6.34741,34.22928 -7.77464,15.35277 -23.49443,30.4473 -39.19346,37.63455 -14.31303,6.55273 -36.89604,8.53663 -51.15478,4.49392 z"
|
||||
id="path98" /><path
|
||||
style="fill:#ffff00;stroke-width:2.16949"
|
||||
d="M 206.10169,504.49124 C 127.20566,487.59493 62.205776,436.20317 27.173029,363.02238 21.843258,351.88888 14.804192,333.99322 11.530661,323.25424 5.8131936,304.49781 5.578785,301.84906 5.578785,256 c 0,-45.84906 0.2344086,-48.4978 5.951876,-67.25424 C 32.549044,119.79392 80.874604,60.902059 141.75428,30.048987 162.90057,19.332308 198.31759,7.9640136 219.39566,5.1273468 248.93064,1.1525593 296.54254,3.8115829 320,10.745884 c 72.79019,21.517644 127.55914,65.552215 160.24491,128.837896 20.42019,39.53725 27.5415,69.6386 27.5415,116.41622 0,45.37717 -6.91577,75.78975 -25.65361,112.81356 -44.0919,87.12047 -131.07015,140.2941 -228.64308,139.77956 -19.26328,-0.10158 -35.11652,-1.47383 -47.38803,-4.10188 z M 310.59295,466.68002 C 373.25941,450.78337 423.80264,408.85996 452.57467,348.9124 468.66334,315.39107 471.4995,301.46686 471.4995,256 c 0,-45.46685 -2.83616,-59.39108 -18.92483,-92.91239 C 405.84324,65.720986 300.90058,18.252796 195.48196,46.798152 137.02428,62.627376 88.47007,103.99464 59.922035,162.29263 43.457751,195.91436 40.500501,210.18286 40.500501,256 c 0,43.90222 2.572306,57.57609 16.612895,88.31095 32.071417,70.20436 94.044494,116.96666 169.055394,127.56216 22.18618,3.13387 61.01346,0.74552 84.42416,-5.19309 z"
|
||||
id="path100" /><path
|
||||
style="fill:#ffff00;stroke-width:2.16949"
|
||||
d="m 231.62056,329.87503 c -19.432,-7.47847 -37.58534,-24.44505 -46.3932,-43.36027 -4.18771,-8.99327 -5.12103,-14.57144 -5.13837,-30.71062 -0.019,-17.67761 0.66622,-21.09692 6.61232,-32.99612 7.49464,-14.9981 22.76182,-29.97136 38.42543,-37.68566 8.56481,-4.21817 13.67353,-5.05456 30.87326,-5.05456 17.19972,0 22.30844,0.83639 30.87326,5.05456 15.66361,7.7143 30.93078,22.68756 38.42542,37.68566 5.95268,11.91235 6.63352,15.31908 6.63352,33.19198 0,17.8729 -0.68084,21.27963 -6.63352,33.19198 -7.46529,14.93937 -22.8392,30.05422 -38.06767,37.42619 -12.70572,6.15074 -43.41742,7.94939 -55.61045,3.25686 z"
|
||||
id="path120" /></svg>
|
After Width: | Height: | Size: 6.3 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="475.082px"
|
||||
height="475.082px"
|
||||
viewBox="0 0 475.082 475.082"
|
||||
style="enable-background:new 0 0 475.082 475.082;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="folder.svg"><metadata
|
||||
id="metadata41"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs39" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview37"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.49675635"
|
||||
inkscape:cx="-13.084886"
|
||||
inkscape:cy="237.541"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><g
|
||||
id="g3"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1"><path
|
||||
d="M456.239,128.475c-12.56-12.562-27.597-18.842-45.11-18.842h-191.86v-9.136c0-17.511-6.283-32.548-18.843-45.107 c-12.562-12.562-27.6-18.846-45.111-18.846H63.953c-17.515,0-32.551,6.283-45.111,18.846C6.28,67.949,0,82.986,0,100.497v274.088 c0,17.508,6.28,32.545,18.842,45.104c12.562,12.565,27.6,18.849,45.111,18.849h347.175c17.514,0,32.551-6.283,45.11-18.849 c12.566-12.56,18.843-27.597,18.843-45.104V173.59C475.082,156.078,468.805,141.042,456.239,128.475z M438.536,374.585 c0,7.611-2.662,14.093-7.99,19.417c-5.328,5.325-11.8,7.987-19.417,7.987H63.953c-7.614,0-14.084-2.662-19.414-7.987 c-5.33-5.324-7.993-11.806-7.993-19.417V100.501c0-7.611,2.663-14.084,7.993-19.414c5.326-5.327,11.799-7.993,19.414-7.993h91.365 c7.614,0,14.087,2.663,19.417,7.993c5.327,5.33,7.993,11.803,7.993,19.414v18.274c0,7.616,2.664,14.083,7.994,19.414 c5.327,5.327,11.798,7.994,19.414,7.994h200.993c7.617,0,14.089,2.666,19.417,7.993c5.328,5.326,7.99,11.799,7.99,19.414V374.585 L438.536,374.585z"
|
||||
id="path5"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /></g><g
|
||||
id="g7" /><g
|
||||
id="g9" /><g
|
||||
id="g11" /><g
|
||||
id="g13" /><g
|
||||
id="g15" /><g
|
||||
id="g17" /><g
|
||||
id="g19" /><g
|
||||
id="g21" /><g
|
||||
id="g23" /><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /></svg>
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="475.082px"
|
||||
height="475.082px"
|
||||
viewBox="0 0 475.082 475.082"
|
||||
style="enable-background:new 0 0 475.082 475.082;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="folder.svg"><metadata
|
||||
id="metadata41"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs39" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview37"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.49675635"
|
||||
inkscape:cx="-13.084886"
|
||||
inkscape:cy="237.541"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><g
|
||||
id="g3"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1"><path
|
||||
d="M456.239,128.475c-12.56-12.562-27.597-18.842-45.11-18.842h-191.86v-9.136c0-17.511-6.283-32.548-18.843-45.107 c-12.562-12.562-27.6-18.846-45.111-18.846H63.953c-17.515,0-32.551,6.283-45.111,18.846C6.28,67.949,0,82.986,0,100.497v274.088 c0,17.508,6.28,32.545,18.842,45.104c12.562,12.565,27.6,18.849,45.111,18.849h347.175c17.514,0,32.551-6.283,45.11-18.849 c12.566-12.56,18.843-27.597,18.843-45.104V173.59C475.082,156.078,468.805,141.042,456.239,128.475z M438.536,374.585 c0,7.611-2.662,14.093-7.99,19.417c-5.328,5.325-11.8,7.987-19.417,7.987H63.953c-7.614,0-14.084-2.662-19.414-7.987 c-5.33-5.324-7.993-11.806-7.993-19.417V100.501c0-7.611,2.663-14.084,7.993-19.414c5.326-5.327,11.799-7.993,19.414-7.993h91.365 c7.614,0,14.087,2.663,19.417,7.993c5.327,5.33,7.993,11.803,7.993,19.414v18.274c0,7.616,2.664,14.083,7.994,19.414 c5.327,5.327,11.798,7.994,19.414,7.994h200.993c7.617,0,14.089,2.666,19.417,7.993c5.328,5.326,7.99,11.799,7.99,19.414V374.585 L438.536,374.585z"
|
||||
id="path5"
|
||||
style="fill:#{sdcol(iconactive)};fill-opacity:1" /></g><g
|
||||
id="g7" /><g
|
||||
id="g9" /><g
|
||||
id="g11" /><g
|
||||
id="g13" /><g
|
||||
id="g15" /><g
|
||||
id="g17" /><g
|
||||
id="g19" /><g
|
||||
id="g21" /><g
|
||||
id="g23" /><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /></svg>
|
After Width: | Height: | Size: 3.0 KiB |
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 484.6 484.6"
|
||||
style="enable-background:new 0 0 484.6 484.6;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="ico_remotetimer.svg"><metadata
|
||||
id="metadata59"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs57" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview55"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.48699958"
|
||||
inkscape:cx="-13.347034"
|
||||
inkscape:cy="242.3"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><g
|
||||
id="g3"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1"><g
|
||||
id="g5"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1"><path
|
||||
d="M297.2,396.6c-3.2,0-6.3,1.3-8.5,3.5s-3.5,5.3-3.5,8.5s1.3,6.3,3.5,8.5s5.3,3.5,8.5,3.5s6.3-1.3,8.5-3.5s3.5-5.3,3.5-8.5 s-1.3-6.3-3.5-8.5C303.5,397.9,300.4,396.6,297.2,396.6z"
|
||||
id="path7"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M242.3,396.6c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12C254.3,402,248.9,396.6,242.3,396.6z"
|
||||
id="path9"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M187.4,396.6c-3.2,0-6.3,1.3-8.5,3.5s-3.5,5.3-3.5,8.5c0,3.1,1.3,6.3,3.5,8.5s5.3,3.5,8.5,3.5s6.3-1.3,8.5-3.5 s3.5-5.3,3.5-8.5s-1.3-6.3-3.5-8.5C193.6,397.9,190.5,396.6,187.4,396.6z"
|
||||
id="path11"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M187.4,341.7c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S194,341.7,187.4,341.7z"
|
||||
id="path13"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M187.4,286.8c-3.2,0-6.3,1.3-8.5,3.5s-3.5,5.3-3.5,8.5s1.3,6.3,3.5,8.5s5.3,3.5,8.5,3.5s6.3-1.3,8.5-3.5s3.5-5.3,3.5-8.5 s-1.3-6.3-3.5-8.5C193.6,288.1,190.5,286.8,187.4,286.8z"
|
||||
id="path15"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M242.3,286.8c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S248.9,286.8,242.3,286.8z"
|
||||
id="path17"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M297.2,286.8c-3.2,0-6.3,1.3-8.5,3.5s-3.5,5.3-3.5,8.5s1.3,6.3,3.5,8.5s5.3,3.5,8.5,3.5s6.3-1.3,8.5-3.5s3.5-5.3,3.5-8.5 s-1.3-6.3-3.5-8.5C303.5,288.1,300.4,286.8,297.2,286.8z"
|
||||
id="path19"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M297.2,341.7c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S303.8,341.7,297.2,341.7z"
|
||||
id="path21"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /><path
|
||||
d="M472.6,286.8h-42.9v-43.6c0-6.6-5.4-12-12-12H254.3v-33.4h42.9c6.6,0,12-5.4,12-12V76c0-6.6-5.4-12-12-12H187.4 c-6.6,0-12,5.4-12,12v109.8c0,6.6,5.4,12,12,12h42.9v33.4H66.9c-6.6,0-12,5.4-12,12v43.6H12c-6.6,0-12,5.4-12,12v109.8 c0,6.6,5.4,12,12,12h109.8c6.6,0,12-5.4,12-12V298.8c0-6.6-5.4-12-12-12H78.9v-31.6h326.8v31.6h-42.9c-6.6,0-12,5.4-12,12v109.8 c0,6.6,5.4,12,12,12h109.8c6.6,0,12-5.4,12-12V298.8C484.6,292.2,479.3,286.8,472.6,286.8z M109.8,310.8v85.8H24v-85.8H109.8z M199.4,173.8V88h85.8v85.8H199.4z M460.6,396.6h-85.8v-85.8h85.8V396.6z"
|
||||
id="path23"
|
||||
style="fill:#{sdcol(icon)};fill-opacity:1" /></g></g><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /><g
|
||||
id="g37" /><g
|
||||
id="g39" /><g
|
||||
id="g41" /><g
|
||||
id="g43" /><g
|
||||
id="g45" /><g
|
||||
id="g47" /><g
|
||||
id="g49" /><g
|
||||
id="g51" /><g
|
||||
id="g53" /></svg>
|
After Width: | Height: | Size: 4.3 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue