summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY25
-rw-r--r--Makefile6
-rw-r--r--conf/rssfeeds.conf4
-rw-r--r--conf/theme-freestyle.conf4
-rw-r--r--conf/theme-iceblue.conf1
-rw-r--r--conf/theme-light.conf39
-rw-r--r--config.c749
-rw-r--r--config.h203
-rw-r--r--displaychannel.c862
-rw-r--r--displaychannel.h52
-rw-r--r--displaychannelview.c754
-rw-r--r--displaychannelview.h65
-rw-r--r--displaymenu.c142
-rw-r--r--displaymenu.h3
-rw-r--r--displaymenuview.c266
-rw-r--r--displaymenuview.h13
-rw-r--r--displaymessage.c51
-rw-r--r--displayreplay.c263
-rw-r--r--displayreplay.h7
-rw-r--r--displaytracks.c54
-rw-r--r--displayvolume.c69
-rw-r--r--displayvolume.h6
-rw-r--r--fontmanager.c66
-rw-r--r--fontmanager.h2
-rw-r--r--geometrymanager.c150
-rw-r--r--geometrymanager.h24
-rw-r--r--helpers.c35
-rw-r--r--icons/darkgrey/skinIcons/channelsymbols.pngbin6674 -> 0 bytes
-rw-r--r--icons/darkgrey/skinIcons/hd1080i.pngbin6268 -> 0 bytes
-rw-r--r--icons/darkgrey/skinIcons/hd720p.pngbin6105 -> 0 bytes
-rw-r--r--icons/darkgrey/skinIcons/radio.pngbin6506 -> 0 bytes
-rw-r--r--icons/darkgrey/skinIcons/sd576i.pngbin6717 -> 0 bytes
-rw-r--r--icons/darkred/skinIcons/channelsymbols.pngbin6674 -> 0 bytes
-rw-r--r--icons/darkred/skinIcons/hd1080i.pngbin5147 -> 0 bytes
-rw-r--r--icons/darkred/skinIcons/hd720p.pngbin5173 -> 0 bytes
-rw-r--r--icons/darkred/skinIcons/radio.pngbin5659 -> 0 bytes
-rw-r--r--icons/darkred/skinIcons/sd576i.pngbin5768 -> 0 bytes
-rw-r--r--icons/freestyle/menuIcons/CAM.pngbin0 -> 15892 bytes
-rw-r--r--icons/freestyle/menuIcons/Channels.pngbin0 -> 24707 bytes
-rw-r--r--icons/freestyle/menuIcons/Commands.pngbin0 -> 5102 bytes
-rw-r--r--icons/freestyle/menuIcons/DVB.pngbin0 -> 4873 bytes
-rw-r--r--icons/freestyle/menuIcons/EPG.pngbin0 -> 21918 bytes
-rw-r--r--icons/freestyle/menuIcons/LNB.pngbin0 -> 26370 bytes
-rw-r--r--icons/freestyle/menuIcons/Miscellaneous.pngbin0 -> 37855 bytes
-rw-r--r--icons/freestyle/menuIcons/OSD.pngbin0 -> 28197 bytes
-rw-r--r--icons/freestyle/menuIcons/Plugins.pngbin0 -> 12562 bytes
-rw-r--r--icons/freestyle/menuIcons/Recording.pngbin0 -> 24020 bytes
-rw-r--r--icons/freestyle/menuIcons/Recordings.pngbin0 -> 26119 bytes
-rw-r--r--icons/freestyle/menuIcons/Replay.pngbin0 -> 24125 bytes
-rw-r--r--icons/freestyle/menuIcons/Restart.pngbin0 -> 24627 bytes
-rw-r--r--icons/freestyle/menuIcons/Schedule.pngbin0 -> 21973 bytes
-rw-r--r--icons/freestyle/menuIcons/Setup.pngbin0 -> 13024 bytes
-rw-r--r--icons/freestyle/menuIcons/System.pngbin0 -> 13024 bytes
-rw-r--r--icons/freestyle/menuIcons/Timers.pngbin0 -> 19829 bytes
-rw-r--r--icons/freestyle/pluginIcons/Thumbs.dbbin0 -> 265216 bytes
-rw-r--r--icons/freestyle/pluginIcons/admin.pngbin0 -> 29949 bytes
-rw-r--r--icons/freestyle/pluginIcons/arghdirector.pngbin0 -> 15682 bytes
-rw-r--r--icons/freestyle/pluginIcons/autostart.pngbin0 -> 20457 bytes
-rw-r--r--icons/freestyle/pluginIcons/avahi4vdr.pngbin0 -> 14190 bytes
-rw-r--r--icons/freestyle/pluginIcons/avards.pngbin0 -> 8355 bytes
-rw-r--r--icons/freestyle/pluginIcons/block.pngbin0 -> 15002 bytes
-rw-r--r--icons/freestyle/pluginIcons/burn.pngbin0 -> 24532 bytes
-rw-r--r--icons/freestyle/pluginIcons/cdplayer.pngbin0 -> 22751 bytes
-rw-r--r--icons/freestyle/pluginIcons/chanman.pngbin0 -> 31419 bytes
-rw-r--r--icons/freestyle/pluginIcons/check.pngbin0 -> 22818 bytes
-rw-r--r--icons/freestyle/pluginIcons/conflictcheckonly.pngbin0 -> 19928 bytes
-rw-r--r--icons/freestyle/pluginIcons/ddci.pngbin0 -> 23854 bytes
-rw-r--r--icons/freestyle/pluginIcons/devstatus.pngbin0 -> 27552 bytes
-rw-r--r--icons/freestyle/pluginIcons/ding1.pngbin0 -> 26775 bytes
-rw-r--r--icons/freestyle/pluginIcons/dummydevice.pngbin0 -> 10359 bytes
-rw-r--r--icons/freestyle/pluginIcons/duplicates.pngbin0 -> 8937 bytes
-rw-r--r--icons/freestyle/pluginIcons/dvbhddevice.pngbin0 -> 23795 bytes
-rw-r--r--icons/freestyle/pluginIcons/dvbsddevice.pngbin0 -> 25214 bytes
-rw-r--r--icons/freestyle/pluginIcons/dynamite.pngbin0 -> 558436 bytes
-rw-r--r--icons/freestyle/pluginIcons/eepg.pngbin0 -> 19117 bytes
-rw-r--r--icons/freestyle/pluginIcons/epgsearch.pngbin0 -> 24504 bytes
-rw-r--r--icons/freestyle/pluginIcons/epgsearchonly.pngbin0 -> 20596 bytes
-rw-r--r--icons/freestyle/pluginIcons/epgsync.pngbin0 -> 22299 bytes
-rw-r--r--icons/freestyle/pluginIcons/externalplayer.pngbin0 -> 15506 bytes
-rw-r--r--icons/freestyle/pluginIcons/extrecmenu.pngbin0 -> 20929 bytes
-rw-r--r--icons/freestyle/pluginIcons/favorites.pngbin0 -> 21300 bytes
-rw-r--r--icons/freestyle/pluginIcons/femon.pngbin0 -> 14162 bytes
-rw-r--r--icons/freestyle/pluginIcons/fepg.pngbin0 -> 20480 bytes
-rw-r--r--icons/freestyle/pluginIcons/filebrowser.pngbin0 -> 20814 bytes
-rw-r--r--icons/freestyle/pluginIcons/fritzbox.pngbin0 -> 21704 bytes
-rw-r--r--icons/freestyle/pluginIcons/graphlcd.pngbin0 -> 18398 bytes
-rw-r--r--icons/freestyle/pluginIcons/graphtft.pngbin0 -> 15100 bytes
-rw-r--r--icons/freestyle/pluginIcons/image.pngbin0 -> 23748 bytes
-rw-r--r--icons/freestyle/pluginIcons/imonlcd.pngbin0 -> 24295 bytes
-rw-r--r--icons/freestyle/pluginIcons/iptv.pngbin0 -> 23970 bytes
-rw-r--r--icons/freestyle/pluginIcons/lcdproc.pngbin0 -> 21973 bytes
-rw-r--r--icons/freestyle/pluginIcons/mailbox.pngbin0 -> 12529 bytes
-rw-r--r--icons/freestyle/pluginIcons/markad.pngbin0 -> 10823 bytes
-rw-r--r--icons/freestyle/pluginIcons/mlist.pngbin0 -> 16120 bytes
-rw-r--r--icons/freestyle/pluginIcons/music.pngbin0 -> 21903 bytes
-rw-r--r--icons/freestyle/pluginIcons/noepg3.pngbin0 -> 21609 bytes
-rw-r--r--icons/freestyle/pluginIcons/osdteletext.pngbin0 -> 5774 bytes
-rw-r--r--icons/freestyle/pluginIcons/pvrinput.pngbin0 -> 13374 bytes
-rw-r--r--icons/freestyle/pluginIcons/quickepgsearch.pngbin0 -> 13147 bytes
-rw-r--r--icons/freestyle/pluginIcons/radio.pngbin0 -> 72921 bytes
-rw-r--r--icons/freestyle/pluginIcons/remote.pngbin0 -> 13178 bytes
-rw-r--r--icons/freestyle/pluginIcons/remotetimers.pngbin0 -> 26250 bytes
-rw-r--r--icons/freestyle/pluginIcons/rssreader.pngbin0 -> 12678 bytes
-rw-r--r--icons/freestyle/pluginIcons/sc.pngbin0 -> 25564 bytes
-rw-r--r--icons/freestyle/pluginIcons/screenshot.pngbin0 -> 18500 bytes
-rw-r--r--icons/freestyle/pluginIcons/seduatmo.pngbin0 -> 14433 bytes
-rw-r--r--icons/freestyle/pluginIcons/skyselect.pngbin0 -> 4077 bytes
-rw-r--r--icons/freestyle/pluginIcons/sleeptimer.pngbin0 -> 16193 bytes
-rw-r--r--icons/freestyle/pluginIcons/softhddevice.pngbin0 -> 23112 bytes
-rw-r--r--icons/freestyle/pluginIcons/streamdev-server.pngbin0 -> 18995 bytes
-rw-r--r--icons/freestyle/pluginIcons/systeminfo.pngbin0 -> 29949 bytes
-rw-r--r--icons/freestyle/pluginIcons/targavfd.pngbin0 -> 24287 bytes
-rw-r--r--icons/freestyle/pluginIcons/trayopenng.pngbin0 -> 10064 bytes
-rw-r--r--icons/freestyle/pluginIcons/tvguide.pngbin0 -> 22441 bytes
-rw-r--r--icons/freestyle/pluginIcons/tvm2vdr.pngbin0 -> 9962 bytes
-rw-r--r--icons/freestyle/pluginIcons/undelete.pngbin0 -> 27939 bytes
-rw-r--r--icons/freestyle/pluginIcons/weatherng.pngbin0 -> 19985 bytes
-rw-r--r--icons/freestyle/pluginIcons/xml2vdr.pngbin0 -> 24134 bytes
-rw-r--r--icons/freestyle/skinIcons/Channelseparator.pngbin0 -> 36555 bytes
-rw-r--r--icons/freestyle/skinIcons/DiskUsage.pngbin0 -> 21325 bytes
-rw-r--r--icons/freestyle/skinIcons/ac3.pngbin0 -> 4415 bytes
-rw-r--r--icons/freestyle/skinIcons/activetimer.pngbin0 -> 1939 bytes
-rw-r--r--icons/freestyle/skinIcons/activetimersmall.pngbin0 -> 1010 bytes
-rw-r--r--icons/freestyle/skinIcons/arrowLeftChannelSep.pngbin0 -> 11625 bytes
-rw-r--r--icons/freestyle/skinIcons/arrowRightChannelSep.pngbin0 -> 10951 bytes
-rw-r--r--icons/freestyle/skinIcons/channeldelimiter.pngbin0 -> 15923 bytes
-rw-r--r--icons/freestyle/skinIcons/channelsymbols.pngbin0 -> 2903 bytes
-rw-r--r--icons/freestyle/skinIcons/crypted.pngbin0 -> 721 bytes
-rw-r--r--icons/freestyle/skinIcons/daydelimiter.pngbin0 -> 21155 bytes
-rw-r--r--icons/freestyle/skinIcons/discpercent.pngbin0 -> 3369 bytes
-rw-r--r--icons/freestyle/skinIcons/dolbyoff.pngbin0 -> 1791 bytes
-rw-r--r--icons/freestyle/skinIcons/dolbyon.pngbin0 -> 1792 bytes
-rw-r--r--icons/freestyle/skinIcons/encrypted.pngbin0 -> 1587 bytes
-rw-r--r--icons/freestyle/skinIcons/fta.pngbin0 -> 1641 bytes
-rw-r--r--icons/freestyle/skinIcons/fwd.pngbin0 -> 11503 bytes
-rw-r--r--icons/freestyle/skinIcons/fwdInactive.pngbin0 -> 12656 bytes
-rw-r--r--icons/freestyle/skinIcons/fwdx1.pngbin0 -> 13093 bytes
-rw-r--r--icons/freestyle/skinIcons/fwdx2.pngbin0 -> 13094 bytes
-rw-r--r--icons/freestyle/skinIcons/fwdx3.pngbin0 -> 13010 bytes
-rw-r--r--icons/freestyle/skinIcons/hd1080i.pngbin0 -> 2259 bytes
-rw-r--r--icons/freestyle/skinIcons/hd720p.pngbin0 -> 2299 bytes
-rw-r--r--icons/freestyle/skinIcons/newrecording.pngbin0 -> 3887 bytes
-rw-r--r--icons/freestyle/skinIcons/pause.pngbin0 -> 4959 bytes
-rw-r--r--icons/freestyle/skinIcons/pauseInactive.pngbin0 -> 6329 bytes
-rw-r--r--icons/freestyle/skinIcons/play.pngbin0 -> 10550 bytes
-rw-r--r--icons/freestyle/skinIcons/playInactive.pngbin0 -> 10871 bytes
-rw-r--r--icons/freestyle/skinIcons/radio.pngbin0 -> 2188 bytes
-rw-r--r--icons/freestyle/skinIcons/recfolder.pngbin0 -> 16364 bytes
-rw-r--r--icons/freestyle/skinIcons/recoff.pngbin0 -> 4024 bytes
-rw-r--r--icons/freestyle/skinIcons/recon.pngbin0 -> 4194 bytes
-rw-r--r--icons/freestyle/skinIcons/recordingcutted.pngbin0 -> 4976 bytes
-rw-r--r--icons/freestyle/skinIcons/recordingdatetime.pngbin0 -> 1188 bytes
-rw-r--r--icons/freestyle/skinIcons/rew.pngbin0 -> 12275 bytes
-rw-r--r--icons/freestyle/skinIcons/rewInactive.pngbin0 -> 13211 bytes
-rw-r--r--icons/freestyle/skinIcons/rewx1.pngbin0 -> 13588 bytes
-rw-r--r--icons/freestyle/skinIcons/rewx2.pngbin0 -> 13660 bytes
-rw-r--r--icons/freestyle/skinIcons/rewx3.pngbin0 -> 13970 bytes
-rw-r--r--icons/freestyle/skinIcons/rss.pngbin0 -> 3214 bytes
-rw-r--r--icons/freestyle/skinIcons/sd576i.pngbin0 -> 2363 bytes
-rw-r--r--icons/freestyle/skinIcons/stereo.pngbin0 -> 4793 bytes
-rw-r--r--icons/freestyle/skinIcons/stereooff.pngbin0 -> 1944 bytes
-rw-r--r--icons/freestyle/skinIcons/stereoon.pngbin0 -> 1609 bytes
-rw-r--r--icons/freestyle/skinIcons/timerActive.pngbin0 -> 3210 bytes
-rw-r--r--icons/freestyle/skinIcons/timerInactive.pngbin0 -> 4192 bytes
-rw-r--r--icons/freestyle/skinIcons/timerRecording.pngbin0 -> 2469 bytes
-rw-r--r--icons/freestyle/skinIcons/tracks.pngbin0 -> 1267 bytes
-rw-r--r--icons/freestyle/skinIcons/txtoff.pngbin0 -> 1216 bytes
-rw-r--r--icons/freestyle/skinIcons/txton.pngbin0 -> 1214 bytes
-rw-r--r--icons/freestyle/skinIcons/vdrlogo.pngbin0 -> 12123 bytes
-rw-r--r--icons/iceblue/skinIcons/discpercent.pngbin2996 -> 0 bytes
-rw-r--r--icons/iceblue/skinIcons/hd1080i.pngbin5015 -> 0 bytes
-rw-r--r--icons/iceblue/skinIcons/hd720p.pngbin4850 -> 0 bytes
-rw-r--r--icons/iceblue/skinIcons/radio.pngbin5501 -> 0 bytes
-rw-r--r--icons/iceblue/skinIcons/sd576i.pngbin5663 -> 0 bytes
-rw-r--r--icons/light/skinIcons/crypted.pngbin0 -> 721 bytes
-rw-r--r--icons/light/skinIcons/fta.pngbin0 -> 1641 bytes
-rw-r--r--icons/light/skinIcons/hd1080i.pngbin1147 -> 2259 bytes
-rw-r--r--icons/light/skinIcons/hd720p.pngbin1147 -> 2299 bytes
-rw-r--r--icons/light/skinIcons/radio.pngbin1738 -> 0 bytes
-rw-r--r--icons/light/skinIcons/recoff.pngbin0 -> 4024 bytes
-rw-r--r--icons/light/skinIcons/recon.pngbin0 -> 4194 bytes
-rw-r--r--icons/light/skinIcons/sd576i.pngbin141 -> 2363 bytes
-rw-r--r--icons/light/skinIcons/stereooff.pngbin0 -> 1944 bytes
-rw-r--r--icons/light/skinIcons/stereoon.pngbin0 -> 1609 bytes
-rw-r--r--icons/light/skinIcons/txtoff.pngbin0 -> 1216 bytes
-rw-r--r--icons/light/skinIcons/txton.pngbin0 -> 1214 bytes
-rw-r--r--icons/skinElements/buttonblue.pngbin0 -> 13973 bytes
-rw-r--r--icons/skinElements/buttongreen.pngbin0 -> 14537 bytes
-rw-r--r--icons/skinElements/buttonred.pngbin0 -> 13011 bytes
-rw-r--r--icons/skinElements/buttonyellow.pngbin0 -> 13919 bytes
-rw-r--r--icons/skinElements/channellogoback.pngbin0 -> 35436 bytes
-rw-r--r--icons/skinElements/displaychannelback.pngbin0 -> 322733 bytes
-rw-r--r--icons/skinElements/displaychannelback_right.pngbin0 -> 321270 bytes
-rw-r--r--icons/skinElements/displaychanneltop.pngbin0 -> 8987 bytes
-rw-r--r--icons/skinElements/displaychanneltop_right.pngbin0 -> 9959 bytes
-rw-r--r--icons/skinElements/displayreplayback.pngbin0 -> 321112 bytes
-rw-r--r--icons/skinElements/displayreplaytop.pngbin0 -> 4881 bytes
-rw-r--r--icons/skinElements/displayvolume.pngbin0 -> 58704 bytes
-rw-r--r--icons/skinElements/header.pngbin0 -> 5295 bytes
-rw-r--r--icons/skinElements/header_mirrored.pngbin0 -> 5449 bytes
-rw-r--r--icons/skinElements/menubutton.pngbin0 -> 49719 bytes
-rw-r--r--icons/skinElements/menubuttonactive.pngbin0 -> 53449 bytes
-rw-r--r--icons/skinElements/menubuttondefault.pngbin0 -> 60910 bytes
-rw-r--r--icons/skinElements/menubuttondefaultactive.pngbin0 -> 64422 bytes
-rw-r--r--icons/skinElements/menubuttontop.pngbin0 -> 3772 bytes
-rw-r--r--icons/skinElements/messageError.pngbin0 -> 114302 bytes
-rw-r--r--icons/skinElements/messageInfo.pngbin0 -> 120782 bytes
-rw-r--r--icons/skinElements/messageStatus.pngbin0 -> 120430 bytes
-rw-r--r--icons/skinElements/messageWarning.pngbin0 -> 116747 bytes
-rw-r--r--icons/skinElements/scrollbar.pngbin0 -> 11893 bytes
-rw-r--r--icons/skinIcons/discpercent.pngbin2996 -> 3369 bytes
-rw-r--r--icons/skinIcons/hd1080i.pngbin6268 -> 2252 bytes
-rw-r--r--icons/skinIcons/hd720p.pngbin6105 -> 2265 bytes
-rw-r--r--icons/skinIcons/radio.pngbin6506 -> 2274 bytes
-rw-r--r--icons/skinIcons/rss.pngbin10661 -> 0 bytes
-rw-r--r--icons/skinIcons/rssStandalone.pngbin10661 -> 0 bytes
-rw-r--r--icons/skinIcons/sd576i.pngbin6717 -> 2384 bytes
-rw-r--r--imagecache.c407
-rw-r--r--imagecache.h90
-rw-r--r--imageloader.c18
-rw-r--r--menudetailview.c116
-rw-r--r--menuitem.c393
-rw-r--r--menuitem.h4
-rw-r--r--nopacity.c107
-rw-r--r--nopacity.h4
-rw-r--r--po/ca_ES.po81
-rw-r--r--po/de_DE.po83
-rw-r--r--po/it_IT.po81
-rw-r--r--po/sk_SK.po81
-rw-r--r--rssreader.c359
-rw-r--r--rssreader.h83
-rw-r--r--setup.c570
-rw-r--r--setup.h16
-rw-r--r--skinnopacity.c31
-rw-r--r--textwindow.c53
-rw-r--r--themes/nOpacity-darkblue.theme2
-rw-r--r--themes/nOpacity-darkgrey.theme1
-rw-r--r--themes/nOpacity-darkred.theme2
-rw-r--r--themes/nOpacity-default.theme3
-rw-r--r--themes/nOpacity-freestyle.theme96
-rw-r--r--themes/nOpacity-green.theme2
-rw-r--r--themes/nOpacity-iceblue.theme2
-rw-r--r--themes/nOpacity-light.theme2
-rw-r--r--timers.c18
244 files changed, 3079 insertions, 3541 deletions
diff --git a/HISTORY b/HISTORY
index c82f949..2e828a4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -300,3 +300,28 @@ Version 0.1.4
displayChannel
- Configurable Menu Item Scroll Mode: "Carriage Return" or "Forward and
Back again"
+- channel logo cache is built with channelID as key (not with channelNumber
+ anymore)
+- Removed RSS Feed support completely, maybe this will get a standalone
+ plugin in the future
+- Implemented theme dependend configuration. Each theme has now it's own
+ configuration. Default configurations for each theme can be set in the
+ appropriate conf/theme-themename.conf file. This file has to be placed
+ in <PLGCONFDIR>/themeconfigs. With that each theme can be shipped with
+ its individual settings and the plugin settings can be changed
+ individually for each theme without affecting other themes.
+- All skin background and button elements can now be individual PNGs. For
+ that the config value displayType has to be set to the value 2 in the
+ theme specific configuration.
+- Added new Theme "freestyle" with individual graphics for the different
+ skin elements.
+- Rewriting and cleanup of displayChannel:
+ - separated drawing code in dedicated class
+ - removed "simple" status icon bar, now only graphical icons are supported
+ - changed screen resolution icon to same height but 3 times larger width
+ as other status icons.
+ - status icons scale to size of footer height
+ - fixed bug that progress bar sometimes was not displayed when switching
+ - adapted the status icons for the different themes
+ the channel
+
diff --git a/Makefile b/Makefile
index 167bf1a..581efeb 100644
--- a/Makefile
+++ b/Makefile
@@ -121,7 +121,11 @@ install-icons:
mkdir -p $(DESTDIR)$(PLGRESDIR)/icons
cp -r icons/* $(DESTDIR)$(PLGRESDIR)/icons
-install: install-lib install-i18n install-themes install-icons
+install-themeconfigs:
+ mkdir -p $(DESTDIR)$(PLGRESDIR)/themeconfigs
+ cp conf/theme-* $(DESTDIR)$(PLGRESDIR)/themeconfigs
+
+install: install-lib install-i18n install-themes install-icons install-themeconfigs
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff --git a/conf/rssfeeds.conf b/conf/rssfeeds.conf
deleted file mode 100644
index c0f7e62..0000000
--- a/conf/rssfeeds.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[Tagesschau] http://www.tagesschau.de/xml/rss2
-[Kicker] http://rss.kicker.de/news/aktuell
-[Spiegel Online] http://www.spiegel.de/schlagzeilen/tops/index.rss
-[Focus] http://rss2.focus.de/c/32191/f/443312/index.rss
diff --git a/conf/theme-freestyle.conf b/conf/theme-freestyle.conf
new file mode 100644
index 0000000..adb5c9d
--- /dev/null
+++ b/conf/theme-freestyle.conf
@@ -0,0 +1,4 @@
+displayType = 2
+mainMenuTitleStyle = 1
+menuRecFolderSize = 100
+menuWidthRecordings = 40
diff --git a/conf/theme-iceblue.conf b/conf/theme-iceblue.conf
new file mode 100644
index 0000000..42d9ab2
--- /dev/null
+++ b/conf/theme-iceblue.conf
@@ -0,0 +1 @@
+displayType = 0
diff --git a/conf/theme-light.conf b/conf/theme-light.conf
new file mode 100644
index 0000000..061feef
--- /dev/null
+++ b/conf/theme-light.conf
@@ -0,0 +1,39 @@
+displayType = 0
+backgroundStyle = 1
+discUsageStyle = 0
+displayPoster = 0
+displaySignalStrength = 0
+displaySourceInfo = 0
+fontChannelGroupSize = 7
+fontChannelGroupSmallSize = 5
+fontDiskUsage = 13
+fontEPGInfoWindow = -2
+fontEPGSize = 3
+fontEPGSmallSize = 3
+fontHeader = 10
+fontMenuitemDefault = -14
+fontMenuitemLarge = 5
+fontMenuitemRecordings = -18
+fontMenuitemRecordingsSmall = -6
+fontTimers = -4
+fontTimersHead = -6
+footerHeight = 6
+headerHeight = 6
+headerIconHeight = 100
+iconHeight = 80
+mainMenuTitleStyle = 0
+menuSizeDiskUsage = 13
+menuWidthChannels = 37
+menuWidthMain = 26
+menuWidthRecordings = 37
+menuWidthRightItems = 13
+menuWidthSchedules = 37
+menuWidthSetup = 26
+menuWidthTimers = 37
+numDefaultMenuItems = 12
+roundedCorners = 0
+scalePicture = 0
+showDiscUsage = 0
+showTimers = 2
+useFolderPoster = 0
+useMenuIcons = 0
diff --git a/config.c b/config.c
index 6f1f9cc..9fa449a 100644
--- a/config.c
+++ b/config.c
@@ -1,294 +1,226 @@
#include <string>
#include <vector>
+#include <map>
#include "config.h"
cNopacityConfig::cNopacityConfig() {
logoPathSet = false;
epgImagePathSet = false;
iconPathSet = false;
- pathValuesSet = false;
//Common
mainMenuEntry = false;
- fontIndex = 0;
+ fontName = NULL;
fontDefaultName = "VDRSymbols Sans:Book";
- //DisplayChannel
- channelHeight = 25;
- channelBorderVertical = 15;
- channelBorderBottom = 15;
- channelFadeTime = 300; // ms
- logoPosition = 1;
- logoWidth = 260;
- logoHeight = 200;
logoExtension = "png";
- logoBorder = 15;
- backgroundStyle = 0;
- symbolStyle = 0;
- roundedCornersChannel = 1;
- displaySignalStrength = 1;
- displaySourceInfo = 1;
- displayPrevNextChannelGroup = 1;
- fontChannelHeaderSize = 0;
- fontChannelDateSize = 0;
- fontEPGSize = 0;
- fontEPGSmallSize = 0;
- fontChannelGroupSize = 0;
- fontChannelGroupSmallSize = 0;
- resolutionIconSize = 100;
- statusIconSize = 64;
- progressCurrentSchedule = 0;
- displayPoster = 1;
+ LoadDefaults();
+}
+
+cNopacityConfig::~cNopacityConfig() {
+}
+
+int cNopacityConfig::GetValue(std::string name) {
+ std::map<std::string, int>::iterator hit = conf.find(name);
+ if (hit != conf.end()) {
+ return (int)hit->second;
+ } else {
+ dsyslog("nopacity: ERROR: access to unknown config value %s", name.c_str());
+ }
+ return 0;
+}
+
+int *cNopacityConfig::GetValueRef(std::string name) {
+ int *ref = NULL;
+ std::map<std::string, int>::iterator hit = conf.find(name);
+ if (hit != conf.end()) {
+ ref = &hit->second;
+ } else {
+ dsyslog("nopacity: ERROR: access to unknown config value %s", name.c_str());
+ }
+ return ref;
+}
+
+void cNopacityConfig::LoadDefaults(void) {
+ conf.clear();
+ //Common Values
+ conf.insert(std::pair<std::string, int>("displayType", dtBlending));
+ conf.insert(std::pair<std::string, int>("fontIndex", 0));
+ //DisplayMenu
+ conf.insert(std::pair<std::string, int>("scrollMode", 0));
+ conf.insert(std::pair<std::string, int>("spaceMenu", 5));
+ conf.insert(std::pair<std::string, int>("widthScrollbar", 20));
+ conf.insert(std::pair<std::string, int>("menuAdjustLeft", 1));
+ conf.insert(std::pair<std::string, int>("scalePicture", 1));
+ conf.insert(std::pair<std::string, int>("roundedCorners", 1));
+ conf.insert(std::pair<std::string, int>("cornerRadius", 12));
+ conf.insert(std::pair<std::string, int>("useMenuIcons", 1));
+ conf.insert(std::pair<std::string, int>("mainMenuTitleStyle", 0));
+ conf.insert(std::pair<std::string, int>("narrowMainMenu", 1));
+ conf.insert(std::pair<std::string, int>("narrowScheduleMenu", 1));
+ conf.insert(std::pair<std::string, int>("narrowChannelMenu", 1));
+ conf.insert(std::pair<std::string, int>("narrowTimerMenu", 1));
+ conf.insert(std::pair<std::string, int>("narrowRecordingMenu", 1));
+ conf.insert(std::pair<std::string, int>("narrowSetupMenu", 1));
+ conf.insert(std::pair<std::string, int>("displayRerunsDetailEPGView", 1));
+ conf.insert(std::pair<std::string, int>("numReruns", 5));
+ conf.insert(std::pair<std::string, int>("useSubtitleRerun", 1));
+ conf.insert(std::pair<std::string, int>("displayAdditionalEPGPictures", 1));
+ conf.insert(std::pair<std::string, int>("numAdditionalEPGPictures", 9));
+ conf.insert(std::pair<std::string, int>("displayAdditionalRecEPGPictures", 1));
+ conf.insert(std::pair<std::string, int>("numAdditionalRecEPGPictures", 9));
+ conf.insert(std::pair<std::string, int>("menuChannelDisplayMode", 0));
+ conf.insert(std::pair<std::string, int>("menuChannelDisplayTime", 1));
+ conf.insert(std::pair<std::string, int>("numEPGEntriesChannelsMenu", 15));
+ conf.insert(std::pair<std::string, int>("menuFadeTime", 0));
+ conf.insert(std::pair<std::string, int>("menuEPGWindowFadeTime", 300));
+ conf.insert(std::pair<std::string, int>("menuWidthMain", 30));
+ conf.insert(std::pair<std::string, int>("menuWidthSchedules", 30));
+ conf.insert(std::pair<std::string, int>("menuWidthChannels", 30));
+ conf.insert(std::pair<std::string, int>("menuWidthTimers", 30));
+ conf.insert(std::pair<std::string, int>("menuWidthRecordings", 30));
+ conf.insert(std::pair<std::string, int>("menuWidthSetup", 30));
+ conf.insert(std::pair<std::string, int>("menuHeightInfoWindow", 20));
+ conf.insert(std::pair<std::string, int>("menuScrollDelay", 1));
+ conf.insert(std::pair<std::string, int>("menuScrollSpeed", 2));
+ conf.insert(std::pair<std::string, int>("menuInfoTextDelay", 2));
+ conf.insert(std::pair<std::string, int>("menuInfoScrollDelay", 5));
+ conf.insert(std::pair<std::string, int>("menuInfoScrollSpeed", 2));
+ conf.insert(std::pair<std::string, int>("menuWidthRightItems", 12));
+ conf.insert(std::pair<std::string, int>("menuSizeDiskUsage", 12));
+ conf.insert(std::pair<std::string, int>("showDiscUsage", 1));
+ conf.insert(std::pair<std::string, int>("discUsageStyle", 0));
+ conf.insert(std::pair<std::string, int>("showTimers", 1));
+ conf.insert(std::pair<std::string, int>("numberTimers", 10));
+ conf.insert(std::pair<std::string, int>("checkTimerConflict", 1));
+ conf.insert(std::pair<std::string, int>("headerHeight", 7));
+ conf.insert(std::pair<std::string, int>("footerHeight", 7));
+ conf.insert(std::pair<std::string, int>("numDefaultMenuItems", 16));
+ conf.insert(std::pair<std::string, int>("iconHeight", 100));
+ conf.insert(std::pair<std::string, int>("headerIconHeight", 80));
+ conf.insert(std::pair<std::string, int>("menuHeaderLogoWidth", 160));
+ conf.insert(std::pair<std::string, int>("menuHeaderLogoHeight", 70));
+ conf.insert(std::pair<std::string, int>("menuItemLogoWidth", 130));
+ conf.insert(std::pair<std::string, int>("menuItemLogoHeight", 100));
+ conf.insert(std::pair<std::string, int>("timersLogoWidth", 90));
+ conf.insert(std::pair<std::string, int>("timersLogoHeight", 70));
+ conf.insert(std::pair<std::string, int>("epgImageWidth", 210));
+ conf.insert(std::pair<std::string, int>("epgImageHeight", 160));
+ conf.insert(std::pair<std::string, int>("epgImageWidthLarge", 525));
+ conf.insert(std::pair<std::string, int>("epgImageHeightLarge", 400));
+ conf.insert(std::pair<std::string, int>("posterWidth", 500));
+ conf.insert(std::pair<std::string, int>("posterHeight", 750));
+ conf.insert(std::pair<std::string, int>("menuRecFolderSize", 128));
+ conf.insert(std::pair<std::string, int>("useFolderPoster", 1));
+ conf.insert(std::pair<std::string, int>("borderDetailedEPG", 30));
+ conf.insert(std::pair<std::string, int>("borderDetailedRecordings", 30));
+ conf.insert(std::pair<std::string, int>("menuSchedulesWindowMode", 1));
+ conf.insert(std::pair<std::string, int>("menuRecordingsWindowMode", 1));
+ conf.insert(std::pair<std::string, int>("fontHeader", 0));
+ conf.insert(std::pair<std::string, int>("fontDate", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemLarge", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemSchedule", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemScheduleSmall", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemChannel", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemChannelSmall", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemRecordings", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemRecordingsSmall", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemTimers", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemTimersSmall", 0));
+ conf.insert(std::pair<std::string, int>("fontMenuitemDefault", 0));
+ conf.insert(std::pair<std::string, int>("fontDiskUsage", 0));
+ conf.insert(std::pair<std::string, int>("fontDiskUsagePercent", 0));
+ conf.insert(std::pair<std::string, int>("fontTimers", 0));
+ conf.insert(std::pair<std::string, int>("fontTimersHead", 0));
+ conf.insert(std::pair<std::string, int>("fontButtons", 0));
+ conf.insert(std::pair<std::string, int>("fontMessageMenu", 0));
+ conf.insert(std::pair<std::string, int>("fontDetailView", 0));
+ conf.insert(std::pair<std::string, int>("fontDetailViewSmall", 0));
+ conf.insert(std::pair<std::string, int>("fontDetailViewHeader", 0));
+ conf.insert(std::pair<std::string, int>("fontDetailViewHeaderLarge", 0));
+ conf.insert(std::pair<std::string, int>("fontEPGInfoWindow", 0));
+ conf.insert(std::pair<std::string, int>("fontEPGInfoWindowLarge", 0));
+ //DisplayChannel
+ conf.insert(std::pair<std::string, int>("channelHeight", 25));
+ conf.insert(std::pair<std::string, int>("channelBorderVertical", 15));
+ conf.insert(std::pair<std::string, int>("channelBorderBottom", 15));
+ conf.insert(std::pair<std::string, int>("channelFadeTime", 300));
+ conf.insert(std::pair<std::string, int>("logoPosition", 1));
+ conf.insert(std::pair<std::string, int>("logoWidth", 260));
+ conf.insert(std::pair<std::string, int>("logoHeight", 200));
+ conf.insert(std::pair<std::string, int>("logoWidthOriginal", 260));
+ conf.insert(std::pair<std::string, int>("logoHeightOriginal", 200));
+ conf.insert(std::pair<std::string, int>("backgroundStyle", 0));
+ conf.insert(std::pair<std::string, int>("roundedCornersChannel", 1));
+ conf.insert(std::pair<std::string, int>("displaySignalStrength", 1));
+ conf.insert(std::pair<std::string, int>("displaySourceInfo", 1));
+ conf.insert(std::pair<std::string, int>("displayPrevNextChannelGroup", 1));
+ conf.insert(std::pair<std::string, int>("fontChannelHeaderSize", 0));
+ conf.insert(std::pair<std::string, int>("fontChannelDateSize", 0));
+ conf.insert(std::pair<std::string, int>("fontEPGSize", 0));
+ conf.insert(std::pair<std::string, int>("fontEPGSmallSize", 0));
+ conf.insert(std::pair<std::string, int>("fontChannelSourceInfoSize", 0));
+ conf.insert(std::pair<std::string, int>("fontChannelGroupSize", 0));
+ conf.insert(std::pair<std::string, int>("fontChannelGroupSmallSize", 0));
+ conf.insert(std::pair<std::string, int>("progressCurrentSchedule", 0));
+ conf.insert(std::pair<std::string, int>("displayPoster", 1));
//Display Replay
- replayHeight = 25;
- replayBorderVertical = 15;
- replayBorderBottom = 15;
- replayFadeTime = 300; // ms
- fontReplayHeader = 0;
- fontReplay = 0;
+ conf.insert(std::pair<std::string, int>("replayHeight", 25));
+ conf.insert(std::pair<std::string, int>("replayBorderVertical", 15));
+ conf.insert(std::pair<std::string, int>("replayBorderBottom", 15));
+ conf.insert(std::pair<std::string, int>("replayFadeTime", 300));
+ conf.insert(std::pair<std::string, int>("fontReplayHeader", 0));
+ conf.insert(std::pair<std::string, int>("fontReplay", 0));
//DisplayMessage
- messageWidth = 90;
- messageHeight = 10;
- messageBorderBottom = 10;
- fontMessage = 0;
- messageFadeTime = 300;
+ conf.insert(std::pair<std::string, int>("messageFadeTime", 300));
+ conf.insert(std::pair<std::string, int>("messageWidth", 90));
+ conf.insert(std::pair<std::string, int>("messageHeight", 10));
+ conf.insert(std::pair<std::string, int>("messageBorderBottom", 10));
+ conf.insert(std::pair<std::string, int>("fontMessage", 0));
//DisplayTracks
- tracksFadeTime = 300;
- tracksWidth = 25;
- tracksItemHeight = 80;
- tracksPosition = 0;
- tracksBorderHorizontal = 10;
- tracksBorderVertical = 10;
- fontTracksHeader = 0;
- fontTracks = 0;
+ conf.insert(std::pair<std::string, int>("tracksFadeTime", 300));
+ conf.insert(std::pair<std::string, int>("tracksWidth", 25));
+ conf.insert(std::pair<std::string, int>("tracksItemHeight", 80));
+ conf.insert(std::pair<std::string, int>("tracksPosition", 0));
+ conf.insert(std::pair<std::string, int>("tracksBorderHorizontal", 10));
+ conf.insert(std::pair<std::string, int>("tracksBorderVertical", 10));
+ conf.insert(std::pair<std::string, int>("fontTracksHeader", 0));
+ conf.insert(std::pair<std::string, int>("fontTracks", 0));
//DisplayVolume
- volumeFadeTime = 300;
- volumeWidth = 40;
- volumeHeight = 10;
- volumeBorderBottom = 10;
- fontVolume = 0;
- //DisplayMenu
- scrollMode = 0;
- spaceMenu = 5;
- widthScrollbar = 20;
- menuAdjustLeft = 1;
- scalePicture = 1;
- roundedCorners = 0;
- cornerRadius = 12;
- useMenuIcons = 1;
- mainMenuTitleStyle = 0;
- narrowMainMenu = 1;
- narrowScheduleMenu = 1;
- narrowChannelMenu = 1;
- narrowTimerMenu = 1;
- narrowRecordingMenu = 1;
- narrowSetupMenu = 1;
- displayRerunsDetailEPGView = 1;
- numReruns = 5;
- useSubtitleRerun = 1;
- displayAdditionalEPGPictures = 1;
- numAdditionalEPGPictures = 9;
- displayAdditionalRecEPGPictures = 1;
- numAdditionalRecEPGPictures = 9;
- menuChannelDisplayMode = 0;
- menuChannelDisplayTime = 1;
- numEPGEntriesChannelsMenu = 15;
- menuFadeTime = 0;
- menuEPGWindowFadeTime = 300;
- menuWidthMain = 30;
- menuWidthSchedules = 30;
- menuWidthChannels = 30;
- menuWidthTimers = 30;
- menuWidthRecordings = 30;
- menuWidthSetup = 30;
- menuHeightInfoWindow = 20;
- menuScrollDelay = 1;
- menuScrollSpeed = 2;
- menuInfoTextDelay = 2;
- menuInfoScrollDelay = 5;
- menuInfoScrollSpeed = 2;
- menuWidthRightItems = 12;
- menuSizeDiskUsage = 12;
- showDiscUsage = 1;
- discUsageStyle = 0;
- showTimers = 1;
- numberTimers = 10;
- checkTimerConflict = 1;
- headerHeight = 7;
- footerHeight = 7;
- numDefaultMenuItems = 16;
- iconHeight = 100;
- headerIconHeight = 80;
- menuHeaderLogoWidth = 160;
- menuHeaderLogoHeight = 70;
- menuItemLogoWidth = 130;
- menuItemLogoHeight = 100;
- timersLogoWidth = 90;
- timersLogoHeight = 70;
- epgImageWidth = 210;
- epgImageHeight = 160;
- epgImageWidthLarge = 525;
- epgImageHeightLarge = 400;
- posterWidth = 500;
- posterHeight = 750;
- menuRecFolderSize = 128;
- useFolderPoster = 1;
- borderDetailedEPG = 30;
- borderDetailedRecordings = 30;
- menuSchedulesWindowMode = 0;
- menuRecordingsWindowMode = 0;
- fontHeader = 0;
- fontDate = 0;
- fontMenuitemLarge = 0;
- fontMenuitemSchedule = 0;
- fontMenuitemScheduleSmall = 0;
- fontMenuitemChannel = 0;
- fontMenuitemChannelSmall = 0;
- fontMenuitemRecordings = 0;
- fontMenuitemRecordingsSmall = 0;
- fontMenuitemTimers = 0;
- fontMenuitemTimersSmall = 0;
- fontMenuitemDefault = 0;
- fontDiskUsage = 0;
- fontDiskUsagePercent = 0;
- fontTimersHead = 0;
- fontTimers = 0;
- fontButtons = 0;
- fontMessageMenu = 0;
- fontDetailView = 0;
- fontDetailViewSmall = 0;
- fontDetailViewHeader = 0;
- fontDetailViewHeaderLarge = 0;
- fontEPGInfoWindow = 0;
- fontEPGInfoWindowLarge = 0;
- //RSS Feeds
- displayRSSFeed = 0;
- rssFeedHeight = 5;
- rssFeedHeightStandalone = 7;
- fontRssFeed = 0;
- fontRssFeedStandalone = 0;
- rssFeedStandalonePos = 0;
- rssScrollDelay = 2;
- rssScrollSpeed = 1;
- rssFeed[0] = 0;
- rssFeed[1] = 0;
- rssFeed[2] = 0;
- rssFeed[3] = 0;
- rssFeed[4] = 0;
+ conf.insert(std::pair<std::string, int>("volumeFadeTime", 300));
+ conf.insert(std::pair<std::string, int>("volumeWidth", 40));
+ conf.insert(std::pair<std::string, int>("volumeHeight", 10));
+ conf.insert(std::pair<std::string, int>("volumeBorderBottom", 10));
+ conf.insert(std::pair<std::string, int>("fontVolume", 0));
//Channel Logo Caching
- limitLogoCache = 1;
- numLogosInitial = 30;
- numLogosMax = 50;
+ conf.insert(std::pair<std::string, int>("limitLogoCache", 1));
+ conf.insert(std::pair<std::string, int>("numLogosInitial", 30));
+ conf.insert(std::pair<std::string, int>("numLogosMax", 50));
}
-cNopacityConfig::~cNopacityConfig() {
-}
-
-void cNopacityConfig::setDynamicValues() {
- doBlending = (Theme.Color(clrDoBlending) == CLR_BLENDING_ON)?true:false;
- if (fontIndex == 0) {
+void cNopacityConfig::SetFontName() {
+ if (fontName)
+ free(fontName);
+ if (GetValue("fontIndex") == 0) {
fontName = strdup(fontDefaultName);
} else {
cStringList availableFonts;
cFont::GetAvailableFontNames(&availableFonts);
- if (availableFonts[fontIndex-1]) {
- fontName = strdup(availableFonts[fontIndex-1]);
+ if (availableFonts[GetValue("fontIndex")-1]) {
+ fontName = strdup(availableFonts[GetValue("fontIndex")-1]);
} else
fontName = strdup(fontDefaultName);
}
- channelFrameTime = channelFadeTime / 10;
- replayFrameTime = replayFadeTime / 10;
- messageFrameTime = messageFadeTime / 10;
- tracksFrameTime = tracksFadeTime / 10;
- volumeFrameTime = volumeFadeTime / 10;
- menuFrameTime = menuFadeTime / 10;
- menuEPGWindowFrameTime = menuEPGWindowFadeTime / 10;
-
- menuScrollFrameTime = 0;
- if (menuScrollSpeed == 1)
- menuScrollFrameTime = 50;
- else if (menuScrollSpeed == 2)
- menuScrollFrameTime = 30;
- else if (menuScrollSpeed == 3)
- menuScrollFrameTime = 15;
-
- menuInfoScrollFrameTime = 0;
- if (menuInfoScrollSpeed == 1)
- menuInfoScrollFrameTime = 50;
- else if (menuInfoScrollSpeed == 2)
- menuInfoScrollFrameTime = 30;
- else if (menuInfoScrollSpeed == 3)
- menuInfoScrollFrameTime = 15;
-
- rssScrollFrameTime = 0;
- if (rssScrollSpeed == 0)
- rssScrollFrameTime = 30;
- else if (rssScrollSpeed == 1)
- rssScrollFrameTime = 15;
- else if (rssScrollSpeed == 2)
- rssScrollFrameTime = 5;
-
- if (!pathValuesSet) {
- pathValuesSet = true;
- logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
- iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
- epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
-
- dsyslog("nopacity: using Logo Directory %s", (logoPathSet)?(*logoPath):(*logoPathDefault));
- dsyslog("nopacity: using Icon Directory %s", (iconPathSet)?(*iconPath):(*iconPathDefault));
- dsyslog("nopacity: using EPG Images Directory %s", (epgImagePathSet)?(*epgImagePath):(*epgImagePathDefault));
- }
}
-void cNopacityConfig::loadRssFeeds(void) {
- cString rssconf = cString::sprintf("%s/rssfeeds.conf", cPlugin::ConfigDirectory(PLUGIN_NAME_I18N));
- dsyslog("nopacity: trying to load rss feeds from %s", *rssconf);
- FILE *f = fopen(*rssconf, "r");
- bool foundEntries = false;
- if (f) {
- char *line;
- cReadLine ReadLine;
- while ((line = ReadLine.Read(f)) != NULL) {
- try {
- std::string currentLine = line;
- size_t startTag = currentLine.find_first_of('[') + 1;
- size_t endTag = currentLine.find_first_of(']');
- if (endTag != std::string::npos) {
- std::string rssName = currentLine.substr(startTag, endTag - 1);
- std::string rssUrl = currentLine.substr(endTag + 1);
- size_t startUrl = rssUrl.find_first_of("http");
- if (startUrl != std::string::npos) {
- rssUrl = rssUrl.substr(startUrl);
- size_t whitespaces = rssUrl.find_first_of(" ");
- if (whitespaces != std::string::npos) {
- rssUrl = rssUrl.substr(0, whitespaces);
- }
- RssFeed feed;
- feed.name = rssName;
- feed.url = rssUrl;
- rssFeeds.push_back(feed);
- foundEntries = true;
- }
- }
- } catch (...) {}
- }
- fclose(f);
- }
- if (foundEntries) {
- dsyslog("nopacity: loaded %lu rss feeds from %s", (long unsigned)rssFeeds.size(), *rssconf);
- int i = 1;
- for (std::vector<RssFeed>::iterator it = rssFeeds.begin(); it != rssFeeds.end(); it++) {
- dsyslog("nopacity: RssFeed %d: name %s, URL: %s", i, it->name.c_str(), it->url.c_str());
- i++;
- }
- } else {
- dsyslog("nopacity: no valid rss config found, using default rss feed");
- RssFeed feed;
- feed.name = "Tagesschau";
- feed.url = "http://www.tagesschau.de/xml/rss2";
- rssFeeds.push_back(feed);
- }
+void cNopacityConfig::SetPathes(void) {
+ logoPathDefault = cString::sprintf("%s/logos/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
+ iconPathDefault = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
+ epgImagePathDefault = cString::sprintf("%s/epgimages/", cPlugin::CacheDirectory(PLUGIN_NAME_I18N));
+
+ dsyslog("nopacity: using Logo Directory %s", (logoPathSet)?(*logoPath):(*logoPathDefault));
+ dsyslog("nopacity: using Icon Directory %s", (iconPathSet)?(*iconPath):(*iconPathDefault));
+ dsyslog("nopacity: using EPG Images Directory %s", (epgImagePathSet)?(*epgImagePath):(*epgImagePathDefault));
}
-
void cNopacityConfig::SetLogoPath(cString path) {
logoPath = checkSlashAtEnd(*path);
logoPathSet = true;
@@ -312,165 +244,144 @@ cString cNopacityConfig::checkSlashAtEnd(std::string path) {
return path.c_str();
}
+void cNopacityConfig::LoadThemeSpecificConfigs(void) {
+ cThemes themes;
+ themes.Load("nOpacity");
+ int numThemes = themes.NumThemes();
+ dsyslog("nopacity: %d themes available", numThemes);
+ for (int theme = 0; theme < numThemes; theme++) {
+ cString confFile = cString::sprintf("%s/themeconfigs/theme-%s.conf", cPlugin::ConfigDirectory(PLUGIN_NAME_I18N), themes.Name(theme));
+ dsyslog("nopacity: trying to load theme config %s", *confFile);
+ LoadThemeConfig(confFile, themes.Name(theme));
+ }
+}
+
+void cNopacityConfig::LoadThemeConfig(cString confFile, cString theme) {
+ FILE *f = fopen(*confFile, "r");
+ if (f) {
+ dsyslog("nopacity: %s successfully loaded", *confFile);
+ std::map<std::string, int> themeConf;
+ char *line;
+ cReadLine ReadLine;
+ bool insertConf = false;
+ while ((line = ReadLine.Read(f)) != NULL) {
+ std::pair<std::string, int> themeConfLine = ReadThemeConfigLine(line);
+ std::string name = (std::string)themeConfLine.first;
+ if (name.compare("undefined") != 0) {
+ themeConf.insert(themeConfLine);
+ insertConf = true;
+ }
+ }
+ if (insertConf)
+ themeConfigDefaults.insert(std::pair<std::string, std::map<std::string, int> >(*theme, themeConf));
+ }
+}
+
+std::pair<std::string, int> cNopacityConfig::ReadThemeConfigLine(const char *line) {
+ std::pair<std::string, int> themeConf;
+ try {
+ splitstring s(line);
+ std::vector<std::string> flds = s.split('=', 0);
+ if (flds.size() == 2) {
+ std::string name = flds[0];
+ name.erase(name.find_last_not_of(" ")+1);
+ name.erase(0, name.find_first_not_of(" "));
+ int value = atoi(flds[1].c_str());
+ themeConf = std::make_pair (name,value);
+ } else {
+ themeConf = std::make_pair ("undefined",0);
+ }
+ } catch (...) {
+ themeConf = std::make_pair ("undefined",0);
+ }
+ return themeConf;
+}
+
+void cNopacityConfig::SetThemeSpecificDefaults(void) {
+ std::map<std::string, std::map<std::string, int> >::iterator themeConfHit = themeConfigDefaults.find(Setup.OSDTheme);
+ if (themeConfHit != themeConfigDefaults.end()) {
+ std::map<std::string, int> themeConf = (std::map<std::string, int>)themeConfHit->second;
+ for(std::map<std::string, int>::const_iterator it = themeConf.begin(); it != themeConf.end(); it++) {
+ std::string name = (std::string)it->first;
+ int value = (int)it->second;
+ std::map<std::string, int>::iterator origVal = conf.find(name);
+ if (origVal != conf.end()) {
+ conf.erase(origVal);
+ conf.insert(std::pair<std::string, int>(name, value));
+ } else {
+ dsyslog("nopacity: ERROR: unknown config parameter %s in default config for theme %s", name.c_str(), Setup.OSDTheme);
+ }
+ }
+ }
+}
+
+void cNopacityConfig::SetThemeSetup(void) {
+ std::map<std::string, std::map<std::string, int> >::iterator themeSetupHit = themeConfigSetup.find(Setup.OSDTheme);
+ if (themeSetupHit != themeConfigSetup.end()) {
+ std::map<std::string, int> themeSetup = (std::map<std::string, int>)themeSetupHit->second;
+ for(std::map<std::string, int>::const_iterator it = themeSetup.begin(); it != themeSetup.end(); it++) {
+ std::string name = (std::string)it->first;
+ int value = (int)it->second;
+ std::map<std::string, int>::iterator origVal = conf.find(name);
+ if (origVal != conf.end()) {
+ conf.erase(origVal);
+ conf.insert(std::pair<std::string, int>(name, value));
+ }
+ }
+ }
+}
bool cNopacityConfig::SetupParse(const char *Name, const char *Value) {
- if (strcmp(Name, "fontIndex") == 0) fontIndex = atoi(Value);
- else if (strcmp(Name, "channelFadeTime") == 0) channelFadeTime = atoi(Value);
- else if (strcmp(Name, "channelHeight") == 0) channelHeight = atoi(Value);
- else if (strcmp(Name, "channelBorderVertical") == 0) channelBorderVertical = atoi(Value);
- else if (strcmp(Name, "channelBorderBottom") == 0) channelBorderBottom = atoi(Value);
- else if (strcmp(Name, "logoPosition") == 0) logoPosition = atoi(Value);
- else if (strcmp(Name, "logoWidth") == 0) logoWidth = atoi(Value);
- else if (strcmp(Name, "logoHeight") == 0) logoHeight = atoi(Value);
- else if (strcmp(Name, "logoBorder") == 0) logoBorder = atoi(Value);
- else if (strcmp(Name, "backgroundStyle") == 0) backgroundStyle = atoi(Value);
- else if (strcmp(Name, "symbolStyle") == 0) symbolStyle = atoi(Value);
- else if (strcmp(Name, "roundedCornersChannel") == 0) roundedCornersChannel = atoi(Value);
- else if (strcmp(Name, "displaySignalStrength") == 0) displaySignalStrength = atoi(Value);
- else if (strcmp(Name, "displaySourceInfo") == 0) displaySourceInfo = atoi(Value);
- else if (strcmp(Name, "displayPrevNextChannelGroup") == 0) displayPrevNextChannelGroup = atoi(Value);
- else if (strcmp(Name, "fontChannelHeaderSize") == 0) fontChannelHeaderSize = atoi(Value);
- else if (strcmp(Name, "fontChannelDateSize") == 0) fontChannelDateSize = atoi(Value);
- else if (strcmp(Name, "fontEPGSize") == 0) fontEPGSize = atoi(Value);
- else if (strcmp(Name, "fontEPGSmallSize") == 0) fontEPGSmallSize = atoi(Value);
- else if (strcmp(Name, "fontChannelGroupSize") == 0) fontChannelGroupSize = atoi(Value);
- else if (strcmp(Name, "fontChannelGroupSmallSize") == 0) fontChannelGroupSmallSize = atoi(Value);
- else if (strcmp(Name, "resolutionIconSize") == 0) resolutionIconSize = atoi(Value);
- else if (strcmp(Name, "statusIconSize") == 0) statusIconSize = atoi(Value);
- else if (strcmp(Name, "progressCurrentSchedule") == 0) progressCurrentSchedule = atoi(Value);
- else if (strcmp(Name, "displayPoster") == 0) displayPoster = atoi(Value);
- else if (strcmp(Name, "replayHeight") == 0) replayHeight = atoi(Value);
- else if (strcmp(Name, "replayBorderVertical") == 0) replayBorderVertical = atoi(Value);
- else if (strcmp(Name, "replayBorderBottom") == 0) replayBorderBottom = atoi(Value);
- else if (strcmp(Name, "replayFadeTime") == 0) replayFadeTime = atoi(Value);
- else if (strcmp(Name, "fontReplayHeader") == 0) fontReplayHeader = atoi(Value);
- else if (strcmp(Name, "fontReplay") == 0) fontReplay = atoi(Value);
- else if (strcmp(Name, "messageWidth") == 0) messageWidth = atoi(Value);
- else if (strcmp(Name, "messageHeight") == 0) messageHeight = atoi(Value);
- else if (strcmp(Name, "messageBorderBottom") == 0) messageBorderBottom = atoi(Value);
- else if (strcmp(Name, "fontMessage") == 0) fontMessage = atoi(Value);
- else if (strcmp(Name, "messageFadeTime") == 0) messageFadeTime = atoi(Value);
- else if (strcmp(Name, "tracksFadeTime") == 0) tracksFadeTime = atoi(Value);
- else if (strcmp(Name, "tracksWidth") == 0) tracksWidth = atoi(Value);
- else if (strcmp(Name, "tracksItemHeight") == 0) tracksItemHeight = atoi(Value);
- else if (strcmp(Name, "tracksPosition") == 0) tracksPosition = atoi(Value);
- else if (strcmp(Name, "tracksBorderHorizontal") == 0) tracksBorderHorizontal = atoi(Value);
- else if (strcmp(Name, "tracksBorderVertical") == 0) tracksBorderVertical = atoi(Value);
- else if (strcmp(Name, "fontTracksHeader") == 0) fontTracksHeader = atoi(Value);
- else if (strcmp(Name, "fontTracks") == 0) fontTracks = atoi(Value);
- else if (strcmp(Name, "volumeFadeTime") == 0) volumeFadeTime = atoi(Value);
- else if (strcmp(Name, "volumeWidth") == 0) volumeWidth = atoi(Value);
- else if (strcmp(Name, "volumeHeight") == 0) volumeHeight = atoi(Value);
- else if (strcmp(Name, "volumeBorderBottom") == 0) volumeBorderBottom = atoi(Value);
- else if (strcmp(Name, "fontVolume") == 0) fontVolume = atoi(Value);
- else if (strcmp(Name, "menuFadeTime") == 0) menuFadeTime = atoi(Value);
- else if (strcmp(Name, "menuEPGWindowFadeTime") == 0) menuEPGWindowFadeTime = atoi(Value);
- else if (strcmp(Name, "menuScrollDelay") == 0) menuScrollDelay = atoi(Value);
- else if (strcmp(Name, "menuScrollSpeed") == 0) menuScrollSpeed = atoi(Value);
- else if (strcmp(Name, "menuInfoTextDelay") == 0) menuInfoTextDelay = atoi(Value);
- else if (strcmp(Name, "menuInfoScrollDelay") == 0) menuInfoScrollDelay = atoi(Value);
- else if (strcmp(Name, "menuInfoScrollSpeed") == 0) menuInfoScrollSpeed = atoi(Value);
- else if (strcmp(Name, "scrollMode") == 0) scrollMode = atoi(Value);
- else if (strcmp(Name, "menuAdjustLeft") == 0) menuAdjustLeft = atoi(Value);
- else if (strcmp(Name, "scalePicture") == 0) scalePicture = atoi(Value);
- else if (strcmp(Name, "roundedCorners") == 0) roundedCorners = atoi(Value);
- else if (strcmp(Name, "cornerRadius") == 0) cornerRadius = atoi(Value);
- else if (strcmp(Name, "useMenuIcons") == 0) useMenuIcons = atoi(Value);
- else if (strcmp(Name, "mainMenuTitleStyle") == 0) mainMenuTitleStyle = atoi(Value);
- else if (strcmp(Name, "narrowMainMenu") == 0) narrowMainMenu = atoi(Value);
- else if (strcmp(Name, "narrowScheduleMenu") == 0) narrowScheduleMenu = atoi(Value);
- else if (strcmp(Name, "narrowChannelMenu") == 0) narrowChannelMenu = atoi(Value);
- else if (strcmp(Name, "narrowTimerMenu") == 0) narrowTimerMenu = atoi(Value);
- else if (strcmp(Name, "narrowRecordingMenu") == 0) narrowRecordingMenu = atoi(Value);
- else if (strcmp(Name, "narrowSetupMenu") == 0) narrowSetupMenu = atoi(Value);
- else if (strcmp(Name, "displayRerunsDetailEPGView") == 0) displayRerunsDetailEPGView = atoi(Value);
- else if (strcmp(Name, "numReruns") == 0) numReruns = atoi(Value);
- else if (strcmp(Name, "useSubtitleRerun") == 0) useSubtitleRerun = atoi(Value);
- else if (strcmp(Name, "displayAdditionalEPGPictures") == 0) displayAdditionalEPGPictures = atoi(Value);
- else if (strcmp(Name, "numAdditionalEPGPictures") == 0) numAdditionalEPGPictures = atoi(Value);
- else if (strcmp(Name, "displayAdditionalRecEPGPictures") == 0) displayAdditionalRecEPGPictures = atoi(Value);
- else if (strcmp(Name, "numAdditionalRecEPGPictures") == 0) numAdditionalRecEPGPictures = atoi(Value);
- else if (strcmp(Name, "menuChannelDisplayMode") == 0) menuChannelDisplayMode = atoi(Value);
- else if (strcmp(Name, "menuChannelDisplayTime") == 0) menuChannelDisplayTime= atoi(Value);
- else if (strcmp(Name, "numEPGEntriesChannelsMenu") == 0) numEPGEntriesChannelsMenu = atoi(Value);
- else if (strcmp(Name, "menuWidthMain") == 0) menuWidthMain = atoi(Value);
- else if (strcmp(Name, "menuWidthSchedules") == 0) menuWidthSchedules = atoi(Value);
- else if (strcmp(Name, "menuWidthChannels") == 0) menuWidthChannels = atoi(Value);
- else if (strcmp(Name, "menuWidthTimers") == 0) menuWidthTimers = atoi(Value);
- else if (strcmp(Name, "menuWidthRecordings") == 0) menuWidthRecordings = atoi(Value);
- else if (strcmp(Name, "menuWidthSetup") == 0) menuWidthSetup = atoi(Value);
- else if (strcmp(Name, "menuWidthRightItems") == 0) menuWidthRightItems = atoi(Value);
- else if (strcmp(Name, "menuSizeDiskUsage") == 0) menuSizeDiskUsage = atoi(Value);
- else if (strcmp(Name, "menuHeightInfoWindow") == 0) menuHeightInfoWindow = atoi(Value);
- else if (strcmp(Name, "showDiscUsage") == 0) showDiscUsage = atoi(Value);
- else if (strcmp(Name, "discUsageStyle") == 0) discUsageStyle = atoi(Value);
- else if (strcmp(Name, "showTimers") == 0) showTimers = atoi(Value);
- else if (strcmp(Name, "numberTimers") == 0) numberTimers = atoi(Value);
- else if (strcmp(Name, "checkTimerConflict") == 0) checkTimerConflict = atoi(Value);
- else if (strcmp(Name, "headerHeight") == 0) headerHeight = atoi(Value);
- else if (strcmp(Name, "footerHeight") == 0) footerHeight = atoi(Value);
- else if (strcmp(Name, "numDefaultMenuItems") == 0) numDefaultMenuItems = atoi(Value);
- else if (strcmp(Name, "iconHeight") == 0) iconHeight = atoi(Value);
- else if (strcmp(Name, "headerIconHeight") == 0) headerIconHeight = atoi(Value);
- else if (strcmp(Name, "menuItemLogoWidth") == 0) menuItemLogoWidth = atoi(Value);
- else if (strcmp(Name, "menuItemLogoHeight") == 0) menuItemLogoHeight = atoi(Value);
- else if (strcmp(Name, "menuHeaderLogoWidth") == 0) menuHeaderLogoWidth = atoi(Value);
- else if (strcmp(Name, "menuHeaderLogoHeight") == 0) menuHeaderLogoHeight = atoi(Value);
- else if (strcmp(Name, "timersLogoWidth") == 0) timersLogoWidth = atoi(Value);
- else if (strcmp(Name, "timersLogoHeight") == 0) timersLogoHeight = atoi(Value);
- else if (strcmp(Name, "epgImageWidth") == 0) epgImageWidth = atoi(Value);
- else if (strcmp(Name, "epgImageHeight") == 0) epgImageHeight = atoi(Value);
- else if (strcmp(Name, "epgImageWidthLarge") == 0) epgImageWidthLarge = atoi(Value);
- else if (strcmp(Name, "epgImageHeightLarge") == 0) epgImageHeightLarge = atoi(Value);
- else if (strcmp(Name, "posterWidth") == 0) posterWidth = atoi(Value);
- else if (strcmp(Name, "posterHeight") == 0) posterHeight = atoi(Value);
- else if (strcmp(Name, "menuRecFolderSize") == 0) menuRecFolderSize = atoi(Value);
- else if (strcmp(Name, "useFolderPoster") == 0) useFolderPoster = atoi(Value);
- else if (strcmp(Name, "borderDetailedEPG") == 0) borderDetailedEPG = atoi(Value);
- else if (strcmp(Name, "borderDetailedRecordings") == 0) borderDetailedRecordings = atoi(Value);
- else if (strcmp(Name, "menuSchedulesWindowMode") == 0) menuSchedulesWindowMode = atoi(Value);
- else if (strcmp(Name, "menuRecordingsWindowMode") == 0) menuRecordingsWindowMode = atoi(Value);
- else if (strcmp(Name, "fontHeader") == 0) fontHeader = atoi(Value);
- else if (strcmp(Name, "fontDate") == 0) fontDate = atoi(Value);
- else if (strcmp(Name, "fontMenuitemLarge") == 0) fontMenuitemLarge = atoi(Value);
- else if (strcmp(Name, "fontMenuitemSchedule") == 0) fontMenuitemSchedule = atoi(Value);
- else if (strcmp(Name, "fontMenuitemScheduleSmall") == 0) fontMenuitemScheduleSmall = atoi(Value);
- else if (strcmp(Name, "fontMenuitemChannel") == 0) fontMenuitemChannel = atoi(Value);
- else if (strcmp(Name, "fontMenuitemChannelSmall") == 0) fontMenuitemChannelSmall = atoi(Value);
- else if (strcmp(Name, "fontMenuitemRecordings") == 0) fontMenuitemRecordings = atoi(Value);
- else if (strcmp(Name, "fontMenuitemRecordingsSmall") == 0) fontMenuitemRecordingsSmall = atoi(Value);
- else if (strcmp(Name, "fontMenuitemTimers") == 0) fontMenuitemTimers = atoi(Value);
- else if (strcmp(Name, "fontMenuitemTimersSmall") == 0) fontMenuitemTimersSmall = atoi(Value);
- else if (strcmp(Name, "fontMenuitemDefault") == 0) fontMenuitemDefault = atoi(Value);
- else if (strcmp(Name, "fontDiskUsage") == 0) fontDiskUsage = atoi(Value);
- else if (strcmp(Name, "fontDiskUsagePercent") == 0) fontDiskUsagePercent = atoi(Value);
- else if (strcmp(Name, "fontTimersHead") == 0) fontTimersHead = atoi(Value);
- else if (strcmp(Name, "fontTimers") == 0) fontTimers = atoi(Value);
- else if (strcmp(Name, "fontButtons") == 0) fontButtons = atoi(Value);
- else if (strcmp(Name, "fontMessageMenu") == 0) fontMessageMenu = atoi(Value);
- else if (strcmp(Name, "fontDetailView") == 0) fontDetailView = atoi(Value);
- else if (strcmp(Name, "fontDetailViewSmall") == 0) fontDetailViewSmall = atoi(Value);
- else if (strcmp(Name, "fontDetailViewHeader") == 0) fontDetailViewHeader = atoi(Value);
- else if (strcmp(Name, "fontDetailViewHeaderLarge") == 0) fontDetailViewHeaderLarge = atoi(Value);
- else if (strcmp(Name, "fontEPGInfoWindow") == 0) fontEPGInfoWindow = atoi(Value);
- else if (strcmp(Name, "fontEPGInfoWindowLarge") == 0) fontEPGInfoWindowLarge = atoi(Value);
- else if (strcmp(Name, "displayRSSFeed") == 0) displayRSSFeed = atoi(Value);
- else if (strcmp(Name, "rssFeedHeight") == 0) rssFeedHeight = atoi(Value);
- else if (strcmp(Name, "fontRssFeed") == 0) fontRssFeed = atoi(Value);
- else if (strcmp(Name, "rssScrollDelay") == 0) rssScrollDelay = atoi(Value);
- else if (strcmp(Name, "rssScrollSpeed") == 0) rssScrollSpeed = atoi(Value);
- else if (strcmp(Name, "rssFeed[0]") == 0) rssFeed[0] = atoi(Value);
- else if (strcmp(Name, "rssFeed[1]") == 0) rssFeed[1] = atoi(Value);
- else if (strcmp(Name, "rssFeed[2]") == 0) rssFeed[2] = atoi(Value);
- else if (strcmp(Name, "rssFeed[3]") == 0) rssFeed[3] = atoi(Value);
- else if (strcmp(Name, "rssFeed[4]") == 0) rssFeed[4] = atoi(Value);
- else if (strcmp(Name, "rssFeedHeightStandalone") == 0) rssFeedHeightStandalone = atoi(Value);
- else if (strcmp(Name, "fontRssFeedStandalone") == 0) fontRssFeedStandalone = atoi(Value);
- else if (strcmp(Name, "rssFeedStandalonePos") == 0) rssFeedStandalonePos = atoi(Value);
- else if (strcmp(Name, "limitLogoCache") == 0) limitLogoCache = atoi(Value);
- else if (strcmp(Name, "numLogosInitial") == 0) numLogosInitial = atoi(Value);
- else if (strcmp(Name, "numLogosMax") == 0) numLogosMax = atoi(Value);
- else return false;
+ splitstring s(Name);
+ std::vector<std::string> flds = s.split('.', 0);
+ if (flds.size() == 2) {
+ std::string theme = flds[0];
+ std::string name = flds[1];
+ //check if valid value
+ std::map<std::string, int>::iterator hit = conf.find(name);
+ if (hit == conf.end())
+ return false;
+ //check if theme already in map
+ std::map<std::string, std::map<std::string, int> >::iterator hit2 = themeConfigSetup.find(theme);
+ if (hit2 != themeConfigSetup.end()) {
+ std::map<std::string, int> existingValues = (std::map<std::string, int>)hit2->second;
+ existingValues.insert(std::pair<std::string, int>(name, atoi(Value)));
+ themeConfigSetup.erase(theme);
+ themeConfigSetup.insert(std::pair<std::string, std::map<std::string, int> >(theme, existingValues));
+ } else {
+ std::map<std::string, int> themeConf;
+ themeConf.insert(std::pair<std::string, int>(name, atoi(Value)));
+ themeConfigSetup.insert(std::pair<std::string, std::map<std::string, int> >(theme, themeConf));
+ }
+ } else {
+ return false;
+ }
return true;
-
+}
+
+void cNopacityConfig::DumpConfig(void) {
+ esyslog("nopacity: current config -----------------");
+ for(std::map<std::string, int>::const_iterator it = conf.begin(); it != conf.end(); it++) {
+ esyslog("nopacity: %s: %d", (std::string(it->first)).c_str(), (int)it->second);
+ }
+ esyslog("nopacity: --------------------------------");
+}
+
+void cNopacityConfig::DumpThemeConfig(void) {
+ for (std::map<std::string, std::map<std::string, int> >::const_iterator it = themeConfigDefaults.begin(); it != themeConfigDefaults.end(); it++) {
+ esyslog("nopacity: Default Config for theme %s -----------------", (std::string(it->first)).c_str());
+ std::map<std::string, int> themeValues = (std::map<std::string, int>)it->second;
+ for (std::map<std::string, int>::const_iterator it2 = themeValues.begin(); it2 != themeValues.end(); it2++) {
+ esyslog("nopacity: %s: %d", (std::string(it2->first)).c_str(), (int)it2->second);
+ }
+ }
+ esyslog("nopacity: --------------------------------");
+ for (std::map<std::string, std::map<std::string, int> >::const_iterator it3 = themeConfigSetup.begin(); it3 != themeConfigSetup.end(); it3++) {
+ esyslog("nopacity: Setup for theme %s -----------------", (std::string(it3->first)).c_str());
+ std::map<std::string, int> themeValues = (std::map<std::string, int>)it3->second;
+ for (std::map<std::string, int>::const_iterator it4 = themeValues.begin(); it4 != themeValues.end(); it4++) {
+ esyslog("nopacity: %s: %d", (std::string(it4->first)).c_str(), (int)it4->second);
+ }
+ }
+ esyslog("nopacity: --------------------------------");
}
diff --git a/config.h b/config.h
index fc414c5..943f1d3 100644
--- a/config.h
+++ b/config.h
@@ -1,17 +1,27 @@
#ifndef __NOPACITY_CONFIG_H
#define __NOPACITY_CONFIG_H
-struct RssFeed {
- std::string name;
- std::string url;
+enum eDisplayType {
+ dtFlat = 0,
+ dtBlending,
+ dtGraphical
};
class cNopacityConfig {
private:
+ std::map<std::string, int> conf;
+ std::map<std::string, std::map<std::string, int> > themeConfigDefaults;
+ std::map<std::string, std::map<std::string, int> > themeConfigSetup;
+ void LoadThemeConfig(cString confFile, cString theme);
+ std::pair<std::string, int> ReadThemeConfigLine(const char *line);
cString checkSlashAtEnd(std::string path);
public:
cNopacityConfig();
~cNopacityConfig();
+ int GetValue(std::string name);
+ int *GetValueRef(std::string name);
+ std::map<std::string, int>::const_iterator GetStart(void) { return conf.begin(); };
+ std::map<std::string, int>::const_iterator GetEnd(void) { return conf.end(); };
bool SetupParse(const char *Name, const char *Value);
void SetLogoPath(cString path);
void SetIconPath(cString path);
@@ -22,13 +32,14 @@ class cNopacityConfig {
cString logoPathDefault;
cString iconPathDefault;
cString epgImagePathDefault;
- bool pathValuesSet;
- void setDynamicValues();
- void loadRssFeeds(void);
- //Theme Setting
- bool doBlending;
- //Common
- int fontIndex;
+ void LoadDefaults(void);
+ void LoadThemeSpecificConfigs(void);
+ void SetThemeSpecificDefaults(void);
+ void SetThemeSetup(void);
+ void SetPathes(void);
+ void DumpConfig(void);
+ void DumpThemeConfig(void);
+ void SetFontName();
const char *fontDefaultName;
char *fontName;
cString logoPath;
@@ -36,178 +47,6 @@ class cNopacityConfig {
cString iconPath;
cString epgImagePath;
bool mainMenuEntry;
- //DisplayChannel
- int channelHeight;
- int channelBorderVertical;
- int channelBorderBottom;
- int channelFadeTime;
- int channelFrameTime;
- int logoPosition;
- int logoWidth;
- int logoHeight;
- int logoBorder;
- int backgroundStyle;
- int symbolStyle;
- int roundedCornersChannel;
- int displaySignalStrength;
- int displaySourceInfo;
- int displayPrevNextChannelGroup;
- int fontChannelHeaderSize;
- int fontChannelDateSize;
- int fontEPGSize;
- int fontEPGSmallSize;
- int fontChannelGroupSize;
- int fontChannelGroupSmallSize;
- int resolutionIconSize;
- int statusIconSize;
- int progressCurrentSchedule;
- int displayPoster;
- //DisplayReplay
- int replayHeight;
- int replayBorderVertical;
- int replayBorderBottom;
- int replayFadeTime;
- int replayFrameTime;
- int fontReplayHeader;
- int fontReplay;
- //Display Message
- int messageWidth;
- int messageHeight;
- int messageBorderBottom;
- int fontMessage;
- int messageFadeTime;
- int messageFrameTime;
- //DisplayTracks
- int tracksFadeTime;
- int tracksFrameTime;
- int tracksWidth;
- int tracksItemHeight;
- int tracksPosition;
- int tracksBorderHorizontal;
- int tracksBorderVertical;
- int fontTracksHeader;
- int fontTracks;
- //DisplayVolume
- int volumeFadeTime;
- int volumeFrameTime;
- int volumeWidth;
- int volumeHeight;
- int volumeBorderBottom;
- int fontVolume;
- //DisplayMenu
- int scrollMode;
- int spaceMenu;
- int widthScrollbar;
- int menuAdjustLeft;
- int scalePicture;
- int roundedCorners;
- int cornerRadius;
- int useMenuIcons;
- int mainMenuTitleStyle;
- int narrowMainMenu;
- int narrowScheduleMenu;
- int narrowChannelMenu;
- int narrowTimerMenu;
- int narrowRecordingMenu;
- int narrowSetupMenu;
- int displayRerunsDetailEPGView;
- int numReruns;
- int useSubtitleRerun;
- int displayAdditionalEPGPictures;
- int numAdditionalEPGPictures;
- int displayAdditionalRecEPGPictures;
- int numAdditionalRecEPGPictures;
- int menuChannelDisplayMode;
- int menuChannelDisplayTime;
- int numEPGEntriesChannelsMenu;
- int menuFadeTime;
- int menuEPGWindowFadeTime;
- int menuFrameTime;
- int menuEPGWindowFrameTime;
- int menuScrollDelay;
- int menuScrollSpeed;
- int menuScrollFrameTime;
- int menuInfoTextDelay;
- int menuInfoScrollDelay;
- int menuInfoScrollSpeed;
- int menuInfoScrollFrameTime;
- int menuWidthMain;
- int menuWidthSchedules;
- int menuWidthChannels;
- int menuWidthTimers;
- int menuWidthRecordings;
- int menuWidthSetup;
- int menuHeightInfoWindow;
- int menuWidthRightItems;
- int menuSizeDiskUsage;
- int showDiscUsage;
- int discUsageStyle;
- int showTimers;
- int numberTimers;
- int checkTimerConflict;
- int headerHeight;
- int footerHeight;
- int numDefaultMenuItems;
- int iconHeight;
- int headerIconHeight;
- int menuItemLogoWidth;
- int menuItemLogoHeight;
- int menuHeaderLogoWidth;
- int menuHeaderLogoHeight;
- int timersLogoWidth;
- int timersLogoHeight;
- int epgImageWidth;
- int epgImageHeight;
- int epgImageWidthLarge;
- int epgImageHeightLarge;
- int posterWidth;
- int posterHeight;
- int menuRecFolderSize;
- int useFolderPoster;
- int borderDetailedEPG;
- int borderDetailedRecordings;
- int menuSchedulesWindowMode;
- int menuRecordingsWindowMode;
- int fontHeader;
- int fontDate;
- int fontMenuitemLarge;
- int fontMenuitemSchedule;
- int fontMenuitemScheduleSmall;
- int fontMenuitemChannel;
- int fontMenuitemChannelSmall;
- int fontMenuitemRecordings;
- int fontMenuitemRecordingsSmall;
- int fontMenuitemTimers;
- int fontMenuitemTimersSmall;
- int fontMenuitemDefault;
- int fontDiskUsage;
- int fontDiskUsagePercent;
- int fontTimersHead;
- int fontTimers;
- int fontButtons;
- int fontMessageMenu;
- int fontDetailView;
- int fontDetailViewSmall;
- int fontDetailViewHeader;
- int fontDetailViewHeaderLarge;
- int fontEPGInfoWindow;
- int fontEPGInfoWindowLarge;
- //RSS Feeds
- std::vector<RssFeed> rssFeeds;
- int displayRSSFeed;
- int rssFeedHeight;
- int rssFeedHeightStandalone;
- int fontRssFeed;
- int fontRssFeedStandalone;
- int rssFeedStandalonePos;
- int rssScrollDelay;
- int rssScrollSpeed;
- int rssScrollFrameTime;
- int rssFeed[5];
- //Channel Logo Caching
- int limitLogoCache;
- int numLogosInitial;
- int numLogosMax;
};
#endif //__NOPACITY_CONFIG_H \ No newline at end of file
diff --git a/displaychannel.c b/displaychannel.c
index 6dd8dc3..1400de8 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -1,38 +1,28 @@
#include "displaychannel.h"
-#include "services/tvscraper.h"
cNopacityDisplayChannel::cNopacityDisplayChannel(cImageCache *imgCache, bool WithInfo) {
if (firstDisplay) {
imgCache->CreateCacheDelayed();
- std::string sizeBackgrCache = imgCache->GetCacheSize(ctBackground);
firstDisplay = false;
doOutput = false;
return;
} else
doOutput = true;
- this->imgCache = imgCache;
- config.setDynamicValues();
- withInfo = WithInfo;
groupSep = false;
present = NULL;
- lastSeen = -1;
- lastSignalDisplay = 0;
- lastSignalStrength = 0;
- lastSignalQuality = 0;
- lastScreenWidth = 0;
currentLast = 0;
channelChange = false;
- isRadioChannel = false;
- radioIconDrawn = false;
initial = true;
- FrameTime = config.channelFrameTime;
- FadeTime = config.channelFadeTime;
- lastDate = "";
- signalX = 0;
- createOsd();
- CreatePixmaps();
- DrawBackground();
- DrawSignalMeter();
+ FadeTime = config.GetValue("channelFadeTime");
+ FrameTime = FadeTime / 10;
+
+ channelView = new cNopacityDisplayChannelView(imgCache);
+ channelView->createOsd();
+ channelView->CreatePixmaps();
+ channelView->DrawBackground();
+ if (config.GetValue("displaySignalStrength")) {
+ channelView->DrawSignalMeter();
+ }
}
cNopacityDisplayChannel::~cNopacityDisplayChannel() {
@@ -41,461 +31,19 @@ cNopacityDisplayChannel::~cNopacityDisplayChannel() {
Cancel(-1);
while (Active())
cCondWait::SleepMs(10);
-
- osd->DestroyPixmap(pixmapBackgroundTop);
- osd->DestroyPixmap(pixmapBackgroundBottom);
- osd->DestroyPixmap(pixmapLogo);
- osd->DestroyPixmap(pixmapLogoBackground);
- osd->DestroyPixmap(pixmapLogoBackgroundTop);
- osd->DestroyPixmap(pixmapLogoBackgroundBottom);
- osd->DestroyPixmap(pixmapChannelInfo);
- osd->DestroyPixmap(pixmapDate);
- if (withInfo) {
- osd->DestroyPixmap(pixmapBackgroundMiddle);
- osd->DestroyPixmap(pixmapProgressBar);
- osd->DestroyPixmap(pixmapEPGInfo);
- }
- if (pixmapScreenResolution)
- osd->DestroyPixmap(pixmapScreenResolution);
- osd->DestroyPixmap(pixmapFooter);
- osd->DestroyPixmap(pixmapStreamInfo);
- osd->DestroyPixmap(pixmapStreamInfoBack);
- if (config.displaySignalStrength && showSignal) {
- osd->DestroyPixmap(pixmapSignalStrength);
- osd->DestroyPixmap(pixmapSignalQuality);
- osd->DestroyPixmap(pixmapSignalMeter);
- osd->DestroyPixmap(pixmapSignalLabel);
- }
- if (pixmapPoster)
- osd->DestroyPixmap(pixmapPoster);
- if (config.displaySignalStrength && showSignal) {
- delete fontInfoline;
- }
- delete osd;
-}
-
-void cNopacityDisplayChannel::createOsd(void) {
- osd = CreateOsd(geoManager->osdLeft,
- geoManager->osdTop,
- geoManager->osdWidth,
- geoManager->osdHeight);
-}
-
-void cNopacityDisplayChannel::CreatePixmaps(void) {
- int channelInfoY = 0;
- if (withInfo) {
- pixmapProgressBar = osd->CreatePixmap(2, cRect(geoManager->channelX, geoManager->channelTop + geoManager->channelInfoHeight, geoManager->channelWidth, geoManager->channelProgressBarHeight));
- pixmapEPGInfo = osd->CreatePixmap(2, cRect(geoManager->channelX, geoManager->channelTop + geoManager->channelInfoHeight + geoManager->channelProgressBarHeight, geoManager->channelWidth, geoManager->channelEpgInfoHeight));
- pixmapBackgroundMiddle = osd->CreatePixmap(1, cRect(geoManager->channelX, geoManager->channelTop + geoManager->channelInfoHeight, geoManager->channelWidth, geoManager->channelProgressBarHeight + geoManager->channelEpgInfoHeight));
- } else {
- channelInfoY = (geoManager->channelHeight - geoManager->channelInfoHeight) / 3;
- geoManager->channelStreamInfoY = (geoManager->channelHeight - geoManager->channelInfoHeight) / 3 + geoManager->channelInfoHeight;
- }
- pixmapBackgroundTop = osd->CreatePixmap(1, cRect(geoManager->channelX, geoManager->channelTop + channelInfoY, geoManager->channelWidth, geoManager->channelInfoHeight));
- pixmapBackgroundBottom = osd->CreatePixmap(1, cRect(geoManager->channelX, geoManager->channelTop + geoManager->channelStreamInfoY, geoManager->channelWidth, geoManager->channelStreamInfoHeight));
-
- pixmapChannelInfo = osd->CreatePixmap(2, cRect(geoManager->channelX, geoManager->channelTop + channelInfoY, geoManager->channelInfoWidth, geoManager->channelInfoHeight));
- pixmapDate = osd->CreatePixmap(2, cRect(geoManager->channelX + geoManager->channelInfoWidth, geoManager->channelTop + channelInfoY, geoManager->channelDateWidth, geoManager->channelInfoHeight));
- pixmapFooter = osd->CreatePixmap(2, cRect(geoManager->channelX, geoManager->channelTop + geoManager->channelStreamInfoY, geoManager->channelWidth, geoManager->channelStreamInfoHeight));
- pixmapStreamInfo = osd->CreatePixmap(4, cRect(geoManager->channelX + (geoManager->channelWidth - geoManager->channelIconsWidth - config.resolutionIconSize - 35), geoManager->channelTop + geoManager->channelHeight - geoManager->channelIconSize - 10, geoManager->channelIconsWidth, geoManager->channelIconSize));
- pixmapStreamInfoBack = osd->CreatePixmap(3, cRect(geoManager->channelX + (geoManager->channelWidth - geoManager->channelIconsWidth - config.resolutionIconSize - 35), geoManager->channelTop + geoManager->channelHeight - geoManager->channelIconSize - 10, geoManager->channelIconsWidth, geoManager->channelIconSize));
-
- switch (config.logoPosition) {
- case lpLeft:
- pixmapLogoBackgroundTop = osd->CreatePixmap(1, cRect(config.channelBorderVertical, geoManager->channelTop, geoManager->channelX - config.channelBorderVertical, geoManager->channelInfoHeight));
- pixmapLogoBackground = osd->CreatePixmap(1, cRect(config.channelBorderVertical, geoManager->channelTop + geoManager->channelInfoHeight, geoManager->channelX - config.channelBorderVertical, geoManager->channelProgressBarHeight + geoManager->channelEpgInfoHeight));
- pixmapLogoBackgroundBottom = osd->CreatePixmap(1, cRect(config.channelBorderVertical, geoManager->channelTop + geoManager->channelStreamInfoY, geoManager->channelX - config.channelBorderVertical, geoManager->channelStreamInfoHeight));
- pixmapLogo = osd->CreatePixmap(2, cRect(0, geoManager->channelTop, config.logoWidth + 2 * config.logoBorder, geoManager->channelHeight));
- break;
- case lpRight:
- pixmapLogoBackgroundTop = osd->CreatePixmap(1, cRect(geoManager->channelX + geoManager->channelWidth, geoManager->channelTop, cOsd::OsdWidth() - 2*config.channelBorderVertical - geoManager->channelWidth, geoManager->channelInfoHeight));
- pixmapLogoBackground = osd->CreatePixmap(1, cRect(geoManager->channelX + geoManager->channelWidth, geoManager->channelTop + geoManager->channelInfoHeight, cOsd::OsdWidth() - 2*config.channelBorderVertical - geoManager->channelWidth, geoManager->channelProgressBarHeight + geoManager->channelEpgInfoHeight));
- pixmapLogoBackgroundBottom = osd->CreatePixmap(1, cRect(geoManager->channelX + geoManager->channelWidth, geoManager->channelTop + geoManager->channelStreamInfoY, cOsd::OsdWidth() - 2*config.channelBorderVertical - geoManager->channelWidth, geoManager->channelStreamInfoHeight));
- pixmapLogo = osd->CreatePixmap(2, cRect(geoManager->channelX + geoManager->channelWidth, geoManager->channelTop, config.logoWidth + 2 * config.logoBorder, geoManager->channelHeight));
- break;
- case lpNone:
- pixmapLogo = osd->CreatePixmap(-1, cRect(0, geoManager->channelTop, 1, 1));
- pixmapLogoBackground = osd->CreatePixmap(-1, cRect(0, geoManager->channelTop, 1, 1));
- pixmapLogoBackgroundTop = osd->CreatePixmap(-1, cRect(0, geoManager->channelTop, 1, 1));
- pixmapLogoBackgroundBottom = osd->CreatePixmap(-1, cRect(0, geoManager->channelTop, 1, 1));
- break;
- }
-
- if (config.channelFadeTime) {
- pixmapBackgroundTop->SetAlpha(0);
- pixmapBackgroundBottom->SetAlpha(0);
- pixmapChannelInfo->SetAlpha(0);
- pixmapDate->SetAlpha(0);
- pixmapLogo->SetAlpha(0);
- pixmapLogoBackground->SetAlpha(0);
- pixmapLogoBackgroundTop->SetAlpha(0);
- pixmapLogoBackgroundBottom->SetAlpha(0);
- pixmapFooter->SetAlpha(0);
- pixmapStreamInfo->SetAlpha(0);
- pixmapStreamInfoBack->SetAlpha(0);
- if (withInfo) {
- pixmapBackgroundMiddle->SetAlpha(0);
- pixmapProgressBar->SetAlpha(0);
- pixmapEPGInfo->SetAlpha(0);
- }
- }
- if (withInfo) {
- pixmapProgressBar->Fill(clrTransparent);
- pixmapEPGInfo->Fill(clrTransparent);
- }
- pixmapScreenResolution = NULL;
- pixmapSignalMeter = NULL;
- pixmapSignalStrength = NULL;
- pixmapSignalQuality = NULL;
- pixmapSignalLabel = NULL;
- pixmapPoster = NULL;
-}
-
-void cNopacityDisplayChannel::DrawBackground(void){
- if (config.doBlending && (Theme.Color(clrChannelBackground) != Theme.Color(clrChannelBackBlend))) {
- DrawBlendedBackground(pixmapBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true);
- DrawBlendedBackground(pixmapBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false);
- } else {
- pixmapBackgroundTop->Fill(Theme.Color(clrChannelBackground));
- pixmapBackgroundBottom->Fill(Theme.Color(clrChannelBackground));
- }
- if (withInfo)
- pixmapBackgroundMiddle->Fill(Theme.Color(clrChannelBackground));
-
- if ((config.backgroundStyle == bsFull) && withInfo) {
- pixmapLogoBackground->Fill(Theme.Color(clrChannelBackground));
- if (config.doBlending && (Theme.Color(clrChannelBackground) != Theme.Color(clrChannelBackBlend))) {
- DrawBlendedBackground(pixmapLogoBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true);
- DrawBlendedBackground(pixmapLogoBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false);
- } else {
- pixmapLogoBackgroundTop->Fill(Theme.Color(clrChannelBackground));
- pixmapLogoBackgroundBottom->Fill(Theme.Color(clrChannelBackground));
- }
- } else {
- pixmapLogoBackgroundTop->Fill(clrTransparent);
- pixmapLogoBackground->Fill(clrTransparent);
- pixmapLogoBackgroundBottom->Fill(clrTransparent);
- }
- if (config.roundedCornersChannel) {
- int cornerTopSize = geoManager->channelInfoHeight/2;
- int cornerBottomSize = geoManager->channelStreamInfoHeight/2;
- if ((cornerTopSize > 2)&&(cornerBottomSize > 2)) {
- if ((config.backgroundStyle == bsTrans) || ((config.logoPosition == lpNone))) {
- pixmapBackgroundTop->DrawEllipse(cRect(0, 0, cornerTopSize, cornerTopSize), clrTransparent, -2);
- pixmapBackgroundTop->DrawEllipse(cRect(geoManager->channelWidth - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
- pixmapBackgroundBottom->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
- pixmapBackgroundBottom->DrawEllipse(cRect(geoManager->channelWidth - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
- } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpLeft)){
- pixmapLogoBackgroundTop->DrawEllipse(cRect(0, 0, cornerTopSize, cornerTopSize), clrTransparent, -2);
- pixmapBackgroundTop->DrawEllipse(cRect(geoManager->channelWidth - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
- pixmapLogoBackgroundBottom->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
- pixmapBackgroundBottom->DrawEllipse(cRect(geoManager->channelWidth - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
- } else if ((config.backgroundStyle == bsFull) && (config.logoPosition == lpRight)){
- pixmapBackgroundTop->DrawEllipse(cRect(0, 0, cornerTopSize, cornerTopSize), clrTransparent, -2);
- pixmapLogoBackgroundTop->DrawEllipse(cRect(pixmapLogoBackgroundTop->ViewPort().Width() - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
- pixmapBackgroundBottom->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
- pixmapLogoBackgroundBottom->DrawEllipse(cRect(pixmapLogoBackgroundBottom->ViewPort().Width() - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
- }
- }
- }
- pixmapChannelInfo->Fill(clrTransparent);
- pixmapDate->Fill(clrTransparent);
- pixmapLogo->Fill(clrTransparent);
-
- pixmapFooter->Fill(clrTransparent);
- pixmapStreamInfo->Fill(clrTransparent);
-}
-
-void cNopacityDisplayChannel::DrawDate(void) {
- cString curDate = DayDateTime();
- if (initial || channelChange || strcmp(curDate, lastDate)) {
- int strDateWidth = fontManager->channelDate->Width(curDate);
- int strDateHeight = fontManager->channelDate->Height();
- int x = geoManager->channelDateWidth - strDateWidth - geoManager->channelInfoHeight/2;
- int y = (geoManager->channelInfoHeight - strDateHeight) / 2;
- pixmapDate->Fill(clrTransparent);
- pixmapDate->DrawText(cPoint(x, y), curDate, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelDate);
- lastDate = curDate;
- }
-}
-
-void cNopacityDisplayChannel::DrawIconMask(void) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/channelsymbols");
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(0,0), *imgIcon);
-}
-
-void cNopacityDisplayChannel::DrawIcons(const cChannel *Channel) {
- isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0)))?true:false;
-
- int iconSize = geoManager->channelIconSize;
- int backX = 5;
- int backY = 5;
-
- tColor colVT = Theme.Color(clrChannelSymbolOff);
- if (Channel->Vpid() && Channel->Tpid()) {
- colVT = Theme.Color(clrChannelSymbolOn);
- }
- pixmapStreamInfoBack->DrawRectangle(cRect(backX, backY, iconSize-10, iconSize-10), colVT);
-
- backX += iconSize;
- tColor colStereo = Theme.Color(clrChannelSymbolOff);
- if (Channel->Apid(0)) {
- colStereo = Theme.Color(clrChannelSymbolOn);
- }
- pixmapStreamInfoBack->DrawRectangle(cRect(backX, backY, iconSize-10, iconSize-10), colStereo);
-
- backX += iconSize;
- tColor colDolby = Theme.Color(clrChannelSymbolOff);
- if (Channel->Dpid(0)) {
- colDolby = Theme.Color(clrChannelSymbolOn);
- }
- pixmapStreamInfoBack->DrawRectangle(cRect(backX, backY, iconSize-10, iconSize-10), colDolby);
-
- backX += iconSize;
- tColor colCrypted = Theme.Color(clrChannelSymbolOff);
- if (Channel->Ca()) {
- colCrypted = Theme.Color(clrChannelSymbolOn);
- }
- pixmapStreamInfoBack->DrawRectangle(cRect(backX, backY, iconSize-10, iconSize-10), colCrypted);
-
- backX += iconSize;
- tColor colRecording = Theme.Color(clrChannelSymbolOff);
- if (cRecordControls::Active()) {
- colRecording = Theme.Color(clrChannelRecActive);
- }
- pixmapStreamInfoBack->DrawRectangle(cRect(backX, backY, iconSize-10, iconSize-10), colRecording);
-}
-
-void cNopacityDisplayChannel::DrawIconsSingle(const cChannel *Channel) {
- isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0)))?true:false;
- pixmapStreamInfo->Fill(clrTransparent);
- int iconSize = geoManager->channelIconSize;
- int iconX = 0;
-
- if (Channel->Vpid() && Channel->Tpid()) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/txton", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(0,0), *imgIcon);
- } else {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/txtoff", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(0,0), *imgIcon);
- }
-
- iconX += iconSize;
-
- if (Channel->Apid(0)) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/stereoon", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- } else {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/stereooff", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- }
-
- iconX += iconSize;
-
- if (Channel->Dpid(0)) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/dolbyon", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- } else {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/dolbyoff", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- }
-
- iconX += iconSize;
-
- if (Channel->Ca()) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/crypted", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- } else {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/fta", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- }
-
- iconX += iconSize;
-
- if (cRecordControls::Active()) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/recon", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- } else {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/recoff", iconSize, iconSize);
- if (imgIcon)
- pixmapStreamInfo->DrawImage(cPoint(iconX,0), *imgIcon);
- }
-
-}
-
-void cNopacityDisplayChannel::DrawScreenResolution(void) {
- int spacing = 10;
- int screenWidth = 0;
- int screenHeight = 0;
- double aspect = 0;
-
- if (!pixmapScreenResolution) {
- int x = geoManager->channelX + geoManager->channelWidth - config.resolutionIconSize - 2*spacing;
- int y = geoManager->channelTop + geoManager->channelHeight - config.resolutionIconSize - 10;
- pixmapScreenResolution = osd->CreatePixmap(3, cRect(x, y, config.resolutionIconSize, config.resolutionIconSize));
- pixmapScreenResolution->Fill(clrTransparent);
- if ((initial)&&(config.channelFadeTime))
- pixmapScreenResolution->SetAlpha(0);
- }
-
- cImageLoader imgLoader;
- if (isRadioChannel) {
- if (!radioIconDrawn) {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/radio", config.resolutionIconSize, config.resolutionIconSize);
- if (imgIcon)
- pixmapScreenResolution->DrawImage(cPoint(0,0), *imgIcon);
- lastScreenWidth = 0;
- radioIconDrawn = true;
- }
- } else {
- cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect);
- if (screenWidth != lastScreenWidth) {
- cString iconName("");
- switch (screenWidth) {
- case 1920:
- case 1440:
- iconName = "skinIcons/hd1080i";
- break;
- case 1280:
- if (screenHeight == 720)
- iconName = "skinIcons/hd720p";
- else
- iconName = "skinIcons/hd1080i";
- break;
- case 720:
- iconName = "skinIcons/sd576i";
- break;
- default:
- iconName = "skinIcons/sd576i";
- break;
- }
- cImage *imgIcon = imgCache->GetSkinIcon(*iconName, config.resolutionIconSize, config.resolutionIconSize);
- if (imgIcon)
- pixmapScreenResolution->DrawImage(cPoint(0,0), *imgIcon);
- lastScreenWidth = screenWidth;
- radioIconDrawn = false;
- }
- }
-}
-
-void cNopacityDisplayChannel::DrawSignalMeter(void) {
- signalWidth = geoManager->channelWidth * 0.15;
- signalHeight = signalWidth *15 / 200;
- showSignal = false;
- if (config.displaySignalStrength) {
- cString signalStrength = "STR";
- cString signalQuality = "SNR";
- cImage *imgSignal = imgCache->GetSkinIcon("skinIcons/signal", signalWidth, signalHeight, true);
- if (imgSignal) {
- signalWidth = imgSignal->Width();
- signalHeight = imgSignal->Height();
- int signalMeterY = geoManager->channelStreamInfoY + (geoManager->channelStreamInfoHeight - 2*signalHeight - 5)/2;
- fontInfoline = cFont::CreateFont(config.fontName, signalHeight - 2);
- int labelWidth = max(fontInfoline->Width(*signalStrength), fontInfoline->Width(*signalQuality)) + 2;
- signalX = geoManager->channelStreamInfoHeight / 2 + labelWidth;
- showSignal = true;
- pixmapSignalStrength = osd->CreatePixmap(3, cRect(geoManager->channelX + signalX, geoManager->channelTop + signalMeterY + 2, signalWidth + 2, signalHeight + 2));
- pixmapSignalQuality = osd->CreatePixmap(3, cRect(geoManager->channelX + signalX, geoManager->channelTop + signalMeterY + signalHeight + 5, signalWidth + 2, signalHeight + 2));
- pixmapSignalMeter = osd->CreatePixmap(4, cRect(geoManager->channelX + signalX + 1, geoManager->channelTop + signalMeterY + 3, signalWidth, 2*signalHeight + 3));
- pixmapSignalLabel = osd->CreatePixmap(3, cRect(geoManager->channelX + geoManager->channelStreamInfoHeight / 2, geoManager->channelTop + signalMeterY + 2, labelWidth, 2*signalHeight + 3));
- pixmapSignalStrength->Fill(Theme.Color(clrProgressBarBack));
- pixmapSignalQuality->Fill(Theme.Color(clrProgressBarBack));
- pixmapSignalMeter->Fill(clrTransparent);
- pixmapSignalLabel->Fill(clrTransparent);
- if (config.channelFadeTime) {
- pixmapSignalStrength->SetAlpha(0);
- pixmapSignalQuality->SetAlpha(0);
- pixmapSignalMeter->SetAlpha(0);
- pixmapSignalLabel->SetAlpha(0);
- }
- pixmapSignalStrength->DrawImage(cPoint(1,1), *imgSignal);
- pixmapSignalQuality->DrawImage(cPoint(1,1), *imgSignal);
- pixmapSignalLabel->DrawText(cPoint(0, 2), *signalStrength, Theme.Color(clrChannelEPGInfo), clrTransparent, fontInfoline);
- pixmapSignalLabel->DrawText(cPoint(0, signalHeight + 4), *signalQuality, Theme.Color(clrChannelEPGInfo), clrTransparent, fontInfoline);
- }
- }
-}
-
-void cNopacityDisplayChannel::ShowSignalMeter(void) {
- if(pixmapSignalStrength)
- pixmapSignalStrength->SetLayer(3);
- if(pixmapSignalQuality)
- pixmapSignalQuality->SetLayer(3);
- if(pixmapSignalMeter)
- pixmapSignalMeter->SetLayer(4);
- if(pixmapSignalLabel)
- pixmapSignalLabel->SetLayer(3);
-}
-
-void cNopacityDisplayChannel::HideSignalMeter(void) {
- if(pixmapSignalStrength)
- pixmapSignalStrength->SetLayer(-1);
- if(pixmapSignalQuality)
- pixmapSignalQuality->SetLayer(-1);
- if(pixmapSignalMeter)
- pixmapSignalMeter->SetLayer(-1);
- if(pixmapSignalLabel)
- pixmapSignalLabel->SetLayer(-1);
-}
-
-void cNopacityDisplayChannel::DrawSignal(void) {
- time_t Now = time(NULL);
- if (Now != lastSignalDisplay) {
- int SignalStrength = cDevice::ActualDevice()->SignalStrength();
- int SignalQuality = cDevice::ActualDevice()->SignalQuality();
- if ((SignalStrength == 0)&&(SignalQuality==0))
- return;
- if ((lastSignalStrength != SignalStrength) || (lastSignalQuality != SignalQuality)) {
- pixmapSignalMeter->Fill(clrTransparent);
- pixmapSignalMeter->DrawRectangle(cRect(double(SignalStrength) /100 * signalWidth, 0, signalWidth - (double)SignalStrength /100 * signalWidth + 1, signalHeight), Theme.Color(clrChannelBackground));
- pixmapSignalMeter->DrawRectangle(cRect(double(SignalQuality) /100 * signalWidth, signalHeight + 3, signalWidth - (double)SignalQuality / 100 * signalWidth + 1, signalHeight + 1), Theme.Color(clrChannelBackground));
- }
- lastSignalStrength = SignalStrength;
- lastSignalQuality = SignalQuality;
- lastSignalDisplay = Now;
- }
-}
-
-void cNopacityDisplayChannel::DrawSourceInfo(const cChannel *Channel) {
- const cSource *source = Sources.Get(Channel->Source());
- cString channelInfo = "";
- if (source)
- channelInfo = cString::sprintf("%s - %s", *cSource::ToString(source->Code()), source->Description());
- int x = signalX + 20;
- if (config.displaySignalStrength)
- x += signalWidth;
- pixmapFooter->Fill(clrTransparent);
- pixmapFooter->DrawText(cPoint(x, (geoManager->channelStreamInfoHeight - fontManager->channelDate->Height())/2), channelInfo, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelDate);
+ delete channelView;
}
void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
if (!doOutput)
return;
- pixmapLogo->Fill(clrTransparent);
- pixmapChannelInfo->Fill(clrTransparent);
- pixmapStreamInfo->Fill(clrTransparent);
- pixmapStreamInfoBack->Fill(clrTransparent);
- if (withInfo) {
- pixmapProgressBar->Fill(clrTransparent);
- pixmapEPGInfo->Fill(clrTransparent);
- }
channelChange = true;
- lastSignalStrength = 0;
- lastSignalQuality = 0;
+ groupSep = false;
+
cString ChannelNumber("");
cString ChannelName("");
- groupSep = false;
+
if (Channel) {
ChannelName = Channel->Name();
if (!Channel->GroupSep()) {
@@ -509,331 +57,102 @@ void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
ChannelName = ChannelString(NULL, 0);
}
+ channelView->ClearChannelLogo();
+ channelView->ClearChannelName();
+ channelView->ClearStatusIcons();
+ channelView->ClearSourceInfo();
if (!groupSep) {
- if (withInfo && Channel) {
- if (config.symbolStyle == 0) {
- DrawIconMask();
- DrawIcons(Channel);
- } else {
- DrawIconsSingle(Channel);
- }
- if (config.displaySourceInfo)
- DrawSourceInfo(Channel);
- }
- cString channelString = cString::sprintf("%s %s", *ChannelNumber, *ChannelName);
- pixmapChannelInfo->DrawText(cPoint(geoManager->channelInfoHeight/2, (geoManager->channelInfoHeight-fontManager->channelHeader->Height())/2), channelString, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelHeader);
- if (Channel && config.logoPosition != lpNone) {
- cImage *logo = imgCache->GetLogo(ctLogo, Channel);
- if (logo) {
- pixmapLogo->DrawImage(cPoint(config.logoBorder, (geoManager->channelHeight-config.logoHeight)/2), *logo);
- }
- }
- ShowSignalMeter();
+ channelView->DrawChannelName(ChannelNumber, ChannelName);
+ if (Channel && config.GetValue("logoPosition") != lpNone)
+ channelView->DrawChannelLogo(Channel);
+ if (Channel)
+ channelView->DrawStatusIcons(Channel);
+ if (Channel && config.GetValue("displaySourceInfo"))
+ channelView->DrawSourceInfo(Channel);
} else {
- DrawChannelGroups(Channel, ChannelName);
- HideSignalMeter();
- pixmapFooter->Fill(clrTransparent);
+ channelView->HideSignalMeter();
+ channelView->ClearProgressBar();
+ channelView->ClearEPGInfo();
+ if (Channel)
+ channelView->DrawChannelGroups(Channel, ChannelName);
}
-}
-void cNopacityDisplayChannel::DrawChannelGroups(const cChannel *Channel, cString ChannelName) {
- int ySep;
- int ySepNextPrevIcon;
- cPixmap *infoPixmap;
- int prevNextSize = 64;
-
- if (withInfo) {
- pixmapProgressBar->Fill(clrTransparent);
- pixmapEPGInfo->Fill(clrTransparent);
- ySep = (geoManager->channelEpgInfoHeight-fontManager->channelChannelGroup->Height())/2 - fontManager->channelChannelGroup->Height()/2;
- ySepNextPrevIcon = (geoManager->channelEpgInfoHeight - prevNextSize)/2 - fontManager->channelChannelGroup->Height()/2;
- infoPixmap = pixmapEPGInfo;
- } else {
- ySep = (geoManager->channelInfoHeight - fontManager->channelChannelGroup->Height())/2;
- ySepNextPrevIcon = (geoManager->channelInfoHeight - prevNextSize)/2;
- infoPixmap = pixmapChannelInfo;
- }
- int widthSep = fontManager->channelChannelGroup->Width(*ChannelName);
- int xSep = (config.displayPrevNextChannelGroup)?(geoManager->channelWidth * 2 / 5):0;
- infoPixmap->DrawText(cPoint(xSep, ySep), *ChannelName, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelChannelGroup);
-
- cImageLoader imgLoader;
- if (config.logoPosition != lpNone) {
- cString separator = cString::sprintf("separatorlogos/%s", *ChannelName);
- if (imgLoader.LoadLogo(*separator)) {
- pixmapLogo->DrawImage(cPoint(config.logoBorder, (geoManager->channelHeight-config.logoHeight)/2), imgLoader.GetImage());
- } else {
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/Channelseparator", config.logoWidth, config.logoHeight);
- if (imgIcon)
- pixmapLogo->DrawImage(cPoint(config.logoBorder + (config.logoWidth - config.logoWidth)/2, (geoManager->channelHeight-config.logoHeight)/2), *imgIcon);
- }
- }
-
- if (!config.displayPrevNextChannelGroup)
- return;
-
- cString prevChannelSep = GetChannelSep(Channel, true);
- cString nextChannelSep = GetChannelSep(Channel, false);
- bool prevAvailable = (strlen(*prevChannelSep) > 0)?true:false;
- bool nextAvailable = (strlen(*nextChannelSep) > 0)?true:false;
-
-
- int ySepNextPrev = ySep + (fontManager->channelChannelGroup->Height() - fontManager->channelChannelGroupSmall->Height())/2;
- if (prevAvailable) {
- int xSymbol = xSep - prevNextSize - 10;
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/arrowLeftChannelSep", prevNextSize, prevNextSize);
- if (imgIcon)
- infoPixmap->DrawImage(cPoint(xSymbol, ySepNextPrevIcon), *imgIcon);
- int xSepPrev = xSymbol - 10 - fontManager->channelChannelGroupSmall->Width(prevChannelSep);
- if (xSepPrev < 0) {
- prevChannelSep = CutText(*prevChannelSep, xSymbol, fontManager->channelChannelGroupSmall).c_str();
- xSepPrev = xSymbol - 10 - fontManager->channelChannelGroupSmall->Width(prevChannelSep);
- }
- infoPixmap->DrawText(cPoint(xSepPrev, ySepNextPrev), *prevChannelSep, Theme.Color(clrChannelEPGInfoNext), clrTransparent, fontManager->channelChannelGroupSmall);
- }
- if (nextAvailable) {
- int xSymbol = xSep + widthSep + 10;
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/arrowRightChannelSep", prevNextSize, prevNextSize);
- if (imgIcon)
- infoPixmap->DrawImage(cPoint(xSymbol, ySepNextPrevIcon), *imgIcon);
- int xSepNext = xSymbol + 10 + prevNextSize;
- int spaceAvailable = infoPixmap->DrawPort().Width() - xSepNext;
- if (fontManager->channelChannelGroupSmall->Width(nextChannelSep) > spaceAvailable) {
- nextChannelSep = CutText(*nextChannelSep, spaceAvailable, fontManager->channelChannelGroupSmall).c_str();
- }
- infoPixmap->DrawText(cPoint(xSepNext, ySepNextPrev), *nextChannelSep, Theme.Color(clrChannelEPGInfoNext), clrTransparent, fontManager->channelChannelGroupSmall);
- }
-}
-
-cString cNopacityDisplayChannel::GetChannelSep(const cChannel *channel, bool prev) {
- cString sepName("");
- const cChannel *sep = prev ? Channels.Prev(channel) :
- Channels.Next(channel);
- for (; sep; (prev)?(sep = Channels.Prev(sep)):(sep = Channels.Next(sep))) {
- if (sep->GroupSep()) {
- sepName = sep->Name();
- break;
- }
- }
- return sepName;
}
void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following) {
if (!doOutput)
return;
- if (!withInfo)
- return;
- if (present != Present)
- lastSeen = -1;
present = Present;
-
- if (Present || Following) {
- pixmapProgressBar->Fill(clrTransparent);
- pixmapEPGInfo->Fill(clrTransparent);
+ channelView->ClearProgressBar();
+ if (!groupSep) {
+ channelView->DrawProgressbarBackground();
+ channelView->ClearEPGInfo();
}
- int indent = 20;
-
- for (int i = 0; i < 2; i++) {
- const cEvent *e = !i ? Present : Following;
- int y = !i ? 0 : 2;
- if (e) {
- cString startTime = e->GetTimeString();
- int startTimeWidth = fontManager->channelEPG->Width(*startTime);
- int epgWidth = fontManager->channelEPG->Width(e->Title());
- int epgWidthShort = fontManager->channelEPGSmall->Width(e->ShortText());
- cString strSeen("");
- if (i==0) {
- if (config.progressCurrentSchedule == 0) {
- int seen = (int)(time(NULL) - e->StartTime())/60;
- strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60);
- } else if (config.progressCurrentSchedule == 1) {
- int remaining = (int)(e->EndTime() - time(NULL))/60;
- strSeen = cString::sprintf("-%d/%dmin", remaining, e->Duration()/60);
- }
- if (config.displayPoster)
- DrawPoster(e);
- } else {
- strSeen = cString::sprintf("%dmin", e->Duration()/60);
- }
- int seenWidth = fontManager->channelEPG->Width(*strSeen);
- int space = geoManager->channelWidth - 9*indent - seenWidth - startTimeWidth - config.resolutionIconSize;
- bool drawRecIcon = false;
- int widthRecIcon = 0;
- //check for timers
- if (i==0) {
- eTimerMatch TimerMatch = tmNone;
- const cTimer * Timer = Timers.GetMatch(e, &TimerMatch);
- if (Timer && Timer->Recording()) {
- drawRecIcon = true;
- }
- } else {
- drawRecIcon = e->HasTimer();
- }
- if (drawRecIcon) {
- widthRecIcon = fontManager->channelEPGSmall->Width(" REC ");
- space -= widthRecIcon + indent/2;
- }
- cString strEPG = e->Title();
- if (space < epgWidth) {
- strEPG = CutText(e->Title(), space, fontManager->channelEPG).c_str();
- }
- cString strEPGShort = e->ShortText();
- int spaceShort = geoManager->channelWidth - 6*indent - startTimeWidth - config.resolutionIconSize;
- if (spaceShort < epgWidthShort) {
- strEPGShort = CutText(e->ShortText(), spaceShort, fontManager->channelEPGSmall).c_str();
- }
- tColor fontColor = (i==0)?Theme.Color(clrChannelEPG):Theme.Color(clrChannelEPGNext);
- tColor fontColorInfo = (i==0)?Theme.Color(clrChannelEPGInfo):Theme.Color(clrChannelEPGInfoNext);
-
- pixmapEPGInfo->DrawText(cPoint(indent, y * geoManager->channelEpgInfoLineHeight), *startTime, fontColor, clrTransparent, fontManager->channelEPG);
- int xEPGInfo = 2 * indent + startTimeWidth;
- if (drawRecIcon) {
- tColor clrRecIcon = (i==0)?Theme.Color(clrRecNow):Theme.Color(clrRecNext);
- tColor clrRecIconText = (i==0)?Theme.Color(clrRecNowFont):Theme.Color(clrRecNextFont);
- pixmapEPGInfo->DrawRectangle(cRect(xEPGInfo, y * geoManager->channelEpgInfoLineHeight , widthRecIcon, geoManager->channelEpgInfoLineHeight), clrRecIcon);
- int xRecText = xEPGInfo + (widthRecIcon - fontManager->channelEPGSmall->Width("REC"))/2;
- int yRecText = y * geoManager->channelEpgInfoLineHeight + (geoManager->channelEpgInfoLineHeight - fontManager->channelEPGSmall->Height())/2;
- pixmapEPGInfo->DrawText(cPoint(xRecText, yRecText), "REC", clrRecIconText, clrRecIcon, fontManager->channelEPGSmall);
- xEPGInfo += widthRecIcon + indent/2;
- }
- pixmapEPGInfo->DrawText(cPoint(xEPGInfo, y * geoManager->channelEpgInfoLineHeight), *strEPG, fontColor, clrTransparent, fontManager->channelEPG);
- pixmapEPGInfo->DrawText(cPoint(2 * indent + startTimeWidth, (y+1) * geoManager->channelEpgInfoLineHeight + 3), *strEPGShort, fontColorInfo, clrTransparent, fontManager->channelEPGSmall);
- int x = geoManager->channelWidth - indent - seenWidth - config.resolutionIconSize - indent;
- pixmapEPGInfo->DrawText(cPoint(x, y * geoManager->channelEpgInfoLineHeight), *strSeen, fontColor, clrTransparent, fontManager->channelEPG);
+ if (Present) {
+ if (!groupSep) {
+ SetProgressBar(Present);
}
- }
-}
-
-void cNopacityDisplayChannel::DrawPoster(const cEvent *event) {
- if (pixmapPoster) {
- osd->DestroyPixmap(pixmapPoster);
- pixmapPoster = NULL;
- }
- static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper");
- if (pTVScraper) {
- TVScraperGetPosterOrBanner call;
- call.event = event;
- if (pTVScraper->Service("TVScraperGetPosterOrBanner", &call)) {
- int mediaWidth = 0;
- int mediaHeight = 0;
- if (call.type == typeSeries) {
- mediaWidth = call.media.width;
- mediaHeight = call.media.height;
- } else if (call.type == typeMovie) {
- double ratio = (double)(cOsd::OsdHeight()/3) / (double)call.media.height;
- mediaWidth = ratio * call.media.width;
- mediaHeight = ratio * call.media.height;
- }
- pixmapPoster = osd->CreatePixmap(1, cRect(config.channelBorderVertical,
- config.channelBorderBottom,
- mediaWidth + 2*config.channelBorderVertical,
- mediaHeight + 2*config.channelBorderBottom));
- if (initial && config.channelFadeTime)
- pixmapPoster->SetAlpha(0);
- cImageLoader imgLoader;
- if (imgLoader.LoadPoster(call.media.path.c_str(), mediaWidth, mediaHeight)) {
- pixmapPoster->Fill(Theme.Color(clrChannelBackground));
- pixmapPoster->DrawImage(cPoint(config.channelBorderVertical, config.channelBorderBottom), imgLoader.GetImage());
- } else {
- pixmapPoster->Fill(clrTransparent);
- }
+ bool recCurrent = false;
+ eTimerMatch TimerMatch = tmNone;
+ const cTimer *Timer = Timers.GetMatch(Present, &TimerMatch);
+ if (Timer && Timer->Recording()) {
+ recCurrent = true;
}
+ channelView->DrawEPGInfo(Present, true, recCurrent);
}
-}
-
-void cNopacityDisplayChannel::DrawProgressBar(int Current, int Total) {
- if ((Current < currentLast + 3) && !channelChange)
- return;
- currentLast = Current;
- if (((Current > 0) || (Total > 0)) && (Total >= Current)) {
- int barHeight = pixmapProgressBar->ViewPort().Height()-8;
- if (barHeight%2 != 0)
- barHeight++;
- if (barHeight < 3)
- return;
- int barFullWidth = pixmapProgressBar->ViewPort().Width() - 20 - barHeight;
- double percentSeen = ((double)Current) / (double)Total;
-
- pixmapProgressBar->DrawEllipse(cRect(9, 3, barHeight+2, barHeight+2), Theme.Color(clrChannelProgressBarBack));
- pixmapProgressBar->DrawEllipse(cRect(9 + barFullWidth, 3, barHeight+2, barHeight+2), Theme.Color(clrChannelProgressBarBack));
- pixmapProgressBar->DrawRectangle(cRect( 9 + barHeight/2, 3, barFullWidth, barHeight+1), Theme.Color(clrChannelProgressBarBack));
-
- pixmapProgressBar->DrawEllipse(cRect(10, 4, barHeight, barHeight), Theme.Color(clrChannelProgressBarBlend));
- if (Current > 0) {
- tColor colAct = DrawProgressbarBackground(10 + barHeight/2, 4, barFullWidth * percentSeen, barHeight-1);
- pixmapProgressBar->DrawEllipse(cRect(10 + barFullWidth * percentSeen, 4, barHeight, barHeight), colAct);
- }
+ if (Following) {
+ bool recFollowing = Following->HasTimer();
+ channelView->DrawEPGInfo(Following, false, recFollowing);
}
+ if (config.GetValue("displayPoster"))
+ channelView->DrawPoster(Present, initial);
}
-tColor cNopacityDisplayChannel::DrawProgressbarBackground(int left, int top, int width, int height) {
- tColor clr1 = Theme.Color(clrChannelProgressBar);
- tColor clr2 = Theme.Color(clrChannelProgressBarBlend);
- tColor clr = 0x00000000;
- width = (width==0)?1:width;
- int step = width / 256;
- int alpha = 0x0;
- int alphaStep;
- int maximum = 0;
- if (step == 0) { //width < 256
- step = 1;
- alphaStep = 256 / width;
- maximum = width;
- } else { //width > 256
- alphaStep = 0x1;
- maximum = 256;
- }
- int x = 0;
- for (int i = 0; i < maximum; i++) {
- x = left + i*step;
- clr = AlphaBlend(clr1, clr2, alpha);
- pixmapProgressBar->DrawRectangle(cRect(x,top,step,height), clr);
- alpha += alphaStep;
+void cNopacityDisplayChannel::SetProgressBar(const cEvent *present) {
+ int Current = 0;
+ int Total = 0;
+ time_t t = time(NULL);
+ if (t > present->StartTime())
+ Current = t - present->StartTime();
+ Total = present->Duration();
+ if ((Current > currentLast + 3) || initial || channelChange){
+ currentLast = Current;
+ channelView->DrawProgressBar(Current, Total);
}
- if (step > 0) {
- int rest = width - step*256;
- pixmapProgressBar->DrawRectangle(cRect(left+step*256, top, rest, height), clr);
- }
- return clr;
}
+
void cNopacityDisplayChannel::SetMessage(eMessageType Type, const char *Text) {
}
void cNopacityDisplayChannel::Flush(void) {
if (!doOutput)
return;
- DrawDate();
- if (!groupSep)
- DrawScreenResolution();
- else {
- if (pixmapScreenResolution)
- pixmapScreenResolution->Fill(clrTransparent);
+ if (initial || channelChange)
+ channelView->DrawDate();
+
+ if (present) {
+ SetProgressBar(present);
}
- if (config.displaySignalStrength && showSignal && !groupSep) {
- DrawSignal();
+ if (!groupSep)
+ channelView->DrawScreenResolution();
+ else
+ channelView->ClearStatusIcons();
+
+ if (config.GetValue("displaySignalStrength") && !groupSep) {
+ channelView->ShowSignalMeter();
+ channelView->DrawSignal();
} else
- if (pixmapSignalMeter)
- pixmapSignalMeter->Fill(clrTransparent);
- if (withInfo) {
- int Current = 0;
- int Total = 0;
- if (present) {
- time_t t = time(NULL);
- if (t > present->StartTime())
- Current = t - present->StartTime();
- Total = present->Duration();
- DrawProgressBar(Current, Total);
- }
- }
+ channelView->HideSignalMeter();
+
if (initial) {
- if (config.channelFadeTime)
+ if (config.GetValue("channelFadeTime"))
Start();
}
initial = false;
channelChange = false;
- osd->Flush();
+ channelView->Flush();
}
void cNopacityDisplayChannel::Action(void) {
@@ -843,35 +162,10 @@ void cNopacityDisplayChannel::Action(void) {
cPixmap::Lock();
double t = min(double(Now - Start) / FadeTime, 1.0);
int Alpha = t * ALPHA_OPAQUE;
- pixmapBackgroundTop->SetAlpha(Alpha);
- pixmapBackgroundBottom->SetAlpha(Alpha);
- pixmapLogoBackground->SetAlpha(Alpha);
- pixmapLogoBackgroundTop->SetAlpha(Alpha);
- pixmapLogoBackgroundBottom->SetAlpha(Alpha);
- pixmapLogo->SetAlpha(Alpha);
- pixmapChannelInfo->SetAlpha(Alpha);
- pixmapDate->SetAlpha(Alpha);
- if (withInfo) {
- pixmapBackgroundMiddle->SetAlpha(Alpha);
- pixmapProgressBar->SetAlpha(Alpha);
- pixmapEPGInfo->SetAlpha(Alpha);
- }
- pixmapFooter->SetAlpha(Alpha);
- pixmapStreamInfo->SetAlpha(Alpha);
- pixmapStreamInfoBack->SetAlpha(Alpha);
- if (pixmapScreenResolution)
- pixmapScreenResolution->SetAlpha(Alpha);
- if (config.displaySignalStrength && showSignal) {
- pixmapSignalStrength->SetAlpha(Alpha);
- pixmapSignalQuality->SetAlpha(Alpha);
- pixmapSignalMeter->SetAlpha(Alpha);
- pixmapSignalLabel->SetAlpha(Alpha);
- }
- if (pixmapPoster)
- pixmapPoster->SetAlpha(Alpha);
+ channelView->SetAlpha(Alpha);
cPixmap::Unlock();
if (Running())
- osd->Flush();
+ channelView->Flush();
int Delta = cTimeMs::Now() - Now;
if (Running() && (Delta < FrameTime))
cCondWait::SleepMs(FrameTime - Delta);
diff --git a/displaychannel.h b/displaychannel.h
index 2280b46..752f522 100644
--- a/displaychannel.h
+++ b/displaychannel.h
@@ -1,22 +1,15 @@
#ifndef __NOPACITY_DISPLAYCHANNEL_H
#define __NOPACITY_DISPLAYCHANNEL_H
-//enum eLogoPosition {lpNone = 0, lpLeft, lpRight};
-enum eBackgroundStyle {bsTrans = 0, bsFull};
-
class cNopacityDisplayChannel : public cSkinDisplayChannel, cThread {
private:
+ cNopacityDisplayChannelView *channelView;
bool doOutput;
int FrameTime;
int FadeTime;
- bool withInfo;
bool initial;
bool groupSep;
bool channelChange;
- bool isRadioChannel;
- bool radioIconDrawn;
- cString lastDate;
- int lastSeen;
time_t lastSignalDisplay;
int lastSignalStrength;
int lastSignalQuality;
@@ -24,49 +17,8 @@ private:
int currentLast;
bool showSignal;
const cEvent *present;
- cOsd *osd;
- cImageCache *imgCache;
- cPixmap *pixmapBackgroundTop;
- cPixmap *pixmapBackgroundMiddle;
- cPixmap *pixmapBackgroundBottom;
- cPixmap *pixmapChannelInfo;
- cPixmap *pixmapDate;
- cPixmap *pixmapLogo;
- cPixmap *pixmapLogoBackground;
- cPixmap *pixmapLogoBackgroundTop;
- cPixmap *pixmapLogoBackgroundBottom;
- cPixmap *pixmapProgressBar;
- cPixmap *pixmapEPGInfo;
- cPixmap *pixmapFooter;
- cPixmap *pixmapStreamInfo;
- cPixmap *pixmapStreamInfoBack;
- cPixmap *pixmapSignalStrength;
- cPixmap *pixmapSignalQuality;
- cPixmap *pixmapSignalMeter;
- cPixmap *pixmapSignalLabel;
- cPixmap *pixmapScreenResolution;
- cPixmap *pixmapPoster;
- int signalWidth, signalHeight, signalX;
- cFont *fontInfoline;
virtual void Action(void);
- void createOsd(void);
- void CreatePixmaps(void);
- void DrawBackground(void);
- void DrawDate(void);
- void DrawProgressBar(int Current, int Total);
- tColor DrawProgressbarBackground(int left, int top, int width, int height);
- void DrawIconMask(void);
- void DrawIcons(const cChannel *Channel);
- void DrawIconsSingle(const cChannel *Channel);
- void DrawScreenResolution(void);
- void DrawSignalMeter(void);
- void ShowSignalMeter(void);
- void HideSignalMeter(void);
- void DrawSignal(void);
- void DrawSourceInfo(const cChannel *Channel);
- void DrawChannelGroups(const cChannel *Channel, cString ChannelName);
- cString GetChannelSep(const cChannel *channel, bool prev);
- void DrawPoster(const cEvent *event);
+ void SetProgressBar(const cEvent *present);
public:
cNopacityDisplayChannel(cImageCache *imgCache, bool WithInfo);
virtual ~cNopacityDisplayChannel();
diff --git a/displaychannelview.c b/displaychannelview.c
new file mode 100644
index 0000000..8b8510a
--- /dev/null
+++ b/displaychannelview.c
@@ -0,0 +1,754 @@
+#include "services/tvscraper.h"
+#include "displaychannelview.h"
+
+cNopacityDisplayChannelView::cNopacityDisplayChannelView(cImageCache *imgCache) {
+ this->imgCache = imgCache;
+ osd = NULL;
+ lastDate = "";
+ isRadioChannel = false;
+ statusIconBorder = 5;
+ statusIconSize = geoManager->channelFooterHeight - 2 * statusIconBorder;
+ signalWidth = 0;
+ signalHeight = 0;
+ signalX = 0;
+ lastSignalDisplay = 0;
+ lastSignalStrength = 0;
+ lastSignalQuality = 0;
+ pixmapSignalMeter = NULL;
+ pixmapSignalStrength = NULL;
+ pixmapSignalQuality = NULL;
+ pixmapSignalLabel = NULL;
+ pixmapPoster = NULL;
+}
+
+cNopacityDisplayChannelView::~cNopacityDisplayChannelView() {
+ osd->DestroyPixmap(pixmapBackground);
+ osd->DestroyPixmap(pixmapTop);
+ osd->DestroyPixmap(pixmapLogo);
+ osd->DestroyPixmap(pixmapLogoBackground);
+ osd->DestroyPixmap(pixmapChannelName);
+ osd->DestroyPixmap(pixmapDate);
+ osd->DestroyPixmap(pixmapProgressBar);
+ osd->DestroyPixmap(pixmapEPGInfo);
+ osd->DestroyPixmap(pixmapStatusIcons);
+ osd->DestroyPixmap(pixmapSourceInfo);
+ if (pixmapSignalStrength)
+ osd->DestroyPixmap(pixmapSignalStrength);
+ if (pixmapSignalQuality)
+ osd->DestroyPixmap(pixmapSignalQuality);
+ if (pixmapSignalMeter)
+ osd->DestroyPixmap(pixmapSignalMeter);
+ if (pixmapSignalLabel)
+ osd->DestroyPixmap(pixmapSignalLabel);
+ if (pixmapPoster)
+ osd->DestroyPixmap(pixmapPoster);
+ delete osd;
+}
+
+void cNopacityDisplayChannelView::createOsd(void) {
+ osd = CreateOsd(geoManager->osdLeft,
+ geoManager->osdTop,
+ geoManager->osdWidth,
+ geoManager->osdHeight);
+}
+
+void cNopacityDisplayChannelView::CreatePixmaps(void) {
+ pixmapBackground = osd->CreatePixmap(1,
+ cRect(geoManager->channelX,
+ geoManager->channelTop,
+ geoManager->channelWidth,
+ geoManager->channelHeight)
+ );
+ pixmapTop = osd->CreatePixmap(7,
+ cRect(geoManager->channelX,
+ geoManager->channelTop,
+ geoManager->channelWidth,
+ geoManager->channelHeight)
+ );
+ pixmapLogo = osd->CreatePixmap(3,
+ cRect(geoManager->channelX + geoManager->channelLogoX,
+ geoManager->channelLogoY,
+ geoManager->channelLogoWidth,
+ geoManager->channelLogoHeight)
+ );
+ pixmapLogoBackground = osd->CreatePixmap(2,
+ cRect(geoManager->channelX + geoManager->channelLogoX,
+ geoManager->channelLogoY,
+ geoManager->channelLogoWidth,
+ geoManager->channelLogoHeight)
+ );
+ pixmapChannelName = osd->CreatePixmap(2,
+ cRect(geoManager->channelX + geoManager->channelContentX,
+ geoManager->channelTop,
+ geoManager->channelChannelNameWidth,
+ geoManager->channelHeaderHeight)
+ );
+ pixmapDate = osd->CreatePixmap(2,
+ cRect(geoManager->channelX + geoManager->channelContentX +
+ geoManager->channelChannelNameWidth,
+ geoManager->channelTop,
+ geoManager->channelDateWidth,
+ geoManager->channelHeaderHeight)
+ );
+ pixmapProgressBar = osd->CreatePixmap(2,
+ cRect(geoManager->channelX + geoManager->channelContentX,
+ geoManager->channelTop + geoManager->channelHeaderHeight,
+ geoManager->channelContentWidth,
+ geoManager->channelProgressBarHeight)
+ );
+ pixmapEPGInfo = osd->CreatePixmap(2,
+ cRect(geoManager->channelX + geoManager->channelContentX,
+ geoManager->channelTop + geoManager->channelHeaderHeight +
+ geoManager->channelProgressBarHeight,
+ geoManager->channelContentWidth,
+ geoManager->channelEpgInfoHeight)
+ );
+ int statusIconsWidth = 8 * statusIconSize + 6 * statusIconBorder;
+ int statusIconX = geoManager->osdWidth
+ - config.GetValue("channelBorderVertical")
+ - statusIconsWidth
+ - 2*statusIconBorder;
+ if (config.GetValue("logoPosition") == lpRight)
+ statusIconX -= geoManager->channelLogoWidthTotal;
+
+ pixmapStatusIcons = osd->CreatePixmap(2,
+ cRect(statusIconX,
+ geoManager->channelTop + geoManager->channelHeaderHeight +
+ geoManager->channelProgressBarHeight +
+ geoManager->channelEpgInfoHeight,
+ statusIconsWidth,
+ geoManager->channelFooterHeight)
+ );
+ int sourceInfoX = geoManager->channelContentX + 2 * statusIconBorder;
+ if (config.GetValue("displaySignalStrength"))
+ sourceInfoX +=geoManager->channelWidth * 0.2;
+ pixmapSourceInfo = osd->CreatePixmap(2,
+ cRect(sourceInfoX,
+ geoManager->channelTop + geoManager->channelHeaderHeight +
+ geoManager->channelProgressBarHeight +
+ geoManager->channelEpgInfoHeight,
+ geoManager->channelContentWidth * 0.3,
+ geoManager->channelFooterHeight)
+ );
+
+ if (config.GetValue("channelFadeTime")) {
+ pixmapBackground->SetAlpha(0);
+ pixmapTop->SetAlpha(0);
+ pixmapLogo->SetAlpha(0);
+ pixmapLogoBackground->SetAlpha(0);
+ pixmapChannelName->SetAlpha(0);
+ pixmapDate->SetAlpha(0);
+ pixmapProgressBar->SetAlpha(0);
+ pixmapEPGInfo->SetAlpha(0);
+ pixmapStatusIcons->SetAlpha(0);
+ pixmapSourceInfo->SetAlpha(0);
+ }
+}
+
+void cNopacityDisplayChannelView::SetAlpha(int alpha) {
+ pixmapBackground->SetAlpha(alpha);
+ pixmapTop->SetAlpha(alpha);
+ pixmapLogo->SetAlpha(alpha);
+ pixmapLogoBackground->SetAlpha(alpha);
+ pixmapChannelName->SetAlpha(alpha);
+ pixmapDate->SetAlpha(alpha);
+ pixmapProgressBar->SetAlpha(alpha);
+ pixmapEPGInfo->SetAlpha(alpha);
+ pixmapStatusIcons->SetAlpha(alpha);
+ pixmapSourceInfo->SetAlpha(alpha);
+ if (pixmapSignalStrength)
+ pixmapSignalStrength->SetAlpha(alpha);
+ if (pixmapSignalQuality)
+ pixmapSignalQuality->SetAlpha(alpha);
+ if (pixmapSignalMeter)
+ pixmapSignalMeter->SetAlpha(alpha);
+ if (pixmapSignalLabel)
+ pixmapSignalLabel->SetAlpha(alpha);
+ if (pixmapPoster)
+ pixmapPoster->SetAlpha(alpha);
+}
+
+void cNopacityDisplayChannelView::DrawBackground(void) {
+ pixmapBackground->Fill(clrTransparent);
+ pixmapTop->Fill(clrTransparent);
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *imgBack = imgCache->GetSkinElement(seChannelBackground);
+ if (imgBack)
+ pixmapBackground->DrawImage(cPoint(0,0), *imgBack);
+ cImage *imgTop = imgCache->GetSkinElement(seChannelTop);
+ if (imgTop)
+ pixmapTop->DrawImage(cPoint(0,0), *imgTop);
+ } else {
+ int backgroundX;
+ int backgroundWidth;
+ if (config.GetValue("backgroundStyle") == bsFull) {
+ backgroundX = 0;
+ backgroundWidth = geoManager->channelWidth;
+ } else {
+ backgroundX = geoManager->channelContentX;
+ backgroundWidth = geoManager->channelContentWidth;
+ }
+ pixmapBackground->DrawRectangle(cRect(backgroundX,
+ 0,
+ backgroundWidth,
+ geoManager->channelHeight),
+ Theme.Color(clrChannelBackground));
+ if (config.GetValue("displayType") == dtBlending) {
+ DrawBlendedBackground(pixmapBackground,
+ backgroundX,
+ backgroundWidth,
+ Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend),
+ true);
+ DrawBlendedBackground(pixmapBackground,
+ backgroundX,
+ backgroundWidth,
+ Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend),
+ false);
+ }
+ if (config.GetValue("roundedCornersChannel")) {
+ int cornerRadius = geoManager->channelHeaderHeight/2;
+ if (cornerRadius > 2) {
+ DrawRoundedCorners(pixmapBackground,
+ cornerRadius,
+ backgroundX,
+ 0,
+ backgroundWidth,
+ geoManager->channelHeight);
+ }
+ }
+ }
+}
+
+void cNopacityDisplayChannelView::DrawChannelLogo(const cChannel *Channel) {
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *imgLogoBack = imgCache->GetSkinElement(seChannelLogoBack);
+ if (imgLogoBack)
+ pixmapLogoBackground->DrawImage(cPoint(0,0), *imgLogoBack);
+ }
+ cImage *imgLogo = imgCache->GetLogo(ctLogo, Channel);
+ if (imgLogo) {
+ pixmapLogo->DrawImage(cPoint(0,0), *imgLogo);
+ }
+}
+
+void cNopacityDisplayChannelView::ClearChannelLogo(void) {
+ pixmapLogoBackground->Fill(clrTransparent);
+ pixmapLogo->Fill(clrTransparent);
+}
+
+
+void cNopacityDisplayChannelView::DrawChannelName(cString number, cString name) {
+ cString channelString = cString::sprintf("%s %s", *number, *name);
+ pixmapChannelName->DrawText(cPoint(geoManager->channelHeaderHeight/2,
+ (geoManager->channelHeaderHeight-fontManager->channelHeader->Height())/2),
+ channelString,
+ Theme.Color(clrChannelHead),
+ clrTransparent,
+ fontManager->channelHeader);
+}
+
+void cNopacityDisplayChannelView::ClearChannelName(void) {
+ pixmapChannelName->Fill(clrTransparent);
+}
+
+
+void cNopacityDisplayChannelView::DrawDate(void) {
+ cString curDate = DayDateTime();
+ if (strcmp(curDate, lastDate)) {
+ int strDateWidth = fontManager->channelDate->Width(curDate);
+ int strDateHeight = fontManager->channelDate->Height();
+ int x = geoManager->channelDateWidth - strDateWidth - geoManager->channelHeaderHeight/2;
+ int y = (geoManager->channelHeaderHeight - strDateHeight) / 2;
+ pixmapDate->Fill(clrTransparent);
+ pixmapDate->DrawText(cPoint(x, y), curDate, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelDate);
+ lastDate = curDate;
+ }
+}
+
+void cNopacityDisplayChannelView::DrawProgressBar(int Current, int Total) {
+ int barHeight = pixmapProgressBar->ViewPort().Height()-8;
+ if (barHeight%2 != 0)
+ barHeight++;
+ if (barHeight < 3)
+ return;
+ int barFullWidth = pixmapProgressBar->ViewPort().Width() - 20 - barHeight;
+ if (Current > Total)
+ Current = Total;
+ if ((Current > 0) || (Total > 0)) {
+ double percentSeen = ((double)Current) / (double)Total;
+ pixmapProgressBar->DrawEllipse(cRect(10,
+ 4,
+ barHeight,
+ barHeight),
+ Theme.Color(clrChannelProgressBarBlend));
+ if (Current > 0) {
+ tColor colAct = DrawProgressbarProgress(10 + barHeight/2, 4, barFullWidth * percentSeen, barHeight-1);
+ pixmapProgressBar->DrawEllipse(cRect(10 + barFullWidth * percentSeen,
+ 4,
+ barHeight,
+ barHeight),
+ colAct);
+ }
+ }
+}
+
+void cNopacityDisplayChannelView::DrawProgressbarBackground(void) {
+ int barHeight = pixmapProgressBar->ViewPort().Height()-8;
+ if (barHeight%2 != 0)
+ barHeight++;
+ if (barHeight < 3)
+ return;
+ int barFullWidth = pixmapProgressBar->ViewPort().Width() - 20 - barHeight;
+ pixmapProgressBar->DrawEllipse(cRect(9,
+ 3,
+ barHeight+2,
+ barHeight+2),
+ Theme.Color(clrChannelProgressBarBack));
+ pixmapProgressBar->DrawEllipse(cRect(9 + barFullWidth,
+ 3, barHeight+2,
+ barHeight+2),
+ Theme.Color(clrChannelProgressBarBack));
+ pixmapProgressBar->DrawRectangle(cRect(9 + barHeight/2,
+ 3,
+ barFullWidth,
+ barHeight+1),
+ Theme.Color(clrChannelProgressBarBack));
+}
+
+tColor cNopacityDisplayChannelView::DrawProgressbarProgress(int left, int top, int width, int height) {
+ tColor clr1 = Theme.Color(clrChannelProgressBar);
+ tColor clr2 = Theme.Color(clrChannelProgressBarBlend);
+ tColor clr = 0x00000000;
+ width = (width==0)?1:width;
+ int step = width / 256;
+ int alpha = 0x0;
+ int alphaStep;
+ int maximum = 0;
+ if (step == 0) { //width < 256
+ step = 1;
+ alphaStep = 256 / width;
+ maximum = width;
+ } else { //width > 256
+ alphaStep = 0x1;
+ maximum = 256;
+ }
+ int x = 0;
+ for (int i = 0; i < maximum; i++) {
+ x = left + i*step;
+ clr = AlphaBlend(clr1, clr2, alpha);
+ pixmapProgressBar->DrawRectangle(cRect(x,top,step,height), clr);
+ alpha += alphaStep;
+ }
+ if (step > 0) {
+ int rest = width - step*256;
+ pixmapProgressBar->DrawRectangle(cRect(left+step*256, top, rest, height), clr);
+ }
+ return clr;
+}
+
+void cNopacityDisplayChannelView::ClearProgressBar(void) {
+ pixmapProgressBar->Fill(clrTransparent);
+}
+
+
+void cNopacityDisplayChannelView::DrawEPGInfo(const cEvent *e, bool present, bool recording) {
+ int indent = 20;
+ cString startTime = e->GetTimeString();
+ cString strEPG = e->Title();
+ cString strEPGShort = e->ShortText();
+ cString strSeen("");
+ if (present) {
+ if (config.GetValue("progressCurrentSchedule") == 0) {
+ int seen = (int)(time(NULL) - e->StartTime())/60;
+ strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60);
+ } else if (config.GetValue("progressCurrentSchedule") == 1) {
+ int remaining = (int)(e->EndTime() - time(NULL))/60;
+ strSeen = cString::sprintf("-%d/%dmin", remaining, e->Duration()/60);
+ }
+ } else {
+ strSeen = cString::sprintf("%dmin", e->Duration()/60);
+ }
+
+ int startTimeWidth = fontManager->channelEPG->Width(*startTime);
+ int epgWidth = fontManager->channelEPG->Width(*strEPG);
+ int epgWidthShort = fontManager->channelEPGSmall->Width(*strEPGShort);
+ int seenWidth = fontManager->channelEPG->Width(*strSeen);
+
+ int widthRecIcon = 0;
+ if (recording) {
+ widthRecIcon = fontManager->channelEPGSmall->Width(" REC ") + indent/2;
+ }
+ int spaceEPGText = geoManager->channelContentWidth - seenWidth
+ - startTimeWidth - 3 * indent - widthRecIcon
+ - fontManager->channelEPG->Width("...");
+ int spaceEPGTextSmall = spaceEPGText + widthRecIcon;
+ if (spaceEPGText < epgWidth) {
+ strEPG = CutText(*strEPG, spaceEPGText, fontManager->channelEPG).c_str();
+ }
+ if (spaceEPGTextSmall < epgWidthShort) {
+ strEPGShort = CutText(*strEPGShort, spaceEPGText, fontManager->channelEPGSmall).c_str();
+ }
+
+ int lineHeight = geoManager->channelEpgInfoLineHeight;
+ int yEPG = (present) ? 0 : 2 * lineHeight;
+ int yEPGSmall = (present) ? lineHeight : 3 * lineHeight;
+ int xEPG = 2 * indent + startTimeWidth;
+
+ tColor fontColor = (present) ? Theme.Color(clrChannelEPG)
+ : Theme.Color(clrChannelEPGNext);
+ tColor fontColorInfo = (present) ? Theme.Color(clrChannelEPGInfo)
+ : Theme.Color(clrChannelEPGInfoNext);
+
+ pixmapEPGInfo->DrawText(cPoint(indent, yEPG), *startTime, fontColor, clrTransparent, fontManager->channelEPG);
+
+ pixmapEPGInfo->DrawText(cPoint(xEPG + widthRecIcon, yEPG), *strEPG, fontColor, clrTransparent, fontManager->channelEPG);
+
+ pixmapEPGInfo->DrawText(cPoint(xEPG, yEPGSmall), *strEPGShort, fontColorInfo, clrTransparent, fontManager->channelEPGSmall);
+
+ int x = geoManager->channelContentWidth - 2 * indent - seenWidth;
+
+ pixmapEPGInfo->DrawText(cPoint(x, yEPG), *strSeen, fontColor, clrTransparent, fontManager->channelEPG);
+
+ //Recording Icon
+ if (recording) {
+ tColor clrRecIcon = (present)?Theme.Color(clrRecNow):Theme.Color(clrRecNext);
+ tColor clrRecIconText = (present)?Theme.Color(clrRecNowFont):Theme.Color(clrRecNextFont);
+ pixmapEPGInfo->DrawRectangle(cRect(xEPG, yEPG, widthRecIcon - indent/2, lineHeight), clrRecIcon);
+ int xRecText = xEPG + (widthRecIcon - indent/2 - fontManager->channelEPGSmall->Width("REC"))/2;
+ int yRecText = yEPG + (lineHeight - fontManager->channelEPGSmall->Height())/2;
+ pixmapEPGInfo->DrawText(cPoint(xRecText, yRecText), "REC", clrRecIconText, clrRecIcon, fontManager->channelEPGSmall);
+ }
+}
+
+void cNopacityDisplayChannelView::ClearEPGInfo(void) {
+ pixmapEPGInfo->Fill(clrTransparent);
+}
+
+void cNopacityDisplayChannelView::DrawStatusIcons(const cChannel *Channel) {
+ isRadioChannel = ((!Channel->Vpid())&&(Channel->Apid(0)))?true:false;
+ int iconX = 0;
+
+ if (Channel->Vpid() && Channel->Tpid()) {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/txton", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(0,statusIconBorder), *imgIcon);
+ } else {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/txtoff", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(0,statusIconBorder), *imgIcon);
+ }
+
+ iconX += statusIconBorder + statusIconSize;
+
+ if (Channel->Apid(0)) {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/stereoon", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ } else {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/stereooff", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ }
+
+ iconX += statusIconBorder + statusIconSize;
+
+ if (Channel->Dpid(0)) {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/dolbyon", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ } else {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/dolbyoff", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ }
+
+ iconX += statusIconBorder + statusIconSize;
+
+ if (Channel->Ca()) {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/crypted", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ } else {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/fta", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ }
+
+ iconX += statusIconBorder + statusIconSize;
+
+ if (cRecordControls::Active()) {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/recon", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ } else {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/recoff", statusIconSize, statusIconSize);
+ if (imgIcon)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgIcon);
+ }
+
+ iconX += statusIconBorder + statusIconSize;
+
+
+}
+
+void cNopacityDisplayChannelView::DrawScreenResolution(void) {
+ cString resolutionIcon("");
+ if (isRadioChannel) {
+ resolutionIcon = "skinIcons/radio";
+ } else {
+ resolutionIcon = GetScreenResolutionIcon();
+ }
+ int iconX = 5 * (statusIconBorder + statusIconSize);
+ cImage *imgRes = imgCache->GetSkinIcon(*resolutionIcon, 3*statusIconSize, statusIconSize);
+ if (imgRes)
+ pixmapStatusIcons->DrawImage(cPoint(iconX,statusIconBorder), *imgRes);
+
+}
+
+cString cNopacityDisplayChannelView::GetScreenResolutionIcon(void) {
+ int screenWidth = 0;
+ int screenHeight = 0;
+ double aspect = 0;
+ cDevice::PrimaryDevice()->GetVideoSize(screenWidth, screenHeight, aspect);
+ cString iconName("");
+ switch (screenWidth) {
+ case 1920:
+ case 1440:
+ iconName = "skinIcons/hd1080i";
+ break;
+ case 1280:
+ if (screenHeight == 720)
+ iconName = "skinIcons/hd720p";
+ else
+ iconName = "skinIcons/hd1080i";
+ break;
+ case 720:
+ iconName = "skinIcons/sd576i";
+ break;
+ default:
+ iconName = "skinIcons/sd576i";
+ break;
+ }
+ return iconName;
+}
+
+void cNopacityDisplayChannelView::ClearStatusIcons(void) {
+ pixmapStatusIcons->Fill(clrTransparent);
+}
+
+void cNopacityDisplayChannelView::DrawPoster(const cEvent *event, bool initial) {
+ if (pixmapPoster) {
+ osd->DestroyPixmap(pixmapPoster);
+ pixmapPoster = NULL;
+ }
+ static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper");
+ if (pTVScraper) {
+ TVScraperGetPosterOrBanner call;
+ call.event = event;
+ if (pTVScraper->Service("TVScraperGetPosterOrBanner", &call)) {
+ int mediaWidth = 0;
+ int mediaHeight = 0;
+ if (call.type == typeSeries) {
+ mediaWidth = call.media.width;
+ mediaHeight = call.media.height;
+ } else if (call.type == typeMovie) {
+ double ratio = (double)(cOsd::OsdHeight()/3) / (double)call.media.height;
+ mediaWidth = ratio * call.media.width;
+ mediaHeight = ratio * call.media.height;
+ }
+ pixmapPoster = osd->CreatePixmap(1, cRect(config.GetValue("channelBorderVertical"),
+ config.GetValue("channelBorderBottom"),
+ mediaWidth + 2*config.GetValue("channelBorderVertical"),
+ mediaHeight + 2*config.GetValue("channelBorderBottom")));
+ if (initial && config.GetValue("channelFadeTime"))
+ pixmapPoster->SetAlpha(0);
+ cImageLoader imgLoader;
+ if (imgLoader.LoadPoster(call.media.path.c_str(), mediaWidth, mediaHeight)) {
+ pixmapPoster->Fill(Theme.Color(clrChannelBackground));
+ pixmapPoster->DrawImage(cPoint(config.GetValue("channelBorderVertical"), config.GetValue("channelBorderBottom")), imgLoader.GetImage());
+ } else {
+ pixmapPoster->Fill(clrTransparent);
+ }
+ }
+ }
+}
+
+void cNopacityDisplayChannelView::DrawSignalMeter(void) {
+ signalWidth = geoManager->channelWidth * 0.15;
+ signalHeight = signalWidth *15 / 200;
+ cFont *fontInfoline = cFont::CreateFont(config.fontName, signalHeight - 2);
+ cString signalStrength = "STR";
+ cString signalQuality = "SNR";
+ cImage *imgSignal = imgCache->GetSkinIcon("skinIcons/signal", signalWidth, signalHeight, true);
+ if (imgSignal) {
+ signalWidth = imgSignal->Width();
+ signalHeight = imgSignal->Height();
+ int signalMeterY = geoManager->channelFooterY +
+ (geoManager->channelFooterHeight - 2*signalHeight - 5)/2;
+ int labelWidth = max(fontInfoline->Width(*signalStrength),
+ fontInfoline->Width(*signalQuality)) + 2;
+ signalX = geoManager->channelFooterHeight / 2 + labelWidth;
+ pixmapSignalStrength = osd->CreatePixmap(3,
+ cRect(geoManager->channelContentX + signalX,
+ signalMeterY + 2,
+ signalWidth + 2,
+ signalHeight + 2));
+ pixmapSignalQuality = osd->CreatePixmap(3,
+ cRect(geoManager->channelContentX + signalX,
+ signalMeterY + signalHeight + 5,
+ signalWidth + 2,
+ signalHeight + 2));
+ pixmapSignalMeter = osd->CreatePixmap(4,
+ cRect(geoManager->channelContentX + signalX + 1,
+ signalMeterY + 3, signalWidth,
+ 2*signalHeight + 3));
+ pixmapSignalLabel = osd->CreatePixmap(3,
+ cRect(geoManager->channelContentX
+ + geoManager->channelFooterHeight / 2,
+ signalMeterY + 2,
+ labelWidth,
+ 2*signalHeight + 3));
+ pixmapSignalStrength->Fill(Theme.Color(clrProgressBarBack));
+ pixmapSignalQuality->Fill(Theme.Color(clrProgressBarBack));
+ pixmapSignalMeter->Fill(clrTransparent);
+ pixmapSignalLabel->Fill(clrTransparent);
+ if (config.GetValue("channelFadeTime")) {
+ pixmapSignalStrength->SetAlpha(0);
+ pixmapSignalQuality->SetAlpha(0);
+ pixmapSignalMeter->SetAlpha(0);
+ pixmapSignalLabel->SetAlpha(0);
+ }
+ pixmapSignalStrength->DrawImage(cPoint(1,1), *imgSignal);
+ pixmapSignalQuality->DrawImage(cPoint(1,1), *imgSignal);
+ pixmapSignalLabel->DrawText(cPoint(0, 2), *signalStrength, Theme.Color(clrChannelEPGInfo), clrTransparent, fontInfoline);
+ pixmapSignalLabel->DrawText(cPoint(0, signalHeight + 4), *signalQuality, Theme.Color(clrChannelEPGInfo), clrTransparent, fontInfoline);
+ }
+ delete fontInfoline;
+}
+
+void cNopacityDisplayChannelView::DrawSignal(void) {
+ time_t Now = time(NULL);
+ if (Now != lastSignalDisplay) {
+ int SignalStrength = cDevice::ActualDevice()->SignalStrength();
+ int SignalQuality = cDevice::ActualDevice()->SignalQuality();
+ if ((SignalStrength == 0)&&(SignalQuality==0))
+ return;
+ if ((lastSignalStrength != SignalStrength) || (lastSignalQuality != SignalQuality)) {
+ pixmapSignalMeter->Fill(clrTransparent);
+ pixmapSignalMeter->DrawRectangle(cRect(double(SignalStrength) /100 * signalWidth, 0, signalWidth - (double)SignalStrength /100 * signalWidth + 1, signalHeight), Theme.Color(clrChannelBackground));
+ pixmapSignalMeter->DrawRectangle(cRect(double(SignalQuality) /100 * signalWidth, signalHeight + 3, signalWidth - (double)SignalQuality / 100 * signalWidth + 1, signalHeight + 1), Theme.Color(clrChannelBackground));
+ }
+ lastSignalStrength = SignalStrength;
+ lastSignalQuality = SignalQuality;
+ lastSignalDisplay = Now;
+ }
+}
+
+
+void cNopacityDisplayChannelView::ShowSignalMeter(void) {
+ if(pixmapSignalStrength)
+ pixmapSignalStrength->SetLayer(3);
+ if(pixmapSignalQuality)
+ pixmapSignalQuality->SetLayer(3);
+ if(pixmapSignalMeter)
+ pixmapSignalMeter->SetLayer(4);
+ if(pixmapSignalLabel)
+ pixmapSignalLabel->SetLayer(3);
+}
+
+void cNopacityDisplayChannelView::HideSignalMeter(void) {
+ if(pixmapSignalStrength)
+ pixmapSignalStrength->SetLayer(-1);
+ if(pixmapSignalQuality)
+ pixmapSignalQuality->SetLayer(-1);
+ if(pixmapSignalMeter)
+ pixmapSignalMeter->SetLayer(-1);
+ if(pixmapSignalLabel)
+ pixmapSignalLabel->SetLayer(-1);
+}
+
+void cNopacityDisplayChannelView::DrawChannelGroups(const cChannel *Channel, cString ChannelName) {
+ int ySep;
+ int ySepNextPrevIcon;
+ int prevNextSize = 64;
+
+ ySep = (geoManager->channelContentHeight-fontManager->channelChannelGroup->Height())/2 - fontManager->channelChannelGroup->Height()/2;
+ ySepNextPrevIcon = (geoManager->channelContentHeight - prevNextSize)/2 - fontManager->channelChannelGroup->Height()/2;
+
+ int widthSep = fontManager->channelChannelGroup->Width(*ChannelName);
+ int xSep = (config.GetValue("displayPrevNextChannelGroup"))?(geoManager->channelWidth * 2 / 5):0;
+ pixmapEPGInfo->DrawText(cPoint(xSep, ySep), *ChannelName, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelChannelGroup);
+
+ cImageLoader imgLoader;
+ if (config.GetValue("logoPosition") != lpNone) {
+ cString separator = cString::sprintf("separatorlogos/%s", *ChannelName);
+ if (imgLoader.LoadLogo(*separator, geoManager->channelLogoWidth, geoManager->channelLogoHeight)) {
+ pixmapLogo->DrawImage(cPoint(0, 0), imgLoader.GetImage());
+ } else {
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/Channelseparator", geoManager->channelLogoWidth, geoManager->channelLogoHeight);
+ if (imgIcon)
+ pixmapLogo->DrawImage(cPoint(0, 0), *imgIcon);
+ }
+ }
+
+ if (!config.GetValue("displayPrevNextChannelGroup"))
+ return;
+
+ cString prevChannelSep = GetChannelSep(Channel, true);
+ cString nextChannelSep = GetChannelSep(Channel, false);
+ bool prevAvailable = (strlen(*prevChannelSep) > 0)?true:false;
+ bool nextAvailable = (strlen(*nextChannelSep) > 0)?true:false;
+
+
+ int ySepNextPrev = ySep + (fontManager->channelChannelGroup->Height() - fontManager->channelChannelGroupSmall->Height())/2;
+ if (prevAvailable) {
+ int xSymbol = xSep - prevNextSize - 10;
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/arrowLeftChannelSep", prevNextSize, prevNextSize);
+ if (imgIcon)
+ pixmapEPGInfo->DrawImage(cPoint(xSymbol, ySepNextPrevIcon), *imgIcon);
+ int xSepPrev = xSymbol - 10 - fontManager->channelChannelGroupSmall->Width(prevChannelSep);
+ if (xSepPrev < 0) {
+ prevChannelSep = CutText(*prevChannelSep, xSymbol, fontManager->channelChannelGroupSmall).c_str();
+ xSepPrev = xSymbol - 10 - fontManager->channelChannelGroupSmall->Width(prevChannelSep);
+ }
+ pixmapEPGInfo->DrawText(cPoint(xSepPrev, ySepNextPrev), *prevChannelSep, Theme.Color(clrChannelEPGInfoNext), clrTransparent, fontManager->channelChannelGroupSmall);
+ }
+ if (nextAvailable) {
+ int xSymbol = xSep + widthSep + 10;
+ cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/arrowRightChannelSep", prevNextSize, prevNextSize);
+ if (imgIcon)
+ pixmapEPGInfo->DrawImage(cPoint(xSymbol, ySepNextPrevIcon), *imgIcon);
+ int xSepNext = xSymbol + 10 + prevNextSize;
+ int spaceAvailable = pixmapEPGInfo->DrawPort().Width() - xSepNext;
+ if (fontManager->channelChannelGroupSmall->Width(nextChannelSep) > spaceAvailable) {
+ nextChannelSep = CutText(*nextChannelSep, spaceAvailable, fontManager->channelChannelGroupSmall).c_str();
+ }
+ pixmapEPGInfo->DrawText(cPoint(xSepNext, ySepNextPrev), *nextChannelSep, Theme.Color(clrChannelEPGInfoNext), clrTransparent, fontManager->channelChannelGroupSmall);
+ }
+}
+
+cString cNopacityDisplayChannelView::GetChannelSep(const cChannel *channel, bool prev) {
+ cString sepName("");
+ const cChannel *sep = prev ? Channels.Prev(channel) :
+ Channels.Next(channel);
+ for (; sep; (prev)?(sep = Channels.Prev(sep)):(sep = Channels.Next(sep))) {
+ if (sep->GroupSep()) {
+ sepName = sep->Name();
+ break;
+ }
+ }
+ return sepName;
+}
+
+void cNopacityDisplayChannelView::DrawSourceInfo(const cChannel *Channel) {
+ const cSource *source = Sources.Get(Channel->Source());
+ cString channelInfo = "";
+ if (source)
+ channelInfo = cString::sprintf("%s - %s", *cSource::ToString(source->Code()), source->Description());
+ int textY = (geoManager->channelFooterHeight - fontManager->channelSourceInfo->Height()) / 2;
+ pixmapSourceInfo->DrawText(cPoint(0, textY), channelInfo, Theme.Color(clrChannelHead), clrTransparent, fontManager->channelSourceInfo);
+}
+
+void cNopacityDisplayChannelView::ClearSourceInfo(void) {
+ pixmapSourceInfo->Fill(clrTransparent);
+} \ No newline at end of file
diff --git a/displaychannelview.h b/displaychannelview.h
new file mode 100644
index 0000000..c5055d4
--- /dev/null
+++ b/displaychannelview.h
@@ -0,0 +1,65 @@
+#ifndef __NOPACITY_DISPLAYCHANNELVIEW_H
+#define __NOPACITY_DISPLAYCHANNELVIEW_H
+
+
+class cNopacityDisplayChannelView {
+private:
+ cImageCache *imgCache;
+ cOsd *osd;
+ cString lastDate;
+ int statusIconBorder;
+ int statusIconSize;
+ bool isRadioChannel;
+ int signalWidth, signalHeight, signalX;
+ int lastSignalDisplay;
+ int lastSignalStrength;
+ int lastSignalQuality;
+ cPixmap *pixmapBackground;
+ cPixmap *pixmapTop;
+ cPixmap *pixmapLogo;
+ cPixmap *pixmapLogoBackground;
+ cPixmap *pixmapChannelName;
+ cPixmap *pixmapDate;
+ cPixmap *pixmapProgressBar;
+ cPixmap *pixmapEPGInfo;
+ cPixmap *pixmapStatusIcons;
+ cPixmap *pixmapSignalStrength;
+ cPixmap *pixmapSignalQuality;
+ cPixmap *pixmapSignalMeter;
+ cPixmap *pixmapSignalLabel;
+ cPixmap *pixmapSourceInfo;
+ cPixmap *pixmapPoster;
+ tColor DrawProgressbarProgress(int left, int top, int width, int height);
+ cString GetScreenResolutionIcon(void);
+ cString GetChannelSep(const cChannel *channel, bool prev);
+public:
+ cNopacityDisplayChannelView(cImageCache *imgCache);
+ virtual ~cNopacityDisplayChannelView();
+ void createOsd(void);
+ void CreatePixmaps(void);
+ void SetAlpha(int alpha);
+ void DrawBackground(void);
+ void DrawChannelLogo(const cChannel *Channel);
+ void ClearChannelLogo(void);
+ void DrawChannelName(cString number, cString name);
+ void ClearChannelName(void);
+ void DrawDate(void);
+ void DrawProgressbarBackground(void);
+ void DrawProgressBar(int Current, int Total);
+ void ClearProgressBar(void);
+ void DrawEPGInfo(const cEvent *e, bool present, bool recording);
+ void ClearEPGInfo(void);
+ void DrawStatusIcons(const cChannel *Channel);
+ void DrawScreenResolution(void);
+ void ClearStatusIcons(void);
+ void DrawPoster(const cEvent *event, bool initial);
+ void DrawSignalMeter(void);
+ void DrawSignal(void);
+ void ShowSignalMeter(void);
+ void HideSignalMeter(void);
+ void DrawChannelGroups(const cChannel *Channel, cString ChannelName);
+ void DrawSourceInfo(const cChannel *Channel);
+ void ClearSourceInfo(void);
+ void Flush(void) { osd->Flush(); };
+};
+#endif //__NOPACITY_DISPLAYCHANNELVIEW_H \ No newline at end of file
diff --git a/displaymenu.c b/displaymenu.c
index df69c7f..5838264 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -10,10 +10,9 @@ namespace PluginRemoteTimers {
cNopacityDisplayMenu::cNopacityDisplayMenu(cImageCache *imgCache) {
this->imgCache = imgCache;
- config.setDynamicValues();
menuCategoryLast = mcUndefined;
- FrameTime = config.menuFrameTime;
- FadeTime = config.menuFadeTime;
+ FadeTime = config.GetValue("menuFadeTime");
+ FrameTime = FadeTime / 10;
initial = true;
initMenu = true;
diskUsageDrawn = false;
@@ -32,26 +31,12 @@ cNopacityDisplayMenu::cNopacityDisplayMenu(cImageCache *imgCache) {
menuView->DrawHeaderLogo();
menuView->DrawBorderDecoration();
currentFeed = 0;
- if (config.displayRSSFeed) {
- menuView->DrawRssFeed(config.rssFeeds[config.rssFeed[currentFeed]].name);
- rssReader = new cRssReader(osd, fontManager->menuRssFeed, menuView->GetRssFeedPosition(), menuView->GetRssFeedSize());
- rssReader->SetFeed(config.rssFeeds[config.rssFeed[currentFeed]].url);
- rssReader->Start();
- } else
- rssReader = NULL;
}
cNopacityDisplayMenu::~cNopacityDisplayMenu() {
Cancel(-1);
while (Active())
cCondWait::SleepMs(10);
- if (rssReader) {
- rssReader->Stop();
- while (rssReader->Active())
- cCondWait::SleepMs(10);
- delete rssReader;
- rssReader = NULL;
- }
delete menuView;
menuItems.Clear();
if (detailView) {
@@ -64,7 +49,7 @@ cNopacityDisplayMenu::~cNopacityDisplayMenu() {
}
void cNopacityDisplayMenu::DrawDisk(void) {
- if (!config.narrowMainMenu)
+ if (!config.GetValue("narrowMainMenu"))
return;
if (initial || ((menuCategoryLast!=mcMain)&&(MenuCategory()==mcMain)&&!diskUsageDrawn)) {
if (cVideoDiskUsage::HasChanged(lastDiskUsageState)) {
@@ -100,7 +85,7 @@ int cNopacityDisplayMenu::CheckTimerConflict(bool timersChanged) {
}
void cNopacityDisplayMenu::DrawTimers(bool timersChanged, int numConflicts) {
- if (!config.narrowMainMenu)
+ if (!config.GetValue("narrowMainMenu"))
return;
int maxTimersHeight = menuView->GetTimersMaxHeight();
if (initial || ((menuCategoryLast!=mcMain)&&(MenuCategory()==mcMain)&&!timersDrawn)) {
@@ -146,7 +131,7 @@ void cNopacityDisplayMenu::DrawTimers(bool timersChanged, int numConflicts) {
if (currentHeight < maxTimersHeight) {
timers.Add(t);
numTimersDisplayed++;
- if (numTimersDisplayed == config.numberTimers)
+ if (numTimersDisplayed == config.GetValue("numberTimers"))
break;
} else {
delete t;
@@ -178,45 +163,45 @@ int cNopacityDisplayMenu::MaxItems(void) {
int maxItems = 0;
switch (MenuCategory()) {
case mcMain:
- if (config.narrowMainMenu)
+ if (config.GetValue("narrowMainMenu"))
maxItems = menuView->GetMaxItems(MenuCategory());
else
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
break;
case mcSetup:
- if (config.narrowSetupMenu)
+ if (config.GetValue("narrowSetupMenu"))
maxItems = menuView->GetMaxItems(MenuCategory());
else
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
break;
case mcSchedule:
case mcScheduleNow:
case mcScheduleNext:
- if (config.narrowScheduleMenu)
+ if (config.GetValue("narrowScheduleMenu"))
maxItems = menuView->GetMaxItems(MenuCategory());
else
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
break;
case mcChannel:
- if (config.narrowChannelMenu)
+ if (config.GetValue("narrowChannelMenu"))
maxItems = menuView->GetMaxItems(MenuCategory());
else
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
break;
case mcTimer:
- if (config.narrowTimerMenu)
+ if (config.GetValue("narrowTimerMenu"))
maxItems = menuView->GetMaxItems(MenuCategory());
else
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
break;
case mcRecording:
- if (config.narrowRecordingMenu)
+ if (config.GetValue("narrowRecordingMenu"))
maxItems = menuView->GetMaxItems(MenuCategory());
else
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
break;
default:
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
}
currentNumItems = maxItems;
return maxItems;
@@ -267,11 +252,11 @@ void cNopacityDisplayMenu::SetMenuCategory(eMenuCategory MenuCategory) {
menuCategoryLast = this->MenuCategory();
cSkinDisplayMenu::SetMenuCategory(MenuCategory);
if ((menuCategoryLast == mcMain) && (MenuCategory != mcMain)) {
- if (config.showDiscUsage) {
+ if (config.GetValue("showDiscUsage")) {
menuView->ShowDiskUsage(false);
diskUsageDrawn = false;
}
- if (config.showTimers) {
+ if (config.GetValue("showTimers")) {
for (cNopacityTimer *t = timers.First(); t; t = timers.Next(t)) {
t->Hide();
}
@@ -293,7 +278,7 @@ void cNopacityDisplayMenu::SetTitle(const char *Title) {
cString title = Title;
switch (MenuCategory()) {
case mcMain:
- switch (config.mainMenuTitleStyle) {
+ switch (config.GetValue("mainMenuTitleStyle")) {
case 0:
title = cString::sprintf("%s %s", Title, VDRVERSION);
break;
@@ -356,22 +341,22 @@ void cNopacityDisplayMenu::SetButtonPositions(void) {
void cNopacityDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue) {
if (Red) {
- menuView->DrawButton(Red, btButtonRed, Theme.Color(clrButtonRed), Theme.Color(clrButtonRedBorder), Theme.Color(clrButtonRedFont), positionButtons[0]);
+ menuView->DrawButton(Red, seButtonRed, Theme.Color(clrButtonRed), Theme.Color(clrButtonRedBorder), Theme.Color(clrButtonRedFont), positionButtons[0]);
} else
menuView->ClearButton(positionButtons[0]);
if (Green) {
- menuView->DrawButton(Green, btButtonGreen,Theme.Color(clrButtonGreen), Theme.Color(clrButtonGreenBorder), Theme.Color(clrButtonGreenFont), positionButtons[1]);
+ menuView->DrawButton(Green, seButtonGreen,Theme.Color(clrButtonGreen), Theme.Color(clrButtonGreenBorder), Theme.Color(clrButtonGreenFont), positionButtons[1]);
} else
menuView->ClearButton(positionButtons[1]);
if (Yellow) {
- menuView->DrawButton(Yellow, btButtonYellow, Theme.Color(clrButtonYellow), Theme.Color(clrButtonYellowBorder), Theme.Color(clrButtonYellowFont), positionButtons[2]);
+ menuView->DrawButton(Yellow, seButtonYellow, Theme.Color(clrButtonYellow), Theme.Color(clrButtonYellowBorder), Theme.Color(clrButtonYellowFont), positionButtons[2]);
} else
menuView->ClearButton(positionButtons[2]);
if (Blue) {
- menuView->DrawButton(Blue, btButtonBlue, Theme.Color(clrButtonBlue), Theme.Color(clrButtonBlueBorder), Theme.Color(clrButtonBlueFont), positionButtons[3]);
+ menuView->DrawButton(Blue, seButtonBlue, Theme.Color(clrButtonBlue), Theme.Color(clrButtonBlueBorder), Theme.Color(clrButtonBlueFont), positionButtons[3]);
} else
menuView->ClearButton(positionButtons[3]);
}
@@ -386,7 +371,7 @@ void cNopacityDisplayMenu::SetMessage(eMessageType Type, const char *Text) {
bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) {
- if (!config.narrowScheduleMenu)
+ if (!config.GetValue("narrowScheduleMenu"))
return false;
if ((initMenu)&&(Index > menuItemIndexLast)) {
cNopacityMenuItem *item = new cNopacityScheduleMenuItem(osd, imgCache, Event, Channel, TimerMatch, Selectable, MenuCategory(), &videoWindowRect);
@@ -403,6 +388,9 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur
item->CreateText();
int textWidth = item->CheckScrollable((Channel)?true:false);
item->CreatePixmap();
+ if (config.GetValue("displayType") == dtGraphical) {
+ item->CreatePixmapForeground();
+ }
item->CreatePixmapIcon();
item->CreatePixmapTextScroller(textWidth);
menuItems.Add(item);
@@ -424,7 +412,7 @@ bool cNopacityDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Cur
}
bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current, bool Selectable) {
- if (!config.narrowTimerMenu)
+ if (!config.GetValue("narrowTimerMenu"))
return false;
if ((initMenu)&&(Index > menuItemIndexLast)) {
cNopacityMenuItem *item = new cNopacityTimerMenuItem(osd, imgCache, Timer, Selectable);
@@ -438,6 +426,9 @@ bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Cur
item->CreateText();
int textWidth = item->CheckScrollable(true);
item->CreatePixmap();
+ if (config.GetValue("displayType") == dtGraphical) {
+ item->CreatePixmapForeground();
+ }
item->CreatePixmapIcon();
item->CreatePixmapTextScroller(textWidth);
menuItems.Add(item);
@@ -459,7 +450,7 @@ bool cNopacityDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Cur
}
bool cNopacityDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Current, bool Selectable, bool WithProvider) {
- if (!config.narrowChannelMenu)
+ if (!config.GetValue("narrowChannelMenu"))
return false;
if ((initMenu)&&(Index > menuItemIndexLast)) {
cNopacityMenuItem *item = new cNopacityChannelMenuItem(osd, imgCache, Channel, Selectable, &videoWindowRect);
@@ -477,6 +468,9 @@ bool cNopacityDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bo
item->CreatePixmap();
item->CreatePixmapIcon();
item->CreatePixmapTextScroller(textWidth);
+ if (config.GetValue("displayType") == dtGraphical) {
+ item->CreatePixmapForeground();
+ }
menuItems.Add(item);
item->Render();
menuItemIndexLast = Index;
@@ -497,7 +491,7 @@ bool cNopacityDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bo
bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bool Current, bool Selectable,
int Level, int Total, int New) {
- if (!config.narrowRecordingMenu)
+ if (!config.GetValue("narrowRecordingMenu"))
return false;
if ((initMenu)&&(Index > menuItemIndexLast)) {
bool isFolder = false;
@@ -520,6 +514,9 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind
item->CreatePixmap();
item->CreatePixmapIcon();
item->CreatePixmapTextScroller(textWidth);
+ if (config.GetValue("displayType") == dtGraphical) {
+ item->CreatePixmapForeground();
+ }
menuItems.Add(item);
item->Render();
menuItemIndexLast = Index;
@@ -540,8 +537,8 @@ bool cNopacityDisplayMenu::SetItemRecording(const cRecording *Recording, int Ind
void cNopacityDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Selectable) {
- //int start = cTimeMs::Now();
bool hasIcons = false;
+ bool MainOrSetup = false;
cString *strItems = new cString[MaxTabs];
int *tabItems = new int[2*MaxTabs];
for (int i=0; i<MaxTabs; i++) {
@@ -554,12 +551,13 @@ void cNopacityDisplayMenu::SetItem(const char *Text, int Index, bool Current, bo
if (Index > menuItemIndexLast) {
cNopacityMenuItem *item;
cPoint itemSize;
- if (((MenuCategory() == mcMain)&&(config.narrowMainMenu)) || ((MenuCategory() == mcSetup)&&(config.narrowSetupMenu))){
+ if (((MenuCategory() == mcMain)&&(config.GetValue("narrowMainMenu"))) || ((MenuCategory() == mcSetup)&&(config.GetValue("narrowSetupMenu")))){
+ MainOrSetup = true;
bool isSetup = (MenuCategory() == mcSetup)?true:false;
item = new cNopacityMainMenuItem(osd, imgCache, Text, Selectable, isSetup);
menuView->GetMenuItemSize(MenuCategory(), &itemSize);
item->SetFont(fontManager->menuItemLarge);
- if (config.useMenuIcons)
+ if (config.GetValue("useMenuIcons"))
hasIcons = true;
} else {
item = new cNopacityDefaultMenuItem(osd, imgCache, Text, Selectable);
@@ -573,6 +571,9 @@ void cNopacityDisplayMenu::SetItem(const char *Text, int Index, bool Current, bo
item->CreateText();
int textWidth = item->CheckScrollable(hasIcons);
item->CreatePixmap();
+ if (config.GetValue("displayType") == dtGraphical && MainOrSetup) {
+ item->CreatePixmapForeground();
+ }
if (hasIcons) {
item->CreatePixmapIcon();
}
@@ -726,17 +727,17 @@ void cNopacityDisplayMenu::Flush(void) {
//int start = cTimeMs::Now();
menuView->DrawDate(initial);
if (MenuCategory() == mcMain) {
- if (config.showDiscUsage)
+ if (config.GetValue("showDiscUsage"))
DrawDisk();
bool timersChanged = Timers.Modified(lastTimersState);
int numConflicts = 0;
- if (config.checkTimerConflict)
+ if (config.GetValue("checkTimerConflict"))
numConflicts = CheckTimerConflict(timersChanged);
- if (config.showTimers)
+ if (config.GetValue("showTimers"))
DrawTimers(timersChanged, numConflicts);
}
if (initial) {
- if (config.menuFadeTime)
+ if (FadeTime)
Start();
}
initMenu = false;
@@ -769,41 +770,4 @@ void cNopacityDisplayMenu::Action(void) {
if ((int)(Now - Start) > FadeTime)
break;
}
-}
-
-void cNopacityDisplayMenu::SwitchNextRssMessage(void) {
- if (!config.displayRSSFeed)
- return;
- if (rssReader) {
- rssReader->SwitchNextMessage();
- }
-}
-
-void cNopacityDisplayMenu::SwitchNextRssFeed(void) {
- if (!config.displayRSSFeed)
- return;
- if (rssReader) {
- rssReader->Stop();
- while (rssReader->Active())
- cCondWait::SleepMs(10);
- delete rssReader;
- rssReader = NULL;
- }
- SetNextFeed();
- int feedNum = (config.rssFeed[currentFeed]==0)?0:(config.rssFeed[currentFeed]-1);
- menuView->DrawRssFeed(config.rssFeeds[feedNum].name);
- rssReader = new cRssReader(osd, fontManager->menuRssFeed, menuView->GetRssFeedPosition(), menuView->GetRssFeedSize());
- rssReader->SetFeed(config.rssFeeds[feedNum].url);
- rssReader->Start();
-}
-
-void cNopacityDisplayMenu::SetNextFeed(void) {
- int nextFeed = 0;
- for (int i = 1; i<6; i++) {
- nextFeed = (currentFeed + i)%5;
- if ((nextFeed == 0)||(config.rssFeed[nextFeed] > 0)) {
- currentFeed = nextFeed;
- break;
- }
- }
-} \ No newline at end of file
+} \ No newline at end of file
diff --git a/displaymenu.h b/displaymenu.h
index 8f7bd69..420cbe5 100644
--- a/displaymenu.h
+++ b/displaymenu.h
@@ -22,7 +22,6 @@ private:
cList<cNopacityMenuItem> menuItems;
int positionButtons[4];
cRect videoWindowRect;
- cRssReader *rssReader;
int currentFeed;
void SetNextFeed(void);
void DrawDisk(void);
@@ -56,8 +55,6 @@ public:
virtual void SetTabs(int Tab1, int Tab2 = 0, int Tab3 = 0, int Tab4 = 0, int Tab5 = 0);
virtual int GetTextAreaWidth(void) const;
virtual const cFont *GetTextAreaFont(bool FixedFont) const;
- void SwitchNextRssMessage(void);
- void SwitchNextRssFeed(void);
};
#endif //__NOPACITY_DISPLAYMENU_H \ No newline at end of file
diff --git a/displaymenuview.c b/displaymenuview.c
index e7b50e5..86bd875 100644
--- a/displaymenuview.c
+++ b/displaymenuview.c
@@ -9,24 +9,21 @@ cNopacityDisplayMenuView::cNopacityDisplayMenuView(cImageCache *imgCache) {
cNopacityDisplayMenuView::~cNopacityDisplayMenuView(void) {
osd->DestroyPixmap(pixmapHeader);
+ osd->DestroyPixmap(pixmapHeaderForeground);
osd->DestroyPixmap(pixmapHeaderLogo);
osd->DestroyPixmap(pixmapHeaderLabel);
osd->DestroyPixmap(pixmapDate);
osd->DestroyPixmap(pixmapFooter);
+ osd->DestroyPixmap(pixmapFooterBack);
osd->DestroyPixmap(pixmapButtonsText);
osd->DestroyPixmap(pixmapContent);
- osd->DestroyPixmap(pixmapScrollbar);
+ osd->DestroyPixmap(pixmapScrollbar);
+ osd->DestroyPixmap(pixmapScrollbarBack);
osd->DestroyPixmap(pixmapDiskUsage);
osd->DestroyPixmap(pixmapDiskUsageIcon);
osd->DestroyPixmap(pixmapDiskUsageLabel);
if (pixmapHeaderIcon)
osd->DestroyPixmap(pixmapHeaderIcon);
- if (pixmapRssFeed)
- osd->DestroyPixmap(pixmapRssFeed);
- if (pixmapRssFeedBackground)
- osd->DestroyPixmap(pixmapRssFeedBackground);
- if (pixmapRssFeedIcon)
- osd->DestroyPixmap(pixmapRssFeedIcon);
}
cOsd *cNopacityDisplayMenuView::createOsd(void) {
@@ -37,7 +34,7 @@ cOsd *cNopacityDisplayMenuView::createOsd(void) {
void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
int xSchedules, xRecordings, xChannels;
int widthSchedules, widthRecordings, widthChannels;
- if (config.menuAdjustLeft) {
+ if (config.GetValue("menuAdjustLeft")) {
xSchedules = 2 * geoManager->menuSpace
+ geoManager->menuContentWidthSchedules
+ geoManager->menuWidthScrollbar;
@@ -68,15 +65,15 @@ void cNopacityDisplayMenuView::SetDescriptionTextWindowSize(void) {
- 2 * geoManager->menuSpace;
}
int heightFull = geoManager->menuContentHeight - 2*geoManager->menuSpace;
- int height = config.menuHeightInfoWindow * heightFull / 100;
+ int height = config.GetValue("menuHeightInfoWindow") * heightFull / 100;
int y = geoManager->menuHeaderHeight + (geoManager->menuContentHeight - height - geoManager->menuSpace);
int yFullScreen = geoManager->menuHeaderHeight + geoManager->menuSpace;
- if (config.menuSchedulesWindowMode == 0)
+ if (config.GetValue("menuSchedulesWindowMode") == 0)
textWindowSizeSchedules = cRect(xSchedules,y,widthSchedules,height);
else
textWindowSizeSchedules = cRect(xSchedules,yFullScreen,widthSchedules,heightFull);
- if (config.menuRecordingsWindowMode == 0)
+ if (config.GetValue("menuRecordingsWindowMode") == 0)
textWindowSizeRecordings = cRect(xRecordings,y,widthRecordings,height);
else
textWindowSizeRecordings = cRect(xRecordings,yFullScreen,widthRecordings,heightFull);
@@ -100,34 +97,34 @@ cRect *cNopacityDisplayMenuView::GetDescriptionTextWindowSize(eMenuCategory menu
int cNopacityDisplayMenuView::GetContentWidth(eMenuCategory menuCat) {
switch (menuCat) {
case mcMain:
- if (config.narrowMainMenu)
+ if (config.GetValue("narrowMainMenu"))
return geoManager->menuContentWidthMain;
else
return geoManager->menuContentWidthFull;
case mcSetup:
- if (config.narrowSetupMenu)
+ if (config.GetValue("narrowSetupMenu"))
return geoManager->menuContentWidthSetup;
else
return geoManager->menuContentWidthFull;
case mcSchedule:
case mcScheduleNow:
case mcScheduleNext:
- if (config.narrowScheduleMenu)
+ if (config.GetValue("narrowScheduleMenu"))
return geoManager->menuContentWidthSchedules;
else
return geoManager->menuContentWidthFull;
case mcChannel:
- if (config.narrowChannelMenu)
+ if (config.GetValue("narrowChannelMenu"))
return geoManager->menuContentWidthChannels;
else
return geoManager->menuContentWidthFull;
case mcTimer:
- if (config.narrowTimerMenu)
+ if (config.GetValue("narrowTimerMenu"))
return geoManager->menuContentWidthTimers;
else
return geoManager->menuContentWidthFull;
case mcRecording:
- if (config.narrowRecordingMenu)
+ if (config.GetValue("narrowRecordingMenu"))
return geoManager->menuContentWidthRecordings;
else
return geoManager->menuContentWidthFull;
@@ -140,46 +137,43 @@ int cNopacityDisplayMenuView::GetContentWidth(eMenuCategory menuCat) {
void cNopacityDisplayMenuView::CreatePixmaps(void) {
pixmapHeader = osd->CreatePixmap(1, cRect(0, 0, geoManager->osdWidth, geoManager->menuHeaderHeight));
- int dateX = (config.menuAdjustLeft) ? (geoManager->osdWidth - geoManager->menuDateWidth) : 0;
+ pixmapHeaderForeground = osd->CreatePixmap(3, cRect(0, 0, geoManager->osdWidth, geoManager->menuHeaderHeight));
+ int dateX = (config.GetValue("menuAdjustLeft")) ? (geoManager->osdWidth - geoManager->menuDateWidth) : 0;
pixmapDate = osd->CreatePixmap(2, cRect(dateX, 0, geoManager->menuDateWidth, geoManager->menuHeaderHeight));
- int logoX = (config.menuAdjustLeft) ? 0 : (geoManager->osdWidth - config.menuHeaderLogoWidth);
- pixmapHeaderLogo = osd->CreatePixmap(-1, cRect(logoX, 0, config.menuHeaderLogoWidth, config.menuHeaderLogoHeight));
- int labelX = (config.menuAdjustLeft) ? 0 : geoManager->menuDateWidth;
+ int logoX = (config.GetValue("menuAdjustLeft")) ? 0 : (geoManager->osdWidth - config.GetValue("menuHeaderLogoWidth"));
+ pixmapHeaderLogo = osd->CreatePixmap(-1, cRect(logoX, 0, config.GetValue("menuHeaderLogoWidth"), config.GetValue("menuHeaderLogoHeight")));
+ int labelX = (config.GetValue("menuAdjustLeft")) ? 0 : geoManager->menuDateWidth;
pixmapHeaderLabel = osd->CreatePixmap(2, cRect(labelX, 0, geoManager->osdWidth - geoManager->menuDateWidth, geoManager->menuHeaderHeight));
- pixmapFooter = osd->CreatePixmap(1, cRect(0, geoManager->osdHeight - geoManager->menuRssFeedHeight - geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuFooterHeight));
- pixmapButtonsText = osd->CreatePixmap(1, cRect(0, geoManager->osdHeight - geoManager->menuRssFeedHeight - geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuFooterHeight));
+ pixmapFooter = osd->CreatePixmap(2, cRect(0, geoManager->osdHeight - geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuFooterHeight));
+ pixmapFooterBack = osd->CreatePixmap(1, cRect(0, geoManager->osdHeight - geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuFooterHeight));
+ pixmapButtonsText = osd->CreatePixmap(3, cRect(0, geoManager->osdHeight - geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuFooterHeight));
int drawPortWidth = geoManager->osdWidth + geoManager->menuContentWidthFull - geoManager->menuContentWidthMinimum;
pixmapContent = osd->CreatePixmap(1, cRect(0, geoManager->menuHeaderHeight, geoManager->osdWidth, geoManager->menuContentHeight),
cRect(0, 0, drawPortWidth, geoManager->menuContentHeight));
- int diskUsageX = (config.menuAdjustLeft) ? (geoManager->osdWidth - geoManager->menuDiskUsageWidth - 10) : 10;
+ int diskUsageX = (config.GetValue("menuAdjustLeft")) ? (geoManager->osdWidth - geoManager->menuDiskUsageWidth - 10) : 10;
pixmapDiskUsage = osd->CreatePixmap(2, cRect(diskUsageX, geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuDiskUsageWidth, geoManager->menuDiskUsageHeight));
pixmapDiskUsageIcon = osd->CreatePixmap(3, cRect(diskUsageX + 2, geoManager->menuHeaderHeight + geoManager->menuSpace + 2, geoManager->menuDiskUsageWidth - 4, geoManager->menuDiskUsageHeight - 4));
pixmapDiskUsageLabel = osd->CreatePixmap(4, cRect(diskUsageX + 2, geoManager->menuHeaderHeight + geoManager->menuSpace + 2, geoManager->menuDiskUsageWidth - 4, geoManager->menuDiskUsageHeight - 4));
- int scrollbarX = (config.menuAdjustLeft) ? geoManager->menuContentWidthMain : (geoManager->osdWidth - geoManager->menuContentWidthMain);
- pixmapScrollbar = osd->CreatePixmap(2, cRect(scrollbarX, geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2 * geoManager->menuSpace));
+ int scrollbarX = (config.GetValue("menuAdjustLeft")) ? geoManager->menuContentWidthMain : (geoManager->osdWidth - geoManager->menuContentWidthMain);
+ pixmapScrollbar = osd->CreatePixmap(3, cRect(scrollbarX, geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2 * geoManager->menuSpace));
+ pixmapScrollbarBack = osd->CreatePixmap(2, cRect(scrollbarX, geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2 * geoManager->menuSpace));
- if (config.displayRSSFeed) {
- pixmapRssFeedBackground = osd->CreatePixmap(1, cRect(0, geoManager->menuHeaderHeight + geoManager->menuContentHeight + geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuRssFeedHeight));
- pixmapRssFeed = osd->CreatePixmap(2, cRect(0, geoManager->menuHeaderHeight + geoManager->menuContentHeight + geoManager->menuFooterHeight, geoManager->osdWidth, geoManager->menuRssFeedHeight));
- pixmapRssFeedIcon = osd->CreatePixmap(3, cRect(0, geoManager->menuHeaderHeight + geoManager->menuContentHeight + geoManager->menuFooterHeight, geoManager->menuRssFeedHeight, geoManager->menuRssFeedHeight));
- } else {
- pixmapRssFeedBackground = NULL;
- pixmapRssFeed = NULL;
- pixmapRssFeedIcon = NULL;
- }
pixmapHeaderLogo->Fill(clrTransparent);
pixmapHeaderLabel->Fill(clrTransparent);
pixmapDiskUsage->Fill(clrTransparent);
pixmapDiskUsageIcon->Fill(clrTransparent);
pixmapDiskUsageLabel->Fill(clrTransparent);
- if (config.menuFadeTime) {
+ if (config.GetValue("menuFadeTime")) {
pixmapHeader->SetAlpha(0);
+ pixmapHeaderForeground->SetAlpha(0);
pixmapHeaderLogo->SetAlpha(0);
pixmapHeaderLabel->SetAlpha(0);
pixmapDate->SetAlpha(0);
pixmapFooter->SetAlpha(0);
+ pixmapFooterBack->SetAlpha(0);
pixmapButtonsText->SetAlpha(0);
pixmapContent->SetAlpha(0);
+ pixmapScrollbarBack->SetAlpha(0);
pixmapScrollbar->SetAlpha(0);
pixmapDiskUsage->SetAlpha(0);
pixmapDiskUsageIcon->SetAlpha(0);
@@ -189,12 +183,15 @@ void cNopacityDisplayMenuView::CreatePixmaps(void) {
void cNopacityDisplayMenuView::SetPixmapAlpha(int Alpha) {
pixmapHeader->SetAlpha(Alpha);
+ pixmapHeaderForeground->SetAlpha(Alpha);
pixmapHeaderLogo->SetAlpha(Alpha);
pixmapHeaderLabel->SetAlpha(Alpha);
pixmapDate->SetAlpha(Alpha);
pixmapContent->SetAlpha(Alpha);
pixmapFooter->SetAlpha(Alpha);
+ pixmapFooterBack->SetAlpha(Alpha);
pixmapButtonsText->SetAlpha(Alpha);
+ pixmapScrollbarBack->SetAlpha(Alpha);
pixmapScrollbar->SetAlpha(Alpha);
pixmapDiskUsage->SetAlpha(Alpha);
pixmapDiskUsageIcon->SetAlpha(Alpha);
@@ -261,7 +258,7 @@ int cNopacityDisplayMenuView::GetMaxItems(eMenuCategory menuCat) {
maxItems = geoManager->menuContentHeight / (geoManager->menuItemHeightRecordings + geoManager->menuSpace);
break;
default:
- maxItems = config.numDefaultMenuItems;
+ maxItems = config.GetValue("numDefaultMenuItems");
}
return maxItems;
}
@@ -272,7 +269,7 @@ int cNopacityDisplayMenuView::GetMenuTop(int numItems, int itemHeight) {
int cNopacityDisplayMenuView::GetMenuItemLeft(int itemWidth) {
int menuLeft = geoManager->menuSpace;
- if (!config.menuAdjustLeft)
+ if (!config.GetValue("menuAdjustLeft"))
menuLeft = geoManager->osdWidth - itemWidth - geoManager->menuSpace;
return menuLeft;
}
@@ -305,17 +302,30 @@ int cNopacityDisplayMenuView::GetTextAreaWidth(void) {
}
const cFont *cNopacityDisplayMenuView::GetTextAreaFont(bool FixedFont) {
- return cFont::CreateFont(config.fontName, geoManager->menuContentHeight / 25 + config.fontDetailView);
+ return cFont::CreateFont(config.fontName, geoManager->menuContentHeight / 25 + config.GetValue("fontDetailView"));
}
void cNopacityDisplayMenuView::DrawBorderDecoration() {
- if (config.doBlending) {
- cImage *headerImage = imgCache->GetBackground(btMenuHeader);
+ if (config.GetValue("displayType") == dtGraphical) {
+ pixmapHeader->Fill(Theme.Color(clrMenuBack));
+ cImage *headerImage = imgCache->GetSkinElement(seMenuHeader);
+ if (headerImage)
+ pixmapHeaderForeground->DrawImage(cPoint(0, 0), *headerImage);
+ else
+ pixmapHeaderForeground->Fill(clrTransparent);
+ } else if (config.GetValue("displayType") == dtBlending) {
+ pixmapHeaderForeground->Fill(clrTransparent);
+ cImage *headerImage = imgCache->GetSkinElement(seMenuHeader);
if (headerImage)
pixmapHeader->DrawImage(cPoint(0, 0), *headerImage);
- } else
+ else
+ pixmapHeader->Fill(Theme.Color(clrMenuBack));
+ } else {
+ pixmapHeaderForeground->Fill(clrTransparent);
pixmapHeader->Fill(Theme.Color(clrMenuBack));
- pixmapFooter->Fill(Theme.Color(clrMenuBack));
+ }
+ pixmapFooter->Fill(clrTransparent);
+ pixmapFooterBack->Fill(Theme.Color(clrMenuBack));
pixmapButtonsText->Fill(clrTransparent);
int borderWidth = 2;
@@ -323,7 +333,7 @@ void cNopacityDisplayMenuView::DrawBorderDecoration() {
pixmapContent->Fill(clrTransparent);
- if (config.menuAdjustLeft) {
+ if (config.GetValue("menuAdjustLeft")) {
//Background
pixmapContent->DrawRectangle(cRect(0, 0, geoManager->menuContentWidthFull - radius, geoManager->menuContentHeight), Theme.Color(clrMenuBack));
pixmapContent->DrawRectangle(cRect(geoManager->menuContentWidthFull - radius, 0, geoManager->menuWidthScrollbar + geoManager->menuSpace + radius, geoManager->menuContentHeight), Theme.Color(clrMenuScrollBarBase));
@@ -374,18 +384,18 @@ void cNopacityDisplayMenuView::AdjustContentBackground(eMenuCategory menuCat, eM
int drawportX;
if ((contentWidth != contentWidthLast)||(menuCatLast == mcUndefined)) {
if (contentWidth == geoManager->menuContentWidthFull) {
- drawportX = (config.menuAdjustLeft)?0:(geoManager->menuContentWidthMinimum - geoManager->menuContentWidthFull);
+ drawportX = (config.GetValue("menuAdjustLeft"))?0:(geoManager->menuContentWidthMinimum - geoManager->menuContentWidthFull);
pixmapContent->SetDrawPortPoint(cPoint(drawportX, 0));
- if (config.scalePicture) {
+ if (config.GetValue("scalePicture")) {
// ask output device to restore full size
vidWin = cDevice::PrimaryDevice()->CanScaleVideo(cRect::Null);
}
} else {
- drawportX = (config.menuAdjustLeft)?(contentWidth - geoManager->menuContentWidthFull):(geoManager->menuContentWidthMinimum - contentWidth);
+ drawportX = (config.GetValue("menuAdjustLeft"))?(contentWidth - geoManager->menuContentWidthFull):(geoManager->menuContentWidthMinimum - contentWidth);
pixmapContent->SetDrawPortPoint(cPoint(drawportX, 0));
- if (config.scalePicture) {
+ if (config.GetValue("scalePicture")) {
// ask output device to scale down
- int windowX = (config.menuAdjustLeft)?(geoManager->osdLeft + contentWidth + geoManager->menuWidthScrollbar + 2 * geoManager->menuSpace)
+ int windowX = (config.GetValue("menuAdjustLeft"))?(geoManager->osdLeft + contentWidth + geoManager->menuWidthScrollbar + 2 * geoManager->menuSpace)
:(geoManager->osdLeft + 2 * geoManager->menuSpace);
cRect availableRect(
windowX,
@@ -397,9 +407,12 @@ void cNopacityDisplayMenuView::AdjustContentBackground(eMenuCategory menuCat, eM
}
}
osd->DestroyPixmap(pixmapScrollbar);
- int scrollbarX = (config.menuAdjustLeft)?(contentWidth):(geoManager->osdWidth - contentWidth - geoManager->menuWidthScrollbar);
- pixmapScrollbar = osd->CreatePixmap(2, cRect(scrollbarX , geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2*geoManager->menuSpace));
+ osd->DestroyPixmap(pixmapScrollbarBack);
+ int scrollbarX = (config.GetValue("menuAdjustLeft"))?(contentWidth):(geoManager->osdWidth - contentWidth - geoManager->menuWidthScrollbar);
+ pixmapScrollbar = osd->CreatePixmap(3, cRect(scrollbarX , geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2*geoManager->menuSpace));
+ pixmapScrollbarBack = osd->CreatePixmap(2, cRect(scrollbarX , geoManager->menuHeaderHeight + geoManager->menuSpace, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2*geoManager->menuSpace));
pixmapScrollbar->Fill(clrTransparent);
+ pixmapScrollbarBack->Fill(clrTransparent);
}
void cNopacityDisplayMenuView::DrawHeaderLogo(void) {
@@ -414,7 +427,7 @@ int cNopacityDisplayMenuView::ShowHeaderLogo(bool show) {
} else {
pixmapHeaderLogo->SetLayer(-1);
}
- return config.menuHeaderLogoWidth + geoManager->menuSpace;
+ return config.GetValue("menuHeaderLogoWidth") + geoManager->menuSpace;
}
int cNopacityDisplayMenuView::DrawHeaderIcon(eMenuCategory menuCat) {
@@ -446,13 +459,13 @@ int cNopacityDisplayMenuView::DrawHeaderIcon(eMenuCategory menuCat) {
int left = 0;
if (drawIcon) {
- int iconX = (config.menuAdjustLeft) ? 0 : (geoManager->osdWidth - config.headerIconHeight);
- pixmapHeaderIcon = osd->CreatePixmap(2, cRect(iconX, 0, config.headerIconHeight, config.headerIconHeight));
+ int iconX = (config.GetValue("menuAdjustLeft")) ? 0 : (geoManager->osdWidth - config.GetValue("headerIconHeight"));
+ pixmapHeaderIcon = osd->CreatePixmap(2, cRect(iconX, 0, config.GetValue("headerIconHeight"), config.GetValue("headerIconHeight")));
pixmapHeaderIcon->Fill(clrTransparent);
cImage *imgIcon = imgCache->GetSkinIcon(*icon);
if (imgIcon) {
pixmapHeaderIcon->DrawImage(cPoint(0,0), *imgIcon);
- left = config.headerIconHeight + geoManager->menuSpace;
+ left = config.GetValue("headerIconHeight") + geoManager->menuSpace;
}
}
return left;
@@ -460,8 +473,8 @@ int cNopacityDisplayMenuView::DrawHeaderIcon(eMenuCategory menuCat) {
int cNopacityDisplayMenuView::ShowHeaderIconChannelLogo(const char *Title) {
int left = 0;
- int iconX = (config.menuAdjustLeft) ? 0 : (geoManager->osdWidth - config.menuItemLogoWidth);
- pixmapHeaderIcon = osd->CreatePixmap(2, cRect(iconX, 0, config.menuItemLogoWidth, config.menuItemLogoHeight));
+ int iconX = (config.GetValue("menuAdjustLeft")) ? 0 : (geoManager->osdWidth - config.GetValue("menuItemLogoWidth"));
+ pixmapHeaderIcon = osd->CreatePixmap(2, cRect(iconX, 0, config.GetValue("menuItemLogoWidth"), config.GetValue("menuItemLogoHeight")));
pixmapHeaderIcon->Fill(clrTransparent);
std::string channel = Title;
if (channel.length() == 0)
@@ -472,9 +485,9 @@ int cNopacityDisplayMenuView::ShowHeaderIconChannelLogo(const char *Title) {
channel.erase(0, remove.length());
} catch (...) {}
cImageLoader imgLoader;
- if (imgLoader.LoadLogo(channel.c_str(), config.menuItemLogoWidth, config.menuItemLogoHeight)) {
+ if (imgLoader.LoadLogo(channel.c_str(), config.GetValue("menuItemLogoWidth"), config.GetValue("menuItemLogoHeight"))) {
pixmapHeaderIcon->DrawImage(cPoint(0, 0), imgLoader.GetImage());
- left = config.menuItemLogoWidth + geoManager->menuSpace;
+ left = config.GetValue("menuItemLogoWidth") + geoManager->menuSpace;
}
return left;
}
@@ -489,7 +502,7 @@ void cNopacityDisplayMenuView::DestroyHeaderIcon(void) {
void cNopacityDisplayMenuView::DrawHeaderLabel(int left, cString label) {
pixmapHeaderLabel->Fill(clrTransparent);
int labelW = fontManager->menuHeader->Width(label);
- int labelX = (config.menuAdjustLeft) ? (left) : (geoManager->osdWidth - geoManager->menuDateWidth - labelW - left - 2*geoManager->menuSpace);
+ int labelX = (config.GetValue("menuAdjustLeft")) ? (left) : (geoManager->osdWidth - geoManager->menuDateWidth - labelW - left - 2*geoManager->menuSpace);
pixmapHeaderLabel->DrawText(cPoint(labelX, ((geoManager->menuHeaderHeight - 10) - fontManager->menuHeader->Height()) / 2), *label, Theme.Color(clrMenuFontHeader), clrTransparent, fontManager->menuHeader);
}
@@ -498,7 +511,7 @@ void cNopacityDisplayMenuView::DrawDate(bool initial) {
if (initial || strcmp(date, lastDate)) {
pixmapDate->Fill(clrTransparent);
int dateW = fontManager->menuDate->Width(date);
- int dateX = (config.menuAdjustLeft) ? (geoManager->menuDateWidth - dateW - 2*geoManager->menuSpace) : (geoManager->menuSpace);
+ int dateX = (config.GetValue("menuAdjustLeft")) ? (geoManager->menuDateWidth - dateW - 2*geoManager->menuSpace) : (geoManager->menuSpace);
pixmapDate->DrawText(cPoint(dateX, (geoManager->menuHeaderHeight - fontManager->menuDate->Height()) / 2), date, Theme.Color(clrMenuFontDate), clrTransparent, fontManager->menuDate);
lastDate = date;
}
@@ -520,7 +533,7 @@ void cNopacityDisplayMenuView::DrawDiskUsage(void) {
pixmapDiskUsageLabel->Fill(clrTransparent);
cString usage = cString::sprintf("%d%%", DiskUsage);
cString rest;
- if (config.discUsageStyle == 0)
+ if (config.GetValue("discUsageStyle") == 0)
rest = cString::sprintf("%02d:%02dh %s", cVideoDiskUsage::FreeMinutes() / 60, cVideoDiskUsage::FreeMinutes() % 60, tr("free"));
else
rest = cString::sprintf("%d GB %s", cVideoDiskUsage::FreeMB() / 1024, tr("free"));
@@ -545,36 +558,39 @@ void cNopacityDisplayMenuView::ShowDiskUsage(bool show) {
}
}
-void cNopacityDisplayMenuView::DrawButton(const char *text, eBackgroundType bgButton, tColor buttonColor, tColor borderColor, tColor fontColor, int num) {
+void cNopacityDisplayMenuView::DrawButton(const char *text, eSkinElementType seButton, tColor buttonColor, tColor borderColor, tColor fontColor, int num) {
if (num < 0)
return;
int top = 2*geoManager->menuButtonsBorder;
int left = num * geoManager->menuButtonWidth + (2*num + 1) * geoManager->menuButtonsBorder;
- if (config.doBlending) {
+ if (config.GetValue("displayType") == dtBlending) {
pixmapFooter->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), borderColor);
- cImage *back = imgCache->GetBackground(bgButton);
+ cImage *back = imgCache->GetSkinElement(seButton);
if (back)
pixmapFooter->DrawImage(cPoint(left+2, top+2), *back);
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *image = imgCache->GetSkinElement(seButton);
+ if (image)
+ pixmapFooter->DrawImage(cPoint(left, top), *image);
} else {
pixmapFooter->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), buttonColor);
}
- if (config.roundedCorners) {
- int radius = config.cornerRadius;
+ if (config.GetValue("roundedCorners") && (config.GetValue("displayType") != dtGraphical)) {
+ int radius = config.GetValue("cornerRadius");
if (radius > 2) {
pixmapFooter->DrawEllipse(cRect(left,top,radius,radius), borderColor, -2);
- pixmapFooter->DrawEllipse(cRect(left-2,top-2,radius,radius), Theme.Color(clrMenuBack), -2);
+ pixmapFooter->DrawEllipse(cRect(left-2,top-2,radius,radius), clrTransparent, -2);
pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius, top,radius,radius), borderColor, -1);
- pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius+2,top-2,radius,radius), Theme.Color(clrMenuBack), -1);
+ pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius+2,top-2,radius,radius), clrTransparent, -1);
pixmapFooter->DrawEllipse(cRect(left,top + geoManager->menuButtonHeight -radius,radius,radius), borderColor, -3);
- pixmapFooter->DrawEllipse(cRect(left - 2, top + geoManager->menuButtonHeight - radius + 2,radius,radius), Theme.Color(clrMenuBack), -3);
+ pixmapFooter->DrawEllipse(cRect(left - 2, top + geoManager->menuButtonHeight - radius + 2,radius,radius), clrTransparent, -3);
pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius, top + geoManager->menuButtonHeight -radius,radius,radius), borderColor, -4);
- pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius + 2, top + geoManager->menuButtonHeight -radius + 2,radius,radius), Theme.Color(clrMenuBack), -4);
+ pixmapFooter->DrawEllipse(cRect(left + geoManager->menuButtonWidth -radius + 2, top + geoManager->menuButtonHeight -radius + 2,radius,radius), clrTransparent, -4);
}
}
-
int textWidth = fontManager->menuButtons->Width(text);
int textHeight = fontManager->menuButtons->Height();
pixmapButtonsText->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), clrTransparent);
@@ -586,13 +602,13 @@ void cNopacityDisplayMenuView::ClearButton(int num) {
return;
int top = 2*geoManager->menuButtonsBorder;
int left = num * geoManager->menuButtonWidth + (2*num + 1) * geoManager->menuButtonsBorder;
- pixmapFooter->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), Theme.Color(clrMenuBack));
+ pixmapFooter->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), clrTransparent);
pixmapButtonsText->DrawRectangle(cRect(left, top, geoManager->menuButtonWidth, geoManager->menuButtonHeight), clrTransparent);
}
int cNopacityDisplayMenuView::GetTimersInitHeight(void) {
int initHeight = geoManager->menuHeaderHeight + 2*geoManager->menuSpace;
- if (config.showDiscUsage)
+ if (config.GetValue("showDiscUsage"))
initHeight += geoManager->menuDiskUsageHeight;
return initHeight;
}
@@ -606,7 +622,7 @@ cNopacityTimer *cNopacityDisplayMenuView::DrawTimerConflict(int numConflicts, in
t->SetGeometry(geoManager->menuTimersWidth, y);
t->CreateConflictText();
t->CalculateHeight(geoManager->menuSpace);
- int timerX = (config.menuAdjustLeft) ? (geoManager->osdWidth - geoManager->menuTimersWidth - 10) : 10;
+ int timerX = (config.GetValue("menuAdjustLeft")) ? (geoManager->osdWidth - geoManager->menuTimersWidth - 10) : 10;
t->CreatePixmaps(timerX);
t->Render();
return t;
@@ -618,7 +634,7 @@ cNopacityTimer *cNopacityDisplayMenuView::DrawTimer(const cTimer *Timer, int y)
t->CreateDate();
t->CreateShowName();
t->CalculateHeight(geoManager->menuSpace);
- int timerX = (config.menuAdjustLeft) ? (geoManager->osdWidth - geoManager->menuTimersWidth - 10) : 10;
+ int timerX = (config.GetValue("menuAdjustLeft")) ? (geoManager->osdWidth - geoManager->menuTimersWidth - 10) : 10;
t->CreatePixmaps(timerX);
t->Render();
return t;
@@ -628,52 +644,80 @@ void cNopacityDisplayMenuView::DrawScrollbar(double Height, double Offset) {
int totalHeight = pixmapScrollbar->ViewPort().Height() - 6;
int height = Height * totalHeight;
int offset = Offset * totalHeight;
- pixmapScrollbar->Fill(Theme.Color(clrMenuScrollBar));
- pixmapScrollbar->DrawRectangle(cRect(2,2,geoManager->menuWidthScrollbar-4,totalHeight+2), Theme.Color(clrMenuScrollBarBack));
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *image = imgCache->GetSkinElement(seScrollbar);
+ if (image)
+ pixmapScrollbarBack->DrawImage(cPoint(0, 0), *image);
+ } else {
+ pixmapScrollbarBack->Fill(Theme.Color(clrMenuScrollBar));
+ pixmapScrollbarBack->DrawRectangle(cRect(2,2,geoManager->menuWidthScrollbar-4,totalHeight+2), Theme.Color(clrMenuScrollBarBack));
+ }
+ pixmapScrollbar->Fill(clrTransparent);
pixmapScrollbar->DrawRectangle(cRect(3,3 + offset,geoManager->menuWidthScrollbar-6,height), Theme.Color(clrMenuScrollBar));
}
void cNopacityDisplayMenuView::ClearScrollbar(void) {
pixmapScrollbar->Fill(clrTransparent);
+ pixmapScrollbarBack->Fill(clrTransparent);
}
void cNopacityDisplayMenuView::DrawMessage(eMessageType Type, const char *Text) {
tColor col = Theme.Color(clrMessageStatus);
tColor colFont = Theme.Color(clrMessageFontStatus);
+ eSkinElementType seType = seMessageMenuStatus;
switch (Type) {
- case mtStatus:
+ case mtStatus:
col = Theme.Color(clrMessageStatus);
colFont = Theme.Color(clrMessageFontStatus);
+ seType = seMessageMenuStatus;
break;
case mtInfo:
col = Theme.Color(clrMessageInfo);
colFont = Theme.Color(clrMessageFontInfo);
+ seType = seMessageMenuInfo;
break;
case mtWarning:
col = Theme.Color(clrMessageWarning);
colFont = Theme.Color(clrMessageFontWarning);
+ seType = seMessageMenuWarning;
break;
case mtError:
col = Theme.Color(clrMessageError);
colFont = Theme.Color(clrMessageFontError);
+ seType = seMessageMenuError;
break;
}
if (pixmapStatus) {
ClearMessage();
}
pixmapStatus = osd->CreatePixmap(7, cRect(0.1*geoManager->osdWidth, 0.8*geoManager->osdHeight, geoManager->menuMessageWidth, geoManager->menuMessageHeight));
- pixmapStatus->Fill(col);
- if (config.doBlending) {
- cImage imgBack = imgCache->GetBackground(Theme.Color(clrMenuBack), col, geoManager->menuMessageWidth-2, geoManager->menuMessageHeight-2, true);
- pixmapStatus->DrawImage(cPoint(1, 1), imgBack);
- }
- if (config.roundedCorners) {
- DrawRoundedCornersWithBorder(pixmapStatus, col, config.cornerRadius, geoManager->menuMessageWidth, geoManager->menuMessageHeight);
+
+ pixmapStatus->Fill(clrTransparent);
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *imgBack = imgCache->GetSkinElement(seType);
+ if (imgBack) {
+ pixmapStatus->DrawImage(cPoint(0, 0), *imgBack);
+ }
+ } else {
+ if (config.GetValue("displayType") == dtBlending) {
+ cImage imgBack = imgCache->GetBackground(Theme.Color(clrMenuBack), col, geoManager->menuMessageWidth-2, geoManager->menuMessageHeight-2, true);
+ pixmapStatus->DrawImage(cPoint(1, 1), imgBack);
+ } else {
+ pixmapStatus->Fill(col);
+ }
+ if (config.GetValue("roundedCorners")) {
+ DrawRoundedCornersWithBorder(pixmapStatus, col, config.GetValue("cornerRadius"), geoManager->menuMessageWidth, geoManager->menuMessageHeight);
+ }
}
int textWidth = fontManager->menuMessage->Width(Text);
- tColor clrFontBack = (config.doBlending)?(clrTransparent):col;
- pixmapStatus->DrawText(cPoint((geoManager->menuMessageWidth - textWidth) / 2, (geoManager->menuMessageHeight - fontManager->menuMessage->Height()) / 2), Text, colFont, clrFontBack, fontManager->menuMessage);
+ tColor clrFontBack = (config.GetValue("displayType") != dtFlat)?(clrTransparent):col;
+ pixmapStatus->DrawText(cPoint((geoManager->menuMessageWidth - textWidth) / 2,
+ (geoManager->menuMessageHeight - fontManager->menuMessage->Height()) / 2),
+ Text,
+ colFont,
+ clrFontBack,
+ fontManager->menuMessage);
}
void cNopacityDisplayMenuView::ClearMessage(void) {
@@ -684,7 +728,7 @@ void cNopacityDisplayMenuView::ClearMessage(void) {
}
void cNopacityDisplayMenuView::SetDetailViewSize(eDetailViewType detailViewType, cNopacityMenuDetailView *detailView) {
- int x = (config.menuAdjustLeft) ? 0 : geoManager->osdWidth - geoManager->menuContentWidthFull + 2*geoManager->menuSpace;
+ int x = (config.GetValue("menuAdjustLeft")) ? 0 : geoManager->osdWidth - geoManager->menuContentWidthFull + 2*geoManager->menuSpace;
int width = 0;
int height = 0;
int top = 0;
@@ -693,12 +737,12 @@ void cNopacityDisplayMenuView::SetDetailViewSize(eDetailViewType detailViewType,
switch (detailViewType) {
case dvEvent:
- detailHeaderHeight = max(config.logoHeight, config.epgImageHeight)+4;
- contentBorder = config.borderDetailedEPG;
+ detailHeaderHeight = max(config.GetValue("logoHeightOriginal"), config.GetValue("epgImageHeight"))+4;
+ contentBorder = config.GetValue("borderDetailedEPG");
break;
case dvRecording:
- detailHeaderHeight = config.epgImageHeight + 4;
- contentBorder = config.borderDetailedRecordings;
+ detailHeaderHeight = config.GetValue("epgImageHeight") + 4;
+ contentBorder = config.GetValue("borderDetailedRecordings");
break;
case dvText:
detailHeaderHeight = 0;
@@ -710,38 +754,4 @@ void cNopacityDisplayMenuView::SetDetailViewSize(eDetailViewType detailViewType,
height = geoManager->menuContentHeight;
top = geoManager->menuHeaderHeight;
detailView->SetGeometry(x, width, height, top, contentBorder, detailHeaderHeight);
-}
-
-void cNopacityDisplayMenuView::DrawRssFeed(std::string feedName) {
- pixmapRssFeedBackground->Fill(clrBlack);
- pixmapRssFeed->Fill(clrTransparent);
- feedNameLength = fontManager->menuRssFeed->Width(feedName.c_str());
- int labelWidth = 2 + geoManager->menuRssFeedHeight + 2 + feedNameLength + 6;
- pixmapRssFeed->Fill(Theme.Color(clrRSSFeedBorder));
- if (config.doBlending) {
- cImage imgBack = imgCache->GetBackground(Theme.Color(clrRSSFeedHeaderBack), Theme.Color(clrRSSFeedHeaderBackBlend), labelWidth, geoManager->menuRssFeedHeight - 4);
- pixmapRssFeed->DrawImage(cPoint(2,2), imgBack);
- cImage imgBack2 = imgCache->GetBackground(Theme.Color(clrRSSFeedBack), Theme.Color(clrRSSFeedBackBlend), geoManager->osdWidth - labelWidth - 2, geoManager->menuRssFeedHeight - 4);
- pixmapRssFeed->DrawImage(cPoint(labelWidth,2), imgBack2);
- } else {
- pixmapRssFeed->DrawRectangle(cRect(2, 2, labelWidth, geoManager->menuRssFeedHeight - 4), Theme.Color(clrRSSFeedHeaderBack));
- pixmapRssFeed->DrawRectangle(cRect(labelWidth, 2, geoManager->osdWidth - labelWidth - 2, geoManager->menuRssFeedHeight - 4), Theme.Color(clrRSSFeedBack));
- }
- pixmapRssFeed->DrawText(cPoint(geoManager->menuRssFeedHeight + 2, (geoManager->menuRssFeedHeight - fontManager->menuRssFeed->Height()) / 2), feedName.c_str(), Theme.Color(clrRSSFeedHeaderText), clrTransparent, fontManager->menuRssFeed);
- pixmapRssFeedIcon->Fill(clrTransparent);
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/rss");
- if (imgIcon)
- pixmapRssFeedIcon->DrawImage(cPoint(2,2), *imgIcon);
-}
-
-cPoint cNopacityDisplayMenuView::GetRssFeedPosition(void) {
- int x = geoManager->menuRssFeedHeight + feedNameLength + 10;
- int y = geoManager->osdHeight - geoManager->menuRssFeedHeight + 2;
- return cPoint(x, y);
-}
-
-cPoint cNopacityDisplayMenuView::GetRssFeedSize(void) {
- int width = geoManager->osdWidth - (geoManager->menuRssFeedHeight + feedNameLength + 12);
- int height = geoManager->menuRssFeedHeight - 4;
- return cPoint(width, height);
-}
+} \ No newline at end of file
diff --git a/displaymenuview.h b/displaymenuview.h
index 0c63bc2..e2c1b5c 100644
--- a/displaymenuview.h
+++ b/displaymenuview.h
@@ -10,21 +10,21 @@ class cNopacityDisplayMenuView {
cString lastDate;
int diskUsageAlert;
cPixmap *pixmapHeader;
+ cPixmap *pixmapHeaderForeground;
cPixmap *pixmapHeaderLogo;
cPixmap *pixmapHeaderIcon;
cPixmap *pixmapHeaderLabel;
cPixmap *pixmapDate;
cPixmap *pixmapFooter;
+ cPixmap *pixmapFooterBack;
cPixmap *pixmapButtonsText;
cPixmap *pixmapContent;
- cPixmap *pixmapScrollbar;
+ cPixmap *pixmapScrollbar;
+ cPixmap *pixmapScrollbarBack;
cPixmap *pixmapDiskUsage;
cPixmap *pixmapDiskUsageIcon;
cPixmap *pixmapDiskUsageLabel;
cPixmap *pixmapStatus;
- cPixmap *pixmapRssFeed;
- cPixmap *pixmapRssFeedBackground;
- cPixmap *pixmapRssFeedIcon;
int feedNameLength;
int avrgFontWidth;
cRect textWindowSizeSchedules;
@@ -61,7 +61,7 @@ class cNopacityDisplayMenuView {
void DrawDate(bool initial);
void DrawDiskUsage(void);
void ShowDiskUsage(bool show);
- void DrawButton(const char *text, eBackgroundType bgButton, tColor buttonColor, tColor borderColor, tColor fontColor, int num);
+ void DrawButton(const char *text, eSkinElementType seButton, tColor buttonColor, tColor borderColor, tColor fontColor, int num);
void ClearButton(int num);
int GetTimersInitHeight(void);
int GetTimersMaxHeight(void);
@@ -72,9 +72,6 @@ class cNopacityDisplayMenuView {
void DrawMessage(eMessageType Type, const char *Text);
void ClearMessage(void);
void SetDetailViewSize(eDetailViewType detailViewType, cNopacityMenuDetailView *detailView);
- void DrawRssFeed(std::string feedName);
- cPoint GetRssFeedPosition(void);
- cPoint GetRssFeedSize(void);
};
diff --git a/displaymessage.c b/displaymessage.c
index b512a44..c484614 100644
--- a/displaymessage.c
+++ b/displaymessage.c
@@ -2,18 +2,17 @@
cNopacityDisplayMessage::cNopacityDisplayMessage(cImageCache *imgCache) {
this->imgCache = imgCache;
- config.setDynamicValues();
- int top = geoManager->osdTop + geoManager->osdHeight - geoManager->messageHeight - config.messageBorderBottom;
+ FadeTime = config.GetValue("messageFadeTime");
+ FrameTime = FadeTime / 10;
+ int top = geoManager->osdTop + geoManager->osdHeight - geoManager->messageHeight - config.GetValue("messageBorderBottom");
int left = (geoManager->osdLeft + geoManager->osdWidth - geoManager->messageWidth) / 2;
osd = CreateOsd(left, top, geoManager->messageWidth, geoManager->messageHeight);
pixmap = osd->CreatePixmap(2, cRect(0, 0, geoManager->messageWidth, geoManager->messageHeight));
pixmapBackground = osd->CreatePixmap(1, cRect(0, 0, geoManager->messageWidth, geoManager->messageHeight));
- if (config.messageFadeTime) {
+ if (FadeTime) {
pixmap->SetAlpha(0);
pixmapBackground->SetAlpha(0);
}
- FrameTime = config.messageFrameTime;
- FadeTime = config.messageFadeTime;
}
cNopacityDisplayMessage::~cNopacityDisplayMessage() {
@@ -28,36 +27,56 @@ cNopacityDisplayMessage::~cNopacityDisplayMessage() {
void cNopacityDisplayMessage::SetMessage(eMessageType Type, const char *Text) {
tColor col = Theme.Color(clrMessageStatus);
tColor colFont = Theme.Color(clrMessageFontStatus);
+ eSkinElementType seType = seMessageStatus;
switch (Type) {
- case mtStatus:
+ case mtStatus:
col = Theme.Color(clrMessageStatus);
colFont = Theme.Color(clrMessageFontStatus);
+ seType = seMessageStatus;
break;
case mtInfo:
col = Theme.Color(clrMessageInfo);
colFont = Theme.Color(clrMessageFontInfo);
+ seType = seMessageInfo;
break;
case mtWarning:
col = Theme.Color(clrMessageWarning);
colFont = Theme.Color(clrMessageFontWarning);
+ seType = seMessageWarning;
break;
case mtError:
col = Theme.Color(clrMessageError);
colFont = Theme.Color(clrMessageFontError);
+ seType = seMessageError;
break;
}
- pixmapBackground->Fill(clrBlack);
- pixmap->Fill(col);
- if (config.doBlending) {
- cImage imgBack = imgCache->GetBackground(Theme.Color(clrMessageBlend), col, geoManager->messageWidth-2, geoManager->messageHeight-2, true);
- pixmap->DrawImage(cPoint(1, 1), imgBack);
- }
- if (config.roundedCorners) {
- DrawRoundedCornersWithBorder(pixmap, col, config.cornerRadius, geoManager->messageWidth, geoManager->messageHeight, pixmapBackground);
+
+ pixmapBackground->Fill(clrTransparent);
+ pixmap->Fill(clrTransparent);
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *imgBack = imgCache->GetSkinElement(seType);
+ if (imgBack) {
+ pixmap->DrawImage(cPoint(0, 0), *imgBack);
+ }
+ } else {
+ if (config.GetValue("displayType") == dtBlending) {
+ cImage imgBack = imgCache->GetBackground(Theme.Color(clrMessageBlend), col, geoManager->messageWidth-2, geoManager->messageHeight-2, true);
+ pixmap->DrawImage(cPoint(1, 1), imgBack);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ if (config.GetValue("roundedCorners")) {
+ DrawRoundedCornersWithBorder(pixmap, col, config.GetValue("cornerRadius"), geoManager->messageWidth, geoManager->messageHeight, pixmapBackground);
+ }
}
int textWidth = fontManager->messageText->Width(Text);
- pixmap->DrawText(cPoint((geoManager->messageWidth - textWidth) / 2, (geoManager->messageHeight - fontManager->messageText->Height()) / 2), Text, colFont, (config.doBlending)?clrTransparent:col, fontManager->messageText);
- if (config.messageFadeTime)
+ pixmap->DrawText(cPoint((geoManager->messageWidth - textWidth) / 2,
+ (geoManager->messageHeight - fontManager->messageText->Height()) / 2),
+ Text,
+ colFont,
+ (config.GetValue("displayType") != dtFlat)?clrTransparent:col,
+ fontManager->messageText);
+ if (FadeTime)
Start();
}
diff --git a/displayreplay.c b/displayreplay.c
index 3b08de0..1378159 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -2,12 +2,11 @@
cNopacityDisplayReplay::cNopacityDisplayReplay(cImageCache *imgCache, bool ModeOnly) {
this->imgCache = imgCache;
- config.setDynamicValues();
initial = true;
modeOnly = ModeOnly;
lastDate = "";
- FrameTime = config.replayFrameTime;
- FadeTime = config.replayFadeTime;
+ FadeTime = config.GetValue("replayFadeTime");
+ FrameTime = FadeTime / 10;
createOSD();
CreatePixmaps();
DrawBackground();
@@ -18,17 +17,16 @@ cNopacityDisplayReplay::~cNopacityDisplayReplay() {
while (Active())
cCondWait::SleepMs(10);
if (!modeOnly) {
- osd->DestroyPixmap(pixmapHeader);
osd->DestroyPixmap(pixmapBackground);
+ osd->DestroyPixmap(pixmapTop);
osd->DestroyPixmap(pixmapInfo);
osd->DestroyPixmap(pixmapDate);
osd->DestroyPixmap(pixmapInfo2);
osd->DestroyPixmap(pixmapProgressBar);
osd->DestroyPixmap(pixmapCurrent);
osd->DestroyPixmap(pixmapTotal);
- osd->DestroyPixmap(pixmapScreenResolution);
+ osd->DestroyPixmap(pixmapScreenRes);
osd->DestroyPixmap(pixmapJump);
- osd->DestroyPixmap(pixmapFooter);
}
osd->DestroyPixmap(pixmapControls);
osd->DestroyPixmap(pixmapRew);
@@ -39,53 +37,114 @@ cNopacityDisplayReplay::~cNopacityDisplayReplay() {
}
void cNopacityDisplayReplay::createOSD(void) {
- int top = geoManager->osdTop + geoManager->osdHeight - geoManager->replayHeight - config.replayBorderBottom;
- osd = CreateOsd(geoManager->osdLeft + config.replayBorderVertical, top, geoManager->replayWidth, geoManager->replayHeight);
+ int top = geoManager->osdTop
+ + geoManager->osdHeight
+ - geoManager->replayHeight
+ - config.GetValue("replayBorderBottom");
+ osd = CreateOsd(geoManager->osdLeft + config.GetValue("replayBorderVertical"),
+ top,
+ geoManager->replayWidth,
+ geoManager->replayHeight);
}
void cNopacityDisplayReplay::CreatePixmaps(void) {
if (!modeOnly) {
- pixmapHeader = osd->CreatePixmap(1, cRect(0, 0, geoManager->replayWidth, geoManager->replayHeaderHeight));
- pixmapBackground = osd->CreatePixmap(1, cRect(0, geoManager->replayHeaderHeight, geoManager->replayWidth, geoManager->replayInfo2Height + geoManager->replayProgressBarHeight + geoManager->replayControlsHeight));
- pixmapFooter = osd->CreatePixmap(1, cRect(0, geoManager->replayHeaderHeight + geoManager->replayInfo2Height + geoManager->replayProgressBarHeight + geoManager->replayControlsHeight, geoManager->replayWidth, geoManager->replayFooterHeight));
- pixmapInfo = osd->CreatePixmap(2, cRect(config.resolutionIconSize + 10, 0, geoManager->replayInfoWidth, geoManager->replayHeaderHeight));
- pixmapDate = osd->CreatePixmap(2, cRect(geoManager->replayInfoWidth, 0, geoManager->replayDateWidth, geoManager->replayHeaderHeight));
- pixmapInfo2 = osd->CreatePixmap(2, cRect(config.resolutionIconSize + 10, geoManager->replayHeaderHeight, geoManager->replayInfoWidth, geoManager->replayInfo2Height));
- pixmapProgressBar = osd->CreatePixmap(2, cRect(0, geoManager->replayHeaderHeight + geoManager->replayInfo2Height, geoManager->replayWidth, geoManager->replayProgressBarHeight));
- pixmapCurrent = osd->CreatePixmap(3, cRect(0, geoManager->replayHeaderHeight + geoManager->replayInfo2Height + geoManager->replayProgressBarHeight, geoManager->replayWidth/5, geoManager->replayCurrentHeight));
- pixmapTotal = osd->CreatePixmap(3, cRect(4*geoManager->replayWidth/5, geoManager->replayHeaderHeight + geoManager->replayInfo2Height + geoManager->replayProgressBarHeight, geoManager->replayWidth/5, geoManager->replayCurrentHeight));
- pixmapScreenResolution = osd->CreatePixmap(5, cRect(geoManager->replayResolutionX, geoManager->replayResolutionY, config.resolutionIconSize, config.resolutionIconSize));
- pixmapJump = osd->CreatePixmap(4, cRect(geoManager->replayJumpX, geoManager->replayJumpY, geoManager->replayJumpWidth, geoManager->replayJumpHeight));
+ pixmapBackground = osd->CreatePixmap(1, cRect(0,
+ 0,
+ geoManager->replayWidth,
+ geoManager->replayHeight));
+ pixmapTop = osd->CreatePixmap(7, cRect(0,
+ 0,
+ geoManager->replayWidth,
+ geoManager->replayHeight));
+ pixmapInfo = osd->CreatePixmap(2, cRect(0,
+ 0,
+ geoManager->replayInfoWidth,
+ geoManager->replayHeaderHeight));
+ pixmapDate = osd->CreatePixmap(2, cRect(geoManager->replayInfoWidth,
+ 0,
+ geoManager->replayDateWidth,
+ geoManager->replayHeaderHeight));
+ pixmapInfo2 = osd->CreatePixmap(2, cRect(0,
+ geoManager->replayHeaderHeight,
+ geoManager->replayInfoWidth,
+ geoManager->replayInfo2Height));
+ pixmapProgressBar = osd->CreatePixmap(2, cRect(0,
+ geoManager->replayHeaderHeight
+ + geoManager->replayInfo2Height,
+ geoManager->replayWidth,
+ geoManager->replayProgressBarHeight));
+ pixmapCurrent = osd->CreatePixmap(3, cRect(0,
+ geoManager->replayHeaderHeight
+ + geoManager->replayInfo2Height
+ + geoManager->replayProgressBarHeight,
+ geoManager->replayWidth/5,
+ geoManager->replayCurrentHeight));
+ pixmapTotal = osd->CreatePixmap(3, cRect(4*geoManager->replayWidth/5,
+ geoManager->replayHeaderHeight
+ + geoManager->replayInfo2Height
+ + geoManager->replayProgressBarHeight,
+ geoManager->replayWidth/5,
+ geoManager->replayCurrentHeight));
+ pixmapScreenRes = osd->CreatePixmap(5, cRect(geoManager->replayResolutionX,
+ geoManager->replayResolutionY,
+ geoManager->replayResolutionSize * 3,
+ geoManager->replayResolutionSize));
+ pixmapJump = osd->CreatePixmap(4, cRect(geoManager->replayJumpX,
+ geoManager->replayJumpY,
+ geoManager->replayJumpWidth,
+ geoManager->replayJumpHeight));
}
- int controlY = geoManager->replayHeaderHeight + geoManager->replayInfo2Height + geoManager->replayProgressBarHeight;
+ int controlY = geoManager->replayHeaderHeight
+ + geoManager->replayInfo2Height
+ + geoManager->replayProgressBarHeight;
int iconBorder = geoManager->replayIconBorder;
int iconSize = geoManager->replayIconSize;
- int backgroundWidth = 2 * iconBorder + iconSize;
+ int iconWidth = 2 * iconBorder + iconSize;
if (!modeOnly) {
- pixmapControls = osd->CreatePixmap(2, cRect(0, controlY, geoManager->replayWidth, geoManager->replayControlsHeight));
+ pixmapControls = osd->CreatePixmap(2, cRect(0,
+ controlY,
+ geoManager->replayWidth,
+ geoManager->replayControlsHeight));
} else {
- pixmapControls = osd->CreatePixmap(2, cRect( (geoManager->replayWidth - (5 * backgroundWidth))/2, controlY - 10, 5 * backgroundWidth, geoManager->replayControlsHeight + 20));
+ pixmapControls = osd->CreatePixmap(2, cRect((geoManager->replayWidth
+ - (5 * iconWidth))/2,
+ controlY - 10,
+ 5 * iconWidth,
+ geoManager->replayControlsHeight + 20));
}
- pixmapRew = osd->CreatePixmap(4, cRect((geoManager->replayWidth - 4 * backgroundWidth)/2 + iconBorder, controlY + iconBorder, iconSize, iconSize));
- pixmapPause = osd->CreatePixmap(4, cRect((geoManager->replayWidth - 4 * backgroundWidth)/2 + (iconSize + 2*iconBorder) + iconBorder, controlY + iconBorder, iconSize, iconSize));
- pixmapPlay = osd->CreatePixmap(4, cRect((geoManager->replayWidth - 4 * backgroundWidth)/2 + 2*(iconSize + 2*iconBorder) + iconBorder, controlY + iconBorder, iconSize, iconSize));
- pixmapFwd = osd->CreatePixmap(4, cRect((geoManager->replayWidth - 4 * backgroundWidth)/2 + 3*(iconSize + 2*iconBorder) + iconBorder, controlY + iconBorder, iconSize, iconSize));
+ int iconX = (geoManager->replayWidth - 4 * iconWidth)/2;
+ pixmapRew = osd->CreatePixmap(4, cRect(iconX + iconBorder,
+ controlY + iconBorder,
+ iconSize,
+ iconSize));
+ pixmapPause = osd->CreatePixmap(4, cRect(iconX + iconSize + 3*iconBorder,
+ controlY + iconBorder,
+ iconSize,
+ iconSize));
+ pixmapPlay = osd->CreatePixmap(4, cRect(iconX + 2*iconSize + 3*iconBorder,
+ controlY + iconBorder,
+ iconSize,
+ iconSize));
+ pixmapFwd = osd->CreatePixmap(4, cRect(iconX + 3*iconSize + 3*iconBorder,
+ controlY + iconBorder,
+ iconSize,
+ iconSize));
- if (config.replayFadeTime) {
+ if (FadeTime) {
if (!modeOnly) {
- pixmapHeader->SetAlpha(0);
pixmapBackground->SetAlpha(0);
+ pixmapTop->SetAlpha(0);
pixmapInfo->SetAlpha(0);
pixmapDate->SetAlpha(0);
pixmapInfo2->SetAlpha(0);
pixmapProgressBar->SetAlpha(0);
pixmapCurrent->SetAlpha(0);
pixmapTotal->SetAlpha(0);
- pixmapScreenResolution->SetAlpha(0);
+ pixmapScreenRes->SetAlpha(0);
pixmapJump->SetAlpha(0);
- pixmapFooter->SetAlpha(0);
}
pixmapControls->SetAlpha(0);
pixmapRew->SetAlpha(0);
@@ -97,27 +156,46 @@ void cNopacityDisplayReplay::CreatePixmaps(void) {
void cNopacityDisplayReplay::DrawBackground(void) {
if (!modeOnly) {
- if (config.doBlending && (Theme.Color(clrReplayBackground) != Theme.Color(clrReplayBackBlend))) {
- DrawBlendedBackground(pixmapHeader, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), true);
- DrawBlendedBackground(pixmapFooter, Theme.Color(clrReplayBackground), Theme.Color(clrReplayBackBlend), false);
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *imgBack = imgCache->GetSkinElement(seReplayBackground);
+ if (imgBack)
+ pixmapBackground->DrawImage(cPoint(0,0), *imgBack);
+ cImage *imgTop = imgCache->GetSkinElement(seReplayTop);
+ if (imgTop)
+ pixmapTop->DrawImage(cPoint(0,0), *imgTop);
} else {
- pixmapHeader->Fill(Theme.Color(clrReplayBackground));
- pixmapFooter->Fill(Theme.Color(clrReplayBackground));
- }
- if (config.roundedCornersChannel) {
- int cornerTopSize = geoManager->replayHeaderHeight/2;
- int cornerBottomSize = geoManager->replayFooterHeight/2;
- if ((cornerTopSize > 2)&&(cornerBottomSize > 2)) {
- pixmapHeader->DrawEllipse(cRect(0,0, cornerTopSize, cornerTopSize), clrTransparent, -2);
- pixmapHeader->DrawEllipse(cRect(geoManager->replayWidth - cornerTopSize, 0, cornerTopSize, cornerTopSize), clrTransparent, -1);
- pixmapFooter->DrawEllipse(cRect(0, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -3);
- pixmapFooter->DrawEllipse(cRect(geoManager->replayWidth - cornerBottomSize, cornerBottomSize, cornerBottomSize, cornerBottomSize), clrTransparent, -4);
+ pixmapBackground->Fill(Theme.Color(clrReplayBackground));
+ pixmapTop->Fill(clrTransparent);
+ if (config.GetValue("displayType") == dtBlending &&
+ (Theme.Color(clrReplayBackground) != Theme.Color(clrReplayBackBlend))) {
+ DrawBlendedBackground(pixmapBackground,
+ 0,
+ geoManager->replayWidth,
+ Theme.Color(clrReplayBackground),
+ Theme.Color(clrReplayBackBlend),
+ true);
+ DrawBlendedBackground(pixmapBackground,
+ 0,
+ geoManager->replayWidth,
+ Theme.Color(clrReplayBackground),
+ Theme.Color(clrReplayBackBlend),
+ false);
+ }
+ if (config.GetValue("roundedCornersChannel")) {
+ int cornerRadius = geoManager->replayHeaderHeight/2;
+ if (cornerRadius > 2) {
+ DrawRoundedCorners(pixmapBackground,
+ cornerRadius,
+ 0,
+ 0,
+ geoManager->replayWidth,
+ geoManager->replayHeight);
+ }
}
}
- pixmapBackground->Fill(Theme.Color(clrReplayBackground));
pixmapControls->Fill(clrTransparent);
pixmapProgressBar->Fill(clrTransparent);
- pixmapScreenResolution->Fill(clrTransparent);
+ pixmapScreenRes->Fill(clrTransparent);
pixmapJump->Fill(clrTransparent);
} else {
pixmapControls->Fill(Theme.Color(clrMenuBorder));
@@ -154,7 +232,11 @@ void cNopacityDisplayReplay::DrawDate(void) {
int x = geoManager->replayDateWidth - strDateWidth - geoManager->replayHeaderHeight/2;
int y = (geoManager->replayHeaderHeight - strDateHeight) / 2;
pixmapDate->Fill(clrTransparent);
- pixmapDate->DrawText(cPoint(x, y), curDate, Theme.Color(clrReplayHead), clrTransparent, fontManager->replayText);
+ pixmapDate->DrawText(cPoint(x, y),
+ curDate,
+ Theme.Color(clrReplayHead),
+ clrTransparent,
+ fontManager->replayText);
lastDate = curDate;
}
}
@@ -183,9 +265,10 @@ void cNopacityDisplayReplay::DrawScreenResolution(void) {
iconName = "skinIcons/sd576i";
break;
}
- cImage *imgRes = imgCache->GetSkinIcon(*iconName, config.resolutionIconSize, config.resolutionIconSize);
+ int replaySize = geoManager->replayResolutionSize;
+ cImage *imgRes = imgCache->GetSkinIcon(*iconName, 3 * replaySize, replaySize);
if (imgRes)
- pixmapScreenResolution->DrawImage(cPoint(0,0), *imgRes);
+ pixmapScreenRes->DrawImage(cPoint(0,0), *imgRes);
}
void cNopacityDisplayReplay::SetRecording(const cRecording *Recording) {
@@ -198,13 +281,24 @@ void cNopacityDisplayReplay::SetRecording(const cRecording *Recording) {
info2 = cString::sprintf("%s %s", *ShortDateString(Recording->Start()), *TimeString(Recording->Start()));
pixmapInfo2->Fill(clrTransparent);
- pixmapInfo2->DrawText(cPoint(geoManager->replayHeaderHeight/2, max( (geoManager->replayInfo2Height - fontManager->replayText->Height())/2 - 10,0 )), *info2, Theme.Color(clrReplayDescription), clrTransparent, fontManager->replayText);
+ pixmapInfo2->DrawText(cPoint(geoManager->replayHeaderHeight/2,
+ max((geoManager->replayInfo2Height
+ - fontManager->replayText->Height())/2 - 10,
+ 0)),
+ *info2,
+ Theme.Color(clrReplayDescription),
+ clrTransparent,
+ fontManager->replayText);
DrawScreenResolution();
}
void cNopacityDisplayReplay::SetTitle(const char *Title) {
pixmapInfo->Fill(clrTransparent);
- pixmapInfo->DrawText(cPoint(geoManager->replayHeaderHeight/2, 0), Title, Theme.Color(clrReplayHead), clrTransparent, fontManager->replayHeader);
+ pixmapInfo->DrawText(cPoint(geoManager->replayHeaderHeight/2, 0),
+ Title,
+ Theme.Color(clrReplayHead),
+ clrTransparent,
+ fontManager->replayHeader);
}
void cNopacityDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
@@ -265,28 +359,70 @@ void cNopacityDisplayReplay::SetProgress(int Current, int Total) {
if (geoManager->replayProgressBarHeight < 5)
return;
int barWidth = geoManager->replayWidth - 2*geoManager->replayProgressBarHeight;
- cProgressBar pb(barWidth, geoManager->replayProgressBarHeight-2, Current, Total, marks, Theme.Color(clrReplayProgressSeen), Theme.Color(clrReplayProgressRest), Theme.Color(clrReplayProgressSelected), Theme.Color(clrReplayProgressMark), Theme.Color(clrReplayProgressCurrent));
- pixmapProgressBar->DrawEllipse(cRect(geoManager->replayProgressBarHeight/2, 0, geoManager->replayProgressBarHeight, geoManager->replayProgressBarHeight), Theme.Color(clrProgressBarBack));
- pixmapProgressBar->DrawEllipse(cRect(barWidth + geoManager->replayProgressBarHeight/2, 0, geoManager->replayProgressBarHeight, geoManager->replayProgressBarHeight), Theme.Color(clrReplayProgressRest));
- pixmapProgressBar->DrawRectangle(cRect( geoManager->replayProgressBarHeight, 0, barWidth, geoManager->replayProgressBarHeight), Theme.Color(clrProgressBarBack));
- pixmapProgressBar->DrawEllipse(cRect(geoManager->replayProgressBarHeight/2+1, 1, geoManager->replayProgressBarHeight-1, geoManager->replayProgressBarHeight-2), Theme.Color(clrReplayProgressSeen));
+ cProgressBar pb(barWidth,
+ geoManager->replayProgressBarHeight-2,
+ Current,
+ Total,
+ marks,
+ Theme.Color(clrReplayProgressSeen),
+ Theme.Color(clrReplayProgressRest),
+ Theme.Color(clrReplayProgressSelected),
+ Theme.Color(clrReplayProgressMark),
+ Theme.Color(clrReplayProgressCurrent));
+ pixmapProgressBar->DrawEllipse(cRect(geoManager->replayProgressBarHeight/2,
+ 0,
+ geoManager->replayProgressBarHeight,
+ geoManager->replayProgressBarHeight),
+ Theme.Color(clrProgressBarBack));
+ pixmapProgressBar->DrawEllipse(cRect(barWidth + geoManager->replayProgressBarHeight/2,
+ 0,
+ geoManager->replayProgressBarHeight,
+ geoManager->replayProgressBarHeight),
+ Theme.Color(clrReplayProgressRest));
+ pixmapProgressBar->DrawRectangle(cRect(geoManager->replayProgressBarHeight,
+ 0,
+ barWidth,
+ geoManager->replayProgressBarHeight),
+ Theme.Color(clrProgressBarBack));
+ pixmapProgressBar->DrawEllipse(cRect(geoManager->replayProgressBarHeight/2+1,
+ 1,
+ geoManager->replayProgressBarHeight-1,
+ geoManager->replayProgressBarHeight-2),
+ Theme.Color(clrReplayProgressSeen));
pixmapProgressBar->DrawBitmap(cPoint(geoManager->replayProgressBarHeight, 1), pb);
}
void cNopacityDisplayReplay::SetCurrent(const char *Current) {
pixmapCurrent->Fill(clrTransparent);
- pixmapCurrent->DrawText(cPoint(geoManager->replayHeaderHeight/2, 0), Current, Theme.Color(clrReplayCurrentTotal), clrTransparent, fontManager->replayText);
+ pixmapCurrent->DrawText(cPoint(geoManager->replayHeaderHeight/2, 0),
+ Current,
+ Theme.Color(clrReplayCurrentTotal),
+ clrTransparent,
+ fontManager->replayText);
}
void cNopacityDisplayReplay::SetTotal(const char *Total) {
pixmapTotal->Fill(clrTransparent);
- pixmapTotal->DrawText(cPoint(geoManager->replayWidth/5 - (fontManager->replayText->Width(Total) + geoManager->replayHeaderHeight/2), 0), Total, Theme.Color(clrReplayCurrentTotal), clrTransparent, fontManager->replayText);
+ pixmapTotal->DrawText(cPoint(geoManager->replayWidth/5
+ - (fontManager->replayText->Width(Total)
+ + geoManager->replayHeaderHeight/2),
+ 0),
+ Total,
+ Theme.Color(clrReplayCurrentTotal),
+ clrTransparent,
+ fontManager->replayText);
}
void cNopacityDisplayReplay::SetJump(const char *Jump) {
pixmapJump->Fill(clrTransparent);
if (Jump) {
- pixmapJump->DrawText(cPoint(0, (geoManager->replayJumpHeight - fontManager->replayHeader->Height())/2), Jump, Theme.Color(clrReplayCurrentTotal), clrTransparent, fontManager->replayHeader);
+ pixmapJump->DrawText(cPoint(0,
+ (geoManager->replayJumpHeight
+ - fontManager->replayHeader->Height())/2),
+ Jump,
+ Theme.Color(clrReplayCurrentTotal),
+ clrTransparent,
+ fontManager->replayHeader);
}
}
@@ -298,7 +434,7 @@ void cNopacityDisplayReplay::Flush(void) {
DrawDate();
}
if (initial) {
- if (config.replayFadeTime)
+ if (FadeTime)
Start();
}
initial = false;
@@ -313,17 +449,16 @@ void cNopacityDisplayReplay::Action(void) {
double t = min(double(Now - Start) / FadeTime, 1.0);
int Alpha = t * ALPHA_OPAQUE;
if (!modeOnly) {
- pixmapHeader->SetAlpha(Alpha);
pixmapBackground->SetAlpha(Alpha);
+ pixmapTop->SetAlpha(Alpha);
pixmapInfo->SetAlpha(Alpha);
pixmapDate->SetAlpha(Alpha);
pixmapInfo2->SetAlpha(Alpha);
pixmapProgressBar->SetAlpha(Alpha);
pixmapCurrent->SetAlpha(Alpha);
pixmapTotal->SetAlpha(Alpha);
- pixmapScreenResolution->SetAlpha(Alpha);
+ pixmapScreenRes->SetAlpha(Alpha);
pixmapJump->SetAlpha(Alpha);
- pixmapFooter->SetAlpha(Alpha);
}
pixmapControls->SetAlpha(Alpha);
pixmapRew->SetAlpha(Alpha);
diff --git a/displayreplay.h b/displayreplay.h
index 4dbfe6b..3563506 100644
--- a/displayreplay.h
+++ b/displayreplay.h
@@ -10,22 +10,23 @@ private:
cString lastDate;
int FrameTime;
int FadeTime;
- cPixmap *pixmapHeader;
+ //cPixmap *pixmapHeader;
cPixmap *pixmapBackground;
+ cPixmap *pixmapTop;
cPixmap *pixmapInfo;
cPixmap *pixmapDate;
cPixmap *pixmapInfo2;
cPixmap *pixmapProgressBar;
cPixmap *pixmapCurrent;
cPixmap *pixmapTotal;
- cPixmap *pixmapScreenResolution;
+ cPixmap *pixmapScreenRes;
cPixmap *pixmapControls;
cPixmap *pixmapRew;
cPixmap *pixmapPause;
cPixmap *pixmapPlay;
cPixmap *pixmapFwd;
cPixmap *pixmapJump;
- cPixmap *pixmapFooter;
+ //cPixmap *pixmapFooter;
virtual void Action(void);
void createOSD(void);
void CreatePixmaps(void);
diff --git a/displaytracks.c b/displaytracks.c
index 3a0333c..d1bb024 100644
--- a/displaytracks.c
+++ b/displaytracks.c
@@ -2,13 +2,12 @@
cNopacityDisplayTracks::cNopacityDisplayTracks(cImageCache *imgCache, const char *Title, int NumTracks, const char * const *Tracks) {
this->imgCache = imgCache;
- config.setDynamicValues();
initial = true;
currentIndex = -1;
numTracks = NumTracks;
audioChannelLast = -5;
- FrameTime = config.tracksFrameTime;
- FadeTime = config.tracksFadeTime;
+ FadeTime = config.GetValue("tracksFadeTime");
+ FrameTime = FadeTime / 10;
SetGeometry();
CreatePixmaps();
DrawHeader(Title);
@@ -29,47 +28,47 @@ cNopacityDisplayTracks::~cNopacityDisplayTracks() {
void cNopacityDisplayTracks::SetGeometry(void) {
width = geoManager->trackWidth;
- height = (config.tracksItemHeight +4) * (numTracks+1);
+ height = (config.GetValue("tracksItemHeight") +4) * (numTracks+1);
menuItemWidth = geoManager->menuItemWidthTracks;
menuItemHeight = geoManager->menuItemHeightTracks;
int top, left;
- switch(config.tracksPosition) {
+ switch(config.GetValue("tracksPosition")) {
case 0: //middle bottom
- top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.tracksBorderHorizontal;
+ top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal");
left = (cOsd::OsdWidth() - width) / 2;
break;
case 1: //left bottom
- top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.tracksBorderHorizontal;
+ top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal");
left = cOsd::OsdLeft();
break;
case 2: //left middle
top = (cOsd::OsdHeight() - height) / 2;
- left = cOsd::OsdLeft() + config.tracksBorderVertical;
+ left = cOsd::OsdLeft() + config.GetValue("tracksBorderVertical");
break;
case 3: //left top
- top = cOsd::OsdTop() + config.tracksBorderHorizontal;
- left = cOsd::OsdLeft() + config.tracksBorderVertical;
+ top = cOsd::OsdTop() + config.GetValue("tracksBorderHorizontal");
+ left = cOsd::OsdLeft() + config.GetValue("tracksBorderVertical");
break;
case 4: //top middle
- top = cOsd::OsdTop() + config.tracksBorderHorizontal;
+ top = cOsd::OsdTop() + config.GetValue("tracksBorderHorizontal");
left = (cOsd::OsdWidth() - width) / 2;
break;
case 5: //top right
- top = cOsd::OsdTop() + config.tracksBorderHorizontal;
- left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.tracksBorderVertical;
+ top = cOsd::OsdTop() + config.GetValue("tracksBorderHorizontal");
+ left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.GetValue("tracksBorderVertical");
break;
case 6: //right middle
top = (cOsd::OsdHeight() - height) / 2;
- left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.tracksBorderVertical;
+ left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.GetValue("tracksBorderVertical");
break;
case 7: //right bottom
- top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.tracksBorderHorizontal;
- left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.tracksBorderVertical;
+ top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal");
+ left = cOsd::OsdWidth() - cOsd::OsdLeft() - width - config.GetValue("tracksBorderVertical");
break;
default: //middle bottom
- top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.tracksBorderHorizontal;
+ top = cOsd::OsdHeight() - cOsd::OsdTop() - height - config.GetValue("tracksBorderHorizontal");
left = (cOsd::OsdWidth() - width) / 2;
break;
}
@@ -80,7 +79,7 @@ void cNopacityDisplayTracks::CreatePixmaps(void) {
pixmapContainer = osd->CreatePixmap(1, cRect(0, 0, width, height));
pixmapHeader = osd->CreatePixmap(2, cRect(2, 2, menuItemWidth, menuItemHeight));
pixmapHeaderAudio = osd->CreatePixmap(3, cRect(menuItemWidth - menuItemHeight, 2, menuItemHeight, menuItemHeight));
- if (config.tracksFadeTime) {
+ if (FadeTime) {
pixmapContainer->SetAlpha(0);
pixmapHeader->SetAlpha(0);
pixmapHeaderAudio->SetAlpha(0);
@@ -90,12 +89,17 @@ void cNopacityDisplayTracks::CreatePixmaps(void) {
void cNopacityDisplayTracks::DrawHeader(const char *Title) {
pixmapContainer->Fill(Theme.Color(clrMenuBorder));
pixmapContainer->DrawRectangle(cRect(1, 1, width-2, height-2), Theme.Color(clrMenuBack));
- pixmapHeader->Fill(Theme.Color(clrMenuItem));
- if (config.doBlending) {
- cImage *back = imgCache->GetBackground(btTracks);
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmapHeader->Fill(Theme.Color(clrMenuItem));
+ cImage *back = imgCache->GetSkinElement(seTracks);
if (back)
pixmapHeader->DrawImage(cPoint(1, 1), *back);
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(seTracks);
+ if (back)
+ pixmapHeader->DrawImage(cPoint(0, 0), *back);
} else {
+ pixmapHeader->Fill(Theme.Color(clrMenuItem));
pixmapHeader->DrawRectangle(cRect(1, 1, width-2, height-2), Theme.Color(clrAudioMenuHeader));
}
pixmapIcon = osd->CreatePixmap(3, cRect(2, 2, menuItemHeight-2, menuItemHeight-2));
@@ -104,8 +108,7 @@ void cNopacityDisplayTracks::DrawHeader(const char *Title) {
cImage *imgTracks = imgCache->GetSkinIcon("skinIcons/tracks", menuItemHeight-6, menuItemHeight-6);
if (imgTracks)
pixmapIcon->DrawImage(cPoint(3,3), *imgTracks);
- int clrFontBack = (config.doBlending)?clrTransparent:Theme.Color(clrAudioMenuHeader);
- pixmapHeader->DrawText(cPoint((width - fontManager->trackHeader->Width(Title)) / 2, (menuItemHeight - fontManager->trackHeader->Height()) / 2), Title, Theme.Color(clrTracksFontHead), clrFontBack, fontManager->trackHeader);
+ pixmapIcon->DrawText(cPoint((width - fontManager->trackHeader->Width(Title)) / 2, (menuItemHeight - fontManager->trackHeader->Height()) / 2), Title, Theme.Color(clrTracksFontHead), clrTransparent, fontManager->trackHeader);
}
void cNopacityDisplayTracks::SetItem(const char *Text, int Index, bool Current) {
@@ -115,6 +118,9 @@ void cNopacityDisplayTracks::SetItem(const char *Text, int Index, bool Current)
item->SetFont(fontManager->trackText);
item->SetGeometry(Index, menuItemHeight+4, 2, menuItemWidth, menuItemHeight, 4);
item->CreatePixmap();
+ item->CreatePixmapIcon();
+ if (config.GetValue("displayType") == dtGraphical)
+ item->CreatePixmapForeground();
menuItems.Add(item);
item->Render();
}
@@ -157,7 +163,7 @@ void cNopacityDisplayTracks::SetAudioChannel(int AudioChannel) {
void cNopacityDisplayTracks::Flush(void) {
if (initial)
- if (config.tracksFadeTime)
+ if (FadeTime)
Start();
initial = false;
osd->Flush();
diff --git a/displayvolume.c b/displayvolume.c
index 390c339..979f182 100644
--- a/displayvolume.c
+++ b/displayvolume.c
@@ -1,40 +1,55 @@
#include "symbols/mute.xpm"
#include "displayvolume.h"
-cNopacityDisplayVolume::cNopacityDisplayVolume(void) {
- config.setDynamicValues();
+cNopacityDisplayVolume::cNopacityDisplayVolume(cImageCache *imgCache) {
+ this->imgCache = imgCache;
initial = true;
muted = false;
- FrameTime = config.volumeFrameTime;
- FadeTime = config.volumeFadeTime;
+ FadeTime = config.GetValue("volumeFadeTime");
+ FrameTime = FadeTime / 10;
- int top = (geoManager->osdHeight - geoManager->volumeHeight) - config.volumeBorderBottom;
+ int top = (geoManager->osdHeight - geoManager->volumeHeight) - config.GetValue("volumeBorderBottom");
int left = (geoManager->osdWidth - geoManager->volumeWidth) / 2;
osd = CreateOsd(left, top, geoManager->volumeWidth, geoManager->volumeHeight);
- pixmapBackgroundTop = osd->CreatePixmap(1, cRect(0, 0, geoManager->volumeWidth, geoManager->volumeHeight/2));
- pixmapBackgroundBottom = osd->CreatePixmap(1, cRect(0, geoManager->volumeHeight/2, geoManager->volumeWidth, geoManager->volumeHeight/2));
- if (config.doBlending) {
- DrawBlendedBackground(pixmapBackgroundTop, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), true);
- DrawBlendedBackground(pixmapBackgroundBottom, Theme.Color(clrChannelBackground), Theme.Color(clrChannelBackBlend), false);
+ pixmapBackground = osd->CreatePixmap(1, cRect(0, 0, geoManager->volumeWidth, geoManager->volumeHeight));
+
+ if (config.GetValue("displayType") == dtGraphical) {
+ cImage *imgBack = imgCache->GetSkinElement(seVolumeBackground);
+ if (imgBack) {
+ pixmapBackground->DrawImage(cPoint(0, 0), *imgBack);
+ }
} else {
- pixmapBackgroundTop->Fill(Theme.Color(clrChannelBackground));
- pixmapBackgroundBottom->Fill(Theme.Color(clrChannelBackground));
- }
- int cornerSize = geoManager->volumeHeight/4;
- if (cornerSize > 2) {
- pixmapBackgroundTop->DrawEllipse(cRect(0, 0, cornerSize, cornerSize), clrTransparent, -2);
- pixmapBackgroundTop->DrawEllipse(cRect(geoManager->volumeWidth - cornerSize, 0, cornerSize, cornerSize), clrTransparent, -1);
- pixmapBackgroundBottom->DrawEllipse(cRect(0, cornerSize, cornerSize, cornerSize), clrTransparent, -3);
- pixmapBackgroundBottom->DrawEllipse(cRect(geoManager->volumeWidth - cornerSize, cornerSize, cornerSize, cornerSize), clrTransparent, -4);
+ pixmapBackground->Fill(Theme.Color(clrChannelBackground));
+ if (config.GetValue("displayType") == dtBlending) {
+ DrawBlendedBackground(pixmapBackground,
+ 0,
+ geoManager->volumeWidth,
+ Theme.Color(clrChannelBackground),
+ Theme.Color(clrChannelBackBlend),
+ true);
+ DrawBlendedBackground(pixmapBackground,
+ 0,
+ geoManager->volumeWidth,
+ Theme.Color(clrChannelBackground),
+ Theme.Color(clrChannelBackBlend),
+ false);
+ }
+ int cornerRadius = geoManager->volumeHeight/4;
+ if (cornerRadius > 2) {
+ DrawRoundedCorners(pixmapBackground,
+ cornerRadius,
+ 0,
+ 0,
+ geoManager->volumeWidth,
+ geoManager->volumeHeight);
+ }
}
-
pixmapLabel = osd->CreatePixmap(2, cRect(0, 5, geoManager->volumeWidth, geoManager->volumeLabelHeight));
pixmapProgressBar = osd->CreatePixmap(2, cRect((geoManager->volumeWidth - geoManager->volumeProgressBarWidth) / 2, (geoManager->volumeHeight - geoManager->volumeProgressBarHeight)*2/3, geoManager->volumeProgressBarWidth, geoManager->volumeProgressBarHeight));
- if (config.volumeFadeTime) {
- pixmapBackgroundTop->SetAlpha(0);
- pixmapBackgroundBottom->SetAlpha(0);
+ if (FadeTime) {
+ pixmapBackground->SetAlpha(0);
pixmapProgressBar->SetAlpha(0);
pixmapLabel->SetAlpha(0);
}
@@ -44,8 +59,7 @@ cNopacityDisplayVolume::~cNopacityDisplayVolume() {
Cancel(-1);
while (Active())
cCondWait::SleepMs(10);
- osd->DestroyPixmap(pixmapBackgroundTop);
- osd->DestroyPixmap(pixmapBackgroundBottom);
+ osd->DestroyPixmap(pixmapBackground);
osd->DestroyPixmap(pixmapLabel);
osd->DestroyPixmap(pixmapProgressBar);
delete osd;
@@ -114,7 +128,7 @@ tColor cNopacityDisplayVolume::DrawProgressbarBackground(int left, int top, int
void cNopacityDisplayVolume::Flush(void) {
if (initial)
- if (config.volumeFadeTime)
+ if (FadeTime)
Start();
initial = false;
osd->Flush();
@@ -127,8 +141,7 @@ void cNopacityDisplayVolume::Action(void) {
cPixmap::Lock();
double t = min(double(Now - Start) / FadeTime, 1.0);
int Alpha = t * ALPHA_OPAQUE;
- pixmapBackgroundTop->SetAlpha(Alpha);
- pixmapBackgroundBottom->SetAlpha(Alpha);
+ pixmapBackground->SetAlpha(Alpha);
pixmapProgressBar->SetAlpha(Alpha);
pixmapLabel->SetAlpha(Alpha);
cPixmap::Unlock();
diff --git a/displayvolume.h b/displayvolume.h
index 30a4db2..c1ef2ae 100644
--- a/displayvolume.h
+++ b/displayvolume.h
@@ -8,15 +8,15 @@ private:
bool initial;
bool muted;
cOsd *osd;
- cPixmap *pixmapBackgroundTop;
- cPixmap *pixmapBackgroundBottom;
+ cImageCache *imgCache;
+ cPixmap *pixmapBackground;
cPixmap *pixmapProgressBar;
cPixmap *pixmapLabel;
virtual void Action(void);
void DrawProgressBar(int Current, int Total);
tColor DrawProgressbarBackground(int left, int top, int width, int height);
public:
- cNopacityDisplayVolume(void);
+ cNopacityDisplayVolume(cImageCache *imgCache);
virtual ~cNopacityDisplayVolume();
virtual void SetVolume(int Current, int Total, bool Mute);
virtual void Flush(void);
diff --git a/fontmanager.c b/fontmanager.c
index 8b42b66..c7a08fd 100644
--- a/fontmanager.c
+++ b/fontmanager.c
@@ -30,27 +30,26 @@ cFont *cFontManager::CreateFont(int size) {
}
void cFontManager::SetFontsMenu(void) {
- menuHeader = CreateFont(geoManager->menuHeaderHeight / 2 + config.fontHeader);
- menuDate = CreateFont(geoManager->menuHeaderHeight / 2 + config.fontDate);
- menuItemLarge = CreateFont(geoManager->menuItemHeightMain/3 + 4 + config.fontMenuitemLarge);
- menuItemSchedule = CreateFont(geoManager->menuItemHeightSchedule / 4 + 5 + config.fontMenuitemSchedule);
- menuItemScheduleSmall = CreateFont(geoManager->menuItemHeightSchedule / 4 - 5 + config.fontMenuitemScheduleSmall);
- menuItemChannel = CreateFont(geoManager->menuItemHeightSchedule / 3 + config.fontMenuitemChannel);
- menuItemChannelSmall = CreateFont(geoManager->menuItemHeightSchedule / 5 - 2 + config.fontMenuitemChannelSmall);
- menuItemRecordings = CreateFont(geoManager->menuItemHeightRecordings / 2 - 14 + config.fontMenuitemRecordings);
- menuItemRecordingsSmall = CreateFont(geoManager->menuItemHeightRecordings / 4 - 3 + config.fontMenuitemRecordingsSmall);
- menuItemTimers = CreateFont(geoManager->menuItemHeightSchedule / 3 + config.fontMenuitemTimers);
- menuItemTimersSmall = CreateFont(geoManager->menuItemHeightSchedule / 4 - 3 + config.fontMenuitemTimersSmall);
- menuItemDefault = CreateFont(geoManager->menuItemHeightDefault * 2 / 3 + config.fontMenuitemDefault);
- menuDiskUsage = CreateFont(geoManager->menuDiskUsageHeight/6 - 2 + config.fontDiskUsage);
- menuDiskUsagePercent = CreateFont(geoManager->menuDiskUsageHeight/5 - 4 + config.fontDiskUsagePercent);
- menuTimersHead = CreateFont((geoManager->menuContentHeight - 3*geoManager->menuSpace - geoManager->menuDiskUsageHeight) / 25 + config.fontTimersHead);
- menuTimers = CreateFont((geoManager->menuContentHeight - 3*geoManager->menuSpace - geoManager->menuDiskUsageHeight) / 25 - 6 + config.fontTimers);
- menuButtons = CreateFont(geoManager->menuButtonHeight*0.8 + config.fontButtons);
- menuMessage = CreateFont(geoManager->menuMessageHeight / 3 + config.fontMessageMenu);
- menuEPGInfoWindow = CreateFont(geoManager->menuContentHeight / 30 + config.fontEPGInfoWindow);
- menuEPGInfoWindowLarge = CreateFont(geoManager->menuContentHeight / 20 + config.fontEPGInfoWindowLarge);
- menuRssFeed = CreateFont((geoManager->menuRssFeedHeight / 2) + 3 + config.fontRssFeed);
+ menuHeader = CreateFont(geoManager->menuHeaderHeight / 2 + config.GetValue("fontHeader"));
+ menuDate = CreateFont(geoManager->menuHeaderHeight / 2 + config.GetValue("fontDate"));
+ menuItemLarge = CreateFont(geoManager->menuItemHeightMain/3 + 4 + config.GetValue("fontMenuitemLarge"));
+ menuItemSchedule = CreateFont(geoManager->menuItemHeightSchedule / 4 + 5 + config.GetValue("fontMenuitemSchedule"));
+ menuItemScheduleSmall = CreateFont(geoManager->menuItemHeightSchedule / 4 - 5 + config.GetValue("fontMenuitemScheduleSmall"));
+ menuItemChannel = CreateFont(geoManager->menuItemHeightSchedule / 3 + config.GetValue("fontMenuitemChannel"));
+ menuItemChannelSmall = CreateFont(geoManager->menuItemHeightSchedule / 5 - 2 + config.GetValue("fontMenuitemChannelSmall"));
+ menuItemRecordings = CreateFont(geoManager->menuItemHeightRecordings / 2 - 14 + config.GetValue("fontMenuitemRecordings"));
+ menuItemRecordingsSmall = CreateFont(geoManager->menuItemHeightRecordings / 4 - 3 + config.GetValue("fontMenuitemRecordingsSmall"));
+ menuItemTimers = CreateFont(geoManager->menuItemHeightSchedule / 3 + config.GetValue("fontMenuitemTimers"));
+ menuItemTimersSmall = CreateFont(geoManager->menuItemHeightSchedule / 4 - 3 + config.GetValue("fontMenuitemTimersSmall"));
+ menuItemDefault = CreateFont(geoManager->menuItemHeightDefault * 2 / 3 + config.GetValue("fontMenuitemDefault"));
+ menuDiskUsage = CreateFont(geoManager->menuDiskUsageHeight/6 - 2 + config.GetValue("fontDiskUsage"));
+ menuDiskUsagePercent = CreateFont(geoManager->menuDiskUsageHeight/5 - 4 + config.GetValue("fontDiskUsagePercent"));
+ menuTimersHead = CreateFont((geoManager->menuContentHeight - 3*geoManager->menuSpace - geoManager->menuDiskUsageHeight) / 25 + config.GetValue("fontTimersHead"));
+ menuTimers = CreateFont((geoManager->menuContentHeight - 3*geoManager->menuSpace - geoManager->menuDiskUsageHeight) / 25 - 6 + config.GetValue("fontTimers"));
+ menuButtons = CreateFont(geoManager->menuButtonHeight*0.8 + config.GetValue("fontButtons"));
+ menuMessage = CreateFont(geoManager->menuMessageHeight / 3 + config.GetValue("fontMessageMenu"));
+ menuEPGInfoWindow = CreateFont(geoManager->menuContentHeight / 30 + config.GetValue("fontEPGInfoWindow"));
+ menuEPGInfoWindowLarge = CreateFont(geoManager->menuContentHeight / 20 + config.GetValue("fontEPGInfoWindowLarge"));
}
void cFontManager::DeleteFontsMenu(void) {
@@ -74,16 +73,16 @@ void cFontManager::DeleteFontsMenu(void) {
delete menuMessage;
delete menuEPGInfoWindow;
delete menuEPGInfoWindowLarge;
- delete menuRssFeed;
}
void cFontManager::SetFontsChannel(void) {
- channelHeader = CreateFont(geoManager->channelInfoHeight - 8 + config.fontChannelHeaderSize);
- channelDate = CreateFont(geoManager->channelInfoHeight/2 + config.fontChannelDateSize);
- channelEPG = CreateFont(geoManager->channelEpgInfoLineHeight + config.fontEPGSize);
- channelEPGSmall = CreateFont(geoManager->channelEpgInfoLineHeight - 6 + config.fontEPGSmallSize);
- channelChannelGroup = CreateFont(geoManager->channelEpgInfoHeight/3 + config.fontChannelGroupSize);
- channelChannelGroupSmall = CreateFont(geoManager->channelEpgInfoHeight/3 - 5 + config.fontChannelGroupSmallSize);
+ channelHeader = CreateFont(geoManager->channelHeaderHeight - 8 + config.GetValue("fontChannelHeaderSize"));
+ channelDate = CreateFont(geoManager->channelHeaderHeight/2 + config.GetValue("fontChannelDateSize"));
+ channelEPG = CreateFont(geoManager->channelEpgInfoLineHeight + config.GetValue("fontEPGSize"));
+ channelEPGSmall = CreateFont(geoManager->channelEpgInfoLineHeight - 6 + config.GetValue("fontEPGSmallSize"));
+ channelSourceInfo = CreateFont(geoManager->channelFooterHeight/2 + config.GetValue("fontChannelSourceInfoSize"));;
+ channelChannelGroup = CreateFont(geoManager->channelEpgInfoHeight/3 + config.GetValue("fontChannelGroupSize"));
+ channelChannelGroupSmall = CreateFont(geoManager->channelEpgInfoHeight/3 - 5 + config.GetValue("fontChannelGroupSmallSize"));
}
void cFontManager::DeleteFontsChannel(void) {
@@ -91,12 +90,13 @@ void cFontManager::DeleteFontsChannel(void) {
delete channelDate;
delete channelEPG;
delete channelEPGSmall;
+ delete channelSourceInfo;
delete channelChannelGroup;
delete channelChannelGroupSmall;
}
void cFontManager::SetFontsReplay(void) {
- replayHeader = CreateFont(geoManager->replayHeaderHeight - 8 + config.fontReplayHeader);
+ replayHeader = CreateFont(geoManager->replayHeaderHeight - 8 + config.GetValue("fontReplayHeader"));
replayText = CreateFont(geoManager->replayCurrentHeight);
}
@@ -106,7 +106,7 @@ void cFontManager::DeleteFontsReplay(void) {
}
void cFontManager::SetFontsMessage(void) {
- messageText = CreateFont(geoManager->messageHeight / 4 + 15 + config.fontMessage);
+ messageText = CreateFont(geoManager->messageHeight / 4 + 15 + config.GetValue("fontMessage"));
}
void cFontManager::DeleteFontsMessage(void) {
@@ -114,8 +114,8 @@ void cFontManager::DeleteFontsMessage(void) {
}
void cFontManager::SetFontsTrack(void) {
- trackText = CreateFont(geoManager->menuItemHeightTracks/3 + config.fontTracks);
- trackHeader = CreateFont(geoManager->menuItemHeightTracks/2 + config.fontTracksHeader);
+ trackText = CreateFont(geoManager->menuItemHeightTracks/3 + config.GetValue("fontTracks"));
+ trackHeader = CreateFont(geoManager->menuItemHeightTracks/2 + config.GetValue("fontTracksHeader"));
}
void cFontManager::DeleteFontsTrack(void) {
@@ -124,7 +124,7 @@ void cFontManager::DeleteFontsTrack(void) {
}
void cFontManager::SetFontsVolume(void) {
- volumeText = CreateFont(geoManager->volumeLabelHeight - 6 + config.fontVolume);
+ volumeText = CreateFont(geoManager->volumeLabelHeight - 6 + config.GetValue("fontVolume"));
}
void cFontManager::DeleteFontsVolume(void) {
diff --git a/fontmanager.h b/fontmanager.h
index 6728ace..69938f0 100644
--- a/fontmanager.h
+++ b/fontmanager.h
@@ -42,12 +42,12 @@ class cFontManager {
cFont *menuMessage;
cFont *menuEPGInfoWindow;
cFont *menuEPGInfoWindowLarge;
- cFont *menuRssFeed;
//Fonts DisplayChannel
cFont *channelHeader;
cFont *channelDate;
cFont *channelEPG;
cFont *channelEPGSmall;
+ cFont *channelSourceInfo;
cFont *channelChannelGroup;
cFont *channelChannelGroupSmall;
//Fonts DisplayReplay
diff --git a/geometrymanager.c b/geometrymanager.c
index 9f2e9fb..17e55f1 100644
--- a/geometrymanager.c
+++ b/geometrymanager.c
@@ -38,23 +38,22 @@ bool cGeometryManager::GeometryChanged(void) {
}
void cGeometryManager::SetDisplayMenuSizes() {
- menuSpace = config.spaceMenu;
+ menuSpace = config.GetValue("spaceMenu");
- menuWidthScrollbar = config.widthScrollbar;
+ menuWidthScrollbar = config.GetValue("widthScrollbar");
menuDateWidth = osdWidth * 0.3;
- menuHeaderHeight = osdHeight * config.headerHeight / 100;
- menuFooterHeight = osdHeight * config.footerHeight / 100;
- menuRssFeedHeight = (config.displayRSSFeed)?(osdHeight * config.rssFeedHeight / 100):0;
- menuContentHeight = osdHeight - menuHeaderHeight - menuFooterHeight - menuRssFeedHeight;
-
- menuContentWidthMain = osdWidth * config.menuWidthMain / 100;
- menuContentWidthSchedules = osdWidth * config.menuWidthSchedules / 100;
- menuContentWidthChannels = osdWidth * config.menuWidthChannels / 100;
- menuContentWidthTimers = osdWidth * config.menuWidthTimers / 100;
- menuContentWidthRecordings = osdWidth * config.menuWidthRecordings / 100;
- menuContentWidthSetup = osdWidth * config.menuWidthSetup / 100;
- menuContentWidthFull = osdWidth - config.widthScrollbar - config.spaceMenu;
+ menuHeaderHeight = osdHeight * config.GetValue("headerHeight") / 100;
+ menuFooterHeight = osdHeight * config.GetValue("footerHeight") / 100;
+ menuContentHeight = osdHeight - menuHeaderHeight - menuFooterHeight;
+
+ menuContentWidthMain = osdWidth * config.GetValue("menuWidthMain") / 100;
+ menuContentWidthSchedules = osdWidth * config.GetValue("menuWidthSchedules") / 100;
+ menuContentWidthChannels = osdWidth * config.GetValue("menuWidthChannels") / 100;
+ menuContentWidthTimers = osdWidth * config.GetValue("menuWidthChannels") / 100;
+ menuContentWidthRecordings = osdWidth * config.GetValue("menuWidthRecordings") / 100;
+ menuContentWidthSetup = osdWidth * config.GetValue("menuWidthSetup") / 100;
+ menuContentWidthFull = osdWidth - config.GetValue("widthScrollbar") - config.GetValue("spaceMenu");
menuContentWidthMinimum = Minimum(menuContentWidthMain,
menuContentWidthSchedules,
menuContentWidthChannels,
@@ -62,81 +61,108 @@ void cGeometryManager::SetDisplayMenuSizes() {
menuContentWidthRecordings,
menuContentWidthSetup);
- menuItemWidthDefault = menuContentWidthFull - 4 * config.spaceMenu;
- menuItemWidthMain = menuContentWidthMain - 4 * config.spaceMenu;
- menuItemWidthSchedule = menuContentWidthSchedules - 4 * config.spaceMenu;
- menuItemWidthChannel = menuContentWidthChannels - 4 * config.spaceMenu;
- menuItemWidthTimer = menuContentWidthTimers - 4 * config.spaceMenu;
- menuItemWidthRecording = menuContentWidthRecordings - 4 * config.spaceMenu;
- menuItemWidthSetup = menuContentWidthSetup - 4 * config.spaceMenu;
- menuItemWidthTracks = osdWidth * config.tracksWidth / 100 - 4;
- menuItemHeightMain = config.iconHeight + 2;
- menuItemHeightSchedule = config.menuItemLogoHeight + 2;
- menuItemHeightDefault = menuContentHeight / config.numDefaultMenuItems - config.spaceMenu;
- menuItemHeightRecordings = config.menuRecFolderSize + 2;
- menuItemHeightTracks = config.tracksItemHeight;
+ menuItemWidthDefault = menuContentWidthFull - 4 * config.GetValue("spaceMenu");
+ menuItemWidthMain = menuContentWidthMain - 4 * config.GetValue("spaceMenu");
+ menuItemWidthSchedule = menuContentWidthSchedules - 4 * config.GetValue("spaceMenu");
+ menuItemWidthChannel = menuContentWidthChannels - 4 * config.GetValue("spaceMenu");
+ menuItemWidthTimer = menuContentWidthTimers - 4 * config.GetValue("spaceMenu");
+ menuItemWidthRecording = menuContentWidthRecordings - 4 * config.GetValue("spaceMenu");
+ menuItemWidthSetup = menuContentWidthSetup - 4 * config.GetValue("spaceMenu");
+ menuItemWidthTracks = osdWidth * config.GetValue("tracksWidth") / 100 - 4;
+ menuItemHeightMain = config.GetValue("iconHeight") + 2;
+ menuItemHeightSchedule = config.GetValue("menuItemLogoHeight") + 2;
+ menuItemHeightDefault = menuContentHeight / config.GetValue("numDefaultMenuItems") - config.GetValue("spaceMenu");
+ menuItemHeightRecordings = config.GetValue("menuRecFolderSize") + 2;
+ menuItemHeightTracks = config.GetValue("tracksItemHeight");
menuButtonsBorder = menuFooterHeight / 6;
menuButtonWidth = (osdWidth / 4) - 2 * menuButtonsBorder;
menuButtonHeight = menuFooterHeight - 3 * menuButtonsBorder;
- menuDiskUsageWidth = menuDiskUsageHeight = osdWidth * config.menuSizeDiskUsage / 100;
- menuTimersWidth = osdWidth * config.menuWidthRightItems / 100;
+ menuDiskUsageWidth = menuDiskUsageHeight = osdWidth * config.GetValue("menuSizeDiskUsage") / 100;
+ menuTimersWidth = osdWidth * config.GetValue("menuWidthRightItems") / 100;
menuMessageWidth = 0.8 * osdWidth;
menuMessageHeight = 0.1 * osdHeight;
}
void cGeometryManager::SetDisplayChannelSizes(void) {
- channelHeight = osdHeight * config.channelHeight / 100;
- channelTop = osdTop + osdHeight - channelHeight - config.channelBorderBottom;
- switch (config.logoPosition) {
+ channelX = config.GetValue("channelBorderVertical");
+ channelWidth = osdWidth - 2 * config.GetValue("channelBorderVertical");
+ channelHeight = osdHeight * config.GetValue("channelHeight") / 100;
+ channelTop = osdTop + osdHeight - channelHeight - config.GetValue("channelBorderBottom");
+
+ channelHeaderHeight = 0.2 * channelHeight;
+ channelFooterHeight = 0.2 * channelHeight;
+ channelContentHeight = channelHeight - channelHeaderHeight - channelFooterHeight;
+
+ int logoWidthTotalPercent = 16;
+ channelLogoWidthTotal = logoWidthTotalPercent * channelWidth /100;
+
+ int logoMaxWidth = logoMaxWidth = channelLogoWidthTotal - 10;
+ int logoMaxHeight;
+ if (config.GetValue("displayType") == dtGraphical) {
+ logoMaxHeight = channelHeight - channelHeaderHeight - 2;
+ } else {
+ logoMaxHeight = channelHeight - 2;
+ }
+ cSize logoSize = ScaleToFit(logoMaxWidth,
+ logoMaxHeight,
+ config.GetValue("logoWidthOriginal"),
+ config.GetValue("logoHeightOriginal"));
+ channelLogoWidth = logoSize.Width();
+ channelLogoHeight = logoSize.Height();
+ channelLogoX = (channelLogoWidthTotal - channelLogoWidth) / 2;
+
+ if (config.GetValue("displayType") == dtGraphical) {
+ channelLogoY = (channelTop + channelHeaderHeight)
+ + (channelHeight - channelHeaderHeight - channelLogoHeight)/2;
+ } else {
+ channelLogoY = channelTop + (channelHeight - channelLogoHeight)/2;
+ }
+
+ switch (config.GetValue("logoPosition")) {
case lpLeft:
- channelWidth = osdWidth - (config.logoWidth + 2 * config.channelBorderVertical + config.logoBorder);
- channelX = config.logoWidth + config.channelBorderVertical + config.logoBorder;
+ channelContentX = channelLogoWidthTotal;
+ channelContentWidth = channelWidth - channelLogoWidthTotal;
break;
case lpRight:
- channelWidth = osdWidth - (config.logoWidth + 2 * config.channelBorderVertical + config.logoBorder);
- channelX = config.channelBorderVertical;
+ channelContentX = 0;
+ channelContentWidth = channelWidth - channelLogoWidthTotal;
+ channelLogoX = channelContentWidth;
break;
case lpNone:
- channelWidth = osdWidth - 2 * config.channelBorderVertical;
- channelX = config.channelBorderVertical;
+ channelContentX = 0;
+ channelContentWidth = channelWidth;
break;
}
- channelInfoWidth = channelWidth * 0.7;
- channelDateWidth = channelWidth - channelInfoWidth;
- channelInfoHeight = channelHeight * 0.2;
- if (channelInfoHeight%2 != 0)
- channelInfoHeight++;
+
+ channelChannelNameWidth = channelContentWidth * 70 / 100;
+ channelDateWidth = channelContentWidth - channelChannelNameWidth;
channelProgressBarHeight = channelHeight * 0.1;
- channelStreamInfoHeight = channelHeight * 0.2;
- if (channelStreamInfoHeight%2 != 0)
- channelStreamInfoHeight++;
- channelEpgInfoHeight = channelHeight - channelInfoHeight - channelStreamInfoHeight - channelProgressBarHeight;
+ channelEpgInfoHeight = channelContentHeight - channelProgressBarHeight;
channelEpgInfoLineHeight = channelEpgInfoHeight / 4;
- channelStreamInfoY = channelInfoHeight + channelProgressBarHeight + channelEpgInfoHeight;
- channelIconSize = config.statusIconSize;
- channelIconsWidth = 5*channelIconSize;
+ channelFooterY = channelTop + channelHeaderHeight + channelContentHeight;
}
void cGeometryManager::SetDisplayReplaySizes(void) {
- replayHeight = osdHeight * config.replayHeight / 100;
- replayWidth = osdWidth - 2 * config.replayBorderVertical;
+ replayHeight = osdHeight * config.GetValue("replayHeight") / 100;
+ replayWidth = osdWidth - 2 * config.GetValue("replayBorderVertical");
replayHeaderHeight = replayHeight * 0.2;
if (replayHeaderHeight%2 != 0)
replayHeaderHeight++;
replayFooterHeight = replayHeaderHeight;
- replayResolutionX = 10;
- replayResolutionY = 5;
- replayInfo2Height = max(replayHeaderHeight,config.resolutionIconSize+replayResolutionY*2-replayHeaderHeight);
+ replayResolutionSize = replayHeaderHeight - 10;
+ replayResolutionX = replayWidth - replayResolutionSize*3 - replayHeaderHeight/2;
+ replayResolutionY = replayHeight - replayFooterHeight;
+ replayInfo2Height = replayHeaderHeight;
replayProgressBarHeight = 0.1 * replayHeight;
if (replayProgressBarHeight%2 != 0)
replayProgressBarHeight++;
- replayCurrentHeight = replayProgressBarHeight + config.fontReplay;
+ replayCurrentHeight = replayProgressBarHeight + config.GetValue("fontReplay");
replayControlsHeight = replayHeight - replayHeaderHeight - replayInfo2Height - replayFooterHeight - replayProgressBarHeight;
if (replayControlsHeight < 11)
replayControlsHeight = 11;
- replayInfoWidth = 0.75 * replayWidth - config.resolutionIconSize - 10;
+ replayInfoWidth = 0.75 * replayWidth;
replayDateWidth = replayWidth - replayInfoWidth;
replayJumpX = (replayWidth - 4 * replayControlsHeight)/2 + 5*replayControlsHeight;
@@ -149,17 +175,17 @@ void cGeometryManager::SetDisplayReplaySizes(void) {
}
void cGeometryManager::SetDisplayMessageSizes(void) {
- messageWidth = osdWidth * config.messageWidth / 100;
- messageHeight = osdHeight * config.messageHeight / 100;
+ messageWidth = osdWidth * config.GetValue("messageWidth") / 100;
+ messageHeight = osdHeight * config.GetValue("messageHeight") / 100;
}
void cGeometryManager::SetDisplayTrackSizes(void) {
- trackWidth = osdWidth * config.tracksWidth / 100;
+ trackWidth = osdWidth * config.GetValue("tracksWidth") / 100;
}
void cGeometryManager::SetDisplayVolumeSizes(void) {
- volumeWidth = osdWidth * config.volumeWidth / 100;
- volumeHeight = osdHeight * config.volumeHeight / 100;
+ volumeWidth = osdWidth * config.GetValue("volumeWidth") / 100;
+ volumeHeight = osdHeight * config.GetValue("volumeHeight") / 100;
volumeLabelHeight = volumeHeight/3;
volumeProgressBarWidth = 0.9 * volumeWidth;
volumeProgressBarHeight = 0.3 * volumeHeight;
diff --git a/geometrymanager.h b/geometrymanager.h
index 03f4f44..cb94eef 100644
--- a/geometrymanager.h
+++ b/geometrymanager.h
@@ -2,6 +2,7 @@
#define __NOPACITY_GEOMETRYMANAGER_H
enum eLogoPosition {lpNone = 0, lpLeft, lpRight};
+enum eBackgroundStyle {bsTrans = 0, bsFull};
class cGeometryManager {
private:
@@ -27,7 +28,6 @@ class cGeometryManager {
int menuDateWidth;
int menuHeaderHeight;
int menuFooterHeight;
- int menuRssFeedHeight;
int menuContentHeight;
int menuContentWidthMain;
int menuContentWidthSchedules;
@@ -59,20 +59,21 @@ class cGeometryManager {
int menuMessageWidth;
int menuMessageHeight;
//DisplayChannel Sizes
- int channelTop, channelHeight;
- int channelWidth;
- int channelX;
- int channelInfoWidth;
- int channelInfoHeight;
+ int channelX, channelTop;
+ int channelWidth, channelHeight;
+ int channelHeaderHeight;
+ int channelFooterHeight;
+ int channelContentHeight;
+ int channelContentX, channelContentWidth;
+ int channelLogoWidthTotal;
+ int channelLogoX, channelLogoY;
+ int channelLogoWidth, channelLogoHeight;
+ int channelChannelNameWidth;
int channelDateWidth;
+ int channelFooterY;
int channelProgressBarHeight;
int channelEpgInfoHeight;
int channelEpgInfoLineHeight;
- int channelStreamInfoHeight;
- int channelStreamInfoY;
- int channelIconSize;
- int channelIconsWidth;
- int channelSignalWidth, channelSignalHeight, channelSignalX;
//DisplayReplay Sizes
int replayWidth;
int replayHeight;
@@ -85,6 +86,7 @@ class cGeometryManager {
int replayInfoWidth;
int replayDateWidth;
int replayIconSize, replayIconBorder;
+ int replayResolutionSize;
int replayResolutionX, replayResolutionY;
int replayJumpX, replayJumpY;
int replayJumpWidth, replayJumpHeight;
diff --git a/helpers.c b/helpers.c
index 3f9b3f6..249bc44 100644
--- a/helpers.c
+++ b/helpers.c
@@ -13,15 +13,12 @@ static cOsd *CreateOsd(int Left, int Top, int Width, int Height) {
return NULL;
}
-static void DrawBlendedBackground(cPixmap *pixmap, tColor color, tColor colorBlending, bool fromTop) {
- int width = pixmap->ViewPort().Width();
+static void DrawBlendedBackground(cPixmap *pixmap, int xStart, int width, tColor color, tColor colorBlending, bool fromTop) {
int height = pixmap->ViewPort().Height();
- pixmap->Fill(color);
int numSteps = 16;
int alphaStep = 0x0F;
int alpha = 0x00;
int step, begin, end;
- bool cont = true;
if (fromTop) {
step = 1;
begin = 0;
@@ -32,9 +29,10 @@ static void DrawBlendedBackground(cPixmap *pixmap, tColor color, tColor colorBle
end = height - numSteps;
}
tColor clr;
+ bool cont = true;
for (int i = begin; cont; i = i + step) {
clr = AlphaBlend(color, colorBlending, alpha);
- pixmap->DrawRectangle(cRect(0,i,width,1), clr);
+ pixmap->DrawRectangle(cRect(xStart,i,width,1), clr);
alpha += alphaStep;
if (i == end)
cont = false;
@@ -75,6 +73,33 @@ static void DrawRoundedCornersWithBorder(cPixmap *p, tColor borderColor, int rad
}
+static cSize ScaleToFit(int widthMax, int heightMax, int widthOriginal, int heightOriginal) {
+ int width = 1;
+ int height = 1;
+
+ if ((widthMax == 0)||(heightMax==0)||(widthOriginal==0)||(heightOriginal==0))
+ return cSize(width, height);
+
+ if ((widthOriginal <= widthMax) && (heightOriginal <= heightMax)) {
+ width = widthOriginal;
+ height = heightOriginal;
+ } else if ((widthOriginal > widthMax) && (heightOriginal <= heightMax)) {
+ width = widthMax;
+ height = (double)width/(double)widthOriginal * heightOriginal;
+ } else if ((widthOriginal <= widthMax) && (heightOriginal > heightMax)) {
+ height = heightMax;
+ width = (double)height/(double)heightOriginal * widthOriginal;
+ } else {
+ width = widthMax;
+ height = (double)width/(double)widthOriginal * heightOriginal;
+ if (height > heightMax) {
+ height = heightMax;
+ width = (double)height/(double)heightOriginal * widthOriginal;
+ }
+ }
+ return cSize(width, height);
+}
+
static int Minimum(int a, int b, int c, int d, int e, int f) {
int min = a;
if (b < min) min = b;
diff --git a/icons/darkgrey/skinIcons/channelsymbols.png b/icons/darkgrey/skinIcons/channelsymbols.png
deleted file mode 100644
index 4ca060f..0000000
--- a/icons/darkgrey/skinIcons/channelsymbols.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkgrey/skinIcons/hd1080i.png b/icons/darkgrey/skinIcons/hd1080i.png
deleted file mode 100644
index 21351ce..0000000
--- a/icons/darkgrey/skinIcons/hd1080i.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkgrey/skinIcons/hd720p.png b/icons/darkgrey/skinIcons/hd720p.png
deleted file mode 100644
index 1d91b7d..0000000
--- a/icons/darkgrey/skinIcons/hd720p.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkgrey/skinIcons/radio.png b/icons/darkgrey/skinIcons/radio.png
deleted file mode 100644
index 3a90a3e..0000000
--- a/icons/darkgrey/skinIcons/radio.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkgrey/skinIcons/sd576i.png b/icons/darkgrey/skinIcons/sd576i.png
deleted file mode 100644
index 85c3657..0000000
--- a/icons/darkgrey/skinIcons/sd576i.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkred/skinIcons/channelsymbols.png b/icons/darkred/skinIcons/channelsymbols.png
deleted file mode 100644
index 4ca060f..0000000
--- a/icons/darkred/skinIcons/channelsymbols.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkred/skinIcons/hd1080i.png b/icons/darkred/skinIcons/hd1080i.png
deleted file mode 100644
index f717498..0000000
--- a/icons/darkred/skinIcons/hd1080i.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkred/skinIcons/hd720p.png b/icons/darkred/skinIcons/hd720p.png
deleted file mode 100644
index 93efca8..0000000
--- a/icons/darkred/skinIcons/hd720p.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkred/skinIcons/radio.png b/icons/darkred/skinIcons/radio.png
deleted file mode 100644
index 5850bc5..0000000
--- a/icons/darkred/skinIcons/radio.png
+++ /dev/null
Binary files differ
diff --git a/icons/darkred/skinIcons/sd576i.png b/icons/darkred/skinIcons/sd576i.png
deleted file mode 100644
index 6e3869f..0000000
--- a/icons/darkred/skinIcons/sd576i.png
+++ /dev/null
Binary files differ
diff --git a/icons/freestyle/menuIcons/CAM.png b/icons/freestyle/menuIcons/CAM.png
new file mode 100644
index 0000000..d84840d
--- /dev/null
+++ b/icons/freestyle/menuIcons/CAM.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Channels.png b/icons/freestyle/menuIcons/Channels.png
new file mode 100644
index 0000000..adeddbe
--- /dev/null
+++ b/icons/freestyle/menuIcons/Channels.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Commands.png b/icons/freestyle/menuIcons/Commands.png
new file mode 100644
index 0000000..c00a22b
--- /dev/null
+++ b/icons/freestyle/menuIcons/Commands.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/DVB.png b/icons/freestyle/menuIcons/DVB.png
new file mode 100644
index 0000000..2901d4e
--- /dev/null
+++ b/icons/freestyle/menuIcons/DVB.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/EPG.png b/icons/freestyle/menuIcons/EPG.png
new file mode 100644
index 0000000..19732e6
--- /dev/null
+++ b/icons/freestyle/menuIcons/EPG.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/LNB.png b/icons/freestyle/menuIcons/LNB.png
new file mode 100644
index 0000000..2321291
--- /dev/null
+++ b/icons/freestyle/menuIcons/LNB.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Miscellaneous.png b/icons/freestyle/menuIcons/Miscellaneous.png
new file mode 100644
index 0000000..49ef651
--- /dev/null
+++ b/icons/freestyle/menuIcons/Miscellaneous.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/OSD.png b/icons/freestyle/menuIcons/OSD.png
new file mode 100644
index 0000000..e9f8b63
--- /dev/null
+++ b/icons/freestyle/menuIcons/OSD.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Plugins.png b/icons/freestyle/menuIcons/Plugins.png
new file mode 100644
index 0000000..32de9d9
--- /dev/null
+++ b/icons/freestyle/menuIcons/Plugins.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Recording.png b/icons/freestyle/menuIcons/Recording.png
new file mode 100644
index 0000000..fce5bc6
--- /dev/null
+++ b/icons/freestyle/menuIcons/Recording.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Recordings.png b/icons/freestyle/menuIcons/Recordings.png
new file mode 100644
index 0000000..b17376c
--- /dev/null
+++ b/icons/freestyle/menuIcons/Recordings.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Replay.png b/icons/freestyle/menuIcons/Replay.png
new file mode 100644
index 0000000..fd4a6a6
--- /dev/null
+++ b/icons/freestyle/menuIcons/Replay.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Restart.png b/icons/freestyle/menuIcons/Restart.png
new file mode 100644
index 0000000..aa74b1d
--- /dev/null
+++ b/icons/freestyle/menuIcons/Restart.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Schedule.png b/icons/freestyle/menuIcons/Schedule.png
new file mode 100644
index 0000000..8bc9282
--- /dev/null
+++ b/icons/freestyle/menuIcons/Schedule.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Setup.png b/icons/freestyle/menuIcons/Setup.png
new file mode 100644
index 0000000..7b450b0
--- /dev/null
+++ b/icons/freestyle/menuIcons/Setup.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/System.png b/icons/freestyle/menuIcons/System.png
new file mode 100644
index 0000000..7b450b0
--- /dev/null
+++ b/icons/freestyle/menuIcons/System.png
Binary files differ
diff --git a/icons/freestyle/menuIcons/Timers.png b/icons/freestyle/menuIcons/Timers.png
new file mode 100644
index 0000000..b3686cf
--- /dev/null
+++ b/icons/freestyle/menuIcons/Timers.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/Thumbs.db b/icons/freestyle/pluginIcons/Thumbs.db
new file mode 100644
index 0000000..1d774db
--- /dev/null
+++ b/icons/freestyle/pluginIcons/Thumbs.db
Binary files differ
diff --git a/icons/freestyle/pluginIcons/admin.png b/icons/freestyle/pluginIcons/admin.png
new file mode 100644
index 0000000..cae9664
--- /dev/null
+++ b/icons/freestyle/pluginIcons/admin.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/arghdirector.png b/icons/freestyle/pluginIcons/arghdirector.png
new file mode 100644
index 0000000..368ba31
--- /dev/null
+++ b/icons/freestyle/pluginIcons/arghdirector.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/autostart.png b/icons/freestyle/pluginIcons/autostart.png
new file mode 100644
index 0000000..a232620
--- /dev/null
+++ b/icons/freestyle/pluginIcons/autostart.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/avahi4vdr.png b/icons/freestyle/pluginIcons/avahi4vdr.png
new file mode 100644
index 0000000..6c5f60e
--- /dev/null
+++ b/icons/freestyle/pluginIcons/avahi4vdr.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/avards.png b/icons/freestyle/pluginIcons/avards.png
new file mode 100644
index 0000000..7420d9f
--- /dev/null
+++ b/icons/freestyle/pluginIcons/avards.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/block.png b/icons/freestyle/pluginIcons/block.png
new file mode 100644
index 0000000..7a1170d
--- /dev/null
+++ b/icons/freestyle/pluginIcons/block.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/burn.png b/icons/freestyle/pluginIcons/burn.png
new file mode 100644
index 0000000..6629202
--- /dev/null
+++ b/icons/freestyle/pluginIcons/burn.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/cdplayer.png b/icons/freestyle/pluginIcons/cdplayer.png
new file mode 100644
index 0000000..a61863b
--- /dev/null
+++ b/icons/freestyle/pluginIcons/cdplayer.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/chanman.png b/icons/freestyle/pluginIcons/chanman.png
new file mode 100644
index 0000000..7109c51
--- /dev/null
+++ b/icons/freestyle/pluginIcons/chanman.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/check.png b/icons/freestyle/pluginIcons/check.png
new file mode 100644
index 0000000..5270c5e
--- /dev/null
+++ b/icons/freestyle/pluginIcons/check.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/conflictcheckonly.png b/icons/freestyle/pluginIcons/conflictcheckonly.png
new file mode 100644
index 0000000..08b65d6
--- /dev/null
+++ b/icons/freestyle/pluginIcons/conflictcheckonly.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/ddci.png b/icons/freestyle/pluginIcons/ddci.png
new file mode 100644
index 0000000..0907fca
--- /dev/null
+++ b/icons/freestyle/pluginIcons/ddci.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/devstatus.png b/icons/freestyle/pluginIcons/devstatus.png
new file mode 100644
index 0000000..89873c8
--- /dev/null
+++ b/icons/freestyle/pluginIcons/devstatus.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/ding1.png b/icons/freestyle/pluginIcons/ding1.png
new file mode 100644
index 0000000..ab6d68c
--- /dev/null
+++ b/icons/freestyle/pluginIcons/ding1.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/dummydevice.png b/icons/freestyle/pluginIcons/dummydevice.png
new file mode 100644
index 0000000..64fea06
--- /dev/null
+++ b/icons/freestyle/pluginIcons/dummydevice.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/duplicates.png b/icons/freestyle/pluginIcons/duplicates.png
new file mode 100644
index 0000000..4dc3056
--- /dev/null
+++ b/icons/freestyle/pluginIcons/duplicates.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/dvbhddevice.png b/icons/freestyle/pluginIcons/dvbhddevice.png
new file mode 100644
index 0000000..f136aed
--- /dev/null
+++ b/icons/freestyle/pluginIcons/dvbhddevice.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/dvbsddevice.png b/icons/freestyle/pluginIcons/dvbsddevice.png
new file mode 100644
index 0000000..ae22859
--- /dev/null
+++ b/icons/freestyle/pluginIcons/dvbsddevice.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/dynamite.png b/icons/freestyle/pluginIcons/dynamite.png
new file mode 100644
index 0000000..dada486
--- /dev/null
+++ b/icons/freestyle/pluginIcons/dynamite.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/eepg.png b/icons/freestyle/pluginIcons/eepg.png
new file mode 100644
index 0000000..09a1ccc
--- /dev/null
+++ b/icons/freestyle/pluginIcons/eepg.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/epgsearch.png b/icons/freestyle/pluginIcons/epgsearch.png
new file mode 100644
index 0000000..df16215
--- /dev/null
+++ b/icons/freestyle/pluginIcons/epgsearch.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/epgsearchonly.png b/icons/freestyle/pluginIcons/epgsearchonly.png
new file mode 100644
index 0000000..d65a505
--- /dev/null
+++ b/icons/freestyle/pluginIcons/epgsearchonly.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/epgsync.png b/icons/freestyle/pluginIcons/epgsync.png
new file mode 100644
index 0000000..1198287
--- /dev/null
+++ b/icons/freestyle/pluginIcons/epgsync.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/externalplayer.png b/icons/freestyle/pluginIcons/externalplayer.png
new file mode 100644
index 0000000..5f6f479
--- /dev/null
+++ b/icons/freestyle/pluginIcons/externalplayer.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/extrecmenu.png b/icons/freestyle/pluginIcons/extrecmenu.png
new file mode 100644
index 0000000..e9f711c
--- /dev/null
+++ b/icons/freestyle/pluginIcons/extrecmenu.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/favorites.png b/icons/freestyle/pluginIcons/favorites.png
new file mode 100644
index 0000000..2d6d284
--- /dev/null
+++ b/icons/freestyle/pluginIcons/favorites.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/femon.png b/icons/freestyle/pluginIcons/femon.png
new file mode 100644
index 0000000..413aa41
--- /dev/null
+++ b/icons/freestyle/pluginIcons/femon.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/fepg.png b/icons/freestyle/pluginIcons/fepg.png
new file mode 100644
index 0000000..0cdb787
--- /dev/null
+++ b/icons/freestyle/pluginIcons/fepg.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/filebrowser.png b/icons/freestyle/pluginIcons/filebrowser.png
new file mode 100644
index 0000000..12a29f9
--- /dev/null
+++ b/icons/freestyle/pluginIcons/filebrowser.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/fritzbox.png b/icons/freestyle/pluginIcons/fritzbox.png
new file mode 100644
index 0000000..f08c86e
--- /dev/null
+++ b/icons/freestyle/pluginIcons/fritzbox.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/graphlcd.png b/icons/freestyle/pluginIcons/graphlcd.png
new file mode 100644
index 0000000..df7afad
--- /dev/null
+++ b/icons/freestyle/pluginIcons/graphlcd.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/graphtft.png b/icons/freestyle/pluginIcons/graphtft.png
new file mode 100644
index 0000000..1477684
--- /dev/null
+++ b/icons/freestyle/pluginIcons/graphtft.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/image.png b/icons/freestyle/pluginIcons/image.png
new file mode 100644
index 0000000..eb40a39
--- /dev/null
+++ b/icons/freestyle/pluginIcons/image.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/imonlcd.png b/icons/freestyle/pluginIcons/imonlcd.png
new file mode 100644
index 0000000..ee9c3d3
--- /dev/null
+++ b/icons/freestyle/pluginIcons/imonlcd.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/iptv.png b/icons/freestyle/pluginIcons/iptv.png
new file mode 100644
index 0000000..f926f44
--- /dev/null
+++ b/icons/freestyle/pluginIcons/iptv.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/lcdproc.png b/icons/freestyle/pluginIcons/lcdproc.png
new file mode 100644
index 0000000..8bc9282
--- /dev/null
+++ b/icons/freestyle/pluginIcons/lcdproc.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/mailbox.png b/icons/freestyle/pluginIcons/mailbox.png
new file mode 100644
index 0000000..6526958
--- /dev/null
+++ b/icons/freestyle/pluginIcons/mailbox.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/markad.png b/icons/freestyle/pluginIcons/markad.png
new file mode 100644
index 0000000..3ffa443
--- /dev/null
+++ b/icons/freestyle/pluginIcons/markad.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/mlist.png b/icons/freestyle/pluginIcons/mlist.png
new file mode 100644
index 0000000..13c634a
--- /dev/null
+++ b/icons/freestyle/pluginIcons/mlist.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/music.png b/icons/freestyle/pluginIcons/music.png
new file mode 100644
index 0000000..4383ab9
--- /dev/null
+++ b/icons/freestyle/pluginIcons/music.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/noepg3.png b/icons/freestyle/pluginIcons/noepg3.png
new file mode 100644
index 0000000..3d3fc77
--- /dev/null
+++ b/icons/freestyle/pluginIcons/noepg3.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/osdteletext.png b/icons/freestyle/pluginIcons/osdteletext.png
new file mode 100644
index 0000000..195d612
--- /dev/null
+++ b/icons/freestyle/pluginIcons/osdteletext.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/pvrinput.png b/icons/freestyle/pluginIcons/pvrinput.png
new file mode 100644
index 0000000..b300426
--- /dev/null
+++ b/icons/freestyle/pluginIcons/pvrinput.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/quickepgsearch.png b/icons/freestyle/pluginIcons/quickepgsearch.png
new file mode 100644
index 0000000..bb5da32
--- /dev/null
+++ b/icons/freestyle/pluginIcons/quickepgsearch.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/radio.png b/icons/freestyle/pluginIcons/radio.png
new file mode 100644
index 0000000..30eed60
--- /dev/null
+++ b/icons/freestyle/pluginIcons/radio.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/remote.png b/icons/freestyle/pluginIcons/remote.png
new file mode 100644
index 0000000..7a5ba3b
--- /dev/null
+++ b/icons/freestyle/pluginIcons/remote.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/remotetimers.png b/icons/freestyle/pluginIcons/remotetimers.png
new file mode 100644
index 0000000..9e41a5f
--- /dev/null
+++ b/icons/freestyle/pluginIcons/remotetimers.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/rssreader.png b/icons/freestyle/pluginIcons/rssreader.png
new file mode 100644
index 0000000..931f2df
--- /dev/null
+++ b/icons/freestyle/pluginIcons/rssreader.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/sc.png b/icons/freestyle/pluginIcons/sc.png
new file mode 100644
index 0000000..b8fa9a2
--- /dev/null
+++ b/icons/freestyle/pluginIcons/sc.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/screenshot.png b/icons/freestyle/pluginIcons/screenshot.png
new file mode 100644
index 0000000..45e79ef
--- /dev/null
+++ b/icons/freestyle/pluginIcons/screenshot.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/seduatmo.png b/icons/freestyle/pluginIcons/seduatmo.png
new file mode 100644
index 0000000..e33982c
--- /dev/null
+++ b/icons/freestyle/pluginIcons/seduatmo.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/skyselect.png b/icons/freestyle/pluginIcons/skyselect.png
new file mode 100644
index 0000000..0bc9c98
--- /dev/null
+++ b/icons/freestyle/pluginIcons/skyselect.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/sleeptimer.png b/icons/freestyle/pluginIcons/sleeptimer.png
new file mode 100644
index 0000000..5485158
--- /dev/null
+++ b/icons/freestyle/pluginIcons/sleeptimer.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/softhddevice.png b/icons/freestyle/pluginIcons/softhddevice.png
new file mode 100644
index 0000000..8f46d43
--- /dev/null
+++ b/icons/freestyle/pluginIcons/softhddevice.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/streamdev-server.png b/icons/freestyle/pluginIcons/streamdev-server.png
new file mode 100644
index 0000000..0162678
--- /dev/null
+++ b/icons/freestyle/pluginIcons/streamdev-server.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/systeminfo.png b/icons/freestyle/pluginIcons/systeminfo.png
new file mode 100644
index 0000000..cae9664
--- /dev/null
+++ b/icons/freestyle/pluginIcons/systeminfo.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/targavfd.png b/icons/freestyle/pluginIcons/targavfd.png
new file mode 100644
index 0000000..0d85648
--- /dev/null
+++ b/icons/freestyle/pluginIcons/targavfd.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/trayopenng.png b/icons/freestyle/pluginIcons/trayopenng.png
new file mode 100644
index 0000000..1658b67
--- /dev/null
+++ b/icons/freestyle/pluginIcons/trayopenng.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/tvguide.png b/icons/freestyle/pluginIcons/tvguide.png
new file mode 100644
index 0000000..e387335
--- /dev/null
+++ b/icons/freestyle/pluginIcons/tvguide.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/tvm2vdr.png b/icons/freestyle/pluginIcons/tvm2vdr.png
new file mode 100644
index 0000000..01e1f41
--- /dev/null
+++ b/icons/freestyle/pluginIcons/tvm2vdr.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/undelete.png b/icons/freestyle/pluginIcons/undelete.png
new file mode 100644
index 0000000..ff603e7
--- /dev/null
+++ b/icons/freestyle/pluginIcons/undelete.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/weatherng.png b/icons/freestyle/pluginIcons/weatherng.png
new file mode 100644
index 0000000..667e9e2
--- /dev/null
+++ b/icons/freestyle/pluginIcons/weatherng.png
Binary files differ
diff --git a/icons/freestyle/pluginIcons/xml2vdr.png b/icons/freestyle/pluginIcons/xml2vdr.png
new file mode 100644
index 0000000..be16860
--- /dev/null
+++ b/icons/freestyle/pluginIcons/xml2vdr.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/Channelseparator.png b/icons/freestyle/skinIcons/Channelseparator.png
new file mode 100644
index 0000000..ad92e2a
--- /dev/null
+++ b/icons/freestyle/skinIcons/Channelseparator.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/DiskUsage.png b/icons/freestyle/skinIcons/DiskUsage.png
new file mode 100644
index 0000000..49de3be
--- /dev/null
+++ b/icons/freestyle/skinIcons/DiskUsage.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/ac3.png b/icons/freestyle/skinIcons/ac3.png
new file mode 100644
index 0000000..416c685
--- /dev/null
+++ b/icons/freestyle/skinIcons/ac3.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/activetimer.png b/icons/freestyle/skinIcons/activetimer.png
new file mode 100644
index 0000000..e944b00
--- /dev/null
+++ b/icons/freestyle/skinIcons/activetimer.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/activetimersmall.png b/icons/freestyle/skinIcons/activetimersmall.png
new file mode 100644
index 0000000..138ff35
--- /dev/null
+++ b/icons/freestyle/skinIcons/activetimersmall.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/arrowLeftChannelSep.png b/icons/freestyle/skinIcons/arrowLeftChannelSep.png
new file mode 100644
index 0000000..642cd78
--- /dev/null
+++ b/icons/freestyle/skinIcons/arrowLeftChannelSep.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/arrowRightChannelSep.png b/icons/freestyle/skinIcons/arrowRightChannelSep.png
new file mode 100644
index 0000000..1418671
--- /dev/null
+++ b/icons/freestyle/skinIcons/arrowRightChannelSep.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/channeldelimiter.png b/icons/freestyle/skinIcons/channeldelimiter.png
new file mode 100644
index 0000000..57d8f62
--- /dev/null
+++ b/icons/freestyle/skinIcons/channeldelimiter.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/channelsymbols.png b/icons/freestyle/skinIcons/channelsymbols.png
new file mode 100644
index 0000000..2ba023d
--- /dev/null
+++ b/icons/freestyle/skinIcons/channelsymbols.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/crypted.png b/icons/freestyle/skinIcons/crypted.png
new file mode 100644
index 0000000..1aec146
--- /dev/null
+++ b/icons/freestyle/skinIcons/crypted.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/daydelimiter.png b/icons/freestyle/skinIcons/daydelimiter.png
new file mode 100644
index 0000000..35a705c
--- /dev/null
+++ b/icons/freestyle/skinIcons/daydelimiter.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/discpercent.png b/icons/freestyle/skinIcons/discpercent.png
new file mode 100644
index 0000000..949fbc7
--- /dev/null
+++ b/icons/freestyle/skinIcons/discpercent.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/dolbyoff.png b/icons/freestyle/skinIcons/dolbyoff.png
new file mode 100644
index 0000000..ef4f17c
--- /dev/null
+++ b/icons/freestyle/skinIcons/dolbyoff.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/dolbyon.png b/icons/freestyle/skinIcons/dolbyon.png
new file mode 100644
index 0000000..1278abe
--- /dev/null
+++ b/icons/freestyle/skinIcons/dolbyon.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/encrypted.png b/icons/freestyle/skinIcons/encrypted.png
new file mode 100644
index 0000000..32d8d09
--- /dev/null
+++ b/icons/freestyle/skinIcons/encrypted.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/fta.png b/icons/freestyle/skinIcons/fta.png
new file mode 100644
index 0000000..55e3789
--- /dev/null
+++ b/icons/freestyle/skinIcons/fta.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/fwd.png b/icons/freestyle/skinIcons/fwd.png
new file mode 100644
index 0000000..3dea9d3
--- /dev/null
+++ b/icons/freestyle/skinIcons/fwd.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/fwdInactive.png b/icons/freestyle/skinIcons/fwdInactive.png
new file mode 100644
index 0000000..cb551c2
--- /dev/null
+++ b/icons/freestyle/skinIcons/fwdInactive.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/fwdx1.png b/icons/freestyle/skinIcons/fwdx1.png
new file mode 100644
index 0000000..599256e
--- /dev/null
+++ b/icons/freestyle/skinIcons/fwdx1.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/fwdx2.png b/icons/freestyle/skinIcons/fwdx2.png
new file mode 100644
index 0000000..3eec356
--- /dev/null
+++ b/icons/freestyle/skinIcons/fwdx2.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/fwdx3.png b/icons/freestyle/skinIcons/fwdx3.png
new file mode 100644
index 0000000..f686658
--- /dev/null
+++ b/icons/freestyle/skinIcons/fwdx3.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/hd1080i.png b/icons/freestyle/skinIcons/hd1080i.png
new file mode 100644
index 0000000..1a863a9
--- /dev/null
+++ b/icons/freestyle/skinIcons/hd1080i.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/hd720p.png b/icons/freestyle/skinIcons/hd720p.png
new file mode 100644
index 0000000..47317d8
--- /dev/null
+++ b/icons/freestyle/skinIcons/hd720p.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/newrecording.png b/icons/freestyle/skinIcons/newrecording.png
new file mode 100644
index 0000000..28cae46
--- /dev/null
+++ b/icons/freestyle/skinIcons/newrecording.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/pause.png b/icons/freestyle/skinIcons/pause.png
new file mode 100644
index 0000000..cd8cad8
--- /dev/null
+++ b/icons/freestyle/skinIcons/pause.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/pauseInactive.png b/icons/freestyle/skinIcons/pauseInactive.png
new file mode 100644
index 0000000..f9a9d94
--- /dev/null
+++ b/icons/freestyle/skinIcons/pauseInactive.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/play.png b/icons/freestyle/skinIcons/play.png
new file mode 100644
index 0000000..4cc0541
--- /dev/null
+++ b/icons/freestyle/skinIcons/play.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/playInactive.png b/icons/freestyle/skinIcons/playInactive.png
new file mode 100644
index 0000000..7fb820a
--- /dev/null
+++ b/icons/freestyle/skinIcons/playInactive.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/radio.png b/icons/freestyle/skinIcons/radio.png
new file mode 100644
index 0000000..19116d8
--- /dev/null
+++ b/icons/freestyle/skinIcons/radio.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/recfolder.png b/icons/freestyle/skinIcons/recfolder.png
new file mode 100644
index 0000000..90ab8de
--- /dev/null
+++ b/icons/freestyle/skinIcons/recfolder.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/recoff.png b/icons/freestyle/skinIcons/recoff.png
new file mode 100644
index 0000000..8b9a02a
--- /dev/null
+++ b/icons/freestyle/skinIcons/recoff.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/recon.png b/icons/freestyle/skinIcons/recon.png
new file mode 100644
index 0000000..1f3df80
--- /dev/null
+++ b/icons/freestyle/skinIcons/recon.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/recordingcutted.png b/icons/freestyle/skinIcons/recordingcutted.png
new file mode 100644
index 0000000..3000f72
--- /dev/null
+++ b/icons/freestyle/skinIcons/recordingcutted.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/recordingdatetime.png b/icons/freestyle/skinIcons/recordingdatetime.png
new file mode 100644
index 0000000..f7f9471
--- /dev/null
+++ b/icons/freestyle/skinIcons/recordingdatetime.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/rew.png b/icons/freestyle/skinIcons/rew.png
new file mode 100644
index 0000000..72408d0
--- /dev/null
+++ b/icons/freestyle/skinIcons/rew.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/rewInactive.png b/icons/freestyle/skinIcons/rewInactive.png
new file mode 100644
index 0000000..ce18386
--- /dev/null
+++ b/icons/freestyle/skinIcons/rewInactive.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/rewx1.png b/icons/freestyle/skinIcons/rewx1.png
new file mode 100644
index 0000000..333c30d
--- /dev/null
+++ b/icons/freestyle/skinIcons/rewx1.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/rewx2.png b/icons/freestyle/skinIcons/rewx2.png
new file mode 100644
index 0000000..c5d1084
--- /dev/null
+++ b/icons/freestyle/skinIcons/rewx2.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/rewx3.png b/icons/freestyle/skinIcons/rewx3.png
new file mode 100644
index 0000000..6ab7a8d
--- /dev/null
+++ b/icons/freestyle/skinIcons/rewx3.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/rss.png b/icons/freestyle/skinIcons/rss.png
new file mode 100644
index 0000000..6181dee
--- /dev/null
+++ b/icons/freestyle/skinIcons/rss.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/sd576i.png b/icons/freestyle/skinIcons/sd576i.png
new file mode 100644
index 0000000..994a7a2
--- /dev/null
+++ b/icons/freestyle/skinIcons/sd576i.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/stereo.png b/icons/freestyle/skinIcons/stereo.png
new file mode 100644
index 0000000..3c63f7f
--- /dev/null
+++ b/icons/freestyle/skinIcons/stereo.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/stereooff.png b/icons/freestyle/skinIcons/stereooff.png
new file mode 100644
index 0000000..569a342
--- /dev/null
+++ b/icons/freestyle/skinIcons/stereooff.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/stereoon.png b/icons/freestyle/skinIcons/stereoon.png
new file mode 100644
index 0000000..eb838b9
--- /dev/null
+++ b/icons/freestyle/skinIcons/stereoon.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/timerActive.png b/icons/freestyle/skinIcons/timerActive.png
new file mode 100644
index 0000000..e62fd96
--- /dev/null
+++ b/icons/freestyle/skinIcons/timerActive.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/timerInactive.png b/icons/freestyle/skinIcons/timerInactive.png
new file mode 100644
index 0000000..27c5464
--- /dev/null
+++ b/icons/freestyle/skinIcons/timerInactive.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/timerRecording.png b/icons/freestyle/skinIcons/timerRecording.png
new file mode 100644
index 0000000..56d6027
--- /dev/null
+++ b/icons/freestyle/skinIcons/timerRecording.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/tracks.png b/icons/freestyle/skinIcons/tracks.png
new file mode 100644
index 0000000..3a1e577
--- /dev/null
+++ b/icons/freestyle/skinIcons/tracks.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/txtoff.png b/icons/freestyle/skinIcons/txtoff.png
new file mode 100644
index 0000000..3b2eac3
--- /dev/null
+++ b/icons/freestyle/skinIcons/txtoff.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/txton.png b/icons/freestyle/skinIcons/txton.png
new file mode 100644
index 0000000..148f9ef
--- /dev/null
+++ b/icons/freestyle/skinIcons/txton.png
Binary files differ
diff --git a/icons/freestyle/skinIcons/vdrlogo.png b/icons/freestyle/skinIcons/vdrlogo.png
new file mode 100644
index 0000000..e168af6
--- /dev/null
+++ b/icons/freestyle/skinIcons/vdrlogo.png
Binary files differ
diff --git a/icons/iceblue/skinIcons/discpercent.png b/icons/iceblue/skinIcons/discpercent.png
deleted file mode 100644
index 1c219c5..0000000
--- a/icons/iceblue/skinIcons/discpercent.png
+++ /dev/null
Binary files differ
diff --git a/icons/iceblue/skinIcons/hd1080i.png b/icons/iceblue/skinIcons/hd1080i.png
deleted file mode 100644
index 71f4e27..0000000
--- a/icons/iceblue/skinIcons/hd1080i.png
+++ /dev/null
Binary files differ
diff --git a/icons/iceblue/skinIcons/hd720p.png b/icons/iceblue/skinIcons/hd720p.png
deleted file mode 100644
index aff3b09..0000000
--- a/icons/iceblue/skinIcons/hd720p.png
+++ /dev/null
Binary files differ
diff --git a/icons/iceblue/skinIcons/radio.png b/icons/iceblue/skinIcons/radio.png
deleted file mode 100644
index d103f7a..0000000
--- a/icons/iceblue/skinIcons/radio.png
+++ /dev/null
Binary files differ
diff --git a/icons/iceblue/skinIcons/sd576i.png b/icons/iceblue/skinIcons/sd576i.png
deleted file mode 100644
index a01c18c..0000000
--- a/icons/iceblue/skinIcons/sd576i.png
+++ /dev/null
Binary files differ
diff --git a/icons/light/skinIcons/crypted.png b/icons/light/skinIcons/crypted.png
new file mode 100644
index 0000000..1aec146
--- /dev/null
+++ b/icons/light/skinIcons/crypted.png
Binary files differ
diff --git a/icons/light/skinIcons/fta.png b/icons/light/skinIcons/fta.png
new file mode 100644
index 0000000..55e3789
--- /dev/null
+++ b/icons/light/skinIcons/fta.png
Binary files differ
diff --git a/icons/light/skinIcons/hd1080i.png b/icons/light/skinIcons/hd1080i.png
index 7a44829..1a863a9 100644
--- a/icons/light/skinIcons/hd1080i.png
+++ b/icons/light/skinIcons/hd1080i.png
Binary files differ
diff --git a/icons/light/skinIcons/hd720p.png b/icons/light/skinIcons/hd720p.png
index 5239249..47317d8 100644
--- a/icons/light/skinIcons/hd720p.png
+++ b/icons/light/skinIcons/hd720p.png
Binary files differ
diff --git a/icons/light/skinIcons/radio.png b/icons/light/skinIcons/radio.png
deleted file mode 100644
index 5200236..0000000
--- a/icons/light/skinIcons/radio.png
+++ /dev/null
Binary files differ
diff --git a/icons/light/skinIcons/recoff.png b/icons/light/skinIcons/recoff.png
new file mode 100644
index 0000000..8b9a02a
--- /dev/null
+++ b/icons/light/skinIcons/recoff.png
Binary files differ
diff --git a/icons/light/skinIcons/recon.png b/icons/light/skinIcons/recon.png
new file mode 100644
index 0000000..1f3df80
--- /dev/null
+++ b/icons/light/skinIcons/recon.png
Binary files differ
diff --git a/icons/light/skinIcons/sd576i.png b/icons/light/skinIcons/sd576i.png
index 9c965ad..994a7a2 100644
--- a/icons/light/skinIcons/sd576i.png
+++ b/icons/light/skinIcons/sd576i.png
Binary files differ
diff --git a/icons/light/skinIcons/stereooff.png b/icons/light/skinIcons/stereooff.png
new file mode 100644
index 0000000..569a342
--- /dev/null
+++ b/icons/light/skinIcons/stereooff.png
Binary files differ
diff --git a/icons/light/skinIcons/stereoon.png b/icons/light/skinIcons/stereoon.png
new file mode 100644
index 0000000..eb838b9
--- /dev/null
+++ b/icons/light/skinIcons/stereoon.png
Binary files differ
diff --git a/icons/light/skinIcons/txtoff.png b/icons/light/skinIcons/txtoff.png
new file mode 100644
index 0000000..3b2eac3
--- /dev/null
+++ b/icons/light/skinIcons/txtoff.png
Binary files differ
diff --git a/icons/light/skinIcons/txton.png b/icons/light/skinIcons/txton.png
new file mode 100644
index 0000000..148f9ef
--- /dev/null
+++ b/icons/light/skinIcons/txton.png
Binary files differ
diff --git a/icons/skinElements/buttonblue.png b/icons/skinElements/buttonblue.png
new file mode 100644
index 0000000..d00e4d2
--- /dev/null
+++ b/icons/skinElements/buttonblue.png
Binary files differ
diff --git a/icons/skinElements/buttongreen.png b/icons/skinElements/buttongreen.png
new file mode 100644
index 0000000..8c05c08
--- /dev/null
+++ b/icons/skinElements/buttongreen.png
Binary files differ
diff --git a/icons/skinElements/buttonred.png b/icons/skinElements/buttonred.png
new file mode 100644
index 0000000..9367c9b
--- /dev/null
+++ b/icons/skinElements/buttonred.png
Binary files differ
diff --git a/icons/skinElements/buttonyellow.png b/icons/skinElements/buttonyellow.png
new file mode 100644
index 0000000..aff8758
--- /dev/null
+++ b/icons/skinElements/buttonyellow.png
Binary files differ
diff --git a/icons/skinElements/channellogoback.png b/icons/skinElements/channellogoback.png
new file mode 100644
index 0000000..b0e83b1
--- /dev/null
+++ b/icons/skinElements/channellogoback.png
Binary files differ
diff --git a/icons/skinElements/displaychannelback.png b/icons/skinElements/displaychannelback.png
new file mode 100644
index 0000000..ab99d01
--- /dev/null
+++ b/icons/skinElements/displaychannelback.png
Binary files differ
diff --git a/icons/skinElements/displaychannelback_right.png b/icons/skinElements/displaychannelback_right.png
new file mode 100644
index 0000000..efe6473
--- /dev/null
+++ b/icons/skinElements/displaychannelback_right.png
Binary files differ
diff --git a/icons/skinElements/displaychanneltop.png b/icons/skinElements/displaychanneltop.png
new file mode 100644
index 0000000..5108435
--- /dev/null
+++ b/icons/skinElements/displaychanneltop.png
Binary files differ
diff --git a/icons/skinElements/displaychanneltop_right.png b/icons/skinElements/displaychanneltop_right.png
new file mode 100644
index 0000000..ede398d
--- /dev/null
+++ b/icons/skinElements/displaychanneltop_right.png
Binary files differ
diff --git a/icons/skinElements/displayreplayback.png b/icons/skinElements/displayreplayback.png
new file mode 100644
index 0000000..d72931f
--- /dev/null
+++ b/icons/skinElements/displayreplayback.png
Binary files differ
diff --git a/icons/skinElements/displayreplaytop.png b/icons/skinElements/displayreplaytop.png
new file mode 100644
index 0000000..064347e
--- /dev/null
+++ b/icons/skinElements/displayreplaytop.png
Binary files differ
diff --git a/icons/skinElements/displayvolume.png b/icons/skinElements/displayvolume.png
new file mode 100644
index 0000000..a5c4c66
--- /dev/null
+++ b/icons/skinElements/displayvolume.png
Binary files differ
diff --git a/icons/skinElements/header.png b/icons/skinElements/header.png
new file mode 100644
index 0000000..2bc19a6
--- /dev/null
+++ b/icons/skinElements/header.png
Binary files differ
diff --git a/icons/skinElements/header_mirrored.png b/icons/skinElements/header_mirrored.png
new file mode 100644
index 0000000..6475b7a
--- /dev/null
+++ b/icons/skinElements/header_mirrored.png
Binary files differ
diff --git a/icons/skinElements/menubutton.png b/icons/skinElements/menubutton.png
new file mode 100644
index 0000000..505e226
--- /dev/null
+++ b/icons/skinElements/menubutton.png
Binary files differ
diff --git a/icons/skinElements/menubuttonactive.png b/icons/skinElements/menubuttonactive.png
new file mode 100644
index 0000000..859a85a
--- /dev/null
+++ b/icons/skinElements/menubuttonactive.png
Binary files differ
diff --git a/icons/skinElements/menubuttondefault.png b/icons/skinElements/menubuttondefault.png
new file mode 100644
index 0000000..76735de
--- /dev/null
+++ b/icons/skinElements/menubuttondefault.png
Binary files differ
diff --git a/icons/skinElements/menubuttondefaultactive.png b/icons/skinElements/menubuttondefaultactive.png
new file mode 100644
index 0000000..70c0b8a
--- /dev/null
+++ b/icons/skinElements/menubuttondefaultactive.png
Binary files differ
diff --git a/icons/skinElements/menubuttontop.png b/icons/skinElements/menubuttontop.png
new file mode 100644
index 0000000..1b49cfd
--- /dev/null
+++ b/icons/skinElements/menubuttontop.png
Binary files differ
diff --git a/icons/skinElements/messageError.png b/icons/skinElements/messageError.png
new file mode 100644
index 0000000..a894992
--- /dev/null
+++ b/icons/skinElements/messageError.png
Binary files differ
diff --git a/icons/skinElements/messageInfo.png b/icons/skinElements/messageInfo.png
new file mode 100644
index 0000000..5f8e62a
--- /dev/null
+++ b/icons/skinElements/messageInfo.png
Binary files differ
diff --git a/icons/skinElements/messageStatus.png b/icons/skinElements/messageStatus.png
new file mode 100644
index 0000000..f4b83f4
--- /dev/null
+++ b/icons/skinElements/messageStatus.png
Binary files differ
diff --git a/icons/skinElements/messageWarning.png b/icons/skinElements/messageWarning.png
new file mode 100644
index 0000000..f073ed5
--- /dev/null
+++ b/icons/skinElements/messageWarning.png
Binary files differ
diff --git a/icons/skinElements/scrollbar.png b/icons/skinElements/scrollbar.png
new file mode 100644
index 0000000..f822555
--- /dev/null
+++ b/icons/skinElements/scrollbar.png
Binary files differ
diff --git a/icons/skinIcons/discpercent.png b/icons/skinIcons/discpercent.png
index 1c219c5..949fbc7 100644
--- a/icons/skinIcons/discpercent.png
+++ b/icons/skinIcons/discpercent.png
Binary files differ
diff --git a/icons/skinIcons/hd1080i.png b/icons/skinIcons/hd1080i.png
index 21351ce..b3e2bc6 100644
--- a/icons/skinIcons/hd1080i.png
+++ b/icons/skinIcons/hd1080i.png
Binary files differ
diff --git a/icons/skinIcons/hd720p.png b/icons/skinIcons/hd720p.png
index 1d91b7d..0a6024d 100644
--- a/icons/skinIcons/hd720p.png
+++ b/icons/skinIcons/hd720p.png
Binary files differ
diff --git a/icons/skinIcons/radio.png b/icons/skinIcons/radio.png
index 3a90a3e..9e9bedd 100644
--- a/icons/skinIcons/radio.png
+++ b/icons/skinIcons/radio.png
Binary files differ
diff --git a/icons/skinIcons/rss.png b/icons/skinIcons/rss.png
deleted file mode 100644
index b1c7bbe..0000000
--- a/icons/skinIcons/rss.png
+++ /dev/null
Binary files differ
diff --git a/icons/skinIcons/rssStandalone.png b/icons/skinIcons/rssStandalone.png
deleted file mode 100644
index b1c7bbe..0000000
--- a/icons/skinIcons/rssStandalone.png
+++ /dev/null
Binary files differ
diff --git a/icons/skinIcons/sd576i.png b/icons/skinIcons/sd576i.png
index 85c3657..4147ce9 100644
--- a/icons/skinIcons/sd576i.png
+++ b/icons/skinIcons/sd576i.png
Binary files differ
diff --git a/imagecache.c b/imagecache.c
index adc7afb..9b598bd 100644
--- a/imagecache.c
+++ b/imagecache.c
@@ -6,7 +6,6 @@
using namespace Magick;
cImageCache::cImageCache() : cImageMagickWrapper() {
- initComplete = false;
tempStaticLogo = NULL;
osdTheme = Setup.OSDTheme;
}
@@ -25,30 +24,35 @@ void cImageCache::CreateCache(void) {
for (int i=0; i < menuIcons.size(); i++) {
std::string iconName = menuIcons[i].first;
cPoint iconSize = menuIcons[i].second;
- LoadIcon(ctMenuIcon, iconName, iconSize.X(), iconSize.X());
+ bool success = LoadIcon(ctMenuIcon, iconName);
+ if (success)
+ InsertIntoIconCache(ctMenuIcon, iconName, iconSize.X(), iconSize.X());
}
//Skin Icons
std::vector<std::pair<std::string, sImgProperties> > skinIcons = GetSkinIcons();
for (int i=0; i < skinIcons.size(); i++) {
std::string iconName = skinIcons[i].first;
sImgProperties iconProps = skinIcons[i].second;
- LoadIcon(ctSkinIcon, iconName, iconProps.width, iconProps.height, iconProps.preserveAspect);
+ bool success = LoadIcon(ctSkinIcon, iconName);
+ if (success)
+ InsertIntoIconCache(ctSkinIcon, iconName, iconProps.width, iconProps.height, iconProps.preserveAspect);
+
}
//Channel Logos
- if (config.numLogosInitial > 0) {
+ if (config.GetValue("numLogosInitial") > 0) {
int channelsCached = 0;
for (const cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) {
- if (channelsCached >= config.numLogosInitial)
+ if (channelsCached >= config.GetValue("numLogosInitial"))
break;
if (!channel->GroupSep()) {
bool success = LoadLogo(channel);
if (success) {
channelsCached++;
- InsertIntoLogoCache(ctLogo, channel->Number());
+ InsertIntoLogoCache(ctLogo, *channel->GetChannelID().ToString());
}
success = LoadLogo(channel);
if (success) {
- InsertIntoLogoCache(ctLogoMenuItem, channel->Number());
+ InsertIntoLogoCache(ctLogoMenuItem, *channel->GetChannelID().ToString());
}
}
@@ -57,7 +61,10 @@ void cImageCache::CreateCache(void) {
}
void cImageCache::CreateCacheDelayed(void) {
- CreateBackgroundImages();
+ if (config.GetValue("displayType") == dtBlending)
+ CreateSkinElementsBlended();
+ else if (config.GetValue("displayType") == dtGraphical)
+ CreateSkinElementsGraphics();
}
bool cImageCache::ThemeChanged(void) {
@@ -79,10 +86,11 @@ cImage *cImageCache::GetMenuIcon(std::string name) {
if (hit != menuIconCache.end()) {
return (cImage*)hit->second;
} else {
- int iconWidth = config.iconHeight;
- int iconHeight = config.iconHeight;
- bool success = LoadIcon(ctMenuIcon, name, iconWidth, iconHeight);
+ int iconWidth = config.GetValue("iconHeight");
+ int iconHeight = config.GetValue("iconHeight");
+ bool success = LoadIcon(ctMenuIcon, name);
if (success) {
+ InsertIntoIconCache(ctMenuIcon, name, iconWidth, iconHeight);
hit = menuIconCache.find(name);
if (hit != menuIconCache.end()) {
return (cImage*)hit->second;
@@ -97,8 +105,9 @@ cImage *cImageCache::GetSkinIcon(std::string name, int width, int height, bool p
if (hit != skinIconCache.end()) {
return (cImage*)hit->second;
} else {
- bool success = LoadIcon(ctSkinIcon, name, width, height, preserveAspect);
+ bool success = LoadIcon(ctSkinIcon, name);
if (success) {
+ InsertIntoIconCache(ctSkinIcon, name, width, height, preserveAspect);
hit = skinIconCache.find(name);
if (hit != skinIconCache.end()) {
return (cImage*)hit->second;
@@ -108,11 +117,19 @@ cImage *cImageCache::GetSkinIcon(std::string name, int width, int height, bool p
return NULL;
}
+cImage *cImageCache::GetSkinElement(eSkinElementType type) {
+ std::map<eSkinElementType, cImage*>::iterator hit = skinElementCache.find(type);
+ if (hit != skinElementCache.end()) {
+ return (cImage*)hit->second;
+ }
+ return NULL;
+}
+
cImage *cImageCache::GetLogo(eCacheType type, const cChannel *channel) {
if (!channel)
return NULL;
- std::map<int, cImage*> *cache;
+ std::map<std::string, cImage*> *cache;
if (type == ctLogo)
cache = &logoCache;
else if (type == ctLogoMenuItem)
@@ -120,14 +137,14 @@ cImage *cImageCache::GetLogo(eCacheType type, const cChannel *channel) {
else if (type == ctLogoTimer)
cache = &logoTimerCache;
- std::map<int, cImage*>::iterator hit = cache->find(channel->Number());
+ std::map<std::string, cImage*>::iterator hit = cache->find(*channel->GetChannelID().ToString());
if (hit != cache->end()) {
return (cImage*)hit->second;
} else {
bool success = LoadLogo(channel);
if (success) {
- if (config.limitLogoCache && (cache->size() >= config.numLogosMax)) {
+ if (config.GetValue("limitLogoCache") && (cache->size() >= config.GetValue("numLogosMax"))) {
//logo cache is full, don't cache anymore
cPoint logoSize = LogoSize(type);
int width = logoSize.X();
@@ -141,8 +158,8 @@ cImage *cImageCache::GetLogo(eCacheType type, const cChannel *channel) {
return tempStaticLogo;
} else {
//add requested logo to cache
- InsertIntoLogoCache(type, channel->Number());
- hit = cache->find(channel->Number());
+ InsertIntoLogoCache(type, *channel->GetChannelID().ToString());
+ hit = cache->find(*channel->GetChannelID().ToString());
if (hit != cache->end()) {
return (cImage*)hit->second;
}
@@ -152,17 +169,6 @@ cImage *cImageCache::GetLogo(eCacheType type, const cChannel *channel) {
return NULL;
}
-cImage *cImageCache::GetBackground(eBackgroundType type) {
- if (!initComplete)
- return NULL;
- try {
- return backgroundImages[(int)type];
- } catch (...) {
- esyslog("nopacity: trying to get undefined Background Image %d", (int)type);
- }
- return NULL;
-}
-
cImage cImageCache::GetBackground(tColor back, tColor blend, int width, int height, bool flip) {
if (!flip)
CreateBackground(back, blend, width, height);
@@ -188,7 +194,7 @@ std::string cImageCache::GetCacheSize(eCacheType type) {
}
numImages = cache->size();
} else if ((type == ctLogo) || (type == ctLogoMenuItem) || (type == ctLogoTimer)) {
- std::map<int, cImage*> *cache;
+ std::map<std::string, cImage*> *cache;
if (type == ctLogo)
cache = &logoCache;
else if (type == ctLogoMenuItem)
@@ -196,17 +202,17 @@ std::string cImageCache::GetCacheSize(eCacheType type) {
else if (type == ctLogoTimer)
cache = &logoTimerCache;
- for(std::map<int, cImage*>::const_iterator it = cache->begin(); it != cache->end(); it++) {
+ for(std::map<std::string, cImage*>::const_iterator it = cache->begin(); it != cache->end(); it++) {
cImage *img = (cImage*)it->second;
sizeByte += img->Width() * img->Height() * sizeof(tColor);
}
numImages = cache->size();
- } else if (type == ctBackground) {
- for(std::vector<cImage*>::const_iterator it = backgroundImages.begin(); it != backgroundImages.end(); it++) {
- cImage *img = (cImage*)*it;
+ } else if (type == ctSkinElement) {
+ for(std::map<eSkinElementType, cImage*>::const_iterator it = skinElementCache.begin(); it != skinElementCache.end(); it++) {
+ cImage *img = (cImage*)it->second;
sizeByte += img->Width() * img->Height() * sizeof(tColor);
}
- numImages = backgroundImages.size();
+ numImages = skinElementCache.size();
}
result << numImages << " " << tr("images") << " / " << sizeByte/1024 << " KByte";
@@ -233,7 +239,7 @@ std::vector<std::pair<std::string, cPoint> > cImageCache::GetMenuIcons(void) {
mainMenuIcons.push_back("menuIcons/Miscellaneous");
mainMenuIcons.push_back("menuIcons/Plugins");
mainMenuIcons.push_back("menuIcons/Restart");
- int mainMenuIconSize = config.iconHeight;
+ int mainMenuIconSize = config.GetValue("iconHeight") - 10;
for (int i=0; i<mainMenuIcons.size(); i++) {
menuIcons.push_back(std::pair<std::string, cPoint>(mainMenuIcons[i], cPoint(mainMenuIconSize, mainMenuIconSize)));
}
@@ -254,8 +260,8 @@ std::vector<std::pair<std::string, sImgProperties> > cImageCache::GetSkinIcons(v
std::vector<std::pair<std::string, sImgProperties> > skinIcons;
//VDR Logo
sImgProperties props;
- props.width = config.menuHeaderLogoWidth;
- props.height = config.menuHeaderLogoWidth;
+ props.width = config.GetValue("menuHeaderLogoWidth");
+ props.height = config.GetValue("menuHeaderLogoWidth");
props.preserveAspect = true;
skinIcons.push_back(std::pair<std::string, sImgProperties>("skinIcons/vdrlogo", props));
//DiskUsage
@@ -267,11 +273,6 @@ std::vector<std::pair<std::string, sImgProperties> > cImageCache::GetSkinIcons(v
props.height = discUsageSize/5;
props.preserveAspect = false;
skinIcons.push_back(std::pair<std::string, sImgProperties>("skinIcons/discpercent", props));
- //RSS Feed
- int rssFeedHeight = geoManager->osdHeight * config.rssFeedHeight / 100;
- props.width = props.height = rssFeedHeight - 4;
- props.preserveAspect = true;
- skinIcons.push_back(std::pair<std::string, sImgProperties>("skinIcons/rss", props));
//menu header icons
std::vector<std::string> menuHeaderIcons;
menuHeaderIcons.push_back("menuIcons/Schedule");
@@ -280,34 +281,27 @@ std::vector<std::pair<std::string, sImgProperties> > cImageCache::GetSkinIcons(v
menuHeaderIcons.push_back("menuIcons/Recordings");
menuHeaderIcons.push_back("menuIcons/Setup");
menuHeaderIcons.push_back("menuIcons/Commands");
- props.width = config.headerIconHeight;
- props.height = config.headerIconHeight;
+ props.width = config.GetValue("headerIconHeight");
+ props.height = config.GetValue("headerIconHeight");
props.preserveAspect = true;
for (int i=0; i<menuHeaderIcons.size(); i++) {
skinIcons.push_back(std::pair<std::string, sImgProperties>(menuHeaderIcons[i], props));
}
-
- //displaychannel Icons
- int iconSize = config.statusIconSize;
- props.width = iconSize*5;
- props.height = iconSize;
- props.preserveAspect = false;
- skinIcons.push_back(std::pair<std::string, sImgProperties>("skinIcons/channelsymbols", props));
-
+
return skinIcons;
}
-bool cImageCache::LoadIcon(eCacheType type, std::string name, int width, int height, bool preserveAspect) {
+bool cImageCache::LoadIcon(eCacheType type, std::string name) {
bool success = false;
if (config.iconPathSet) {
cString iconPathTheme = cString::sprintf("%s%s/", *config.iconPath, Setup.OSDTheme);
success = LoadImage(name, *iconPathTheme, "png");
if (success) {
- InsertIntoIconCache(type, name, width, height, preserveAspect);
+ return true;
} else {
success = LoadImage(name, *config.iconPath, "png");
if (success) {
- InsertIntoIconCache(type, name, width, height, preserveAspect);
+ return true;
}
}
}
@@ -315,15 +309,15 @@ bool cImageCache::LoadIcon(eCacheType type, std::string name, int width, int hei
cString iconPathTheme = cString::sprintf("%s%s/", *config.iconPathDefault, Setup.OSDTheme);
success = LoadImage(name, *iconPathTheme, "png");
if (success) {
- InsertIntoIconCache(type, name, width, height, preserveAspect);
+ return true;
} else {
success = LoadImage(name, *config.iconPathDefault, "png");
if (success) {
- InsertIntoIconCache(type, name, width, height, preserveAspect);
+ return true;
}
}
}
- return success;
+ return false;
}
void cImageCache::InsertIntoIconCache(eCacheType type, std::string name, int width, int height, bool preserveAspect) {
@@ -331,7 +325,7 @@ void cImageCache::InsertIntoIconCache(eCacheType type, std::string name, int wid
buffer.sample(Geometry(width, height));
} else {
cString geometry = cString::sprintf("%dx%d!", width, height);
- buffer.scale(Geometry(*geometry));
+ buffer.resize(Geometry(*geometry));
}
cImage *image = CreateImage();
if (type == ctMenuIcon)
@@ -378,34 +372,34 @@ bool cImageCache::LoadLogo(const cChannel *channel) {
return false;
}
-void cImageCache::InsertIntoLogoCache(eCacheType type, int channelNumber) {
+void cImageCache::InsertIntoLogoCache(eCacheType type, std::string channelID) {
cPoint logoSize = LogoSize(type);
int width = logoSize.X();
int height = logoSize.Y();
buffer.sample(Geometry(width, height));
cImage *image = CreateImage();
if (type == ctLogo)
- logoCache.insert(std::pair<int, cImage*>(channelNumber, image));
+ logoCache.insert(std::pair<std::string, cImage*>(channelID, image));
else if (type == ctLogoMenuItem)
- logoMenuItemCache.insert(std::pair<int, cImage*>(channelNumber, image));
+ logoMenuItemCache.insert(std::pair<std::string, cImage*>(channelID, image));
else if (type == ctLogoTimer)
- logoTimerCache.insert(std::pair<int, cImage*>(channelNumber, image));
+ logoTimerCache.insert(std::pair<std::string, cImage*>(channelID, image));
}
cPoint cImageCache::LogoSize(eCacheType type) {
int width, height;
switch (type) {
case ctLogo:
- width = config.logoWidth;
- height = config.logoHeight;
+ width = geoManager->channelLogoWidth;
+ height = geoManager->channelLogoHeight;
break;
case ctLogoMenuItem:
- width = config.menuItemLogoWidth;
- height = config.menuItemLogoHeight;
+ width = config.GetValue("menuItemLogoWidth");
+ height = config.GetValue("menuItemLogoHeight");
break;
case ctLogoTimer:
- width = config.timersLogoWidth;
- height = config.timersLogoHeight;
+ width = config.GetValue("timersLogoWidth");
+ height = config.GetValue("timersLogoHeight");
break;
default:
width = 1;
@@ -414,71 +408,281 @@ cPoint cImageCache::LogoSize(eCacheType type) {
return cPoint(width, height);
}
-void cImageCache::CreateBackgroundImages(void) {
+void cImageCache::CreateSkinElementsBlended(void) {
//Default Menus
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthDefault-2, geoManager->menuItemHeightDefault-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seDefault);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthDefault-2, geoManager->menuItemHeightDefault-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seDefaultHigh);
//Main Menu
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthMain-2, geoManager->menuItemHeightMain-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seMain);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthMain-2, geoManager->menuItemHeightMain-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seMainHigh);
//Schedules Menu
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthSchedule-2, geoManager->menuItemHeightSchedule-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seSchedules);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthSchedule-2, geoManager->menuItemHeightSchedule-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seSchedulesHigh);
//Channels Menu
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthChannel-2, geoManager->menuItemHeightSchedule-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seChannels);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthChannel-2, geoManager->menuItemHeightSchedule-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seChannelsHigh);
//Recordings Menu
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthRecording-2, geoManager->menuItemHeightRecordings-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seRecordings);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthRecording-2, geoManager->menuItemHeightRecordings-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seRecordingsHigh);
//Timers Menu
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthTimer-2, geoManager->menuItemHeightSchedule-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seTimers);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthTimer-2, geoManager->menuItemHeightSchedule-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seTimersHigh);
//Setup Menu
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthSetup-2, geoManager->menuItemHeightMain-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seSetup);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthSetup-2, geoManager->menuItemHeightMain-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seSetupHigh);
//DisplayTracks
CreateBackground(Theme.Color(clrMenuItem), Theme.Color(clrMenuItemBlend), geoManager->menuItemWidthTracks-2, geoManager->menuItemHeightTracks-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seTracks);
CreateBackground(Theme.Color(clrMenuItemHigh), Theme.Color(clrMenuItemHighBlend), geoManager->menuItemWidthTracks-2, geoManager->menuItemHeightTracks-2);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seTracksHigh);
//Color Buttons
CreateBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonRed), geoManager->menuButtonWidth-4, geoManager->menuButtonHeight-4);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seButtonRed);
CreateBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonGreen), geoManager->menuButtonWidth-4, geoManager->menuButtonHeight-4);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seButtonGreen);
CreateBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonYellow), geoManager->menuButtonWidth-4, geoManager->menuButtonHeight-4);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seButtonYellow);
CreateBackground(Theme.Color(clrMenuBack), Theme.Color(clrButtonBlue), geoManager->menuButtonWidth-4, geoManager->menuButtonHeight-4);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seButtonBlue);
//Menu Header
- bool mirrorHeader = (config.menuAdjustLeft) ? false : true;
+ bool mirrorHeader = (config.GetValue("menuAdjustLeft")) ? false : true;
CreateBackground(Theme.Color(clrMenuHeaderBlend), Theme.Color(clrMenuHeader), geoManager->osdWidth, geoManager->menuHeaderHeight, mirrorHeader);
- backgroundImages.push_back(CreateImage());
+ InsertIntoSkinElementCache(seMenuHeader);
+}
+
+void cImageCache::CreateSkinElementsGraphics(void) {
+ bool success = false;
+
+ //Default Menus
+ std::string imgDefaultMenuItem = "skinElements/menubuttondefault";
+ std::string imgDefaultMenuItemActive = "skinElements/menubuttondefaultactive";
+ success = LoadIcon(ctSkinElement, imgDefaultMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seDefault, geoManager->menuItemWidthDefault, geoManager->menuItemHeightDefault);
+ success = LoadIcon(ctSkinElement, imgDefaultMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seDefaultHigh, geoManager->menuItemWidthDefault, geoManager->menuItemHeightDefault);
+
+ std::string imgMenuItem = "skinElements/menubutton";
+ std::string imgMenuItemActive = "skinElements/menubuttonactive";
+ std::string imgMenuItemTop = "skinElements/menubuttontop";
+ //Main Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seMain, geoManager->menuItemWidthMain, geoManager->menuItemHeightMain);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seMainHigh, geoManager->menuItemWidthMain, geoManager->menuItemHeightMain);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seMainTop, geoManager->menuItemWidthMain, geoManager->menuItemHeightMain);
+
+ //Setup Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seSetup, geoManager->menuItemWidthSetup, geoManager->menuItemHeightMain);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seSetupHigh, geoManager->menuItemWidthSetup, geoManager->menuItemHeightMain);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seSetupTop, geoManager->menuItemWidthSetup, geoManager->menuItemHeightMain);
+
+ //Schedules Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seSchedules, geoManager->menuItemWidthSchedule, geoManager->menuItemHeightSchedule);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seSchedulesHigh, geoManager->menuItemWidthSchedule, geoManager->menuItemHeightSchedule);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seSchedulesTop, geoManager->menuItemWidthSchedule, geoManager->menuItemHeightSchedule);
+
+ //Channels Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seChannels, geoManager->menuItemWidthChannel, geoManager->menuItemHeightSchedule);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seChannelsHigh, geoManager->menuItemWidthChannel, geoManager->menuItemHeightSchedule);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seChannelsTop, geoManager->menuItemWidthChannel, geoManager->menuItemHeightSchedule);
+
+ //Recordings Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seRecordings, geoManager->menuItemWidthRecording, geoManager->menuItemHeightRecordings);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seRecordingsHigh, geoManager->menuItemWidthRecording, geoManager->menuItemHeightRecordings);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seRecordingsTop, geoManager->menuItemWidthRecording, geoManager->menuItemHeightRecordings);
+
+ //Timers Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seTimers, geoManager->menuItemWidthTimer, geoManager->menuItemHeightSchedule);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seTimersHigh, geoManager->menuItemWidthTimer, geoManager->menuItemHeightSchedule);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seTimersTop, geoManager->menuItemWidthTimer, geoManager->menuItemHeightSchedule);
+
+ //Tracks Menu
+ success = LoadIcon(ctSkinElement, imgMenuItem);
+ if (success)
+ InsertIntoSkinElementCache(seTracks, geoManager->menuItemWidthTracks, geoManager->menuItemHeightTracks);
+ success = LoadIcon(ctSkinElement, imgMenuItemActive);
+ if (success)
+ InsertIntoSkinElementCache(seTracksHigh, geoManager->menuItemWidthTracks, geoManager->menuItemHeightTracks);
+ success = LoadIcon(ctSkinElement, imgMenuItemTop);
+ if (success)
+ InsertIntoSkinElementCache(seTracksTop, geoManager->menuItemWidthTracks, geoManager->menuItemHeightTracks);
+
+ //Color Buttons
+ std::string imgButtonRed = "skinElements/buttonred";
+ std::string imgButtonGreen = "skinElements/buttongreen";
+ std::string imgButtonYellow = "skinElements/buttonyellow";
+ std::string imgButtonBlue = "skinElements/buttonblue";
+ success = LoadIcon(ctSkinElement, imgButtonRed);
+ if (success)
+ InsertIntoSkinElementCache(seButtonRed, geoManager->menuButtonWidth, geoManager->menuButtonHeight);
+ success = LoadIcon(ctSkinElement, imgButtonGreen);
+ if (success)
+ InsertIntoSkinElementCache(seButtonGreen, geoManager->menuButtonWidth, geoManager->menuButtonHeight);
+ success = LoadIcon(ctSkinElement, imgButtonYellow);
+ if (success)
+ InsertIntoSkinElementCache(seButtonYellow, geoManager->menuButtonWidth, geoManager->menuButtonHeight);
+ success = LoadIcon(ctSkinElement, imgButtonBlue);
+ if (success)
+ InsertIntoSkinElementCache(seButtonBlue, geoManager->menuButtonWidth, geoManager->menuButtonHeight);
- initComplete = true;
+ //Menu Header
+ std::string imgHeader = "skinElements/header";
+ success = LoadIcon(ctSkinElement, imgHeader);
+ if (success)
+ InsertIntoSkinElementCache(seMenuHeader, geoManager->osdWidth, geoManager->menuHeaderHeight);
+
+ //Menu Messages Background
+ std::string msgStatus = "skinElements/messageStatus";
+ std::string msgInfo = "skinElements/messageInfo";
+ std::string msgWarning = "skinElements/messageWarning";
+ std::string msgError = "skinElements/messageError";
+ success = LoadIcon(ctSkinElement, msgStatus);
+ if (success)
+ InsertIntoSkinElementCache(seMessageMenuStatus, geoManager->menuMessageWidth, geoManager->menuMessageHeight);
+ success = LoadIcon(ctSkinElement, msgInfo);
+ if (success)
+ InsertIntoSkinElementCache(seMessageMenuInfo, geoManager->menuMessageWidth, geoManager->menuMessageHeight);
+ success = LoadIcon(ctSkinElement, msgWarning);
+ if (success)
+ InsertIntoSkinElementCache(seMessageMenuWarning, geoManager->menuMessageWidth, geoManager->menuMessageHeight);
+ success = LoadIcon(ctSkinElement, msgError);
+ if (success)
+ InsertIntoSkinElementCache(seMessageMenuError, geoManager->menuMessageWidth, geoManager->menuMessageHeight);
+ //Messages Background
+ success = LoadIcon(ctSkinElement, msgStatus);
+ if (success)
+ InsertIntoSkinElementCache(seMessageStatus, geoManager->messageWidth, geoManager->messageHeight);
+ success = LoadIcon(ctSkinElement, msgInfo);
+ if (success)
+ InsertIntoSkinElementCache(seMessageInfo, geoManager->messageWidth, geoManager->messageHeight);
+ success = LoadIcon(ctSkinElement, msgWarning);
+ if (success)
+ InsertIntoSkinElementCache(seMessageWarning, geoManager->messageWidth, geoManager->messageHeight);
+ success = LoadIcon(ctSkinElement, msgError);
+ if (success)
+ InsertIntoSkinElementCache(seMessageError, geoManager->messageWidth, geoManager->messageHeight);
+
+
+ //DisplayChannel Background and Foreground
+ std::string imgChannelBackground;
+ std::string imgChannelTop;
+ switch (config.GetValue("logoPosition")) {
+ case lpLeft:
+ imgChannelBackground = "skinElements/displaychannelback";
+ imgChannelTop = "skinElements/displaychanneltop";
+ break;
+ case lpRight:
+ imgChannelBackground = "skinElements/displaychannelback_right";
+ imgChannelTop = "skinElements/displaychanneltop_right";
+ break;
+ case lpNone:
+ imgChannelBackground = "skinElements/displayreplayback";
+ imgChannelTop = "skinElements/displayreplaytop";
+ break;
+ }
+ success = LoadIcon(ctSkinElement, imgChannelBackground);
+ if (success)
+ InsertIntoSkinElementCache(seChannelBackground, geoManager->channelWidth, geoManager->channelHeight);
+
+ success = LoadIcon(ctSkinElement, imgChannelTop);
+ if (success)
+ InsertIntoSkinElementCache(seChannelTop, geoManager->channelWidth, geoManager->channelHeight);
+
+ //ChannelLogo Background
+ std::string imgChannelLogoBack = "skinElements/channellogoback";
+ success = LoadIcon(ctSkinElement, imgChannelLogoBack);
+ if (success)
+ InsertIntoSkinElementCache(seChannelLogoBack, geoManager->channelLogoWidth, geoManager->channelLogoHeight);
+
+ //DisplayReplay Background and Foreground
+ std::string imgReplayBackground = "skinElements/displayreplayback";
+ success = LoadIcon(ctSkinElement, imgReplayBackground);
+ if (success)
+ InsertIntoSkinElementCache(seReplayBackground, geoManager->replayWidth, geoManager->replayHeight);
+ std::string imgReplayTop = "skinElements/displayreplaytop";
+ success = LoadIcon(ctSkinElement, imgReplayTop);
+ if (success)
+ InsertIntoSkinElementCache(seReplayTop, geoManager->replayWidth, geoManager->replayHeight);
+
+ //DisplayVolume Background
+ std::string imgVolumeBackground = "skinElements/displayvolume";
+ success = LoadIcon(ctSkinElement, imgVolumeBackground);
+ if (success)
+ InsertIntoSkinElementCache(seVolumeBackground, geoManager->volumeWidth, geoManager->volumeHeight);
+
+ //Scrolllbar
+ std::string imgScrollbar = "skinElements/scrollbar";
+ success = LoadIcon(ctSkinElement, imgScrollbar);
+ if (success)
+ InsertIntoSkinElementCache(seScrollbar, geoManager->menuWidthScrollbar, geoManager->menuContentHeight - 2 * geoManager->menuSpace);
+}
+
+void cImageCache::InsertIntoSkinElementCache(eSkinElementType type, int width, int height) {
+ if (width>0 && height>0) {
+ cString geometry = cString::sprintf("%dx%d!", width, height);
+ buffer.resize(Geometry(*geometry));
+ }
+ cImage *image = CreateImage();
+ skinElementCache.insert(std::pair<eSkinElementType, cImage*>(type, image));
}
void cImageCache::Clear(void) {
@@ -487,27 +691,32 @@ void cImageCache::Clear(void) {
delete img;
}
menuIconCache.clear();
+
for(std::map<std::string, cImage*>::const_iterator it = skinIconCache.begin(); it != skinIconCache.end(); it++) {
cImage *img = (cImage*)it->second;
delete img;
}
skinIconCache.clear();
- for(std::vector<cImage*>::const_iterator it = backgroundImages.begin(); it != backgroundImages.end(); it++) {
- cImage *img = (cImage*)*it;
+
+ for(std::map<eSkinElementType, cImage*>::const_iterator it = skinElementCache.begin(); it != skinElementCache.end(); it++) {
+ cImage *img = (cImage*)it->second;
delete img;
}
- backgroundImages.clear();
- for(std::map<int, cImage*>::const_iterator it = logoCache.begin(); it != logoCache.end(); it++) {
+ skinElementCache.clear();
+
+ for(std::map<std::string, cImage*>::const_iterator it = logoCache.begin(); it != logoCache.end(); it++) {
cImage *img = (cImage*)it->second;
delete img;
}
logoCache.clear();
- for(std::map<int, cImage*>::const_iterator it = logoMenuItemCache.begin(); it != logoMenuItemCache.end(); it++) {
+
+ for(std::map<std::string, cImage*>::const_iterator it = logoMenuItemCache.begin(); it != logoMenuItemCache.end(); it++) {
cImage *img = (cImage*)it->second;
delete img;
}
logoMenuItemCache.clear();
- for(std::map<int, cImage*>::const_iterator it = logoTimerCache.begin(); it != logoTimerCache.end(); it++) {
+
+ for(std::map<std::string, cImage*>::const_iterator it = logoTimerCache.begin(); it != logoTimerCache.end(); it++) {
cImage *img = (cImage*)it->second;
delete img;
}
diff --git a/imagecache.h b/imagecache.h
index f528011..b634011 100644
--- a/imagecache.h
+++ b/imagecache.h
@@ -15,31 +15,54 @@ enum eCacheType {
ctLogo,
ctLogoMenuItem,
ctLogoTimer,
- ctBackground,
+ ctSkinElement,
};
-enum eBackgroundType {
- btNone = -1,
- btDefault = 0,
- btDefaultHigh,
- btMain,
- btMainHigh,
- btSchedules,
- btSchedulesHigh,
- btChannels,
- btChannelsHigh,
- btRecordings,
- btRecordingsHigh,
- btTimers,
- btTimersHigh,
- btSetup,
- btSetupHigh,
- btTracks,
- btTracksHigh,
- btButtonRed,
- btButtonGreen,
- btButtonYellow,
- btButtonBlue,
- btMenuHeader,
+
+enum eSkinElementType {
+ seNone = -1,
+ seDefault = 0,
+ seDefaultHigh,
+ seMain,
+ seMainHigh,
+ seMainTop,
+ seSchedules,
+ seSchedulesHigh,
+ seSchedulesTop,
+ seChannels,
+ seChannelsHigh,
+ seChannelsTop,
+ seRecordings,
+ seRecordingsHigh,
+ seRecordingsTop,
+ seTimers,
+ seTimersHigh,
+ seTimersTop,
+ seSetup,
+ seSetupHigh,
+ seSetupTop,
+ seTracks,
+ seTracksHigh,
+ seTracksTop,
+ seButtonRed,
+ seButtonGreen,
+ seButtonYellow,
+ seButtonBlue,
+ seMenuHeader,
+ seChannelBackground,
+ seChannelTop,
+ seChannelLogoBack,
+ seReplayBackground,
+ seReplayTop,
+ seMessageStatus,
+ seMessageInfo,
+ seMessageWarning,
+ seMessageError,
+ seMessageMenuStatus,
+ seMessageMenuInfo,
+ seMessageMenuWarning,
+ seMessageMenuError,
+ seVolumeBackground,
+ seScrollbar,
};
struct sImgProperties {
@@ -58,28 +81,29 @@ public:
bool ThemeChanged(void);
cImage *GetMenuIcon(std::string name);
cImage *GetSkinIcon(std::string name, int width=0, int height=0, bool preserveAspect = true);
+ cImage *GetSkinElement(eSkinElementType type);
cImage *GetLogo(eCacheType type, const cChannel *channel);
- cImage *GetBackground(eBackgroundType type);
cImage GetBackground(tColor back, tColor blend, int width, int height, bool flip = false);
std::string GetCacheSize(eCacheType type);
private:
- bool initComplete;
cImage *tempStaticLogo;
std::string osdTheme;
std::map<std::string, cImage*> menuIconCache;
std::map<std::string, cImage*> skinIconCache;
- std::map<int, cImage*> logoCache;
- std::map<int, cImage*> logoMenuItemCache;
- std::map<int, cImage*> logoTimerCache;
- std::vector<cImage*> backgroundImages;
+ std::map<eSkinElementType, cImage*> skinElementCache;
+ std::map<std::string, cImage*> logoCache;
+ std::map<std::string, cImage*> logoMenuItemCache;
+ std::map<std::string, cImage*> logoTimerCache;
std::vector<std::pair<std::string, cPoint> > GetMenuIcons(void);
std::vector<std::pair<std::string, sImgProperties> > GetSkinIcons(void);
- bool LoadIcon(eCacheType type, std::string name, int width, int height, bool preserveAspect = true);
+ bool LoadIcon(eCacheType type, std::string name);
void InsertIntoIconCache(eCacheType type, std::string name, int width, int height, bool preserveAspect = true);
bool LoadLogo(const cChannel *channel);
- void InsertIntoLogoCache(eCacheType type, int channelNumber);
+ void InsertIntoLogoCache(eCacheType type, std::string channelID);
cPoint LogoSize(eCacheType type);
- void CreateBackgroundImages(void);
+ void CreateSkinElementsBlended(void);
+ void CreateSkinElementsGraphics(void);
+ void InsertIntoSkinElementCache(eSkinElementType type, int width=0, int height=0);
void Clear(void);
};
diff --git a/imageloader.c b/imageloader.c
index 8a90a90..5a9d2c0 100644
--- a/imageloader.c
+++ b/imageloader.c
@@ -16,7 +16,7 @@ cImage cImageLoader::GetImage() {
return CreateImageCopy();
}
-bool cImageLoader::LoadLogo(const char *logo, int width = config.logoWidth, int height = config.logoHeight) {
+bool cImageLoader::LoadLogo(const char *logo, int width = config.GetValue("logoWidthOriginal"), int height = config.GetValue("logoHeightOriginal")) {
if ((width == 0)||(height==0))
return false;
std::string logoLower = StrToLowerCase(logo);
@@ -44,8 +44,8 @@ bool cImageLoader::LoadLogo(const char *logo, int width = config.logoWidth, int
}
bool cImageLoader::LoadEPGImage(int eventID) {
- int width = config.epgImageWidth;
- int height = config.epgImageHeight;
+ int width = config.GetValue("epgImageWidth");
+ int height = config.GetValue("epgImageHeight");
if ((width == 0)||(height==0))
return false;
bool success = false;
@@ -64,8 +64,8 @@ bool cImageLoader::LoadEPGImage(int eventID) {
}
bool cImageLoader::LoadAdditionalEPGImage(cString name) {
- int width = config.epgImageWidthLarge;
- int height = config.epgImageHeightLarge;
+ int width = config.GetValue("epgImageWidthLarge");
+ int height = config.GetValue("epgImageHeightLarge");
if ((width == 0)||(height==0))
return false;
bool success = false;
@@ -84,8 +84,8 @@ bool cImageLoader::LoadAdditionalEPGImage(cString name) {
}
bool cImageLoader::LoadRecordingImage(cString Path) {
- int width = config.epgImageWidth;
- int height = config.epgImageHeight;
+ int width = config.GetValue("epgImageWidth");
+ int height = config.GetValue("epgImageHeight");
if ((width == 0)||(height==0))
return false;
cString recImage("");
@@ -100,8 +100,8 @@ bool cImageLoader::LoadRecordingImage(cString Path) {
}
bool cImageLoader::LoadAdditionalRecordingImage(cString path, cString name) {
- int width = config.epgImageWidthLarge;
- int height = config.epgImageHeightLarge;
+ int width = config.GetValue("epgImageWidthLarge");
+ int height = config.GetValue("epgImageHeightLarge");
if ((width == 0)||(height==0))
return false;
if (LoadImage(*name, *path, "jpg")) {
diff --git a/menudetailview.c b/menudetailview.c
index 226c373..4c0bb4e 100644
--- a/menudetailview.c
+++ b/menudetailview.c
@@ -86,8 +86,8 @@ void cNopacityMenuDetailView::DrawPoster(void) {
int posterWidthOrig;
int posterHeightOrig;
if (hasManualPoster) {
- posterWidthOrig = config.posterWidth;
- posterHeightOrig = config.posterHeight;
+ posterWidthOrig = config.GetValue("posterWidth");
+ posterHeightOrig = config.GetValue("posterHeight");
} else {
if (mediaInfo.posters.size() < 1)
return;
@@ -297,10 +297,10 @@ cNopacityMenuDetailEventView::~cNopacityMenuDetailEventView(void) {
}
void cNopacityMenuDetailEventView::SetFonts(void) {
- font = cFont::CreateFont(config.fontName, contentHeight / 25 + 3 + config.fontDetailView);
- fontSmall = cFont::CreateFont(config.fontName, contentHeight / 30 + config.fontDetailViewSmall);
- fontHeaderLarge = cFont::CreateFont(config.fontName, headerHeight / 4 + config.fontDetailViewHeaderLarge);
- fontHeader = cFont::CreateFont(config.fontName, headerHeight / 6 + config.fontDetailViewHeader);
+ font = cFont::CreateFont(config.fontName, contentHeight / 25 + 3 + config.GetValue("fontDetailView"));
+ fontSmall = cFont::CreateFont(config.fontName, contentHeight / 30 + config.GetValue("fontDetailViewSmall"));
+ fontHeaderLarge = cFont::CreateFont(config.fontName, headerHeight / 4 + config.GetValue("fontDetailViewHeaderLarge"));
+ fontHeader = cFont::CreateFont(config.fontName, headerHeight / 6 + config.GetValue("fontDetailViewHeader"));
}
void cNopacityMenuDetailEventView::SetContent(void) {
@@ -322,7 +322,7 @@ void cNopacityMenuDetailEventView::SetContent(void) {
}
}
epgText.Set(event->Description(), font, contentWidth - 2 * border);
- if (config.displayRerunsDetailEPGView) {
+ if (config.GetValue("displayRerunsDetailEPGView")) {
LoadReruns();
}
}
@@ -339,7 +339,7 @@ void cNopacityMenuDetailEventView::SetContentHeight(void) {
int heightEPG = (epgText.Lines()+1) * lineHeight;
//Height of rerun information
int heightReruns = 0;
- if (config.displayRerunsDetailEPGView) {
+ if (config.GetValue("displayRerunsDetailEPGView")) {
heightReruns = reruns.Lines() * lineHeight;
}
//Height of actor pictures
@@ -354,7 +354,7 @@ void cNopacityMenuDetailEventView::SetContentHeight(void) {
}
//Height of EPG Pictures
int heightEPGPics = 0;
- if ((config.displayAdditionalEPGPictures == 1) || ((config.displayAdditionalEPGPictures == 2) && !hasAdditionalMedia)) {
+ if ((config.GetValue("displayAdditionalEPGPictures") == 1) || ((config.GetValue("displayAdditionalEPGPictures") == 2) && !hasAdditionalMedia)) {
heightEPGPics = HeightEPGPics();
}
@@ -379,7 +379,7 @@ void cNopacityMenuDetailEventView::CreatePixmaps(void) {
pixmapHeader = osd->CreatePixmap(3, cRect(x, top, width, headerHeight));
pixmapContent = osd->CreatePixmap(3, cRect(x + contentX, top + headerHeight, contentWidth, contentHeight),
cRect(0, 0, contentWidth, contentDrawPortHeight));
- pixmapLogo = osd->CreatePixmap(4, cRect(x + border, top + max((headerHeight-config.logoHeight)/2,1), config.logoWidth, config.logoHeight));
+ pixmapLogo = osd->CreatePixmap(4, cRect(x + border, top + max((headerHeight-config.GetValue("logoHeightOriginal"))/2,1), config.GetValue("logoWidthOriginal"), config.GetValue("logoHeightOriginal")));
pixmapHeader->Fill(clrTransparent);
pixmapHeader->DrawRectangle(cRect(0, headerHeight - 2, width, 2), Theme.Color(clrMenuBorder));
@@ -397,7 +397,7 @@ void cNopacityMenuDetailEventView::Render(void) {
//draw EPG text
DrawTextWrapper(&epgText, yEPGText);
//draw reruns
- if (config.displayRerunsDetailEPGView) {
+ if (config.GetValue("displayRerunsDetailEPGView")) {
DrawTextWrapper(&reruns, yAddInf);
}
}
@@ -423,7 +423,7 @@ void cNopacityMenuDetailEventView::Action(void) {
osd->Flush();
}
//draw additional EPG Pictures
- if (((config.displayAdditionalEPGPictures == 1) || ((config.displayAdditionalEPGPictures == 2) && !hasAdditionalMedia)) && Running()) {
+ if (((config.GetValue("displayAdditionalEPGPictures") == 1) || ((config.GetValue("displayAdditionalEPGPictures") == 2) && !hasAdditionalMedia)) && Running()) {
DrawEPGPictures(yEPGPics);
osd->Flush();
}
@@ -431,7 +431,7 @@ void cNopacityMenuDetailEventView::Action(void) {
int cNopacityMenuDetailEventView::HeightEPGPics(void) {
int numPicsAvailable = 0;
- for (int i=1; i <= config.numAdditionalEPGPictures; i++) {
+ for (int i=1; i <= config.GetValue("numAdditionalEPGPictures"); i++) {
cString epgimage;
if (config.epgImagePathSet) {
epgimage = cString::sprintf("%s%d_%d.jpg", *config.epgImagePath, event->EventID(), i);
@@ -447,33 +447,33 @@ int cNopacityMenuDetailEventView::HeightEPGPics(void) {
}
}
numEPGPics = numPicsAvailable;
- int picsPerLine = contentWidth / (config.epgImageWidthLarge + border);
+ int picsPerLine = contentWidth / (config.GetValue("epgImageWidthLarge") + border);
int picLines = numPicsAvailable / picsPerLine;
if (numPicsAvailable%picsPerLine != 0)
picLines++;
- return picLines * (config.epgImageHeightLarge + border) + 2*border;
+ return picLines * (config.GetValue("epgImageHeightLarge") + border) + 2*border;
}
void cNopacityMenuDetailEventView::DrawHeader(void) {
- int logoWidth = config.logoWidth;
+ int logoWidth = config.GetValue("logoWidthOriginal");
cChannel *channel = Channels.GetByChannelID(event->ChannelID(), true);
if (channel) {
cImage *logo = imgCache->GetLogo(ctLogo, channel);
if (logo) {
- pixmapLogo->DrawImage(cPoint(0, max((headerHeight - config.logoHeight - border)/2, 0)), *logo);
+ pixmapLogo->DrawImage(cPoint(0, max((headerHeight - config.GetValue("logoHeightOriginal") - border)/2, 0)), *logo);
}
}
int widthTextHeader = width - 4 * border - logoWidth;
cImageLoader imgLoader;
if (imgLoader.LoadEPGImage(event->EventID())) {
- pixmapHeader->DrawImage(cPoint(width - config.epgImageWidth - border, (headerHeight-config.epgImageHeight)/2), imgLoader.GetImage());
- if (config.roundedCorners) {
- int radius = config.cornerRadius;
- int x = width - config.epgImageWidth - border;
- int y = (headerHeight-config.epgImageHeight)/2;
- DrawRoundedCorners(pixmapHeader, radius, x, y, config.epgImageWidth, config.epgImageHeight);
+ pixmapHeader->DrawImage(cPoint(width - config.GetValue("epgImageWidth") - border, (headerHeight-config.GetValue("epgImageHeight"))/2), imgLoader.GetImage());
+ if (config.GetValue("roundedCorners")) {
+ int radius = config.GetValue("cornerRadius");
+ int x = width - config.GetValue("epgImageWidth") - border;
+ int y = (headerHeight-config.GetValue("epgImageHeight"))/2;
+ DrawRoundedCorners(pixmapHeader, radius, x, y, config.GetValue("epgImageWidth"), config.GetValue("epgImageHeight"));
}
- widthTextHeader -= config.epgImageWidth;
+ widthTextHeader -= config.GetValue("epgImageWidth");
}
int lineHeight = fontHeaderLarge->Height();
@@ -513,8 +513,8 @@ void cNopacityMenuDetailEventView::LoadReruns(void) {
std::stringstream sstrReruns;
Epgsearch_searchresults_v1_0 data;
std::string strQuery = event->Title();
- if (config.useSubtitleRerun > 0) {
- if (config.useSubtitleRerun == 2 || !isempty(event->ShortText()))
+ if (config.GetValue("useSubtitleRerun") > 0) {
+ if (config.GetValue("useSubtitleRerun") == 2 || !isempty(event->ShortText()))
strQuery += "~";
if (!isempty(event->ShortText()))
strQuery += event->ShortText();
@@ -533,7 +533,7 @@ void cNopacityMenuDetailEventView::LoadReruns(void) {
if (list && (list->Count() > 1)) {
sstrReruns << tr("RERUNS OF THIS SHOW") << ':' << std::endl;
int i = 0;
- for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < config.numReruns; r = list->Next(r)) {
+ for (Epgsearch_searchresults_v1_0::cServiceSearchResult *r = list->First(); r && i < config.GetValue("numReruns"); r = list->Next(r)) {
if ((event->ChannelID() == r->event->ChannelID()) && (event->StartTime() == r->event->StartTime()))
continue;
i++;
@@ -558,7 +558,7 @@ void cNopacityMenuDetailEventView::LoadReruns(void) {
}
void cNopacityMenuDetailEventView::DrawEPGPictures(int height) {
- int picsPerLine = contentWidth / (config.epgImageWidthLarge + border);
+ int picsPerLine = contentWidth / (config.GetValue("epgImageWidthLarge") + border);
int currentX = border;
int currentY = height + border;
int currentPicsPerLine = 1;
@@ -567,16 +567,16 @@ void cNopacityMenuDetailEventView::DrawEPGPictures(int height) {
cString epgimage = cString::sprintf("%d_%d", event->EventID(), i);
if (imgLoader.LoadAdditionalEPGImage(epgimage)) {
pixmapContent->DrawImage(cPoint(currentX, currentY), imgLoader.GetImage());
- if (config.roundedCorners) {
- int radius = config.cornerRadius;
- DrawRoundedCorners(pixmapContent, radius, currentX, currentY, config.epgImageWidthLarge, config.epgImageHeightLarge);
+ if (config.GetValue("roundedCorners")) {
+ int radius = config.GetValue("cornerRadius");
+ DrawRoundedCorners(pixmapContent, radius, currentX, currentY, config.GetValue("epgImageWidthLarge"), config.GetValue("epgImageHeightLarge"));
}
if (currentPicsPerLine < picsPerLine) {
- currentX += config.epgImageWidthLarge + border;
+ currentX += config.GetValue("epgImageWidthLarge") + border;
currentPicsPerLine++;
} else {
currentX = border;
- currentY += config.epgImageHeightLarge + border;
+ currentY += config.GetValue("epgImageHeightLarge") + border;
currentPicsPerLine = 1;
}
} else {
@@ -607,10 +607,10 @@ cNopacityMenuDetailRecordingView::~cNopacityMenuDetailRecordingView(void) {
}
void cNopacityMenuDetailRecordingView::SetFonts(void) {
- font = cFont::CreateFont(config.fontName, contentHeight / 25 + config.fontDetailView);
- fontSmall = cFont::CreateFont(config.fontName, contentHeight / 30 + config.fontDetailViewSmall);
- fontHeaderLarge = cFont::CreateFont(config.fontName, headerHeight / 4 + config.fontDetailViewHeaderLarge);
- fontHeader = cFont::CreateFont(config.fontName, headerHeight / 6 + config.fontDetailViewHeader);
+ font = cFont::CreateFont(config.fontName, contentHeight / 25 + config.GetValue("fontDetailView"));
+ fontSmall = cFont::CreateFont(config.fontName, contentHeight / 30 + config.GetValue("fontDetailViewSmall"));
+ fontHeaderLarge = cFont::CreateFont(config.fontName, headerHeight / 4 + config.GetValue("fontDetailViewHeaderLarge"));
+ fontHeader = cFont::CreateFont(config.fontName, headerHeight / 6 + config.GetValue("fontDetailViewHeader"));
}
void cNopacityMenuDetailRecordingView::SetContent(void) {
@@ -669,7 +669,7 @@ void cNopacityMenuDetailRecordingView::SetContentHeight(void) {
}
//Height of EPG Pictures
int heightEPGPics = 0;
- if ((config.displayAdditionalRecEPGPictures == 1) || ((config.displayAdditionalRecEPGPictures == 2) && !hasAdditionalMedia)) {
+ if ((config.GetValue("displayAdditionalRecEPGPictures") == 1) || ((config.GetValue("displayAdditionalRecEPGPictures") == 2) && !hasAdditionalMedia)) {
if (LoadEPGPics())
heightEPGPics = HeightEPGPics();
}
@@ -713,7 +713,7 @@ void cNopacityMenuDetailRecordingView::Render(void) {
//draw Recording EPG text
DrawTextWrapper(&recInfo, yEPGText);
//draw additional Info
- if (config.displayRerunsDetailEPGView) {
+ if (config.GetValue("displayRerunsDetailEPGView")) {
DrawTextWrapper(&additionalInfo, yAddInf);
}
}
@@ -739,7 +739,7 @@ void cNopacityMenuDetailRecordingView::Action(void) {
osd->Flush();
}
//draw additional EPG Pictures
- if (((config.displayAdditionalRecEPGPictures == 1) || ((config.displayAdditionalRecEPGPictures == 2) && !hasAdditionalMedia)) && Running()) {
+ if (((config.GetValue("displayAdditionalRecEPGPictures") == 1) || ((config.GetValue("displayAdditionalRecEPGPictures") == 2) && !hasAdditionalMedia)) && Running()) {
DrawEPGPictures(yEPGPics);
osd->Flush();
}
@@ -762,7 +762,7 @@ bool cNopacityMenuDetailRecordingView::LoadEPGPics(void) {
picsFound++;
}
}
- if (picsFound >= config.numAdditionalRecEPGPictures)
+ if (picsFound >= config.GetValue("numAdditionalRecEPGPictures"))
break;
}
closedir(dirHandle);
@@ -774,15 +774,15 @@ bool cNopacityMenuDetailRecordingView::LoadEPGPics(void) {
int cNopacityMenuDetailRecordingView::HeightEPGPics(void) {
int numPicsAvailable = epgpics.size();
- int picsPerLine = contentWidth / (config.epgImageWidthLarge + border);
+ int picsPerLine = contentWidth / (config.GetValue("epgImageWidthLarge") + border);
int picLines = numPicsAvailable / picsPerLine;
if (numPicsAvailable%picsPerLine != 0)
picLines++;
- return picLines * (config.epgImageHeightLarge + border) + 2*border;
+ return picLines * (config.GetValue("epgImageHeightLarge") + border) + 2*border;
}
void cNopacityMenuDetailRecordingView::DrawEPGPictures(int height) {
- int picsPerLine = contentWidth / (config.epgImageWidthLarge + border);
+ int picsPerLine = contentWidth / (config.GetValue("epgImageWidthLarge") + border);
int currentX = border;
int currentY = height + border;
int currentPicsPerLine = 1;
@@ -792,16 +792,16 @@ void cNopacityMenuDetailRecordingView::DrawEPGPictures(int height) {
cString epgimage = epgpics.at(i).c_str();
if (imgLoader.LoadAdditionalRecordingImage(path, epgimage)) {
pixmapContent->DrawImage(cPoint(currentX, currentY), imgLoader.GetImage());
- if (config.roundedCorners) {
- int radius = config.cornerRadius;
- DrawRoundedCorners(pixmapContent, radius, currentX, currentY, config.epgImageWidthLarge, config.epgImageHeightLarge);
+ if (config.GetValue("roundedCorners")) {
+ int radius = config.GetValue("cornerRadius");
+ DrawRoundedCorners(pixmapContent, radius, currentX, currentY, config.GetValue("epgImageWidthLarge"), config.GetValue("epgImageHeightLarge"));
}
if (currentPicsPerLine < picsPerLine) {
- currentX += config.epgImageWidthLarge + border;
+ currentX += config.GetValue("epgImageWidthLarge") + border;
currentPicsPerLine++;
} else {
currentX = border;
- currentY += config.epgImageHeightLarge + border;
+ currentY += config.GetValue("epgImageHeightLarge") + border;
currentPicsPerLine = 1;
}
} else {
@@ -813,15 +813,15 @@ void cNopacityMenuDetailRecordingView::DrawEPGPictures(int height) {
void cNopacityMenuDetailRecordingView::DrawHeader(void) {
cImageLoader imgLoader;
int widthTextHeader = width - 2 * border;
- if ((config.displayAdditionalRecEPGPictures == 1) && imgLoader.LoadRecordingImage(recording->FileName())) {
- pixmapHeader->DrawImage(cPoint(width - config.epgImageWidth - border, (headerHeight-config.epgImageHeight)/2), imgLoader.GetImage());
- if (config.roundedCorners) {
- int radius = config.cornerRadius;
- int x = width - config.epgImageWidth - border;
- int y = (headerHeight-config.epgImageHeight)/2;
- DrawRoundedCorners(pixmapHeader, radius, x, y, config.epgImageWidth, config.epgImageHeight);
+ if ((config.GetValue("displayAdditionalRecEPGPictures") == 1) && imgLoader.LoadRecordingImage(recording->FileName())) {
+ pixmapHeader->DrawImage(cPoint(width - config.GetValue("epgImageWidth") - border, (headerHeight-config.GetValue("epgImageHeight"))/2), imgLoader.GetImage());
+ if (config.GetValue("roundedCorners")) {
+ int radius = config.GetValue("cornerRadius");
+ int x = width - config.GetValue("epgImageWidth") - border;
+ int y = (headerHeight-config.GetValue("epgImageHeight"))/2;
+ DrawRoundedCorners(pixmapHeader, radius, x, y, config.GetValue("epgImageWidth"), config.GetValue("epgImageHeight"));
}
- widthTextHeader -= config.epgImageWidth;
+ widthTextHeader -= config.GetValue("epgImageWidth");
}
int lineHeight = fontHeaderLarge->Height();
int recDuration = recording->LengthInSeconds();
@@ -1025,7 +1025,7 @@ cNopacityMenuDetailTextView::~cNopacityMenuDetailTextView(void) {
}
void cNopacityMenuDetailTextView::SetFonts(void) {
- font = cFont::CreateFont(config.fontName, contentHeight / 25 + config.fontDetailView);
+ font = cFont::CreateFont(config.fontName, contentHeight / 25 + config.GetValue("fontDetailView"));
fontSmall = NULL;
fontHeaderLarge = NULL;
fontHeader = NULL;
diff --git a/menuitem.c b/menuitem.c
index d2cf730..edaea3d 100644
--- a/menuitem.c
+++ b/menuitem.c
@@ -20,6 +20,7 @@ cNopacityMenuItem::cNopacityMenuItem(cOsd *osd, cImageCache *imgCache, const cha
tabWidth = NULL;
pixmapIcon = NULL;
pixmapTextScroller = NULL;
+ pixmapForeground = NULL;
infoTextWindow = NULL;
}
@@ -36,6 +37,9 @@ cNopacityMenuItem::~cNopacityMenuItem(void) {
if (pixmapTextScroller) {
osd->DestroyPixmap(pixmapTextScroller);
}
+ if (pixmapForeground) {
+ osd->DestroyPixmap(pixmapForeground);
+ }
if (infoTextWindow) {
delete infoTextWindow;
}
@@ -59,13 +63,17 @@ void cNopacityMenuItem::CreatePixmap() {
pixmap = osd->CreatePixmap(3, cRect(left, top + index * (height + spaceMenu), width, height));
}
+void cNopacityMenuItem::CreatePixmapForeground() {
+ pixmapForeground = osd->CreatePixmap(6, cRect(left, top + index * (height + spaceMenu), width, height));
+}
+
void cNopacityMenuItem::CreatePixmapIcon(void) {
pixmapIcon = osd->CreatePixmap(5, cRect(left, top + index * (height + spaceMenu), width, height));
pixmapIcon->Fill(clrTransparent);
}
void cNopacityMenuItem::CreatePixmapTextScroller(int totalWidth) {
- pixmapTextScroller = osd->CreatePixmap(4, cRect(left, top + index * (height + spaceMenu), width, height), cRect(0, 0, totalWidth+10, height));
+ pixmapTextScroller = osd->CreatePixmap(4, cRect(left, top + index * (height + spaceMenu), width, height), cRect(0, 0, totalWidth, height));
pixmapTextScroller->Fill(clrTransparent);
}
@@ -79,25 +87,35 @@ void cNopacityMenuItem::SetTabs(cString *tabs, int *tabWidths, int numtabs) {
numTabs = numtabs;
}
-void cNopacityMenuItem::DrawDelimiter(const char *del, const char *icon, eBackgroundType bgType) {
- pixmap->Fill(Theme.Color(clrSeparatorBorder));
- if (bgType != btNone) {
- cImage *back = imgCache->GetBackground(bgType);
+void cNopacityMenuItem::DrawDelimiter(const char *del, const char *icon, eSkinElementType seType) {
+ if ((config.GetValue("displayType") == dtBlending) && (seType != seNone)) {
+ pixmap->Fill(Theme.Color(clrSeparatorBorder));
+ cImage *back = imgCache->GetSkinElement(seType);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
- } else
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrSeparatorBorder));
+ } else if ((config.GetValue("displayType") == dtGraphical) && (seType != seNone)) {
+ cImage *back = imgCache->GetSkinElement(seType);
+ if (back)
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ else
+ pixmap->Fill(clrTransparent);
+ pixmapForeground->Fill(clrTransparent);
+ } else {
+ pixmap->Fill(Theme.Color(clrSeparatorBorder));
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), Theme.Color(clrMenuItem));
-
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrSeparatorBorder));
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrSeparatorBorder));
+ }
if (!drawn) {
- cImage *imgIcon = imgCache->GetSkinIcon(icon, config.iconHeight, config.iconHeight);
+ cImage *imgIcon = imgCache->GetSkinIcon(icon, config.GetValue("iconHeight"), config.GetValue("iconHeight"));
if (imgIcon) {
if (pixmapIcon == NULL) {
- pixmapIcon = osd->CreatePixmap(5, cRect(left, top + index * (height + spaceMenu), config.menuItemLogoWidth, config.menuItemLogoWidth));
+ pixmapIcon = osd->CreatePixmap(5, cRect(left, top + index * (height + spaceMenu), config.GetValue("menuItemLogoWidth"), config.GetValue("menuItemLogoWidth")));
pixmapIcon->Fill(clrTransparent);
}
- pixmapIcon->DrawImage(cPoint(1, (height - config.iconHeight) / 2), *imgIcon);
+ pixmapIcon->DrawImage(cPoint(1, (height - config.GetValue("iconHeight")) / 2), *imgIcon);
}
drawn = true;
}
@@ -108,23 +126,29 @@ void cNopacityMenuItem::DrawDelimiter(const char *del, const char *icon, eBackgr
if (delimiter.find_last_not_of("-") != std::string::npos)
delimiter.erase(delimiter.find_last_not_of("-")+1);
} catch (...) {}
- int x = config.iconHeight + 3;
+ int x = config.GetValue("iconHeight") + 3;
int y = (height - font->Height()) / 2;
- tColor clrFontBack = (config.doBlending)?(clrTransparent):Theme.Color(clrMenuItem);
- pixmap->DrawText(cPoint(x, y), delimiter.c_str(), Theme.Color(clrMenuFontMenuItemSep), clrFontBack, font);
+ pixmapIcon->DrawText(cPoint(x, y), delimiter.c_str(), Theme.Color(clrMenuFontMenuItemSep), clrTransparent, font);
}
void cNopacityMenuItem::Action(void) {
- bool carriageReturn = (config.scrollMode == 0) ? true : false;
+ bool carriageReturn = (config.GetValue("scrollMode") == 0) ? true : false;
int scrollDelta = 1;
- int scrollDelay = config.menuScrollDelay * 1000;
+ int scrollDelay = config.GetValue("menuScrollDelay") * 1000;
DoSleep(scrollDelay);
cPixmap::Lock();
if (Running())
SetTextFull();
cPixmap::Unlock();
int drawPortX;
- int FrameTime = config.menuScrollFrameTime;
+
+ int FrameTime = 0;
+ if (config.GetValue("menuScrollSpeed") == 1)
+ FrameTime = 50;
+ else if (config.GetValue("menuScrollSpeed") == 2)
+ FrameTime = 30;
+ else if (config.GetValue("menuScrollSpeed") == 3)
+ FrameTime = 15;
int maxX = pixmapTextScroller->DrawPort().Width() - pixmapTextScroller->ViewPort().Width();
bool doSleep = false;
while (Running()) {
@@ -171,7 +195,7 @@ void cNopacityMenuItem::DoSleep(int duration) {
}
void cNopacityMenuItem::DrawRoundedCorners(tColor borderColor) {
- int radius = config.cornerRadius;
+ int radius = config.GetValue("cornerRadius");
if (radius < 3)
return;
pixmap->DrawEllipse(cRect(0,0,radius,radius), borderColor, -2);
@@ -196,22 +220,49 @@ cNopacityMainMenuItem::~cNopacityMainMenuItem(void) {
}
void cNopacityMainMenuItem::DrawBackground(void) {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type;
+ cImage *back = NULL;
+ if ((config.GetValue("displayType") == dtBlending) || (config.GetValue("displayType") == dtGraphical)){
+ eSkinElementType type;
if (!isSetup)
- type = (current)?btMainHigh:btMain;
+ type = (current)?seMainHigh:seMain;
else
- type = (current)?btSetupHigh:btSetup;
- cImage *back = imgCache->GetBackground(type);
- if (back)
+ type = (current)?seSetupHigh:seSetup;
+ back = imgCache->GetSkinElement(type);
+ if (back) {
pixmap->DrawImage(cPoint(1, 1), *back);
+ }
+ }
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ if (back) {
+ pixmap->DrawImage(cPoint(1, 1), *back);
+ }
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ eSkinElementType menuButtonTop;
+ if (!isSetup)
+ menuButtonTop = seMainTop;
+ else
+ menuButtonTop = seSetupTop;
+ cImage *fore = imgCache->GetSkinElement(menuButtonTop);
+ if (fore) {
+ pixmapForeground->DrawImage(cPoint(0, 0), *fore);
+ } else {
+ pixmapForeground->Fill(clrTransparent);
+ }
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
std::string cNopacityMainMenuItem::items[16] = { "Schedule", "Channels", "Timers", "Recordings", "Setup", "Commands",
@@ -257,11 +308,11 @@ cString cNopacityMainMenuItem::GetIconName() {
void cNopacityMainMenuItem::CreatePixmapTextScroller(int totalWidth) {
int pixmapLeft = left + 10;
- if (config.useMenuIcons)
- pixmapLeft += config.iconHeight;
+ if (config.GetValue("useMenuIcons"))
+ pixmapLeft += config.GetValue("iconHeight");
int pixmapWidth = width - 10;
- if (config.useMenuIcons)
- pixmapWidth -= config.iconHeight;
+ if (config.GetValue("useMenuIcons"))
+ pixmapWidth -= config.GetValue("iconHeight");
int drawPortWidth = totalWidth + 10;
pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + spaceMenu), pixmapWidth, height), cRect(0, 0, drawPortWidth, height));
pixmapTextScroller->Fill(clrTransparent);
@@ -306,7 +357,7 @@ void cNopacityMainMenuItem::CreateText() {
int cNopacityMainMenuItem::CheckScrollable(bool hasIcon) {
int spaceLeft = spaceMenu;
if (hasIcon)
- spaceLeft += config.iconHeight;
+ spaceLeft += config.GetValue("iconHeight");
int totalTextWidth = width - spaceLeft;
int numberWidth = font->Width("xxx");
int textWidth = font->Width(*menuEntry);
@@ -344,17 +395,18 @@ void cNopacityMainMenuItem::SetTextShort(void) {
void cNopacityMainMenuItem::Render() {
DrawBackground();
if (selectable) {
- if (config.useMenuIcons) {
+ if (config.GetValue("useMenuIcons")) {
cString cIcon = GetIconName();
if (!drawn) {
cImage *imgIcon = imgCache->GetMenuIcon(*cIcon);
if (imgIcon)
- pixmapIcon->DrawImage(cPoint(1,1), *imgIcon);
+ //TODO
+ pixmapIcon->DrawImage(cPoint(5,5), *imgIcon);
drawn = true;
}
}
SetTextShort();
- if (current && scrollable && !Running() && config.menuScrollSpeed) {
+ if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) {
Start();
}
if (wasCurrent && !current && scrollable && Running()) {
@@ -363,7 +415,7 @@ void cNopacityMainMenuItem::Render() {
Cancel(-1);
}
} else {
- DrawDelimiter(strEntry.c_str(), "skinIcons/channeldelimiter", (config.doBlending)?btNone:(isSetup?btSetup:btMain));
+ DrawDelimiter(strEntry.c_str(), "skinIcons/channeldelimiter", (config.GetValue("displayType") != dtFlat)?seNone:(isSetup?seSetup:seMain));
}
}
@@ -393,8 +445,8 @@ void cNopacityScheduleMenuItem::CreatePixmapTextScroller(int totalWidth) {
int pixmapLeft = left;
int pixmapWidth = width;
if (Channel) {
- pixmapLeft += config.menuItemLogoWidth + 5;
- pixmapWidth = pixmapWidth - config.menuItemLogoWidth - 5;
+ pixmapLeft += config.GetValue("menuItemLogoWidth") + 5;
+ pixmapWidth = pixmapWidth - config.GetValue("menuItemLogoWidth") - 5;
}
pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + spaceMenu), pixmapWidth, height), cRect(0, 0, drawPortWidth, height));
pixmapTextScroller->Fill(clrTransparent);
@@ -421,7 +473,7 @@ void cNopacityScheduleMenuItem::CreateText() {
int cNopacityScheduleMenuItem::CheckScrollable(bool hasIcon) {
int spaceLeft = spaceMenu;
if (hasIcon)
- spaceLeft += config.menuItemLogoWidth;
+ spaceLeft += config.GetValue("menuItemLogoWidth");
int totalTextWidth = width - spaceLeft;
if (font->Width(strTitle.c_str()) > (width - spaceLeft)) {
scrollable = true;
@@ -460,8 +512,8 @@ void cNopacityScheduleMenuItem::SetTextShort(void) {
}
void cNopacityScheduleMenuItem::Render() {
- int logoWidth = config.menuItemLogoWidth;
- int logoHeight = config.menuItemLogoHeight;
+ int logoWidth = config.GetValue("menuItemLogoWidth");
+ int logoHeight = config.GetValue("menuItemLogoHeight");
textLeft = 5;
if (Channel && Channel->Name())
textLeft = logoWidth + 10;
@@ -469,13 +521,16 @@ void cNopacityScheduleMenuItem::Render() {
if (selectable) {
titleY = (height - font->Height())/2 - 2;
DrawBackground(textLeft);
- DrawRemaining(textLeft, height*7/8, width - textLeft - 10);
+ int progressBarDelta = 0;
+ if (config.GetValue("displayType") == dtGraphical && textLeft < 20)
+ progressBarDelta = 10;
+ DrawRemaining(textLeft + progressBarDelta, height*7/8, width - textLeft - 20 - progressBarDelta);
if (!drawn) {
DrawLogo(logoWidth, logoHeight);
drawn = true;
}
SetTextShort();
- if (current && scrollable && !Running() && config.menuScrollSpeed) {
+ if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) {
Start();
}
if (wasCurrent && !current && scrollable && Running()) {
@@ -489,7 +544,7 @@ void cNopacityScheduleMenuItem::Render() {
infoTextWindow = NULL;
}
if (current && Event) {
- if (config.menuSchedulesWindowMode == 0) {
+ if (config.GetValue("menuSchedulesWindowMode") == 0) {
//window mode
infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
infoTextWindow->SetGeometry(textWindow);
@@ -506,26 +561,43 @@ void cNopacityScheduleMenuItem::Render() {
}
} else {
if (Event) {
- DrawDelimiter(Event->Title(), "skinIcons/daydelimiter", (config.doBlending)?btSchedules:btNone);
+ DrawDelimiter(Event->Title(), "skinIcons/daydelimiter", (config.GetValue("displayType")!=dtFlat)?seSchedules:seNone);
} else if (Channel) {
- DrawDelimiter(Channel->Name(), "skinIcons/channeldelimiter", (config.doBlending)?btSchedules:btNone);
+ DrawDelimiter(Channel->Name(), "skinIcons/channeldelimiter", (config.GetValue("displayType")!=dtFlat)?seSchedules:seNone);
}
}
}
void cNopacityScheduleMenuItem::DrawBackground(int textLeft) {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type = (current)?btSchedulesHigh:btSchedules;
- cImage *back = imgCache->GetBackground(type);
+ eSkinElementType type = (current)?seSchedulesHigh:seSchedules;
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ cImage *back = imgCache->GetSkinElement(type);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(type);
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ cImage *fore = imgCache->GetSkinElement(seSchedulesTop);
+ if (fore) {
+ pixmapForeground->DrawImage(cPoint(0, 0), *fore);
+ } else {
+ pixmapForeground->Fill(clrTransparent);
+ }
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
+
if (TimerMatch == tmFull) {
cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/activetimer", 64, 64);
if (imgIcon)
@@ -537,8 +609,7 @@ void cNopacityScheduleMenuItem::DrawBackground(int textLeft) {
}
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
- tColor clrFontBack = (config.doBlending)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
- pixmap->DrawText(cPoint(textLeft, 3), strDateTime.c_str(), clrFont, clrFontBack, font);
+ pixmapIcon->DrawText(cPoint(textLeft, 3), strDateTime.c_str(), clrFont, clrTransparent, font);
}
void cNopacityScheduleMenuItem::DrawLogo(int logoWidth, int logoHeight) {
@@ -602,8 +673,8 @@ cNopacityChannelMenuItem::~cNopacityChannelMenuItem(void) {
}
void cNopacityChannelMenuItem::CreatePixmapTextScroller(int totalWidth) {
- int pixmapLeft = left + config.menuItemLogoWidth + 10;
- int pixmapWidth = width - config.menuItemLogoWidth - 10;
+ int pixmapLeft = left + config.GetValue("menuItemLogoWidth") + 10;
+ int pixmapWidth = width - config.GetValue("menuItemLogoWidth") - 10;
int drawPortWidth = totalWidth + 10;
pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + spaceMenu), pixmapWidth, height), cRect(0, 0, drawPortWidth, height));
pixmapTextScroller->Fill(clrTransparent);
@@ -611,7 +682,7 @@ void cNopacityChannelMenuItem::CreatePixmapTextScroller(int totalWidth) {
void cNopacityChannelMenuItem::CreateText() {
strEntry = cString::sprintf("%d %s", Channel->Number(), Channel->Name());
- if (config.menuChannelDisplayMode == 0) {
+ if (config.GetValue("menuChannelDisplayMode") == 0) {
const cSource *source = Sources.Get(Channel->Source());
if (source)
strChannelSource = cString::sprintf("%s - %s", *cSource::ToString(source->Code()), source->Description());
@@ -626,7 +697,7 @@ void cNopacityChannelMenuItem::CreateText() {
int cNopacityChannelMenuItem::CheckScrollable(bool hasIcon) {
int spaceLeft = spaceMenu;
if (hasIcon)
- spaceLeft += config.menuItemLogoWidth;
+ spaceLeft += config.GetValue("menuItemLogoWidth");
int totalTextWidth = width - spaceLeft;
if (font->Width(strEntry.c_str()) > (width - spaceLeft)) {
scrollable = true;
@@ -651,22 +722,22 @@ void cNopacityChannelMenuItem::SetTextFull(void) {
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
pixmapTextScroller->Fill(clrTransparent);
int heightChannelName = 0;
- if (config.menuChannelDisplayMode == 2) {
+ if (config.GetValue("menuChannelDisplayMode") == 2) {
heightChannelName = (height - font->Height())/2;
} else {
heightChannelName = (height/2 - font->Height())/2;
}
pixmapTextScroller->DrawText(cPoint(5, heightChannelName), strEntryFull.c_str(), clrFont, clrTransparent, font);
- if (config.menuChannelDisplayMode == 1) {
+ if (config.GetValue("menuChannelDisplayMode") == 1) {
int heightTimeInfo = 0;
int heightEPGInfo = 0;
- if (config.menuChannelDisplayTime) {
+ if (config.GetValue("menuChannelDisplayTime")) {
heightTimeInfo = height/2 + (height/4 - fontSmall->Height())/2;
heightEPGInfo = 3*height/4 + (height/4 - fontSmall->Height())/2;
} else {
heightEPGInfo = height/2 + (height/4 - fontSmall->Height())/2;
}
- if (config.menuChannelDisplayTime) {
+ if (config.GetValue("menuChannelDisplayTime")) {
pixmapTextScroller->DrawText(cPoint(5, heightTimeInfo), strTimeInfo.c_str(), clrFont, clrTransparent, fontSmall);
}
pixmapTextScroller->DrawText(cPoint(5, heightEPGInfo), strEpgInfoFull.c_str(), clrFont, clrTransparent, fontSmall);
@@ -677,22 +748,22 @@ void cNopacityChannelMenuItem::SetTextShort(void) {
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
pixmapTextScroller->Fill(clrTransparent);
int heightChannelName = 0;
- if (config.menuChannelDisplayMode == 2) {
+ if (config.GetValue("menuChannelDisplayMode") == 2) {
heightChannelName = (height - font->Height())/2;
} else {
heightChannelName = (height/2 - font->Height())/2;
}
pixmapTextScroller->DrawText(cPoint(5, heightChannelName), strEntry.c_str(), clrFont, clrTransparent, font);
- if (config.menuChannelDisplayMode == 1) {
+ if (config.GetValue("menuChannelDisplayMode") == 1) {
int heightTimeInfo = 0;
int heightEPGInfo = 0;
- if (config.menuChannelDisplayTime) {
+ if (config.GetValue("menuChannelDisplayTime")) {
heightTimeInfo = height/2 + (height/4 - fontSmall->Height())/2;
heightEPGInfo = 3*height/4 + (height/4 - fontSmall->Height())/2;
} else {
heightEPGInfo = height/2 + (height/4 - fontSmall->Height())/2;
}
- if (config.menuChannelDisplayTime) {
+ if (config.GetValue("menuChannelDisplayTime")) {
pixmapTextScroller->DrawText(cPoint(5, heightTimeInfo), strTimeInfo.c_str(), clrFont, clrTransparent, fontSmall);
}
pixmapTextScroller->DrawText(cPoint(5, heightEPGInfo), strEpgInfo.c_str(), clrFont, clrTransparent, fontSmall);
@@ -700,25 +771,40 @@ void cNopacityChannelMenuItem::SetTextShort(void) {
}
void cNopacityChannelMenuItem::DrawBackground(void) {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type = (current)?btChannelsHigh:btChannels;
- cImage *back = imgCache->GetBackground(type);
+ eSkinElementType type = (current)?seChannelsHigh:seChannels;
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ cImage *back = imgCache->GetSkinElement(type);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(type);
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ cImage *fore = imgCache->GetSkinElement(seChannelsTop);
+ if (fore) {
+ pixmapForeground->DrawImage(cPoint(0, 0), *fore);
+ } else {
+ pixmapForeground->Fill(clrTransparent);
+ }
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
- if (config.menuChannelDisplayMode == 0) {
+ if (config.GetValue("menuChannelDisplayMode") == 0) {
int encryptedSize = height/4-2;
- int sourceX = config.menuItemLogoWidth + 15;
+ int sourceX = config.GetValue("menuItemLogoWidth") + 15;
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
- tColor clrFontBack = (config.doBlending)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
- pixmap->DrawText(cPoint(sourceX, 3*height/4 + (height/4 - fontSmall->Height())/2), *strChannelInfo, clrFont, clrFontBack, fontSmall);
+ pixmapIcon->DrawText(cPoint(sourceX, 3*height/4 + (height/4 - fontSmall->Height())/2), *strChannelInfo, clrFont, clrTransparent, fontSmall);
if (Channel->Ca()) {
cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/encrypted", encryptedSize, encryptedSize);
if (imgIcon) {
@@ -726,7 +812,7 @@ void cNopacityChannelMenuItem::DrawBackground(void) {
sourceX += encryptedSize + 10;
}
}
- pixmap->DrawText(cPoint(sourceX, height/2 + (height/4 - fontSmall->Height())/2), *strChannelSource, clrFont, clrFontBack, fontSmall);
+ pixmapIcon->DrawText(cPoint(sourceX, height/2 + (height/4 - fontSmall->Height())/2), *strChannelSource, clrFont, clrTransparent, fontSmall);
}
}
@@ -772,7 +858,7 @@ std::string cNopacityChannelMenuItem::readEPG(void) {
if (event->ShortText() && (strlen(event->ShortText()) > 1))
sstrText << " ~ " << event->ShortText();
i++;
- if (i < config.numEPGEntriesChannelsMenu)
+ if (i < config.GetValue("numEPGEntriesChannelsMenu"))
sstrText << "\n";
else
break;
@@ -794,7 +880,7 @@ void cNopacityChannelMenuItem::Render() {
drawn = true;
}
SetTextShort();
- if (current && scrollable && !Running() && config.menuScrollSpeed) {
+ if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) {
Start();
}
if (wasCurrent && !current && scrollable && Running()) {
@@ -807,14 +893,14 @@ void cNopacityChannelMenuItem::Render() {
delete infoTextWindow;
infoTextWindow = NULL;
}
- if (current && Channel && (config.menuChannelDisplayMode == 0)) {
+ if (current && Channel && (config.GetValue("menuChannelDisplayMode") == 0)) {
infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
infoTextWindow->SetGeometry(textWindow);
infoTextWindow->SetText(readEPG().c_str());
infoTextWindow->Start();
}
} else { //Channelseparators
- DrawDelimiter(Channel->Name(), "skinIcons/channeldelimiter", (config.doBlending)?btChannels:btNone);
+ DrawDelimiter(Channel->Name(), "skinIcons/channeldelimiter", (config.GetValue("displayType")!=dtFlat )?seChannels:seNone);
}
}
@@ -828,8 +914,8 @@ cNopacityTimerMenuItem::~cNopacityTimerMenuItem(void) {
}
void cNopacityTimerMenuItem::CreatePixmapTextScroller(int totalWidth) {
- int pixmapLeft = left + config.menuItemLogoWidth + 10;
- int pixmapWidth = width - config.menuItemLogoWidth - 10;
+ int pixmapLeft = left + config.GetValue("menuItemLogoWidth") + 10;
+ int pixmapWidth = width - config.GetValue("menuItemLogoWidth") - 10;
int drawPortWidth = totalWidth + 10;
pixmapTextScroller = osd->CreatePixmap(4, cRect(pixmapLeft, top + index * (height + spaceMenu), pixmapWidth, height), cRect(0, 0, drawPortWidth, height));
pixmapTextScroller->Fill(clrTransparent);
@@ -871,7 +957,7 @@ std::string cNopacityTimerMenuItem::CreateDate(void) {
int cNopacityTimerMenuItem::CheckScrollable(bool hasIcon) {
int spaceLeft = spaceMenu;
if (hasIcon)
- spaceLeft += config.menuItemLogoWidth;
+ spaceLeft += config.GetValue("menuItemLogoWidth");
int totalTextWidth = width - spaceLeft;
if (font->Width(strEntry.c_str()) > (width - spaceLeft)) {
scrollable = true;
@@ -895,18 +981,34 @@ void cNopacityTimerMenuItem::SetTextShort(void) {
}
void cNopacityTimerMenuItem::DrawBackground(int textLeft) {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type = (current)?btTimersHigh:btTimers;
- cImage *back = imgCache->GetBackground(type);
+ eSkinElementType type = (current)?seTimersHigh:seTimers;
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ cImage *back = imgCache->GetSkinElement(type);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(type);
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ cImage *fore = imgCache->GetSkinElement(seTimersTop);
+ if (fore) {
+ pixmapForeground->DrawImage(cPoint(0, 0), *fore);
+ } else {
+ pixmapForeground->Fill(clrTransparent);
+ }
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
int iconSize = height/2;
cString iconName("");
bool firstDay = false;
@@ -930,23 +1032,22 @@ void cNopacityTimerMenuItem::DrawBackground(int textLeft) {
else
dateTime = strDateTime.c_str();
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
- tColor clrFontBack = (config.doBlending)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
- pixmap->DrawText(cPoint(textLeft + iconSize, (height/2 - fontSmall->Height())/2), *dateTime, clrFont, clrFontBack, fontSmall);
+ pixmapIcon->DrawText(cPoint(textLeft + iconSize, (height/2 - fontSmall->Height())/2), *dateTime, clrFont, clrTransparent, fontSmall);
}
void cNopacityTimerMenuItem::Render() {
- textLeft = config.menuItemLogoWidth + 10;
+ textLeft = config.GetValue("menuItemLogoWidth") + 10;
if (selectable) {
DrawBackground(textLeft);
- int logoWidth = config.menuItemLogoWidth;
- int logoHeight = config.menuItemLogoHeight;
+ int logoWidth = config.GetValue("menuItemLogoWidth");
+ int logoHeight = config.GetValue("menuItemLogoHeight");
if (!drawn) {
DrawLogo(logoWidth, logoHeight);
drawn = true;
}
if (!Running())
SetTextShort();
- if (current && scrollable && !Running() && config.menuScrollSpeed) {
+ if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) {
Start();
}
if (wasCurrent && !current && scrollable && Running()) {
@@ -1024,7 +1125,7 @@ void cNopacityRecordingMenuItem::CreateText() {
void cNopacityRecordingMenuItem::SetPoster(void) {
posterHeight = height - 10;
- posterWidth = config.posterWidth * ((double)posterHeight / (double)config.posterHeight);
+ posterWidth = config.GetValue("posterWidth") * ((double)posterHeight / (double)config.GetValue("posterHeight"));
//check first if manually set poster exists
cString posterFound;
cImageLoader imgLoader;
@@ -1091,24 +1192,41 @@ void cNopacityRecordingMenuItem::SetTextFull(void) {
}
void cNopacityRecordingMenuItem::DrawBackground(void) {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type = (current)?btRecordingsHigh:btRecordings;
- cImage *back = imgCache->GetBackground(type);
+ eSkinElementType type = (current)?seRecordingsHigh:seRecordings;
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ cImage *back = imgCache->GetSkinElement(type);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(type);
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ cImage *fore = imgCache->GetSkinElement(seRecordingsTop);
+ if (fore) {
+ pixmapForeground->DrawImage(cPoint(0, 0), *fore);
+ } else {
+ pixmapForeground->Fill(clrTransparent);
+ }
+
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
void cNopacityRecordingMenuItem::SetTextFullFolder(void) {
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
pixmapTextScroller->Fill(clrTransparent);
- if (config.useFolderPoster && (hasPoster || hasManualPoster))
+ if (config.GetValue("useFolderPoster") && (hasPoster || hasManualPoster))
DrawPoster();
else
DrawFolderIcon();
@@ -1135,7 +1253,7 @@ void cNopacityRecordingMenuItem::SetTextShort(void) {
void cNopacityRecordingMenuItem::SetTextShortFolder(void) {
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
pixmapTextScroller->Fill(clrTransparent);
- if (config.useFolderPoster && (hasPoster || hasManualPoster))
+ if (config.GetValue("useFolderPoster") && (hasPoster || hasManualPoster))
DrawPoster();
else
DrawFolderIcon();
@@ -1253,7 +1371,7 @@ void cNopacityRecordingMenuItem::Render() {
}
SetTextShort();
}
- if (current && scrollable && !Running() && config.menuScrollSpeed) {
+ if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) {
Start();
}
if (wasCurrent && !current && scrollable && Running()) {
@@ -1268,7 +1386,7 @@ void cNopacityRecordingMenuItem::Render() {
infoTextWindow = NULL;
}
if (current) {
- if (config.menuRecordingsWindowMode == 0) {
+ if (config.GetValue("menuRecordingsWindowMode") == 0) {
//window mode
infoTextWindow = new cNopacityTextWindow(osd, fontEPGWindow, vidWin);
infoTextWindow->SetGeometry(textWindow);
@@ -1310,18 +1428,28 @@ bool cNopacityDefaultMenuItem::CheckProgressBar(const char *text) {
}
void cNopacityDefaultMenuItem::DrawBackground(void) {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type = (current)?btDefaultHigh:btDefault;
- cImage *back = imgCache->GetBackground(type);
+ eSkinElementType type = (current)?seDefaultHigh:seDefault;
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ cImage *back = imgCache->GetSkinElement(type);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(type);
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
void cNopacityDefaultMenuItem::DrawProgressBar(int x, int width, const char *bar, tColor color) {
@@ -1410,7 +1538,7 @@ bool cNopacityDefaultMenuItem::DrawHeaderElement(void) {
*(c2 + 1) = 0;
int left = 5 + tabWidth[0];
- tColor clrFontBack = (config.doBlending)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
+ tColor clrFontBack = (config.GetValue("displayType") != dtFlat)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
pixmap->DrawText(cPoint(left, (height - font->Height()) / 2), c, Theme.Color(clrMenuFontMenuItemSep), clrFontBack, font);
return true;
}
@@ -1420,7 +1548,7 @@ bool cNopacityDefaultMenuItem::DrawHeaderElement(void) {
void cNopacityDefaultMenuItem::Render() {
DrawBackground();
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem);
- tColor clrFontBack = (config.doBlending)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
+ tColor clrFontBack = (config.GetValue("displayType") != dtFlat)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
if (!selectable && (strncmp(Text, "---", 3) == 0)) {
if (DrawHeaderElement())
return;
@@ -1458,7 +1586,7 @@ void cNopacityDefaultMenuItem::Render() {
break;
}
- if (current && scrollable && !Running() && config.menuScrollSpeed) {
+ if (current && scrollable && !Running() && config.GetValue("menuScrollSpeed")) {
Start();
}
if (wasCurrent && !current && scrollable && Running()) {
@@ -1477,19 +1605,34 @@ cNopacityTrackMenuItem::~cNopacityTrackMenuItem(void) {
}
void cNopacityTrackMenuItem::Render() {
- pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
- eBackgroundType type = (current)?btTracksHigh:btTracks;
- cImage *back = imgCache->GetBackground(type);
+ eSkinElementType type = (current)?seTracksHigh:seTracks;
+ if (config.GetValue("displayType") == dtBlending) {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
+ cImage *back = imgCache->GetSkinElement(type);
if (back)
pixmap->DrawImage(cPoint(1, 1), *back);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
+ } else if (config.GetValue("displayType") == dtGraphical) {
+ cImage *back = imgCache->GetSkinElement(type);
+ if (back) {
+ pixmap->DrawImage(cPoint(0, 0), *back);
+ } else {
+ pixmap->Fill(clrTransparent);
+ }
+ cImage *fore = imgCache->GetSkinElement(seTracksTop);
+ if (fore) {
+ pixmapForeground->DrawImage(cPoint(0, 0), *fore);
+ } else {
+ pixmapForeground->Fill(clrTransparent);
+ }
} else {
+ pixmap->Fill(Theme.Color(clrMenuBorder));
tColor col = (current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem);
pixmap->DrawRectangle(cRect(1, 1, width-2, height-2), col);
+ if (config.GetValue("roundedCorners"))
+ DrawRoundedCorners(Theme.Color(clrMenuBorder));
}
- if (config.roundedCorners)
- DrawRoundedCorners(Theme.Color(clrMenuBorder));
tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrTracksFontButtons);
- tColor clrFontBack = (config.doBlending)?(clrTransparent):((current)?Theme.Color(clrMenuItemHigh):Theme.Color(clrMenuItem));
- pixmap->DrawText(cPoint(5, (height - font->Height())/2), Text, clrFont, clrFontBack, font);
+ pixmapIcon->DrawText(cPoint(5, (height - font->Height())/2), Text, clrFont, clrTransparent, font);
}
diff --git a/menuitem.h b/menuitem.h
index a058185..8ab13a3 100644
--- a/menuitem.h
+++ b/menuitem.h
@@ -8,6 +8,7 @@ protected:
cPixmap *pixmap;
cPixmap *pixmapIcon;
cPixmap *pixmapTextScroller;
+ cPixmap *pixmapForeground;
const char *Text;
bool selectable;
bool current;
@@ -30,7 +31,7 @@ protected:
cNopacityTextWindow *infoTextWindow;
virtual void SetTextFull(void) {};
virtual void SetTextShort(void) {};
- void DrawDelimiter(const char *del, const char *icon, eBackgroundType bgType);
+ void DrawDelimiter(const char *del, const char *icon, eSkinElementType seType);
void DrawRoundedCorners(tColor borderColor);
virtual void Action(void);
void DoSleep(int duration);
@@ -38,6 +39,7 @@ public:
cNopacityMenuItem(cOsd *osd, cImageCache *imgCache, const char *text, bool sel);
virtual ~cNopacityMenuItem(void);
void CreatePixmap();
+ void CreatePixmapForeground();
void CreatePixmapIcon(void);
virtual void CreatePixmapTextScroller(int totalWidth);
void SetGeometry(int index, int top, int left, int width, int height, int spaceMenu);
diff --git a/nopacity.c b/nopacity.c
index 03e117c..39fe9da 100644
--- a/nopacity.c
+++ b/nopacity.c
@@ -5,10 +5,8 @@ static cTheme Theme;
static bool menuActive = false;
static bool firstDisplay = true;
-//ENABLE BLENDING
-#define CLR_BLENDING_ON 0xFFFFFFFF
-
//COMMON
+#define CLR_BACKGROUND_BLUE 0xFF242A38
#define CLR_TRANSBLACK 0xDD000000
#define CLR_TRANSBLACK2 0xB0000000
#define CLR_BLACK 0xFF000000
@@ -68,9 +66,6 @@ static bool firstDisplay = true;
#define CLR_MESSAGEWARNING 0x90BBBB00
#define CLR_MESSAGEERROR 0x90BB0000
-//ENABLE BLENDING
-THEME_CLR(Theme, clrDoBlending, CLR_BLENDING_ON);
-
//CHANNELS
THEME_CLR(Theme, clrChannelBackground, CLR_TRANSBLACK2);
THEME_CLR(Theme, clrChannelBackBlend, CLR_DARKBLUE2);
@@ -141,6 +136,7 @@ THEME_CLR(Theme, clrProgressBarBlend, CLR_PROGRESSBARBLEND);
THEME_CLR(Theme, clrProgressBarHigh, CLR_PROGRESSBARHIGH);
THEME_CLR(Theme, clrProgressBarBackHigh, CLR_PROGRESSBARBACKHIGH);
THEME_CLR(Theme, clrProgressBarBlendHigh, CLR_PROGRESSBARBLENDHIGH);
+THEME_CLR(Theme, clrMenuTextWindow, CLR_TRANSBLACK);
//BUTTONS
THEME_CLR(Theme, clrButtonRed, CLR_BUTTONRED);
THEME_CLR(Theme, clrButtonRedBorder, CLR_BUTTONREDBORDER);
@@ -154,15 +150,6 @@ THEME_CLR(Theme, clrButtonYellowFont, CLR_WHITE);
THEME_CLR(Theme, clrButtonBlue, CLR_BUTTONBLUE);
THEME_CLR(Theme, clrButtonBlueBorder, CLR_BUTTONBLUEBORDER);
THEME_CLR(Theme, clrButtonBlueFont, CLR_WHITE);
-//RSS Feeds
-THEME_CLR(Theme, clrRSSFeedBorder, CLR_DARKBLUE);
-THEME_CLR(Theme, clrRSSFeedTitle, CLR_BRIGHTBLUE);
-THEME_CLR(Theme, clrRSSFeedText, CLR_WHITE);
-THEME_CLR(Theme, clrRSSFeedHeaderText, CLR_WHITE);
-THEME_CLR(Theme, clrRSSFeedHeaderBack, CLR_TRANSBLACK);
-THEME_CLR(Theme, clrRSSFeedHeaderBackBlend, CLR_MENUITEMHIGHBLEND);
-THEME_CLR(Theme, clrRSSFeedBack, CLR_MENUITEM);
-THEME_CLR(Theme, clrRSSFeedBackBlend, CLR_MENUITEMBLEND);
//MESSAGES
THEME_CLR(Theme, clrMessageFontStatus, CLR_WHITE);
THEME_CLR(Theme, clrMessageFontInfo, CLR_WHITE);
@@ -185,8 +172,8 @@ cFontManager *fontManager;
#include "imagecache.c"
#include "imageloader.c"
#include "setup.c"
-#include "rssreader.c"
#include "nopacity.h"
+#include "displaychannelview.c"
#include "displaychannel.c"
#include "textwindow.c"
#include "timers.c"
@@ -203,9 +190,11 @@ cFontManager *fontManager;
cNopacity::cNopacity(cImageCache *imgCache) : cSkin("nOpacity", &::Theme) {
displayMenu = NULL;
- rssTicker = NULL;
- config.setDynamicValues();
- config.loadRssFeeds();
+ config.LoadThemeSpecificConfigs();
+ config.SetThemeSpecificDefaults();
+ config.SetThemeSetup();
+ config.SetPathes();
+ config.SetFontName();
geoManager = new cGeometryManager();
geoManager->SetGeometry();
fontManager = new cFontManager();
@@ -219,20 +208,11 @@ const char *cNopacity::Description(void) {
}
cSkinDisplayChannel *cNopacity::DisplayChannel(bool WithInfo) {
- if (rssTicker) {
- delete rssTicker;
- rssTicker = NULL;
- }
ReloadCaches();
return new cNopacityDisplayChannel(imgCache, WithInfo);
}
cSkinDisplayMenu *cNopacity::DisplayMenu(void) {
- if (rssTicker) {
- delete rssTicker;
- rssTicker = NULL;
- }
-
ReloadCaches();
cNopacityDisplayMenu *menu = new cNopacityDisplayMenu(imgCache);
displayMenu = menu;
@@ -241,91 +221,36 @@ cSkinDisplayMenu *cNopacity::DisplayMenu(void) {
}
cSkinDisplayReplay *cNopacity::DisplayReplay(bool ModeOnly) {
- if (rssTicker) {
- delete rssTicker;
- rssTicker = NULL;
- }
ReloadCaches();
return new cNopacityDisplayReplay(imgCache, ModeOnly);
}
cSkinDisplayVolume *cNopacity::DisplayVolume(void) {
- if (rssTicker) {
- delete rssTicker;
- rssTicker = NULL;
- }
ReloadCaches();
- return new cNopacityDisplayVolume;
+ return new cNopacityDisplayVolume(imgCache);
}
cSkinDisplayTracks *cNopacity::DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks) {
- if (rssTicker) {
- delete rssTicker;
- rssTicker = NULL;
- }
ReloadCaches();
return new cNopacityDisplayTracks(imgCache, Title, NumTracks, Tracks);
}
cSkinDisplayMessage *cNopacity::DisplayMessage(void) {
- if (rssTicker) {
- delete rssTicker;
- rssTicker = NULL;
- }
ReloadCaches();
return new cNopacityDisplayMessage(imgCache);
}
-void cNopacity::svdrpSwitchRss(void) {
- if (menuActive) {
- displayMenu->SwitchNextRssFeed();
- } else if (rssTicker) {
- rssTicker->SwitchNextRssFeed();
- }
-}
-
-void cNopacity::svdrpSwitchMessage(void) {
- if (menuActive) {
- displayMenu->SwitchNextRssMessage();
- } else if (rssTicker) {
- rssTicker->SwitchNextRssMessage();
- }
-}
-
-bool cNopacity::svdrpToggleStandaloneRss(void) {
- if (menuActive)
- return false;
-
- if (!rssTicker) {
- rssTicker = new cRssStandaloneTicker(imgCache);
- rssTicker->SetFeed(config.rssFeeds[config.rssFeed[0]].name);
- rssTicker->Start();
- return true;
- } else {
- delete rssTicker;
- rssTicker = NULL;
- return false;
- }
- return false;
-}
-
void cNopacity::ReloadCaches(void) {
- int start = cTimeMs::Now();
- bool change = false;
- bool reloadImgCache = false;
- if (geoManager->GeometryChanged()) {
+ if (geoManager->GeometryChanged() || imgCache->ThemeChanged()) {
+ int start = cTimeMs::Now();
+ config.LoadDefaults();
+ config.SetThemeSpecificDefaults();
+ config.SetThemeSetup();
+ config.SetFontName();
geoManager->SetGeometry();
fontManager->DeleteFonts();
fontManager->SetFonts();
- reloadImgCache = true;
- change = true;
- }
- if (imgCache->ThemeChanged()) {
- reloadImgCache = true;
- change = true;
- }
- if (reloadImgCache)
imgCache->Reload();
- if (change)
dsyslog("nopacity: Cache reloaded in %d ms", int(cTimeMs::Now()-start));
+ }
}
diff --git a/nopacity.h b/nopacity.h
index 50f2fc1..84f0ee6 100644
--- a/nopacity.h
+++ b/nopacity.h
@@ -9,7 +9,6 @@ class cNopacityDisplayMenu;
class cNopacity : public cSkin {
private:
cNopacityDisplayMenu *displayMenu;
- cRssStandaloneTicker *rssTicker;
cImageCache *imgCache;
void ReloadCaches(void);
public:
@@ -21,8 +20,5 @@ public:
virtual cSkinDisplayVolume *DisplayVolume(void);
virtual cSkinDisplayTracks *DisplayTracks(const char *Title, int NumTracks, const char * const *Tracks);
virtual cSkinDisplayMessage *DisplayMessage(void);
- void svdrpSwitchRss(void);
- void svdrpSwitchMessage(void);
- bool svdrpToggleStandaloneRss(void);
};
#endif //__NOPACITY_H
diff --git a/po/ca_ES.po b/po/ca_ES.po
index 169eca7..6222760 100644
--- a/po/ca_ES.po
+++ b/po/ca_ES.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: skinnopacity 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-10-03 11:10+0200\n"
+"POT-Creation-Date: 2013-10-20 11:15+0200\n"
"PO-Revision-Date: 2013-03-19 22:56+0100\n"
"Last-Translator: Gabychan <gbonich@gmail.com>\n"
"Language-Team: \n"
@@ -110,9 +110,6 @@ msgstr "Missatges"
msgid "Image Caching"
msgstr ""
-msgid "RSS Feeds"
-msgstr "Feeds RSS"
-
msgid "right"
msgstr "dreta"
@@ -410,12 +407,6 @@ msgstr ""
msgid "Height of manually set recording poster"
msgstr ""
-msgid "simple, one common image"
-msgstr "simple, imatge genèrica"
-
-msgid "complex, dedicated images"
-msgstr "complex, imatges pròpies"
-
msgid "transparent channel logo"
msgstr "Logo del canal transparent"
@@ -449,8 +440,11 @@ msgstr "Cantells rodons"
msgid "Channel Logo Position"
msgstr "Posició Logo Canal"
-msgid "Channel Logo Border"
-msgstr "Vora Logo Canal"
+msgid "Channel Logo original Width"
+msgstr ""
+
+msgid "Channel Logo original Height"
+msgstr ""
msgid "Kind of time display for current schedule"
msgstr "Tipus de visualització per la programació actual"
@@ -467,21 +461,15 @@ msgstr ""
msgid "Display previous and next Channel Group"
msgstr "Mostra grups de canals anterior i posterior"
-msgid "Screen Resolution Icon Size"
-msgstr "Resolució de les Icones"
-
-msgid "Status Icons Size"
-msgstr "Estat de la mida de les icones"
-
-msgid "Status Icon Style"
-msgstr "Estat de l'estil de les icones"
-
msgid "Adjust Font Size - EPG Text"
msgstr "Ajusta mida de la Font - Text EPG"
msgid "Adjust Font Size - EPG Infotext"
msgstr "Ajusta mida de la Font - Infotext EPG"
+msgid "Adjust Font Size - Channel Source Info"
+msgstr ""
+
msgid "Adjust Font Size - Channel Group"
msgstr "Ajusta mida de la Font - Grup de canals"
@@ -560,59 +548,8 @@ msgstr ""
msgid "Background Images cache"
msgstr ""
-msgid "none"
-msgstr "cap"
-
-msgid "bottom"
-msgstr "inferior"
-
-msgid "top"
-msgstr "superior"
-
-msgid "Display RSS Feed in Skin"
-msgstr "Mostra Feed RSS"
-
-msgid "Height of RSS Feed Line (Percent of OSD Height)"
-msgstr "Alçada línia Feed RSS (% Alçada OSD)"
-
-msgid "Height of standalone RSS Feed (Percent of OSD Height)"
-msgstr "Alçada del Feed RSS (% Alçada OSD)"
-
-msgid "Adjust Font Size of standalone Feed"
-msgstr "Ajusta mida de la Font Feed"
-
-msgid "Standalone RSS Feed Position"
-msgstr "Posició Feed RSS"
-
-msgid "RSS Feed 1"
-msgstr "Feed RSS 1"
-
-msgid "RSS Feed 2"
-msgstr "Feed RSS 2"
-
-msgid "RSS Feed 3"
-msgstr "Feed RSS 3"
-
-msgid "RSS Feed 4"
-msgstr "Feed RSS 4"
-
-msgid "RSS Feed 5"
-msgstr "Feed RSS 5"
-
-msgid "Scrolling Speed"
-msgstr "Velocitat de desplaçament"
-
-msgid "Scrolling Delay in s"
-msgstr "Retard desplaçament en s"
-
msgid "conflict"
msgstr "conflicte"
msgid "conflicts"
msgstr "conflictes"
-
-#~ msgid "Detail EPG View Logo Width"
-#~ msgstr "Amplada logo a vista detallada EPG"
-
-#~ msgid "Detail EPG View Logo Height"
-#~ msgstr "Alçada logo a vista detallada EPG"
diff --git a/po/de_DE.po b/po/de_DE.po
index dfb8e25..4a6992b 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: skinnopacity 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-10-03 11:10+0200\n"
+"POT-Creation-Date: 2013-10-20 11:15+0200\n"
"PO-Revision-Date: 2012-11-11 17:49+0200\n"
"Last-Translator: louis\n"
"Language-Team: \n"
@@ -107,9 +107,6 @@ msgstr "Nachrichten"
msgid "Image Caching"
msgstr "Bilder Cache"
-msgid "RSS Feeds"
-msgstr "RSS Feeds"
-
msgid "right"
msgstr "rechts"
@@ -174,7 +171,7 @@ msgid "Fade-In Time in ms (Zero for switching off fading)"
msgstr "Fade-In Zeit in ms (Null zum Abschalten)"
msgid "Menu Items Scroll Style"
-msgstr ""
+msgstr "Scrollstil der Menüelemente"
msgid "Menu Items Scrolling Speed"
msgstr "Scroll Geschwindigkeit der Menüelemente"
@@ -407,12 +404,6 @@ msgstr "Breite der manuell gesetzen Poster"
msgid "Height of manually set recording poster"
msgstr "Höhe der manuell gesetzten Poster"
-msgid "simple, one common image"
-msgstr "einfach, eine gemeinsame Graphik"
-
-msgid "complex, dedicated images"
-msgstr "aufwändig, einzelne Graphiken"
-
msgid "transparent channel logo"
msgstr "Kanallogo transparent"
@@ -446,8 +437,11 @@ msgstr "Abgerundete Ecken"
msgid "Channel Logo Position"
msgstr "Kanallogo Position"
-msgid "Channel Logo Border"
-msgstr "Rand um die Kanallogos"
+msgid "Channel Logo original Width"
+msgstr "Kanallogo original Breite"
+
+msgid "Channel Logo original Height"
+msgstr "Kanallogo original Höhe"
msgid "Kind of time display for current schedule"
msgstr "Art der Zeitanzeige für die laufende Sendung"
@@ -464,21 +458,15 @@ msgstr "Poster bzw. Fanart von TVScraper anzeigen"
msgid "Display previous and next Channel Group"
msgstr "Vorherige und nächste Kanalgruppe anzeigen"
-msgid "Screen Resolution Icon Size"
-msgstr "Größe des Icons zur Anzeige der Bildschirmauflösung"
-
-msgid "Status Icons Size"
-msgstr "Status Icon Größe"
-
-msgid "Status Icon Style"
-msgstr "Status Icon Stil"
-
msgid "Adjust Font Size - EPG Text"
msgstr "Schriftgröße anpassen - EPG Text"
msgid "Adjust Font Size - EPG Infotext"
msgstr "Schriftgröße anpassen - EPG Infotext"
+msgid "Adjust Font Size - Channel Source Info"
+msgstr "Schriftgröße anpassen - Kanalquelleninfo"
+
msgid "Adjust Font Size - Channel Group"
msgstr "Schriftgräße Anpassen - Kanalgruppen"
@@ -557,59 +545,8 @@ msgstr "Timer Logo Cache"
msgid "Background Images cache"
msgstr "Hintergrundbilder Cache"
-msgid "none"
-msgstr "keiner"
-
-msgid "bottom"
-msgstr "unten"
-
-msgid "top"
-msgstr "oben"
-
-msgid "Display RSS Feed in Skin"
-msgstr "RSS Feed im Skin anzeigen"
-
-msgid "Height of RSS Feed Line (Percent of OSD Height)"
-msgstr "Höhe des RSS Feeds (% der OSD Höhe)"
-
-msgid "Height of standalone RSS Feed (Percent of OSD Height)"
-msgstr "Höhe des Standalone RSS Feeds (% der OSD Höhe)"
-
-msgid "Adjust Font Size of standalone Feed"
-msgstr "Schriftgröße des standalone Feeds anpassen"
-
-msgid "Standalone RSS Feed Position"
-msgstr "Position des standalone Feeds"
-
-msgid "RSS Feed 1"
-msgstr "RSS Feed 1"
-
-msgid "RSS Feed 2"
-msgstr "RSS Feed 2"
-
-msgid "RSS Feed 3"
-msgstr "RSS Feed 3"
-
-msgid "RSS Feed 4"
-msgstr "RSS Feed 4"
-
-msgid "RSS Feed 5"
-msgstr "RSS Feed 5"
-
-msgid "Scrolling Speed"
-msgstr "Scroll Geschwindigkeit"
-
-msgid "Scrolling Delay in s"
-msgstr "Scroll Verzögerung in s"
-
msgid "conflict"
msgstr "Konflikt"
msgid "conflicts"
msgstr "Konflikte"
-
-#~ msgid "Detail EPG View Logo Width"
-#~ msgstr "Breite der Kanallogos in der EPG Detailanzeige"
-
-#~ msgid "Detail EPG View Logo Height"
-#~ msgstr "Höhe der Kanallogos in der EPG Detailanzeige"
diff --git a/po/it_IT.po b/po/it_IT.po
index 382f810..a8330a6 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: skinnopacity 0.0.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-10-03 11:10+0200\n"
+"POT-Creation-Date: 2013-10-20 11:15+0200\n"
"PO-Revision-Date: 2013-03-19 22:56+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: \n"
@@ -110,9 +110,6 @@ msgstr "Messaggi"
msgid "Image Caching"
msgstr ""
-msgid "RSS Feeds"
-msgstr ""
-
msgid "right"
msgstr "destra"
@@ -410,12 +407,6 @@ msgstr ""
msgid "Height of manually set recording poster"
msgstr ""
-msgid "simple, one common image"
-msgstr ""
-
-msgid "complex, dedicated images"
-msgstr ""
-
msgid "transparent channel logo"
msgstr ""
@@ -449,8 +440,11 @@ msgstr ""
msgid "Channel Logo Position"
msgstr "Posizione logo canale"
-msgid "Channel Logo Border"
-msgstr "Bordo logo canale"
+msgid "Channel Logo original Width"
+msgstr ""
+
+msgid "Channel Logo original Height"
+msgstr ""
msgid "Kind of time display for current schedule"
msgstr ""
@@ -467,21 +461,15 @@ msgstr ""
msgid "Display previous and next Channel Group"
msgstr ""
-msgid "Screen Resolution Icon Size"
-msgstr "Dim. icona risoluzione schermo"
-
-msgid "Status Icons Size"
-msgstr "Dim. icone stato"
-
-msgid "Status Icon Style"
-msgstr ""
-
msgid "Adjust Font Size - EPG Text"
msgstr "Adatta dim. caratteri - Testo EPG"
msgid "Adjust Font Size - EPG Infotext"
msgstr "Adatta dim. caratteri - Info testo EPG"
+msgid "Adjust Font Size - Channel Source Info"
+msgstr ""
+
msgid "Adjust Font Size - Channel Group"
msgstr ""
@@ -560,59 +548,8 @@ msgstr ""
msgid "Background Images cache"
msgstr ""
-msgid "none"
-msgstr ""
-
-msgid "bottom"
-msgstr ""
-
-msgid "top"
-msgstr ""
-
-msgid "Display RSS Feed in Skin"
-msgstr ""
-
-msgid "Height of RSS Feed Line (Percent of OSD Height)"
-msgstr ""
-
-msgid "Height of standalone RSS Feed (Percent of OSD Height)"
-msgstr ""
-
-msgid "Adjust Font Size of standalone Feed"
-msgstr ""
-
-msgid "Standalone RSS Feed Position"
-msgstr ""
-
-msgid "RSS Feed 1"
-msgstr ""
-
-msgid "RSS Feed 2"
-msgstr ""
-
-msgid "RSS Feed 3"
-msgstr ""
-
-msgid "RSS Feed 4"
-msgstr ""
-
-msgid "RSS Feed 5"
-msgstr ""
-
-msgid "Scrolling Speed"
-msgstr ""
-
-msgid "Scrolling Delay in s"
-msgstr ""
-
msgid "conflict"
msgstr "conflitto"
msgid "conflicts"
msgstr "conflitti"
-
-#~ msgid "Detail EPG View Logo Width"
-#~ msgstr "Larghezza logo vista dettagli EPG"
-
-#~ msgid "Detail EPG View Logo Height"
-#~ msgstr "Altezza logo vista dettagli EPG"
diff --git a/po/sk_SK.po b/po/sk_SK.po
index 62a7c3f..89fcffc 100644
--- a/po/sk_SK.po
+++ b/po/sk_SK.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinnopacity\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-10-03 11:10+0200\n"
+"POT-Creation-Date: 2013-10-20 11:15+0200\n"
"PO-Revision-Date: 2013-09-16 19:34+0100\n"
"Last-Translator: Milan Hrala <hrala.milan@gmail.com>\n"
"Language-Team: \n"
@@ -107,9 +107,6 @@ msgstr "Správy"
msgid "Image Caching"
msgstr ""
-msgid "RSS Feeds"
-msgstr "RSS èítaèky"
-
msgid "right"
msgstr "vpravo"
@@ -407,12 +404,6 @@ msgstr "Ruène nastavi» ¹írku plagátov nahrávok"
msgid "Height of manually set recording poster"
msgstr "Ruène nastavi» vý¹ku plagátov nahrávok"
-msgid "simple, one common image"
-msgstr "jednoduchý, jeden spoloèný obrázok"
-
-msgid "complex, dedicated images"
-msgstr "komplexné, ¹pecializované obrázky"
-
msgid "transparent channel logo"
msgstr "priesvitné logo kanálu"
@@ -446,8 +437,11 @@ msgstr "Zaoblené rohy"
msgid "Channel Logo Position"
msgstr "Pozícia loga kanálu"
-msgid "Channel Logo Border"
-msgstr "Okraj loga kanálu"
+msgid "Channel Logo original Width"
+msgstr ""
+
+msgid "Channel Logo original Height"
+msgstr ""
msgid "Kind of time display for current schedule"
msgstr "Druh zobrazenia èasu pre aktuálnu reláciu"
@@ -464,21 +458,15 @@ msgstr "Zobrazenie plagátu alebo Fanartu z TVScraper"
msgid "Display previous and next Channel Group"
msgstr "Zobrazi» predchádzajúcu a nasledujúcu skupinu kanálu"
-msgid "Screen Resolution Icon Size"
-msgstr "Veµkos» ikony rozlí¹enia obrazovky"
-
-msgid "Status Icons Size"
-msgstr "Veµkos» ikon panelu úloh"
-
-msgid "Status Icon Style"
-msgstr "©týl stavovej ikony"
-
msgid "Adjust Font Size - EPG Text"
msgstr "Nastavenie veµkosti písma - EPG text"
msgid "Adjust Font Size - EPG Infotext"
msgstr "Nastavenie veµkosti písma - EPG informaèný text"
+msgid "Adjust Font Size - Channel Source Info"
+msgstr ""
+
msgid "Adjust Font Size - Channel Group"
msgstr "Nastavenie veµkosti písma - Skupina kanálu"
@@ -557,59 +545,8 @@ msgstr ""
msgid "Background Images cache"
msgstr ""
-msgid "none"
-msgstr "¾iadny"
-
-msgid "bottom"
-msgstr "naspodku"
-
-msgid "top"
-msgstr "navrchu"
-
-msgid "Display RSS Feed in Skin"
-msgstr "Zobrazi» RSS èítaèku"
-
-msgid "Height of RSS Feed Line (Percent of OSD Height)"
-msgstr "Vý¹ka riadku RSS èítaèky (Percento z OSD vý¹ky)"
-
-msgid "Height of standalone RSS Feed (Percent of OSD Height)"
-msgstr "Vý¹ka RSS èítaèky (Percento z OSD vý¹ky)"
-
-msgid "Adjust Font Size of standalone Feed"
-msgstr "Prispôsobenie veµkosti písma èítaèky"
-
-msgid "Standalone RSS Feed Position"
-msgstr "Pozícia RSS èítaèky"
-
-msgid "RSS Feed 1"
-msgstr "RSS èítaèka 1"
-
-msgid "RSS Feed 2"
-msgstr "RSS èítaèka 2"
-
-msgid "RSS Feed 3"
-msgstr "RSS èítaèka 3"
-
-msgid "RSS Feed 4"
-msgstr "RSS èítaèka 4"
-
-msgid "RSS Feed 5"
-msgstr "RSS èítaèka 5"
-
-msgid "Scrolling Speed"
-msgstr "Rýchlos» rolovania"
-
-msgid "Scrolling Delay in s"
-msgstr "Preru¹enie rolovania v s"
-
msgid "conflict"
msgstr "konflikt"
msgid "conflicts"
msgstr "konflikty"
-
-#~ msgid "Detail EPG View Logo Width"
-#~ msgstr "©írka loga v podrobnom zobrazení EPG"
-
-#~ msgid "Detail EPG View Logo Height"
-#~ msgstr "Vý¹ka loga v podrobnom zobrazení EPG"
diff --git a/rssreader.c b/rssreader.c
deleted file mode 100644
index 44a4c5a..0000000
--- a/rssreader.c
+++ /dev/null
@@ -1,359 +0,0 @@
-#include "rssreader.h"
-
-static size_t WriteXMLMemoryCallback(void* pointer, size_t size, size_t nmemb, void* xmlData) {
- size_t realsize = size * nmemb;
- struct XMLMemoryStruct* memStruct = (struct XMLMemoryStruct*)xmlData;
- if (memStruct->memory)
- memStruct->memory = (char*)realloc(memStruct->memory, memStruct->size + realsize + 1);
- else
- memStruct->memory = (char*)malloc(memStruct->size + realsize + 1);
- if (memStruct->memory) {
- memcpy (&(memStruct->memory[memStruct->size]), pointer, realsize);
- memStruct->size += realsize;
- memStruct->memory[memStruct->size] = 0;
- }
- return realsize;
-}
-
-cRssReader::cRssReader(cOsd *osd, cFont *font, cPoint position, cPoint size) {
- this->osd = osd;
- this->font = font;
- pixmap = NULL;
-
- x = position.X();
- y = position.Y();
-
- width = size.X();
- height = size.Y();
-
- xmlData.memory = 0;
- xmlData.size = 0;
-
- useProxy = false;
- httpproxy = "";
-
- separator = " +++ ";
- currentElement = 0;
- switchToNextMessage = false;
-}
-
-cRssReader::~cRssReader() {
- osd->DestroyPixmap(pixmap);
-}
-
-int cRssReader::readRssURL(const char *url) {
- CURL* my_curl_handle;
- long code;
- if (xmlData.memory)
- free(xmlData.memory);
- xmlData.memory = 0;
- xmlData.size = 0;
- if (curl_global_init(CURL_GLOBAL_ALL) != 0) {
- esyslog("nopacity: Error, something went wrong with curl_global_init()");
- return -1;
- }
- my_curl_handle = curl_easy_init();
- if (!my_curl_handle) {
- esyslog("nopacity: Error, unable to get handle from curl_easy_init()");
- return -1;
- }
- if (useProxy) {
- curl_easy_setopt(my_curl_handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
- curl_easy_setopt(my_curl_handle, CURLOPT_PROXY, httpproxy.c_str()); // Specify HTTP proxy
- }
- curl_easy_setopt(my_curl_handle, CURLOPT_URL, url); // Specify URL to get
- curl_easy_setopt(my_curl_handle, CURLOPT_FOLLOWLOCATION, 0); // don't follow redirects
- curl_easy_setopt(my_curl_handle, CURLOPT_WRITEFUNCTION, WriteXMLMemoryCallback); // Send all data to this function
- curl_easy_setopt(my_curl_handle, CURLOPT_WRITEDATA, (void*)&xmlData); // Pass our 'data' struct to the callback function
- curl_easy_setopt(my_curl_handle, CURLOPT_MAXFILESIZE, 1024*1024); // Set maximum file size to get (bytes)
- curl_easy_setopt(my_curl_handle, CURLOPT_NOPROGRESS, 1); // No progress meter
- curl_easy_setopt(my_curl_handle, CURLOPT_NOSIGNAL, 1); // No signaling
- curl_easy_setopt(my_curl_handle, CURLOPT_TIMEOUT, 30); // Set timeout to 30 seconds
- curl_easy_setopt(my_curl_handle, CURLOPT_USERAGENT, NOPACITY_USERAGENT); // Some servers don't like requests that are made without a user-agent field
-
- if (curl_easy_perform(my_curl_handle) != 0) {
- curl_easy_cleanup(my_curl_handle); // Cleanup curl stuff
- if (xmlData.memory) {
- free(xmlData.memory);
- xmlData.memory = 0;
- xmlData.size = 0;
- }
- esyslog("nopacity: Error, download of '%s' failed", url);
- return -1;
- }
- curl_easy_getinfo(my_curl_handle, CURLINFO_HTTP_CODE, &code);
- if (code == 404) {
- if (xmlData.memory)
- free(xmlData.memory);
- xmlData.memory = 0;
- xmlData.size = 0;
- }
- curl_easy_cleanup(my_curl_handle); // Cleanup curl stuff
-
- return xmlData.size;
-}
-
-void cRssReader::traverseTree(xmlNode * a_node, bool foundItem) {
- xmlNode *cur_node = NULL;
- xmlChar *node_content;
- bool foundItemAct = false;
- for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
- if (cur_node->type == XML_ELEMENT_NODE) {
- if ((!xmlStrcmp(cur_node->name, (const xmlChar *)"item"))){
- foundItemAct = true;
- saveItem();
- } else {
- if ((!xmlStrcmp(cur_node->name, (const xmlChar *)"title")) && foundItem){
- node_content = xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1);
- if (node_content)
- title = (const char *)node_content;
- else
- title = "";
- xmlFree(node_content);
- }
- if ((!xmlStrcmp(cur_node->name, (const xmlChar *)"description")) && foundItem){
- node_content = xmlNodeListGetString(doc, cur_node->xmlChildrenNode, 1);
- if (node_content)
- content = (const char *)node_content;
- else
- content = "";
- xmlFree(node_content);
- }
- }
- }
- traverseTree(cur_node->children, foundItemAct);
- }
-
-}
-
-void cRssReader::saveItem(void) {
- if (!title.length())
- return;
- RssElement rssElement;
- rssElement.title = title;
- rssElement.content = content;
- int width = font->Width(title.c_str()) + font->Width(": ") + font->Width(content.c_str()) + font->Width(separator.c_str());
- rssElement.width = width;
- rssElements.push_back(rssElement);
-}
-
-void cRssReader::saveRss(void) {
- xmlNode *root_element = NULL;
- root_element = xmlDocGetRootElement(doc);
- traverseTree(root_element, false);
- saveItem();
- xmlFreeDoc(doc);
-}
-
-void cRssReader::createPixmap(void) {
- if (pixmap)
- osd->DestroyPixmap(pixmap);
- pixmap = osd->CreatePixmap(7, cRect(x, y, width, height), cRect(0, 0, rssElements[currentElement].width, height));
- pixmap->Fill(clrTransparent);
- pixmap->SetAlpha(0);
-}
-
-void cRssReader::drawText(void) {
- int currentX = 5;
- int textY = (height - font->Height()) / 2;
- cString text = cString::sprintf("%s: ", rssElements[currentElement].title.c_str());
- pixmap->DrawText(cPoint(currentX, textY), *text, Theme.Color(clrRSSFeedTitle), clrTransparent, font);
- currentX += font->Width(*text);
- text = cString::sprintf("%s%s", rssElements[currentElement].content.c_str(), separator.c_str());
- pixmap->DrawText(cPoint(currentX, textY), *text, Theme.Color(clrRSSFeedText), clrTransparent, font);
-}
-
-void cRssReader::DoSleep(int duration) {
- int sleepSlice = 10;
- for (int i = 0; Running() && (i*sleepSlice < duration); i++)
- cCondWait::SleepMs(sleepSlice);
-}
-
-void cRssReader::Action(void) {
-
- int success = readRssURL(feedUrl.c_str());
- if (success < 1)
- return;
- if (!strstr(xmlData.memory, "rss"))
- return;
- doc = NULL;
- doc = xmlReadMemory(xmlData.memory, strlen(xmlData.memory), "noname.xml", NULL, 0);
- if (doc == NULL) {
- return;
- }
- saveRss();
- //debugRSS();
- int numElements = rssElements.size();
- int scrollDelay = config.rssScrollDelay * 1000;
- int drawPortX;
- int FrameTime = config.rssScrollFrameTime;
- int maxX;
- bool doSleep;
-
- createPixmap();
- drawText();
- fadeInOut(true);
- DoSleep(scrollDelay);
- doSleep = false;
- maxX = pixmap->DrawPort().Width() - pixmap->ViewPort().Width();
-
- while (Running()) {
- if (doSleep) {
- fadeInOut(true);
- DoSleep(scrollDelay);
- doSleep = false;
- }
- uint64_t Now = cTimeMs::Now();
- cPixmap::Lock();
- drawPortX = pixmap->DrawPort().X();
- drawPortX -= 1;
- cPixmap::Unlock();
- if ((abs(drawPortX) > maxX) || switchToNextMessage) {
- if (!switchToNextMessage)
- DoSleep(scrollDelay);
- else
- switchToNextMessage = false;
- fadeInOut(false);
- currentElement = (currentElement + 1)%numElements;
- createPixmap();
- drawText();
- maxX = pixmap->DrawPort().Width() - pixmap->ViewPort().Width();
- drawPortX = 0;
- doSleep = true;
- }
- cPixmap::Lock();
- if (Running())
- pixmap->SetDrawPortPoint(cPoint(drawPortX, 0));
- cPixmap::Unlock();
- int Delta = cTimeMs::Now() - Now;
- if (Running())
- osd->Flush();
- if (Running() && (Delta < FrameTime))
- cCondWait::SleepMs(FrameTime - Delta);
- }
-
-}
-
-void cRssReader::fadeInOut(bool fadeIn) {
- int frameTime = 50;
- int alpha = (fadeIn)?0:225;
- for (int i=0; i<10; i++) {
- if (Running()) {
- if (fadeIn)
- alpha += 26;
- else
- alpha -= 26;
- if (alpha < 0) alpha = 0;
- if (alpha > 255) alpha = 255;
- cPixmap::Lock();
- pixmap->SetAlpha(alpha);
- cPixmap::Unlock();
- osd->Flush();
- }
- DoSleep(frameTime);
- }
-}
-
-void cRssReader::debugRSS(void) {
- for (std::vector<RssElement>::iterator it = rssElements.begin(); it!=rssElements.end(); ++it) {
- esyslog("nopacity: title %s", it->title.c_str());
- esyslog("nopacity: content %s", it->content.c_str());
- }
-
-}
-
-cRssStandaloneTicker::cRssStandaloneTicker(cImageCache *imgCache) {
- this->imgCache = imgCache;
- osdLeft = cOsd::OsdLeft();
- osdWidth = cOsd::OsdWidth();
- osdHeight = config.rssFeedHeightStandalone * cOsd::OsdHeight() / 100;
- if (config.rssFeedStandalonePos == 0)
- osdTop = cOsd::OsdHeight() - osdHeight - 5;
- else
- osdTop = cOsd::OsdTop() + 5;
-
- osd = CreateOsd(osdLeft, osdTop, osdWidth, osdHeight);
- font = cFont::CreateFont(config.fontName, (osdHeight / 2) + 3 + config.fontRssFeedStandalone);
- pixmapBackground = osd->CreatePixmap(1, cRect(0, 0, osdWidth, osdHeight));
- pixmapFeed = osd->CreatePixmap(2, cRect(0, 0, osdWidth, osdHeight));
- pixmapIcon = osd->CreatePixmap(3, cRect(0, 0, osdHeight, osdHeight));
- currentFeed = 0;
-}
-
-cRssStandaloneTicker::~cRssStandaloneTicker() {
- if (rssReader) {
- rssReader->Stop();
- while (rssReader->Active())
- cCondWait::SleepMs(10);
- delete rssReader;
- rssReader = NULL;
- }
- osd->DestroyPixmap(pixmapFeed);
- osd->DestroyPixmap(pixmapBackground);
- osd->DestroyPixmap(pixmapIcon);
- delete font;
- delete osd;
-}
-
-void cRssStandaloneTicker::SetFeed(std::string feedName) {
- pixmapBackground->Fill(clrBlack);
- pixmapFeed->Fill(clrTransparent);
- pixmapIcon->Fill(clrTransparent);
-
- int feedNameLength = font->Width(feedName.c_str());
- labelWidth = 2 + osdHeight + 2 + feedNameLength + 6;
- pixmapFeed->Fill(Theme.Color(clrRSSFeedBorder));
- if (config.doBlending) {
- cImage imgBack = imgCache->GetBackground(Theme.Color(clrRSSFeedHeaderBack), Theme.Color(clrRSSFeedHeaderBackBlend), labelWidth, osdHeight - 4);
- pixmapFeed->DrawImage(cPoint(2,2), imgBack);
- cImage imgBack2 = imgCache->GetBackground(Theme.Color(clrRSSFeedBack), Theme.Color(clrRSSFeedBackBlend), osdWidth - labelWidth - 2, osdHeight - 4);
- pixmapFeed->DrawImage(cPoint(labelWidth,2), imgBack2);
- } else {
- pixmapFeed->DrawRectangle(cRect(2, 2, labelWidth, osdHeight - 4), Theme.Color(clrRSSFeedHeaderBack));
- pixmapFeed->DrawRectangle(cRect(labelWidth, 2, osdWidth - labelWidth - 2, osdHeight - 4), Theme.Color(clrRSSFeedBack));
- }
- pixmapFeed->DrawText(cPoint(osdHeight + 2, (osdHeight - font->Height()) / 2), feedName.c_str(), Theme.Color(clrRSSFeedHeaderText), clrTransparent, font);
- pixmapIcon->Fill(clrTransparent);
-
- cImage *imgIcon = imgCache->GetSkinIcon("skinIcons/rssStandalone", osdHeight-4, osdHeight-4);
- if (imgIcon)
- pixmapIcon->DrawImage(cPoint(2,2), *imgIcon);
- osd->Flush();
-}
-
-void cRssStandaloneTicker::Start(void) {
- rssReader = new cRssReader(osd, font, cPoint(labelWidth,0), cPoint(osdWidth, osdHeight));
- rssReader->SetFeed(config.rssFeeds[config.rssFeed[currentFeed]].url);
- rssReader->Start();
-}
-
-void cRssStandaloneTicker::SwitchNextRssMessage(void) {
- if (rssReader) {
- rssReader->SwitchNextMessage();
- }
-}
-
-void cRssStandaloneTicker::SwitchNextRssFeed(void) {
- if (rssReader) {
- rssReader->Stop();
- while (rssReader->Active())
- cCondWait::SleepMs(10);
- delete rssReader;
- rssReader = NULL;
- }
- SetNextFeed();
- int feedNum = (config.rssFeed[currentFeed]==0)?0:(config.rssFeed[currentFeed]-1);
- SetFeed(config.rssFeeds[feedNum].name);
- Start();
-}
-
-void cRssStandaloneTicker::SetNextFeed(void) {
- int nextFeed = 0;
- for (int i = 1; i<6; i++) {
- nextFeed = (currentFeed + i)%5;
- if ((nextFeed == 0)||(config.rssFeed[nextFeed] > 0)) {
- currentFeed = nextFeed;
- break;
- }
- }
-} \ No newline at end of file
diff --git a/rssreader.h b/rssreader.h
deleted file mode 100644
index 868b48f..0000000
--- a/rssreader.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef __NOPACITY_RSSREADER_H
-#define __NOPACITY_RSSREADER_H
-
-#include <curl/curl.h>
-#include <curl/easy.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <string>
-#include <vector>
-
-#define NOPACITY_USERAGENT "libcurl-agent/1.0"
-
-struct XMLMemoryStruct {
- char *memory;
- size_t size;
-};
-
-struct RssElement {
- std::string title;
- std::string content;
- int width;
-};
-
-class cRssReader : public cThread{
-public:
- cRssReader(cOsd *osd, cFont *font, cPoint position, cPoint size);
- ~cRssReader();
- virtual void Action(void);
- void Stop(void) {Cancel(-1);};
- void SetFeed(std::string feedUrl) {this->feedUrl = feedUrl;};
- void SwitchNextMessage(void) {switchToNextMessage = true;};
-private:
- cOsd *osd;
- cFont *font;
- cPixmap *pixmap;
- std::string feedUrl;
- int x, y;
- int width, height;
- void createPixmap(void);
- void drawText(void);
- int readRssURL(const char *url);
- void saveRss(void);
- void traverseTree(xmlNode * a_node, bool foundItem);
- void saveItem(void);
- void fadeInOut(bool fadeIn);
- XMLMemoryStruct xmlData;
- xmlDoc *doc;
- std::string title, content;
- std::vector<RssElement> rssElements;
- int currentElement;
- bool useProxy;
- std::string httpproxy;
- std::string separator;
- void DoSleep(int duration);
- bool switchToNextMessage;
- void debugRSS(void);
-};
-
-class cRssStandaloneTicker {
- public:
- cRssStandaloneTicker(cImageCache *imgCache);
- ~cRssStandaloneTicker();
- void Start(void);
- void SetFeed(std::string feedName);
- void SwitchNextRssMessage(void);
- void SwitchNextRssFeed(void);
- private:
- cImageCache *imgCache;
- int osdLeft;
- int osdTop;
- int osdWidth;
- int osdHeight;
- cRssReader *rssReader;
- cOsd *osd;
- cPixmap *pixmapFeed;
- cPixmap *pixmapBackground;
- cPixmap *pixmapIcon;
- cFont *font;
- int labelWidth;
- int currentFeed;
- void SetNextFeed(void);
-};
-#endif //__NOPACITY_RSSREADER_H \ No newline at end of file
diff --git a/setup.c b/setup.c
index 07a443f..e48dc41 100644
--- a/setup.c
+++ b/setup.c
@@ -2,14 +2,14 @@
cNopacitySetup::cNopacitySetup(cImageCache *imgCache) {
this->imgCache = imgCache;
- tmpNopacityConfig = config;
+ tmpConf = config;
cFont::GetAvailableFontNames(&fontNames);
fontNames.Insert(strdup(config.fontDefaultName));
Setup();
}
cNopacitySetup::~cNopacitySetup() {
- config.setDynamicValues();
+ config.SetFontName();
int start = cTimeMs::Now();
geoManager->SetGeometry();
fontManager->DeleteFonts();
@@ -22,7 +22,7 @@ cNopacitySetup::~cNopacitySetup() {
void cNopacitySetup::Setup(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditStraItem(tr("Font"), &tmpNopacityConfig.fontIndex, fontNames.Size(), &fontNames[0]));
+ Add(new cMenuEditStraItem(tr("Font"), tmpConf.GetValueRef("fontIndex"), fontNames.Size(), &fontNames[0]));
Add(new cOsdItem(tr("VDR Menu: Common Settings")));
Add(new cOsdItem(tr("VDR Menu: Main and Setup Menu")));
Add(new cOsdItem(tr("VDR Menu: Schedules Menu")));
@@ -35,8 +35,7 @@ void cNopacitySetup::Setup(void) {
Add(new cOsdItem(tr("Messages")));
Add(new cOsdItem(tr("Volume")));
Add(new cOsdItem(tr("Image Caching")));
- Add(new cOsdItem(tr("RSS Feeds")));
-
+
SetCurrent(Get(currentItem));
Display();
}
@@ -50,200 +49,51 @@ eOSState cNopacitySetup::ProcessKey(eKeys Key) {
if ((Key == kOk && !hadSubMenu)) {
const char* ItemText = Get(Current())->Text();
if (strcmp(ItemText, tr("VDR Menu: Common Settings")) == 0)
- state = AddSubMenu(new cNopacitySetupMenuDisplay(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMenuDisplay(&tmpConf));
if (strcmp(ItemText, tr("VDR Menu: Main and Setup Menu")) == 0)
- state = AddSubMenu(new cNopacitySetupMenuDisplayMain(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMenuDisplayMain(&tmpConf));
if (strcmp(ItemText, tr("VDR Menu: Schedules Menu")) == 0)
- state = AddSubMenu(new cNopacitySetupMenuDisplaySchedules(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMenuDisplaySchedules(&tmpConf));
if (strcmp(ItemText, tr("VDR Menu: Channels Menu")) == 0)
- state = AddSubMenu(new cNopacitySetupMenuDisplayChannels(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMenuDisplayChannels(&tmpConf));
if (strcmp(ItemText, tr("VDR Menu: Timers Menu")) == 0)
- state = AddSubMenu(new cNopacitySetupMenuDisplayTimers(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMenuDisplayTimers(&tmpConf));
if (strcmp(ItemText, tr("VDR Menu: Recordings Menu")) == 0)
- state = AddSubMenu(new cNopacitySetupMenuDisplayRecordings(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMenuDisplayRecordings(&tmpConf));
if (strcmp(ItemText, tr("Channel Switching")) == 0)
- state = AddSubMenu(new cNopacitySetupChannelDisplay(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupChannelDisplay(&tmpConf));
if (strcmp(ItemText, tr("Replay")) == 0)
- state = AddSubMenu(new cNopacitySetupReplayDisplay(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupReplayDisplay(&tmpConf));
if (strcmp(ItemText, tr("Audio Tracks")) == 0)
- state = AddSubMenu(new cNopacitySetupTrackDisplay(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupTrackDisplay(&tmpConf));
if (strcmp(ItemText, tr("Messages")) == 0)
- state = AddSubMenu(new cNopacitySetupMessageDisplay(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupMessageDisplay(&tmpConf));
if (strcmp(ItemText, tr("Volume")) == 0)
- state = AddSubMenu(new cNopacitySetupVolumeDisplay(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupVolumeDisplay(&tmpConf));
if (strcmp(ItemText, tr("Image Caching")) == 0)
- state = AddSubMenu(new cNopacitySetupCaching(&tmpNopacityConfig, imgCache));
- if (strcmp(ItemText, tr("RSS Feeds")) == 0)
- state = AddSubMenu(new cNopacitySetupRssFeed(&tmpNopacityConfig));
+ state = AddSubMenu(new cNopacitySetupCaching(&tmpConf, imgCache));
}
}
return state;
}
void cNopacitySetup::Store(void) {
- config = tmpNopacityConfig;
- SetupStore("fontIndex", config.fontIndex);
- SetupStore("channelHeight", config.channelHeight);
- SetupStore("channelBorderVertical", config.channelBorderVertical);
- SetupStore("channelBorderBottom", config.channelBorderBottom);
- SetupStore("logoPosition", config.logoPosition);
- SetupStore("logoWidth", config.logoWidth);
- SetupStore("logoHeight", config.logoHeight);
- SetupStore("logoBorder", config.logoBorder);
- SetupStore("backgroundStyle", config.backgroundStyle);
- SetupStore("symbolStyle", config.symbolStyle);
- SetupStore("roundedCornersChannel", config.roundedCornersChannel);
- SetupStore("displaySignalStrength", config.displaySignalStrength);
- SetupStore("displaySourceInfo", config.displaySourceInfo);
- SetupStore("displayPrevNextChannelGroup", config.displayPrevNextChannelGroup);
- SetupStore("channelFadeTime", config.channelFadeTime);
- SetupStore("fontChannelHeaderSize", config.fontChannelHeaderSize);
- SetupStore("fontChannelDateSize", config.fontChannelDateSize);
- SetupStore("fontEPGSize", config.fontEPGSize);
- SetupStore("fontEPGSmallSize", config.fontEPGSmallSize);
- SetupStore("fontChannelGroupSize", config.fontChannelGroupSize);
- SetupStore("fontChannelGroupSmallSize", config.fontChannelGroupSmallSize);
- SetupStore("resolutionIconSize", config.resolutionIconSize);
- SetupStore("statusIconSize", config.statusIconSize);
- SetupStore("progressCurrentSchedule", config.progressCurrentSchedule);
- SetupStore("displayPoster", config.displayPoster);
- SetupStore("replayHeight", config.replayHeight);
- SetupStore("replayBorderVertical", config.replayBorderVertical);
- SetupStore("replayBorderBottom", config.replayBorderBottom);
- SetupStore("replayFadeTime", config.replayFadeTime);
- SetupStore("fontReplayHeader", config.fontReplayHeader);
- SetupStore("fontReplay", config.fontReplay);
- SetupStore("messageWidth", config.messageWidth);
- SetupStore("messageHeight", config.messageHeight);
- SetupStore("messageBorderBottom", config.messageBorderBottom);
- SetupStore("fontMessage", config.fontMessage);
- SetupStore("messageFadeTime", config.messageFadeTime);
- SetupStore("tracksFadeTime", config.tracksFadeTime);
- SetupStore("tracksWidth", config.tracksWidth);
- SetupStore("tracksItemHeight", config.tracksItemHeight);
- SetupStore("tracksPosition", config.tracksPosition);
- SetupStore("tracksBorderHorizontal", config.tracksBorderHorizontal);
- SetupStore("tracksBorderVertical", config.tracksBorderVertical);
- SetupStore("fontTracksHeader", config.fontTracksHeader);
- SetupStore("fontTracks", config.fontTracks);
- SetupStore("volumeFadeTime", config.volumeFadeTime);
- SetupStore("volumeWidth", config.volumeWidth);
- SetupStore("volumeHeight", config.volumeHeight);
- SetupStore("volumeBorderBottom", config.volumeBorderBottom);
- SetupStore("fontVolume", config.fontVolume);
- SetupStore("scrollMode", config.scrollMode);
- SetupStore("menuAdjustLeft", config.menuAdjustLeft);
- SetupStore("scalePicture", config.scalePicture);
- SetupStore("roundedCorners", config.roundedCorners);
- SetupStore("cornerRadius", config.cornerRadius);
- SetupStore("useMenuIcons", config.useMenuIcons);
- SetupStore("mainMenuTitleStyle", config.mainMenuTitleStyle);
- SetupStore("narrowMainMenu", config.narrowMainMenu);
- SetupStore("narrowScheduleMenu", config.narrowScheduleMenu);
- SetupStore("narrowChannelMenu", config.narrowChannelMenu);
- SetupStore("narrowTimerMenu", config.narrowTimerMenu);
- SetupStore("narrowRecordingMenu", config.narrowRecordingMenu);
- SetupStore("narrowSetupMenu", config.narrowSetupMenu);
- SetupStore("displayRerunsDetailEPGView", config.displayRerunsDetailEPGView);
- SetupStore("numReruns", config.numReruns);
- SetupStore("useSubtitleRerun", config.useSubtitleRerun);
- SetupStore("displayAdditionalEPGPictures", config.displayAdditionalEPGPictures);
- SetupStore("numAdditionalEPGPictures", config.numAdditionalEPGPictures);
- SetupStore("displayAdditionalRecEPGPictures", config.displayAdditionalRecEPGPictures);
- SetupStore("numAdditionalRecEPGPictures", config.numAdditionalRecEPGPictures);
- SetupStore("menuChannelDisplayMode", config.menuChannelDisplayMode);
- SetupStore("menuChannelDisplayTime", config.menuChannelDisplayTime);
- SetupStore("numEPGEntriesChannelsMenu", config.numEPGEntriesChannelsMenu);
- SetupStore("menuFadeTime", config.menuFadeTime);
- SetupStore("menuScrollDelay", config.menuScrollDelay);
- SetupStore("menuScrollSpeed", config.menuScrollSpeed);
- SetupStore("menuWidthMain", config.menuWidthMain);
- SetupStore("menuWidthSchedules", config.menuWidthSchedules);
- SetupStore("menuWidthChannels", config.menuWidthChannels);
- SetupStore("menuWidthTimers", config.menuWidthTimers);
- SetupStore("menuWidthRecordings", config.menuWidthRecordings);
- SetupStore("menuWidthSetup", config.menuWidthSetup);
- SetupStore("menuWidthRightItems", config.menuWidthRightItems);
- SetupStore("menuSizeDiskUsage", config.menuSizeDiskUsage);
- SetupStore("menuHeightInfoWindow", config.menuHeightInfoWindow);
- SetupStore("menuEPGWindowFadeTime", config.menuEPGWindowFadeTime);
- SetupStore("menuInfoTextDelay", config.menuInfoTextDelay);
- SetupStore("menuInfoScrollDelay", config.menuInfoScrollDelay);
- SetupStore("menuInfoScrollSpeed", config.menuInfoScrollSpeed);
- SetupStore("showDiscUsage", config.showDiscUsage);
- SetupStore("discUsageStyle", config.discUsageStyle);
- SetupStore("showTimers", config.showTimers);
- SetupStore("numberTimers", config.numberTimers);
- SetupStore("checkTimerConflict", config.checkTimerConflict);
- SetupStore("headerHeight", config.headerHeight);
- SetupStore("footerHeight", config.footerHeight);
- SetupStore("numDefaultMenuItems", config.numDefaultMenuItems);
- SetupStore("iconHeight", config.iconHeight);
- SetupStore("headerIconHeight", config.headerIconHeight);
- SetupStore("menuItemLogoWidth", config.menuItemLogoWidth);
- SetupStore("menuItemLogoHeight", config.menuItemLogoHeight);
- SetupStore("menuHeaderLogoWidth", config.menuHeaderLogoWidth);
- SetupStore("menuHeaderLogoHeight", config.menuHeaderLogoHeight);
- SetupStore("timersLogoWidth", config.timersLogoWidth);
- SetupStore("timersLogoHeight", config.timersLogoHeight);
- SetupStore("epgImageWidth", config.epgImageWidth);
- SetupStore("epgImageHeight", config.epgImageHeight);
- SetupStore("epgImageWidthLarge", config.epgImageWidthLarge);
- SetupStore("epgImageHeightLarge", config.epgImageHeightLarge);
- SetupStore("posterWidth", config.posterWidth);
- SetupStore("posterHeight", config.posterHeight);
- SetupStore("menuRecFolderSize", config.menuRecFolderSize);
- SetupStore("useFolderPoster", config.useFolderPoster);
- SetupStore("borderDetailedEPG", config.borderDetailedEPG);
- SetupStore("borderDetailedRecordings", config.borderDetailedRecordings);
- SetupStore("menuSchedulesWindowMode", config.menuSchedulesWindowMode);
- SetupStore("menuRecordingsWindowMode", config.menuRecordingsWindowMode);
- SetupStore("fontHeader", config.fontHeader);
- SetupStore("fontDate", config.fontDate);
- SetupStore("fontMenuitemLarge", config.fontMenuitemLarge);
- SetupStore("fontMenuitemSchedule", config.fontMenuitemSchedule);
- SetupStore("fontMenuitemScheduleSmall", config.fontMenuitemScheduleSmall);
- SetupStore("fontMenuitemChannel", config.fontMenuitemChannel);
- SetupStore("fontMenuitemChannelSmall", config.fontMenuitemChannelSmall);
- SetupStore("fontMenuitemRecordings", config.fontMenuitemRecordings);
- SetupStore("fontMenuitemRecordingsSmall", config.fontMenuitemRecordingsSmall);
- SetupStore("fontMenuitemTimers", config.fontMenuitemTimers);
- SetupStore("fontMenuitemTimersSmall", config.fontMenuitemTimersSmall);
- SetupStore("fontMenuitemDefault", config.fontMenuitemDefault);
- SetupStore("fontDiskUsage", config.fontDiskUsage);
- SetupStore("fontDiskUsagePercent", config.fontDiskUsagePercent);
- SetupStore("fontTimersHead", config.fontTimersHead);
- SetupStore("fontTimers", config.fontTimers);
- SetupStore("fontButtons", config.fontButtons);
- SetupStore("fontMessageMenu", config.fontMessageMenu);
- SetupStore("fontDetailView", config.fontDetailView);
- SetupStore("fontDetailViewSmall", config.fontDetailViewSmall);
- SetupStore("fontDetailViewHeader", config.fontDetailViewHeader);
- SetupStore("fontDetailViewHeaderLarge", config.fontDetailViewHeaderLarge);
- SetupStore("fontEPGInfoWindow", config.fontEPGInfoWindow);
- SetupStore("fontEPGInfoWindowLarge", config.fontEPGInfoWindowLarge);
- SetupStore("displayRSSFeed", config.displayRSSFeed);
- SetupStore("rssFeedHeight", config.rssFeedHeight);
- SetupStore("rssFeed[0]", config.rssFeed[0]);
- SetupStore("rssFeed[1]", config.rssFeed[1]);
- SetupStore("rssFeed[2]", config.rssFeed[2]);
- SetupStore("rssFeed[3]", config.rssFeed[3]);
- SetupStore("rssFeed[4]", config.rssFeed[4]);
- SetupStore("fontRssFeed", config.fontRssFeed);
- SetupStore("rssScrollDelay", config.rssScrollDelay);
- SetupStore("rssScrollSpeed", config.rssScrollSpeed);
- SetupStore("rssFeedHeightStandalone", config.rssFeedHeightStandalone);
- SetupStore("fontRssFeedStandalone", config.fontRssFeedStandalone);
- SetupStore("rssFeedStandalonePos", config.rssFeedStandalonePos);
- SetupStore("limitLogoCache", config.limitLogoCache);
- SetupStore("numLogosInitial", config.numLogosInitial);
- SetupStore("numLogosMax", config.numLogosMax);
+ const char *themeName = Skins.Current()->Theme()->Name();
+ for(std::map<std::string, int>::const_iterator it = tmpConf.GetStart(); it != tmpConf.GetEnd(); it++) {
+ std::string name = (std::string)it->first;
+ int value = (int)it->second;
+ int origValue = config.GetValue(name);
+ if (value != origValue) {
+ SetupStore(*cString::sprintf("%s.%s", themeName, name.c_str()), value);
+ }
+ }
+ config = tmpConf;
}
//------------------------------------------------------------------------------------------------------------------
cMenuSetupSubMenu::cMenuSetupSubMenu(const char* Title, cNopacityConfig* data) : cOsdMenu(Title, 30) {
- tmpNopacityConfig = data;
+ tmpConf = data;
spacer = " ";
}
@@ -289,28 +139,28 @@ cNopacitySetupMenuDisplay::cNopacitySetupMenuDisplay(cNopacityConfig* data) : c
void cNopacitySetupMenuDisplay::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditIntItem(tr("Number of Default Menu Entries per Page"), &tmpNopacityConfig->numDefaultMenuItems, 10, 40));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Default Menu Item"), &tmpNopacityConfig->fontMenuitemDefault, -20, 20));
- Add(new cMenuEditStraItem(tr("Adjustment of narrow menus"), &tmpNopacityConfig->menuAdjustLeft, 2, adjustLeft));
- Add(new cMenuEditStraItem(tr("Scale Video size to fit into menu window"), &tmpNopacityConfig->scalePicture, 3, scalePic));
- Add(new cMenuEditIntItem(tr("Header Height (Percent of OSD Height)"), &tmpNopacityConfig->headerHeight, 5, 30));
- Add(new cMenuEditIntItem(tr("Header Icon Size (Square Header Menu Icons)"), &tmpNopacityConfig->headerIconHeight, 30, 200));
- Add(new cMenuEditIntItem(tr("Footer Height (Percent of OSD Height)"), &tmpNopacityConfig->footerHeight, 5, 30));
- Add(new cMenuEditBoolItem(tr("Rounded Corners for menu items and buttons"), &tmpNopacityConfig->roundedCorners));
- if (tmpNopacityConfig->roundedCorners)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Radius of rounded corners")), &tmpNopacityConfig->cornerRadius, 5, 30));
- Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->menuFadeTime, 0, 1000));
- Add(new cMenuEditStraItem(tr("Menu Items Scroll Style"), &tmpNopacityConfig->scrollMode, 2, scrollMode));
- Add(new cMenuEditStraItem(tr("Menu Items Scrolling Speed"), &tmpNopacityConfig->menuScrollSpeed, 4, scrollSpeed));
- Add(new cMenuEditIntItem(tr("Menu Items Scrolling Delay in s"), &tmpNopacityConfig->menuScrollDelay, 0, 3));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), &tmpNopacityConfig->fontHeader, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Date"), &tmpNopacityConfig->fontDate, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Color Buttons"), &tmpNopacityConfig->fontButtons, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Messages"), &tmpNopacityConfig->fontMessageMenu, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Text"), &tmpNopacityConfig->fontDetailView, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Text Small"), &tmpNopacityConfig->fontDetailViewSmall, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Header"), &tmpNopacityConfig->fontDetailViewHeader, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Header Large"), &tmpNopacityConfig->fontDetailViewHeaderLarge, -20, 20));
+ Add(new cMenuEditIntItem(tr("Number of Default Menu Entries per Page"), tmpConf->GetValueRef("numDefaultMenuItems"), 10, 40));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Default Menu Item"), tmpConf->GetValueRef("fontMenuitemDefault"), -20, 20));
+ Add(new cMenuEditStraItem(tr("Adjustment of narrow menus"), tmpConf->GetValueRef("menuAdjustLeft"), 2, adjustLeft));
+ Add(new cMenuEditStraItem(tr("Scale Video size to fit into menu window"), tmpConf->GetValueRef("scalePicture"), 3, scalePic));
+ Add(new cMenuEditIntItem(tr("Header Height (Percent of OSD Height)"), tmpConf->GetValueRef("headerHeight"), 5, 30));
+ Add(new cMenuEditIntItem(tr("Header Icon Size (Square Header Menu Icons)"), tmpConf->GetValueRef("headerIconHeight"), 30, 200));
+ Add(new cMenuEditIntItem(tr("Footer Height (Percent of OSD Height)"), tmpConf->GetValueRef("footerHeight"), 5, 30));
+ Add(new cMenuEditBoolItem(tr("Rounded Corners for menu items and buttons"), tmpConf->GetValueRef("roundedCorners")));
+ if (tmpConf->GetValue("roundedCorners"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Radius of rounded corners")), tmpConf->GetValueRef("cornerRadius"), 5, 30));
+ Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("menuFadeTime"), 0, 1000));
+ Add(new cMenuEditStraItem(tr("Menu Items Scroll Style"), tmpConf->GetValueRef("scrollMode"), 2, scrollMode));
+ Add(new cMenuEditStraItem(tr("Menu Items Scrolling Speed"), tmpConf->GetValueRef("menuScrollSpeed"), 4, scrollSpeed));
+ Add(new cMenuEditIntItem(tr("Menu Items Scrolling Delay in s"), tmpConf->GetValueRef("menuScrollDelay"), 0, 3));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), tmpConf->GetValueRef("fontHeader"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Date"), tmpConf->GetValueRef("fontDate"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Color Buttons"), tmpConf->GetValueRef("fontButtons"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Messages"), tmpConf->GetValueRef("fontMessageMenu"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Text"), tmpConf->GetValueRef("fontDetailView"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Text Small"), tmpConf->GetValueRef("fontDetailViewSmall"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Header"), tmpConf->GetValueRef("fontDetailViewHeader"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Detail View Header Large"), tmpConf->GetValueRef("fontDetailViewHeaderLarge"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -333,37 +183,37 @@ cNopacitySetupMenuDisplayMain::cNopacitySetupMenuDisplayMain(cNopacityConfig* da
void cNopacitySetupMenuDisplayMain::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditBoolItem(tr("Use narrow main menu"), &tmpNopacityConfig->narrowMainMenu));
- if (tmpNopacityConfig->narrowMainMenu)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthMain, 10, 97));
- Add(new cMenuEditBoolItem(tr("Use narrow setup menu"), &tmpNopacityConfig->narrowSetupMenu));
- if (tmpNopacityConfig->narrowSetupMenu)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthSetup, 10, 97));
-
- Add(new cMenuEditBoolItem(tr("Use menu icons"), &tmpNopacityConfig->useMenuIcons));
- if (tmpNopacityConfig->useMenuIcons)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Icon Size (Square)")), &tmpNopacityConfig->iconHeight, 30, 200));
- Add(new cMenuEditStraItem(tr("Main menu title style"), &tmpNopacityConfig->mainMenuTitleStyle, 3, titleStyle));
- Add(new cMenuEditBoolItem(tr("Display Disk Usage"), &tmpNopacityConfig->showDiscUsage));
- if (tmpNopacityConfig->showDiscUsage) {
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Size (square, Percent of OSD Width)")), &tmpNopacityConfig->menuSizeDiskUsage, 5, 30));
- Add(new cMenuEditStraItem(cString::sprintf("%s%s", *spacer, tr("Free Disc Display")), &tmpNopacityConfig->discUsageStyle, 2, discUsageStyle));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - free")), &tmpNopacityConfig->fontDiskUsage, -20, 20));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - percent")), &tmpNopacityConfig->fontDiskUsagePercent, -20, 20));
+ Add(new cMenuEditBoolItem(tr("Use narrow main menu"), tmpConf->GetValueRef("narrowMainMenu")));
+ if (tmpConf->GetValue("narrowMainMenu"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthMain"), 10, 97));
+ Add(new cMenuEditBoolItem(tr("Use narrow setup menu"), tmpConf->GetValueRef("narrowSetupMenu")));
+ if (tmpConf->GetValue("narrowSetupMenu"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthSetup"), 10, 97));
+
+ Add(new cMenuEditBoolItem(tr("Use menu icons"), tmpConf->GetValueRef("useMenuIcons")));
+ if (tmpConf->GetValue("useMenuIcons"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Icon Size (Square)")), tmpConf->GetValueRef("iconHeight"), 30, 200));
+ Add(new cMenuEditStraItem(tr("Main menu title style"), tmpConf->GetValueRef("mainMenuTitleStyle"), 3, titleStyle));
+ Add(new cMenuEditBoolItem(tr("Display Disk Usage"), tmpConf->GetValueRef("showDiscUsage")));
+ if (tmpConf->GetValue("showDiscUsage")) {
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Size (square, Percent of OSD Width)")), tmpConf->GetValueRef("menuSizeDiskUsage"), 5, 30));
+ Add(new cMenuEditStraItem(cString::sprintf("%s%s", *spacer, tr("Free Disc Display")), tmpConf->GetValueRef("discUsageStyle"), 2, discUsageStyle));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - free")), tmpConf->GetValueRef("fontDiskUsage"), -20, 20));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - percent")), tmpConf->GetValueRef("fontDiskUsagePercent"), -20, 20));
}
- Add(new cMenuEditStraItem(tr("Display Timers"), &tmpNopacityConfig->showTimers, 3, showTimers));
- if (tmpNopacityConfig->showTimers) {
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Maximum number of Timers")), &tmpNopacityConfig->numberTimers, 1, 10));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width of Timers (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthRightItems, 5, 30));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Width")), &tmpNopacityConfig->timersLogoWidth, 30, 300));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Height")), &tmpNopacityConfig->timersLogoHeight, 30, 300));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - Header")), &tmpNopacityConfig->fontTimersHead, -20, 20));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - Title")), &tmpNopacityConfig->fontTimers, -20, 20));
+ Add(new cMenuEditStraItem(tr("Display Timers"), tmpConf->GetValueRef("showTimers"), 3, showTimers));
+ if (tmpConf->GetValue("showTimers")) {
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Maximum number of Timers")), tmpConf->GetValueRef("numberTimers"), 1, 10));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width of Timers (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthRightItems"), 5, 30));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Width")), tmpConf->GetValueRef("timersLogoWidth"), 30, 300));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Height")), tmpConf->GetValueRef("timersLogoHeight"), 30, 300));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - Header")), tmpConf->GetValueRef("fontTimersHead"), -20, 20));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size - Title")), tmpConf->GetValueRef("fontTimers"), -20, 20));
}
- Add(new cMenuEditBoolItem(tr("Show Timer Conflicts"), &tmpNopacityConfig->checkTimerConflict));
- Add(new cMenuEditIntItem(tr("Header Logo Width"), &tmpNopacityConfig->menuHeaderLogoWidth, 30, 500));
- Add(new cMenuEditIntItem(tr("Header Logo Height"), &tmpNopacityConfig->menuHeaderLogoHeight, 30, 500));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Items"), &tmpNopacityConfig->fontMenuitemLarge, -20, 20));
+ Add(new cMenuEditBoolItem(tr("Show Timer Conflicts"), tmpConf->GetValueRef("checkTimerConflict")));
+ Add(new cMenuEditIntItem(tr("Header Logo Width"), tmpConf->GetValueRef("menuHeaderLogoWidth"), 30, 500));
+ Add(new cMenuEditIntItem(tr("Header Logo Height"), tmpConf->GetValueRef("menuHeaderLogoHeight"), 30, 500));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Items"), tmpConf->GetValueRef("fontMenuitemLarge"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -391,34 +241,34 @@ void cNopacitySetupMenuDisplaySchedules::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditBoolItem(tr("Use narrow menu"), &tmpNopacityConfig->narrowScheduleMenu));
- if (tmpNopacityConfig->narrowScheduleMenu)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthSchedules, 10, 97));
- Add(new cMenuEditIntItem(tr("Channel Logo Width"), &tmpNopacityConfig->menuItemLogoWidth, 30, 200));
- Add(new cMenuEditIntItem(tr("Channel Logo Height"), &tmpNopacityConfig->menuItemLogoHeight, 30, 200));
- Add(new cMenuEditStraItem(tr("Mode of EPG Window"), &tmpNopacityConfig->menuSchedulesWindowMode, 2, windowMode));
- Add(new cMenuEditIntItem(tr("EPG Window Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->menuEPGWindowFadeTime, 0, 1000));
- Add(new cMenuEditIntItem(tr("EPG Window Display Delay in s"), &tmpNopacityConfig->menuInfoTextDelay, 0, 10));
- Add(new cMenuEditIntItem(tr("EPG Window Scroll Delay in s"), &tmpNopacityConfig->menuInfoScrollDelay, 0, 10));
- Add(new cMenuEditStraItem(tr("EPG Window Text Scrolling Speed"), &tmpNopacityConfig->menuInfoScrollSpeed, 4, scrollSpeed));
- Add(new cMenuEditIntItem(tr("Height of EPG Info Window (Percent of OSD Height)"), &tmpNopacityConfig->menuHeightInfoWindow, 10, 100));
- Add(new cMenuEditIntItem(tr("Border around detailed EPG view"), &tmpNopacityConfig->borderDetailedEPG, 1, 300));
- Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), &tmpNopacityConfig->displayRerunsDetailEPGView));
- if (tmpNopacityConfig->displayRerunsDetailEPGView) {
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of reruns to display")), &tmpNopacityConfig->numReruns, 1, 10));
- Add(new cMenuEditStraItem(cString::sprintf("%s%s", *spacer, tr("Use Subtitle for reruns")), &tmpNopacityConfig->useSubtitleRerun, 3, useSubtitleRerunTexts));
+ Add(new cMenuEditBoolItem(tr("Use narrow menu"), tmpConf->GetValueRef("narrowScheduleMenu")));
+ if (tmpConf->GetValue("narrowScheduleMenu"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthSchedules"), 10, 97));
+ Add(new cMenuEditIntItem(tr("Channel Logo Width"), tmpConf->GetValueRef("menuItemLogoWidth"), 30, 200));
+ Add(new cMenuEditIntItem(tr("Channel Logo Height"), tmpConf->GetValueRef("menuItemLogoHeight"), 30, 200));
+ Add(new cMenuEditStraItem(tr("Mode of EPG Window"), tmpConf->GetValueRef("menuSchedulesWindowMode"), 2, windowMode));
+ Add(new cMenuEditIntItem(tr("EPG Window Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("menuEPGWindowFadeTime"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("EPG Window Display Delay in s"), tmpConf->GetValueRef("menuInfoTextDelay"), 0, 10));
+ Add(new cMenuEditIntItem(tr("EPG Window Scroll Delay in s"), tmpConf->GetValueRef("menuInfoScrollDelay"), 0, 10));
+ Add(new cMenuEditStraItem(tr("EPG Window Text Scrolling Speed"), tmpConf->GetValueRef("menuInfoScrollSpeed"), 4, scrollSpeed));
+ Add(new cMenuEditIntItem(tr("Height of EPG Info Window (Percent of OSD Height)"), tmpConf->GetValueRef("menuHeightInfoWindow"), 10, 100));
+ Add(new cMenuEditIntItem(tr("Border around detailed EPG view"), tmpConf->GetValueRef("borderDetailedEPG"), 1, 300));
+ Add(new cMenuEditBoolItem(tr("Display Reruns in detailed EPG View"), tmpConf->GetValueRef("displayRerunsDetailEPGView")));
+ if (tmpConf->GetValue("displayRerunsDetailEPGView")) {
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of reruns to display")), tmpConf->GetValueRef("numReruns"), 1, 10));
+ Add(new cMenuEditStraItem(cString::sprintf("%s%s", *spacer, tr("Use Subtitle for reruns")), tmpConf->GetValueRef("useSubtitleRerun"), 3, useSubtitleRerunTexts));
}
- Add(new cMenuEditStraItem(tr("Display additional EPG Pictures in detailed EPG View"), &tmpNopacityConfig->displayAdditionalEPGPictures, 3, displayEPGPictures));
- if (tmpNopacityConfig->displayAdditionalEPGPictures)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of EPG pictures to display")), &tmpNopacityConfig->numAdditionalEPGPictures, 1, 9));
- Add(new cMenuEditIntItem(tr("Detail EPG View EPG Image Width"), &tmpNopacityConfig->epgImageWidth, 30, 500));
- Add(new cMenuEditIntItem(tr("Detail EPG View EPG Image Height"), &tmpNopacityConfig->epgImageHeight, 30, 500));
- Add(new cMenuEditIntItem(tr("Detail EPG View additional EPG Image Width"), &tmpNopacityConfig->epgImageWidthLarge, 100, 800));
- Add(new cMenuEditIntItem(tr("Detail EPG View additional EPG Image Height"), &tmpNopacityConfig->epgImageHeightLarge, 100, 800));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), &tmpNopacityConfig->fontMenuitemSchedule, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), &tmpNopacityConfig->fontMenuitemScheduleSmall, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Info Window"), &tmpNopacityConfig->fontEPGInfoWindow, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Info Window Header"), &tmpNopacityConfig->fontEPGInfoWindowLarge, -20, 20));
+ Add(new cMenuEditStraItem(tr("Display additional EPG Pictures in detailed EPG View"), tmpConf->GetValueRef("displayAdditionalEPGPictures"), 3, displayEPGPictures));
+ if (tmpConf->GetValue("displayAdditionalEPGPictures"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of EPG pictures to display")), tmpConf->GetValueRef("numAdditionalEPGPictures"), 1, 9));
+ Add(new cMenuEditIntItem(tr("Detail EPG View EPG Image Width"), tmpConf->GetValueRef("epgImageWidth"), 30, 500));
+ Add(new cMenuEditIntItem(tr("Detail EPG View EPG Image Height"), tmpConf->GetValueRef("epgImageHeight"), 30, 500));
+ Add(new cMenuEditIntItem(tr("Detail EPG View additional EPG Image Width"), tmpConf->GetValueRef("epgImageWidthLarge"), 100, 800));
+ Add(new cMenuEditIntItem(tr("Detail EPG View additional EPG Image Height"), tmpConf->GetValueRef("epgImageHeightLarge"), 100, 800));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), tmpConf->GetValueRef("fontMenuitemSchedule"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), tmpConf->GetValueRef("fontMenuitemScheduleSmall"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Info Window"), tmpConf->GetValueRef("fontEPGInfoWindow"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Info Window Header"), tmpConf->GetValueRef("fontEPGInfoWindowLarge"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -437,16 +287,16 @@ void cNopacitySetupMenuDisplayChannels::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditBoolItem(tr("Use narrow menu"), &tmpNopacityConfig->narrowChannelMenu));
- if (tmpNopacityConfig->narrowChannelMenu)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthChannels, 10, 97));
- Add(new cMenuEditStraItem(tr("Menu Items display mode"), &tmpNopacityConfig->menuChannelDisplayMode, 3, displayModes));
- if (tmpNopacityConfig->menuChannelDisplayMode == 1) {
- Add(new cMenuEditBoolItem(cString::sprintf("%s%s", *spacer, tr("Display schedules with time info")), &tmpNopacityConfig->menuChannelDisplayTime));
+ Add(new cMenuEditBoolItem(tr("Use narrow menu"), tmpConf->GetValueRef("narrowChannelMenu")));
+ if (tmpConf->GetValue("narrowChannelMenu"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthChannels"), 10, 97));
+ Add(new cMenuEditStraItem(tr("Menu Items display mode"), tmpConf->GetValueRef("menuChannelDisplayMode"), 3, displayModes));
+ if (tmpConf->GetValue("menuChannelDisplayMode") == 1) {
+ Add(new cMenuEditBoolItem(cString::sprintf("%s%s", *spacer, tr("Display schedules with time info")), tmpConf->GetValueRef("menuChannelDisplayTime")));
}
- Add(new cMenuEditIntItem(tr("Number of EPG Entries in Schedules Info Window"), &tmpNopacityConfig->numEPGEntriesChannelsMenu, 1, 100));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), &tmpNopacityConfig->fontMenuitemChannel, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), &tmpNopacityConfig->fontMenuitemChannelSmall, -20, 20));
+ Add(new cMenuEditIntItem(tr("Number of EPG Entries in Schedules Info Window"), tmpConf->GetValueRef("numEPGEntriesChannelsMenu"), 1, 100));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), tmpConf->GetValueRef("fontMenuitemChannel"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), tmpConf->GetValueRef("fontMenuitemChannelSmall"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -462,11 +312,11 @@ void cNopacitySetupMenuDisplayTimers::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditBoolItem(tr("Use narrow menu"), &tmpNopacityConfig->narrowTimerMenu));
- if (tmpNopacityConfig->narrowTimerMenu)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthTimers, 10, 97));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), &tmpNopacityConfig->fontMenuitemTimers, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), &tmpNopacityConfig->fontMenuitemTimersSmall, -20, 20));
+ Add(new cMenuEditBoolItem(tr("Use narrow menu"), tmpConf->GetValueRef("narrowTimerMenu")));
+ if (tmpConf->GetValue("narrowTimerMenu"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthTimers"), 10, 97));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), tmpConf->GetValueRef("fontMenuitemTimers"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), tmpConf->GetValueRef("fontMenuitemTimersSmall"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -487,20 +337,20 @@ void cNopacitySetupMenuDisplayRecordings::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditBoolItem(tr("Use narrow menu"), &tmpNopacityConfig->narrowRecordingMenu));
- if (tmpNopacityConfig->narrowRecordingMenu)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), &tmpNopacityConfig->menuWidthRecordings, 10, 97));
- Add(new cMenuEditStraItem(tr("Mode of recording Window"), &tmpNopacityConfig->menuRecordingsWindowMode, 2, windowMode));
- Add(new cMenuEditIntItem(tr("Border around detailed recording view"), &tmpNopacityConfig->borderDetailedRecordings, 1, 300));
- Add(new cMenuEditStraItem(tr("Display additional EPG Pictures in detailed recording View"), &tmpNopacityConfig->displayAdditionalRecEPGPictures, 3, displayEPGPictures));
- if (tmpNopacityConfig->displayAdditionalRecEPGPictures)
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of EPG pictures to display")), &tmpNopacityConfig->numAdditionalRecEPGPictures, 1, 9));
- Add(new cMenuEditIntItem(tr("Folder Icon Size"), &tmpNopacityConfig->menuRecFolderSize, 30, 300));
- Add(new cMenuEditBoolItem(tr("Use folder poster if available"), &tmpNopacityConfig->useFolderPoster));
- Add(new cMenuEditIntItem(tr("Width of manually set recording poster"), &tmpNopacityConfig->posterWidth, 100, 1000));
- Add(new cMenuEditIntItem(tr("Height of manually set recording poster"), &tmpNopacityConfig->posterHeight, 100, 1000));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), &tmpNopacityConfig->fontMenuitemRecordings, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), &tmpNopacityConfig->fontMenuitemRecordingsSmall, -20, 20));
+ Add(new cMenuEditBoolItem(tr("Use narrow menu"), tmpConf->GetValueRef("narrowRecordingMenu")));
+ if (tmpConf->GetValue("narrowRecordingMenu"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Width (Percent of OSD Width)")), tmpConf->GetValueRef("menuWidthRecordings"), 10, 97));
+ Add(new cMenuEditStraItem(tr("Mode of recording Window"), tmpConf->GetValueRef("menuRecordingsWindowMode"), 2, windowMode));
+ Add(new cMenuEditIntItem(tr("Border around detailed recording view"), tmpConf->GetValueRef("borderDetailedRecordings"), 1, 300));
+ Add(new cMenuEditStraItem(tr("Display additional EPG Pictures in detailed recording View"), tmpConf->GetValueRef("displayAdditionalRecEPGPictures"), 3, displayEPGPictures));
+ if (tmpConf->GetValue("displayAdditionalRecEPGPictures"))
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Number of EPG pictures to display")), tmpConf->GetValueRef("numAdditionalRecEPGPictures"), 1, 9));
+ Add(new cMenuEditIntItem(tr("Folder Icon Size"), tmpConf->GetValueRef("menuRecFolderSize"), 30, 300));
+ Add(new cMenuEditBoolItem(tr("Use folder poster if available"), tmpConf->GetValueRef("useFolderPoster")));
+ Add(new cMenuEditIntItem(tr("Width of manually set recording poster"), tmpConf->GetValueRef("posterWidth"), 100, 1000));
+ Add(new cMenuEditIntItem(tr("Height of manually set recording poster"), tmpConf->GetValueRef("posterHeight"), 100, 1000));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item"), tmpConf->GetValueRef("fontMenuitemRecordings"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Menu Item Small"), tmpConf->GetValueRef("fontMenuitemRecordingsSmall"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -509,8 +359,6 @@ void cNopacitySetupMenuDisplayRecordings::Set(void) {
//----ChannelDisplay--------------------------------------------------------------------------------------------------------------
cNopacitySetupChannelDisplay::cNopacitySetupChannelDisplay(cNopacityConfig* data) : cMenuSetupSubMenu(tr("Channel Switching"), data) {
- symStyle[0] = tr("simple, one common image");
- symStyle[1] = tr("complex, dedicated images");
bgStyle[0] = tr("transparent channel logo");
bgStyle[1] = tr("full osd width");
logoPos[0] = tr("do not display");
@@ -524,33 +372,31 @@ cNopacitySetupChannelDisplay::cNopacitySetupChannelDisplay(cNopacityConfig* data
void cNopacitySetupChannelDisplay::Set(void) {
int currentItem = Current();
Clear();
-
- Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->channelFadeTime, 0, 1000));
- Add(new cMenuEditIntItem(tr("Height of Channel Display (Percent of OSD Height)"), &tmpNopacityConfig->channelHeight, 15, 80));
- Add(new cMenuEditIntItem(tr("Left & Right Border Width"), &tmpNopacityConfig->channelBorderVertical, 0, 300));
- Add(new cMenuEditIntItem(tr("Bottom Border Height"), &tmpNopacityConfig->channelBorderBottom, 0, 300));
- Add(new cMenuEditStraItem(tr("Background Style"), &tmpNopacityConfig->backgroundStyle, 2, bgStyle));
- Add(new cMenuEditBoolItem(tr("Rounded Corners"), &tmpNopacityConfig->roundedCornersChannel));
- Add(new cMenuEditStraItem(tr("Channel Logo Position"), &tmpNopacityConfig->logoPosition, 3, logoPos));
- if (tmpNopacityConfig->logoPosition) {
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Width")), &tmpNopacityConfig->logoWidth, 30, 500));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Height")), &tmpNopacityConfig->logoHeight, 30, 500));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo Border")), &tmpNopacityConfig->logoBorder, 0, 200));
+ Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("channelFadeTime"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Height of Channel Display (Percent of OSD Height)"), tmpConf->GetValueRef("channelHeight"), 15, 80));
+ Add(new cMenuEditIntItem(tr("Left & Right Border Width"), tmpConf->GetValueRef("channelBorderVertical"), 0, 300));
+ Add(new cMenuEditIntItem(tr("Bottom Border Height"), tmpConf->GetValueRef("channelBorderBottom"), 0, 300));
+ if (config.GetValue("displayType") != dtGraphical) {
+ Add(new cMenuEditStraItem(tr("Background Style"), tmpConf->GetValueRef("backgroundStyle"), 2, bgStyle));
+ Add(new cMenuEditBoolItem(tr("Rounded Corners"), tmpConf->GetValueRef("roundedCornersChannel")));
}
- Add(new cMenuEditStraItem(tr("Kind of time display for current schedule"), &tmpNopacityConfig->progressCurrentSchedule, 2, progressStyleCurrentSchedule));
- Add(new cMenuEditBoolItem(tr("Display Signal Strength & Quality"), &tmpNopacityConfig->displaySignalStrength));
- Add(new cMenuEditBoolItem(tr("Display Channel Source information"), &tmpNopacityConfig->displaySourceInfo));
- Add(new cMenuEditBoolItem(tr("Display Poster or Fanart from TVScraper"), &tmpNopacityConfig->displayPoster));
- Add(new cMenuEditBoolItem(tr("Display previous and next Channel Group"), &tmpNopacityConfig->displayPrevNextChannelGroup));
- Add(new cMenuEditIntItem(tr("Screen Resolution Icon Size"), &tmpNopacityConfig->resolutionIconSize, 30, 200));
- Add(new cMenuEditIntItem(tr("Status Icons Size"), &tmpNopacityConfig->statusIconSize, 30, 150));
- Add(new cMenuEditStraItem(tr("Status Icon Style"), &tmpNopacityConfig->symbolStyle, 2, symStyle));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), &tmpNopacityConfig->fontChannelHeaderSize, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Date"), &tmpNopacityConfig->fontChannelDateSize, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Text"), &tmpNopacityConfig->fontEPGSize, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Infotext"), &tmpNopacityConfig->fontEPGSmallSize, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Channel Group"), &tmpNopacityConfig->fontChannelGroupSize, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Next/Prev Channel Group"), &tmpNopacityConfig->fontChannelGroupSmallSize, -20, 20));
+ Add(new cMenuEditStraItem(tr("Channel Logo Position"), tmpConf->GetValueRef("logoPosition"), 3, logoPos));
+ if (tmpConf->GetValue("logoPosition")) {
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo original Width")), tmpConf->GetValueRef("logoWidthOriginal"), 30, 500));
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Channel Logo original Height")), tmpConf->GetValueRef("logoHeightOriginal"), 30, 500));
+ }
+ Add(new cMenuEditStraItem(tr("Kind of time display for current schedule"), tmpConf->GetValueRef("progressCurrentSchedule"), 2, progressStyleCurrentSchedule));
+ Add(new cMenuEditBoolItem(tr("Display Signal Strength & Quality"), tmpConf->GetValueRef("displaySignalStrength")));
+ Add(new cMenuEditBoolItem(tr("Display Channel Source information"), tmpConf->GetValueRef("displaySourceInfo")));
+ Add(new cMenuEditBoolItem(tr("Display Poster or Fanart from TVScraper"), tmpConf->GetValueRef("displayPoster")));
+ Add(new cMenuEditBoolItem(tr("Display previous and next Channel Group"), tmpConf->GetValueRef("displayPrevNextChannelGroup")));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), tmpConf->GetValueRef("fontChannelHeaderSize"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Date"), tmpConf->GetValueRef("fontChannelDateSize"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Text"), tmpConf->GetValueRef("fontEPGSize"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - EPG Infotext"), tmpConf->GetValueRef("fontEPGSmallSize"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Channel Source Info"), tmpConf->GetValueRef("fontChannelSourceInfoSize"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Channel Group"), tmpConf->GetValueRef("fontChannelGroupSize"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Next/Prev Channel Group"), tmpConf->GetValueRef("fontChannelGroupSmallSize"), -20, 20));
SetCurrent(Get(currentItem));
Display();
}
@@ -565,12 +411,12 @@ void cNopacitySetupReplayDisplay::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->replayFadeTime, 0, 1000));
- Add(new cMenuEditIntItem(tr("Height of Replay Display (Percent of OSD Height)"), &tmpNopacityConfig->replayHeight, 15, 80));
- Add(new cMenuEditIntItem(tr("Left & Right Border Width"), &tmpNopacityConfig->replayBorderVertical, 0, 300));
- Add(new cMenuEditIntItem(tr("Bottom Border Height"), &tmpNopacityConfig->replayBorderBottom, 0, 300));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), &tmpNopacityConfig->fontReplayHeader, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Text"), &tmpNopacityConfig->fontReplay, -20, 20));
+ Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("replayFadeTime"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Height of Replay Display (Percent of OSD Height)"), tmpConf->GetValueRef("replayHeight"), 15, 80));
+ Add(new cMenuEditIntItem(tr("Left & Right Border Width"), tmpConf->GetValueRef("replayBorderVertical"), 0, 300));
+ Add(new cMenuEditIntItem(tr("Bottom Border Height"), tmpConf->GetValueRef("replayBorderBottom"), 0, 300));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), tmpConf->GetValueRef("fontReplayHeader"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Text"), tmpConf->GetValueRef("fontReplay"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -585,14 +431,14 @@ cNopacitySetupTrackDisplay::cNopacitySetupTrackDisplay(cNopacityConfig* data) :
void cNopacitySetupTrackDisplay::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->tracksFadeTime, 0, 1000));
- Add(new cMenuEditIntItem(tr("Width of Tracks Display (Percent of OSD Width)"), &tmpNopacityConfig->tracksWidth, 10, 100));
- Add(new cMenuEditIntItem(tr("Height of Track Items (in pixels)"), &tmpNopacityConfig->tracksItemHeight, 30, 200));
- Add(new cMenuEditIntItem(tr("Position (0: bot. center, 1: bot. left, ... , 7: bot. right)"), &tmpNopacityConfig->tracksPosition, 0, 7));
- Add(new cMenuEditIntItem(tr("Border Top / Bottom"), &tmpNopacityConfig->tracksBorderHorizontal, 0, 100));
- Add(new cMenuEditIntItem(tr("Border Left / Right"), &tmpNopacityConfig->tracksBorderVertical, 0, 100));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), &tmpNopacityConfig->fontTracksHeader, -20, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size - Buttons"), &tmpNopacityConfig->fontTracks, -20, 20));
+ Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("tracksFadeTime"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Width of Tracks Display (Percent of OSD Width)"), tmpConf->GetValueRef("tracksWidth"), 10, 100));
+ Add(new cMenuEditIntItem(tr("Height of Track Items (in pixels)"), tmpConf->GetValueRef("tracksItemHeight"), 30, 200));
+ Add(new cMenuEditIntItem(tr("Position (0: bot. center, 1: bot. left, ... , 7: bot. right)"), tmpConf->GetValueRef("tracksPosition"), 0, 7));
+ Add(new cMenuEditIntItem(tr("Border Top / Bottom"), tmpConf->GetValueRef("tracksBorderHorizontal"), 0, 100));
+ Add(new cMenuEditIntItem(tr("Border Left / Right"), tmpConf->GetValueRef("tracksBorderVertical"), 0, 100));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Header"), tmpConf->GetValueRef("fontTracksHeader"), -20, 20));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size - Buttons"), tmpConf->GetValueRef("fontTracks"), -20, 20));
SetCurrent(Get(currentItem));
Display();
@@ -608,11 +454,11 @@ void cNopacitySetupMessageDisplay::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->messageFadeTime, 0, 1000));
- Add(new cMenuEditIntItem(tr("Width of Message Display (Percent of OSD Height)"), &tmpNopacityConfig->messageWidth, 30, 100));
- Add(new cMenuEditIntItem(tr("Height of Message Display (Percent of OSD Height)"), &tmpNopacityConfig->messageHeight, 5, 100));
- Add(new cMenuEditIntItem(tr("Bottom Border Height"), &tmpNopacityConfig->messageBorderBottom, 0, 1000));
- Add(new cMenuEditIntItem(tr("Adjust Font Size"), &tmpNopacityConfig->fontMessage, -30, 30));
+ Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("messageFadeTime"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Width of Message Display (Percent of OSD Height)"), tmpConf->GetValueRef("messageWidth"), 30, 100));
+ Add(new cMenuEditIntItem(tr("Height of Message Display (Percent of OSD Height)"), tmpConf->GetValueRef("messageHeight"), 5, 100));
+ Add(new cMenuEditIntItem(tr("Bottom Border Height"), tmpConf->GetValueRef("messageBorderBottom"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size"), tmpConf->GetValueRef("fontMessage"), -30, 30));
SetCurrent(Get(currentItem));
Display();
@@ -627,12 +473,11 @@ cNopacitySetupVolumeDisplay::cNopacitySetupVolumeDisplay(cNopacityConfig* data)
void cNopacitySetupVolumeDisplay::Set(void) {
int currentItem = Current();
Clear();
-
- Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), &tmpNopacityConfig->volumeFadeTime, 0, 1000));
- Add(new cMenuEditIntItem(tr("Width of Volume Display (Percent of OSD Height)"), &tmpNopacityConfig->volumeWidth, 10, 100));
- Add(new cMenuEditIntItem(tr("Height of Volume Display (Percent of OSD Height)"), &tmpNopacityConfig->volumeHeight, 5, 100));
- Add(new cMenuEditIntItem(tr("Bottom Border Height"), &tmpNopacityConfig->volumeBorderBottom, 0, 1000));
- Add(new cMenuEditIntItem(tr("Adjust Font Size"), &tmpNopacityConfig->fontVolume, -30, 30));
+ Add(new cMenuEditIntItem(tr("Fade-In Time in ms (Zero for switching off fading)"), tmpConf->GetValueRef("volumeFadeTime"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Width of Volume Display (Percent of OSD Height)"), tmpConf->GetValueRef("volumeWidth"), 10, 100));
+ Add(new cMenuEditIntItem(tr("Height of Volume Display (Percent of OSD Height)"), tmpConf->GetValueRef("volumeHeight"), 5, 100));
+ Add(new cMenuEditIntItem(tr("Bottom Border Height"), tmpConf->GetValueRef("volumeBorderBottom"), 0, 1000));
+ Add(new cMenuEditIntItem(tr("Adjust Font Size"), tmpConf->GetValueRef("fontVolume"), -30, 30));
SetCurrent(Get(currentItem));
Display();
@@ -649,11 +494,11 @@ void cNopacitySetupCaching::Set(void) {
int currentItem = Current();
Clear();
- Add(new cMenuEditBoolItem(tr("Limit Logo Cache"), &tmpNopacityConfig->limitLogoCache));
- if (tmpNopacityConfig->limitLogoCache) {
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Maximal number of logos to cache")), &tmpNopacityConfig->numLogosMax, 1, 9999));
+ Add(new cMenuEditBoolItem(tr("Limit Logo Cache"), tmpConf->GetValueRef("limitLogoCache")));
+ if (tmpConf->GetValue("limitLogoCache")) {
+ Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Maximal number of logos to cache")), tmpConf->GetValueRef("numLogosMax"), 1, 9999));
}
- Add(new cMenuEditIntItem(tr("Number of logos to cache at start"), &tmpNopacityConfig->numLogosInitial, 0, 9999));
+ Add(new cMenuEditIntItem(tr("Number of logos to cache at start"), tmpConf->GetValueRef("numLogosInitial"), 0, 9999));
Add(InfoItem(tr("Cache Sizes"), ""));
Add(InfoItem(tr("Menu Icon cache"), (imgCache->GetCacheSize(ctMenuIcon)).c_str()));
@@ -661,51 +506,8 @@ void cNopacitySetupCaching::Set(void) {
Add(InfoItem(tr("Logo cache"), (imgCache->GetCacheSize(ctLogo)).c_str()));
Add(InfoItem(tr("Menu Item Logo cache"), (imgCache->GetCacheSize(ctLogoMenuItem)).c_str()));
Add(InfoItem(tr("Timer Logo cache"), (imgCache->GetCacheSize(ctLogoTimer)).c_str()));
- Add(InfoItem(tr("Background Images cache"), (imgCache->GetCacheSize(ctBackground)).c_str()));
+ Add(InfoItem(tr("Background Images cache"), (imgCache->GetCacheSize(ctSkinElement)).c_str()));
SetCurrent(Get(currentItem));
Display();
-}
-
-//-----RSS Feeds-------------------------------------------------------------------------------------------------------------
-
-cNopacitySetupRssFeed::cNopacitySetupRssFeed(cNopacityConfig* data) : cMenuSetupSubMenu(tr("RSS Feeds"), data) {
- scrollSpeed[0] = tr("slow");
- scrollSpeed[1] = tr("medium");
- scrollSpeed[2] = tr("fast");
- feedsWithNone[0] = tr("none");
- int i = 0;
- for (std::vector<RssFeed>::iterator it = config.rssFeeds.begin(); it!=config.rssFeeds.end(); ++it) {
- feeds[i] = it->name.c_str();
- feedsWithNone[i+1] = it->name.c_str();
- i++;
- if (i==20)
- break;
- }
- standalonePos[0] = tr("bottom");
- standalonePos[1] = tr("top");
- Set();
-}
-
-void cNopacitySetupRssFeed::Set(void) {
- int currentItem = Current();
- Clear();
-
- Add(new cMenuEditBoolItem(tr("Display RSS Feed in Skin"), &tmpNopacityConfig->displayRSSFeed));
- if (tmpNopacityConfig->displayRSSFeed) {
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Height of RSS Feed Line (Percent of OSD Height)")), &tmpNopacityConfig->rssFeedHeight, 3, 10));
- Add(new cMenuEditIntItem(cString::sprintf("%s%s", *spacer, tr("Adjust Font Size")), &tmpNopacityConfig->fontRssFeed, -30, 30));
- }
- Add(new cMenuEditIntItem(tr("Height of standalone RSS Feed (Percent of OSD Height)"), &tmpNopacityConfig->rssFeedHeightStandalone, 3, 20));
- Add(new cMenuEditIntItem(tr("Adjust Font Size of standalone Feed"), &tmpNopacityConfig->fontRssFeedStandalone, -30, 30));
- Add(new cMenuEditStraItem(tr("Standalone RSS Feed Position"), &tmpNopacityConfig->rssFeedStandalonePos, 2, standalonePos));
- Add(new cMenuEditStraItem(tr("RSS Feed 1"), &tmpNopacityConfig->rssFeed[0], config.rssFeeds.size(), feeds));
- Add(new cMenuEditStraItem(tr("RSS Feed 2"), &tmpNopacityConfig->rssFeed[1], config.rssFeeds.size()+1, feedsWithNone));
- Add(new cMenuEditStraItem(tr("RSS Feed 3"), &tmpNopacityConfig->rssFeed[2], config.rssFeeds.size()+1, feedsWithNone));
- Add(new cMenuEditStraItem(tr("RSS Feed 4"), &tmpNopacityConfig->rssFeed[3], config.rssFeeds.size()+1, feedsWithNone));
- Add(new cMenuEditStraItem(tr("RSS Feed 5"), &tmpNopacityConfig->rssFeed[4], config.rssFeeds.size()+1, feedsWithNone));
- Add(new cMenuEditStraItem(tr("Scrolling Speed"), &tmpNopacityConfig->rssScrollSpeed, 3, scrollSpeed));
- Add(new cMenuEditIntItem(tr("Scrolling Delay in s"), &tmpNopacityConfig->rssScrollDelay, 0, 3));
- SetCurrent(Get(currentItem));
- Display();
} \ No newline at end of file
diff --git a/setup.h b/setup.h
index 64e0ec5..b029cf7 100644
--- a/setup.h
+++ b/setup.h
@@ -6,7 +6,7 @@ class cNopacitySetup : public cMenuSetupPage {
cNopacitySetup(cImageCache *imgCache);
virtual ~cNopacitySetup();
private:
- cNopacityConfig tmpNopacityConfig;
+ cNopacityConfig tmpConf;
cImageCache *imgCache;
cStringList fontNames;
void Setup(void);
@@ -19,7 +19,7 @@ class cNopacitySetup : public cMenuSetupPage {
class cMenuSetupSubMenu : public cOsdMenu {
protected:
- cNopacityConfig *tmpNopacityConfig;
+ cNopacityConfig *tmpConf;
cString spacer;
virtual eOSState ProcessKey(eKeys Key);
virtual void Set(void) = 0;
@@ -88,7 +88,6 @@ class cNopacitySetupChannelDisplay : public cMenuSetupSubMenu {
protected:
const char *logoPos[3];
const char *progressStyleCurrentSchedule[2];
- const char *symStyle[2];
const char *bgStyle[2];
void Set(void);
public:
@@ -130,15 +129,4 @@ class cNopacitySetupCaching : public cMenuSetupSubMenu {
public:
cNopacitySetupCaching(cNopacityConfig *data, cImageCache *imgCache);
};
-
-class cNopacitySetupRssFeed : public cMenuSetupSubMenu {
- protected:
- const char *scrollSpeed[3];
- const char *feeds[20];
- const char *feedsWithNone[21];
- const char *standalonePos[2];
- void Set(void);
- public:
- cNopacitySetupRssFeed(cNopacityConfig *data);
-};
#endif //__NOPACITY_SETUP_H \ No newline at end of file
diff --git a/skinnopacity.c b/skinnopacity.c
index 602029b..f31a902 100644
--- a/skinnopacity.c
+++ b/skinnopacity.c
@@ -15,7 +15,7 @@
#endif
-static const char *VERSION = "0.1.4 dev";
+static const char *VERSION = "0.9.0";
static const char *DESCRIPTION = "'nOpacity' Skin";
static const char *MAINMENUENTRY = "nOpacity";
@@ -144,37 +144,10 @@ bool cPluginNopacity::Service(const char *Id, void *Data) {
}
const char **cPluginNopacity::SVDRPHelpPages(void) {
- static const char *HelpPages[] = {
- "NEXTMESG\n"
- " Switches to next message in running RSS Feed\n",
- "NEXTFEED\n"
- " Switches to next defined RSS Feed in Setup Menu\n",
- "STANDALONEFEED\n"
- " Switches standalone RSS Feed on and off\n",
- NULL
- };
- return HelpPages;
-
+ return NULL;
}
cString cPluginNopacity::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) {
- if (!strcasecmp(Command, "NEXTMESG")) {
- ReplyCode = 250;
- nopacity->svdrpSwitchMessage();
- return "Switched to next RSS Message";
- } else if (!strcasecmp(Command, "NEXTFEED")) {
- ReplyCode = 250;
- nopacity->svdrpSwitchRss();
- return "Switched to next RSS Feed";
- } else if (!strcasecmp(Command, "STANDALONEFEED")) {
- ReplyCode = 250;
- bool onOff = nopacity->svdrpToggleStandaloneRss();
- if (onOff)
- return "Displaying standalone RSS Feed";
- else
- return "Closing standalone RSS Feed";
- }
- ReplyCode = 502;
return NULL;
}
diff --git a/textwindow.c b/textwindow.c
index ee1e2cb..095b808 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -42,7 +42,7 @@ cNopacityTextWindow::~cNopacityTextWindow(void) {
osd->DestroyPixmap(pixmap);
pixmap = NULL;
}
- if ((config.scalePicture == 2) && scaledWindow) {
+ if ((config.GetValue("scalePicture") == 2) && scaledWindow) {
cRect vidWinNew = cDevice::PrimaryDevice()->CanScaleVideo(oldVidWin);
if (vidWinNew != cRect::Null) {
vidWin->SetX(vidWinNew.X());
@@ -59,8 +59,8 @@ bool cNopacityTextWindow::SetManualPoster(const cRecording *recording, bool full
hasManualPoster = imgLoader.SearchRecordingPoster(recording->FileName(), posterFound);
if (hasManualPoster) {
manualPosterPath = posterFound;
- int posterWidthOrig = config.posterWidth;
- int posterHeightOrig = config.posterHeight;
+ int posterWidthOrig = config.GetValue("posterWidth");
+ int posterHeightOrig = config.GetValue("posterHeight");
if (!fullscreen) {
posterHeight = geometry->Height() - 5;
posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
@@ -164,7 +164,7 @@ void cNopacityTextWindow::CreatePixmap(void) {
pixmapBackground->Fill(Theme.Color(clrMenuBorder));
pixmapBackground->DrawRectangle(cRect(1, 1, geometry->Width(), geometry->Height()), clrBlack);
pixmap->Fill(Theme.Color(clrMenuBack));
- if (config.menuEPGWindowFadeTime) {
+ if (config.GetValue("menuEPGWindowFadeTime")) {
pixmap->SetAlpha(0);
pixmapBackground->SetAlpha(0);
}
@@ -175,14 +175,14 @@ void cNopacityTextWindow::CreatePixmapFullScreen(void) {
pixmapBackground = osd->CreatePixmap(4, cRect(geometry->X()-1, geometry->Y()-1, geometry->Width()+2, geometry->Height()+2));
pixmap = osd->CreatePixmap(5, cRect(geometry->X(), geometry->Y(), geometry->Width(), geometry->Height()));
pixmapBackground->Fill(Theme.Color(clrMenuBorder));
- pixmapBackground->DrawRectangle(cRect(1, 1, geometry->Width(), geometry->Height()), Theme.Color(clrMenuBack));
+ pixmapBackground->DrawRectangle(cRect(1, 1, geometry->Width(), geometry->Height()), Theme.Color(clrMenuTextWindow));
pixmap->Fill(clrTransparent);
}
void cNopacityTextWindow::DrawText(int border, int left) {
int lineHeight = font->Height();
int currentLineHeight = lineHeight/2;
- tColor clrFontBack = (config.doBlending)?(clrTransparent):(Theme.Color(clrMenuBack));
+ tColor clrFontBack = (config.GetValue("displayType") != dtFlat)?(clrTransparent):(Theme.Color(clrMenuBack));
cPixmap::Lock();
if (drawTextTall) {
for (int i=0; (i < twTextTall.Lines()) && Running(); i++) {
@@ -203,7 +203,7 @@ void cNopacityTextWindow::SetEvent(const cEvent *event) {
if (!event)
return;
CreatePixmapFullScreen();
- int border = config.borderDetailedEPG;
+ int border = config.GetValue("borderDetailedEPG");
int width = geometry->Width();
int height = geometry->Height();
int widthTextHeader = width - 2 * border;
@@ -219,8 +219,8 @@ void cNopacityTextWindow::SetEvent(const cEvent *event) {
}
} else if (imgLoader.LoadEPGImage(event->EventID())) {
epgImageFound = true;
- pixmap->DrawImage(cPoint(width - config.epgImageWidth - border, y), imgLoader.GetImage());
- widthTextHeader -= config.epgImageWidth + border;
+ pixmap->DrawImage(cPoint(width - config.GetValue("epgImageWidth") - border, y), imgLoader.GetImage());
+ widthTextHeader -= config.GetValue("epgImageWidth") + border;
}
//Title
y = DrawTextWrapper(event->Title(), widthTextHeader, y, border, fontHeader, Theme.Color(clrMenuFontDetailViewHeaderTitle), height);
@@ -234,8 +234,8 @@ void cNopacityTextWindow::SetEvent(const cEvent *event) {
DrawTextWrapperFloat(event->Description(),
widthTextHeader, widthText, y, heightNarrow,
border, font, Theme.Color(clrMenuFontDetailViewText), height);
- } else if (epgImageFound && (y < (border + config.epgImageHeight))) {
- y = border + config.epgImageHeight;
+ } else if (epgImageFound && (y < (border + config.GetValue("epgImageHeight")))) {
+ y = border + config.GetValue("epgImageHeight");
DrawTextWrapper(event->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), height);
} else {
DrawTextWrapper(event->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), height);
@@ -246,7 +246,7 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) {
if (!recording)
return;
CreatePixmapFullScreen();
- int border = config.borderDetailedRecordings;
+ int border = config.GetValue("borderDetailedRecordings");
int width = geometry->Width();
int height = geometry->Height();
int widthTextHeader = width - 2 * border;
@@ -268,8 +268,8 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) {
widthTextHeader -= posterWidth + border;
}
} else if (imgLoader.LoadRecordingImage(recording->FileName())) {
- pixmap->DrawImage(cPoint(width - config.epgImageWidth - border, y), imgLoader.GetImage());
- widthTextHeader -= config.epgImageWidth + border;
+ pixmap->DrawImage(cPoint(width - config.GetValue("epgImageWidth") - border, y), imgLoader.GetImage());
+ widthTextHeader -= config.GetValue("epgImageWidth") + border;
recImageFound = true;
}
const cRecordingInfo *info = recording->Info();
@@ -293,8 +293,8 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) {
DrawTextWrapperFloat(recording->Info()->Description(),
widthTextHeader, widthText, y, heightNarrow,
border, font, Theme.Color(clrMenuFontDetailViewText), height);
- } else if (recImageFound && (y < (border + config.epgImageHeight))) {
- y = border + config.epgImageHeight;
+ } else if (recImageFound && (y < (border + config.GetValue("epgImageHeight")))) {
+ y = border + config.GetValue("epgImageHeight");
DrawTextWrapper(recording->Info()->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), height);
} else {
DrawTextWrapper(recording->Info()->Description(), widthText, y, border, font, Theme.Color(clrMenuFontDetailViewText), height);
@@ -410,9 +410,9 @@ void cNopacityTextWindow::Action(void) {
if (! *text)
return;
- DoSleep(config.menuInfoTextDelay*1000);
+ DoSleep(config.GetValue("menuInfoTextDelay")*1000);
- if (config.scalePicture == 2) {
+ if (config.GetValue("scalePicture") == 2) {
ScaleVideoWindow();
}
@@ -432,10 +432,10 @@ void cNopacityTextWindow::Action(void) {
DrawPoster(border);
}
//FadeIn
- if (config.menuEPGWindowFadeTime) {
+ if (config.GetValue("menuEPGWindowFadeTime")) {
uint64_t Start = cTimeMs::Now();
- int FadeTime = config.menuEPGWindowFadeTime;
- int FadeFrameTime = config.menuEPGWindowFrameTime;
+ int FadeTime = config.GetValue("menuEPGWindowFadeTime");
+ int FadeFrameTime = FadeTime / 10;
while (Running()) {
uint64_t Now = cTimeMs::Now();
cPixmap::Lock();
@@ -455,10 +455,17 @@ void cNopacityTextWindow::Action(void) {
}
if (scrolling && Running()) {
- int scrollDelay = config.menuInfoScrollDelay * 1000;
+ int scrollDelay = config.GetValue("menuInfoScrollDelay") * 1000;
DoSleep(scrollDelay);
int drawPortY;
- int FrameTime = config.menuInfoScrollFrameTime;
+ int FrameTime = 0;
+ if (config.GetValue("menuInfoScrollSpeed") == 1)
+ FrameTime = 50;
+ else if (config.GetValue("menuInfoScrollSpeed") == 2)
+ FrameTime = 30;
+ else if (config.GetValue("menuInfoScrollSpeed") == 3)
+ FrameTime = 15;
+
int maxY = pixmap->DrawPort().Height() - pixmap->ViewPort().Height();
bool doSleep = false;
while (Running()) {
diff --git a/themes/nOpacity-darkblue.theme b/themes/nOpacity-darkblue.theme
index 0526a10..4f51e77 100644
--- a/themes/nOpacity-darkblue.theme
+++ b/themes/nOpacity-darkblue.theme
@@ -1,6 +1,4 @@
Description = Dark Blue
-#DO BLENDING
-clrDoBlending = FFFFFFFF
clrChannelBackground = B0000000
clrChannelBackBlend = DD5078ab
clrChannelHead = FFEEEEEE
diff --git a/themes/nOpacity-darkgrey.theme b/themes/nOpacity-darkgrey.theme
index f9ac6c8..776ec97 100644
--- a/themes/nOpacity-darkgrey.theme
+++ b/themes/nOpacity-darkgrey.theme
@@ -1,5 +1,4 @@
Description = Dark Grey
-clrDoBlending = FFFFFFFF
clrChannelBackground = B0000000
clrChannelBackBlend = B0858585
clrChannelHead = FFEEEEEE
diff --git a/themes/nOpacity-darkred.theme b/themes/nOpacity-darkred.theme
index cb27639..f12192a 100644
--- a/themes/nOpacity-darkred.theme
+++ b/themes/nOpacity-darkred.theme
@@ -1,6 +1,4 @@
Description = Dark Red
-#DO BLENDING
-clrDoBlending = FFFFFFFF
clrChannelBackground = CC000000
clrChannelBackBlend = CC333333
clrChannelHead = FFEEEEEE
diff --git a/themes/nOpacity-default.theme b/themes/nOpacity-default.theme
index cbf2dc7..a6a3d09 100644
--- a/themes/nOpacity-default.theme
+++ b/themes/nOpacity-default.theme
@@ -1,5 +1,4 @@
Description = Default
-clrDoBlending = FFFFFFFF
clrChannelBackground = B0000000
clrChannelBackBlend = B0003DF5
clrChannelHead = FF0066FF
@@ -22,7 +21,7 @@ clrReplayBackBlend = B0003DF5
clrReplayHead = FFFFFFFF
clrReplayDescription = FF858585
clrReplayCurrentTotal = FF003DF5
-clrReplayProgressSeen = DD003DF5
+clrReplayProgressSeen = DD80B3FF
clrReplayProgressRest = DD858585
clrReplayProgressSelected = FF000000
clrReplayProgressMark = FF000000
diff --git a/themes/nOpacity-freestyle.theme b/themes/nOpacity-freestyle.theme
new file mode 100644
index 0000000..7c31f1b
--- /dev/null
+++ b/themes/nOpacity-freestyle.theme
@@ -0,0 +1,96 @@
+Description = Freestyle
+clrChannelBackground = B0000000
+clrChannelBackBlend = B0858585
+clrChannelHead = FFEEEEEE
+clrChannelEPG = FFFFFFFF
+clrChannelEPGInfo = FFFFFFFF
+clrChannelEPGNext = FF858585
+clrChannelEPGInfoNext = FF858585
+clrChannelProgressBar = FFC6D590
+clrChannelProgressBarBack = DD000000
+clrChannelProgressBarBlend = FF8EAB21
+clrChannelSymbolOn = FFFFD700
+clrChannelSymbolOff = DD858585
+clrChannelRecActive = DDFF0000
+clrRecNow = DDFF0000
+clrRecNowFont = FFFFFFFF
+clrRecNext = DDFFFF00
+clrRecNextFont = FF000000
+clrReplayBackground = AA353B4E
+clrReplayBackBlend = B0858585
+clrReplayHead = FFFFFFFF
+clrReplayDescription = FFFFFFFF
+clrReplayCurrentTotal = FFFFFFFF
+clrReplayProgressSeen = FF8EAB21
+clrReplayProgressRest = DD858585
+clrReplayProgressSelected = FF000000
+clrReplayProgressMark = FF000000
+clrReplayProgressCurrent = 90FFFFFF
+clrReplayHighlightIcon = FFFFD700
+clrTracksFontHead = FF858585
+clrTracksFontButtons = FFFFFFFF
+clrVolumeFont = FFFFFFFF
+clrMenuBack = AA12273f
+clrMenuBorder = AA242A38
+clrMenuScrollBar = 908EAB21
+clrMenuScrollBarBack = 99242A38
+clrMenuScrollBarBase = 00000000
+clrMenuItem = 7D444444
+clrMenuItemBlend = 64000000
+clrMenuItemHigh = 7D000000
+clrMenuItemHighBlend = FE999999
+clrSeparatorBorder = EE444444
+clrDiskAlert = 90cc0000
+clrTimersBack = 7D000000
+clrTimersBackBlend = FE999999
+clrMenuFontHeader = FFFFFFFF
+clrMenuFontDate = FFFFFFFF
+clrMenuFontDiscUsage = FFFFFFFF
+clrMenuFontTimers = FFFFFFFF
+clrMenuFontTimersHeader = FFFFFFFF
+clrMenuFontDetailViewText = FFFFFFFF
+clrMenuFontDetailViewHeader = FF858585
+clrMenuFontDetailViewHeaderTitle = FFFFFFFF
+clrMenuFontMenuItem = FFFFFFFF
+clrMenuFontMenuItemHigh = FF363636
+clrMenuFontMenuItemTitle = FF363636
+clrMenuFontMenuItemSep = FF858585
+clrMenuHeader = DD000000
+clrMenuHeaderBlend = 60FFFFFF
+clrAudioMenuHeader = DD000000
+clrProgressBar = FFC6D590
+clrProgressBarBack = DD000000
+clrProgressBarBlend = FF8EAB21
+clrProgressBarHigh = DD4E78B1
+clrProgressBarBackHigh = DD000000
+clrProgressBarBlendHigh = DD80B3FF
+clrMenuTextWindow = DD000000
+clrButtonRed = 99BB0000
+clrButtonRedBorder = FFBB0000
+clrButtonRedFont = FFFFFFFF
+clrButtonGreen = 9900BB00
+clrButtonGreenBorder = FF00BB00
+clrButtonGreenFont = FFFFFFFF
+clrButtonYellow = 99BBBB00
+clrButtonYellowBorder = FFBBBB00
+clrButtonYellowFont = FFFFFFFF
+clrButtonBlue = 990000BB
+clrButtonBlueBorder = FF0000BB
+clrButtonBlueFont = FFFFFFFF
+clrRSSFeedBorder = FF858585
+clrRSSFeedTitle = FF858585
+clrRSSFeedText = FFFFFFFF
+clrRSSFeedHeaderText = FFFFFFFF
+clrRSSFeedHeaderBack = 7D000000
+clrRSSFeedHeaderBackBlend = FE999999
+clrRSSFeedBack = EE444444
+clrRSSFeedBackBlend = 90000000
+clrMessageFontStatus = FFFFFFFF
+clrMessageFontInfo = FFFFFFFF
+clrMessageFontWarning = FFFFFFFF
+clrMessageFontError = FFFFFFFF
+clrMessageStatus = 9000BBFF
+clrMessageInfo = 90009900
+clrMessageWarning = 90BBBB00
+clrMessageError = 90BB0000
+clrMessageBlend = DD000000
diff --git a/themes/nOpacity-green.theme b/themes/nOpacity-green.theme
index b1a09c6..5f0bf8c 100644
--- a/themes/nOpacity-green.theme
+++ b/themes/nOpacity-green.theme
@@ -1,6 +1,4 @@
Description = Green
-#DO BLENDING
-clrDoBlending = FFFFFFFF
clrChannelBackground = B0000000
clrChannelBackBlend = DD006600
clrChannelHead = FFFFCC00
diff --git a/themes/nOpacity-iceblue.theme b/themes/nOpacity-iceblue.theme
index 001de5c..cfa78ac 100644
--- a/themes/nOpacity-iceblue.theme
+++ b/themes/nOpacity-iceblue.theme
@@ -1,6 +1,4 @@
Description = IceBlue
-#DO BLENDING
-clrDoBlending = 00000000
clrChannelBackground = B0FFFFFF
clrChannelBackBlend = FFFFFFFF
clrChannelHead = FF000000
diff --git a/themes/nOpacity-light.theme b/themes/nOpacity-light.theme
index 5ffdbb5..c785875 100644
--- a/themes/nOpacity-light.theme
+++ b/themes/nOpacity-light.theme
@@ -1,6 +1,4 @@
Description = Keep it Light
-#DO BLENDING
-clrDoBlending = 00000000
clrChannelBackground = AA000000
clrChannelBackBlend = AA000000
clrChannelHead = FFEEEEEE
diff --git a/timers.c b/timers.c
index 929d5d7..b58fbd7 100644
--- a/timers.c
+++ b/timers.c
@@ -107,7 +107,7 @@ void cNopacityTimer::CalculateHeight(int space) {
height = numLines * lineHeight + 2*space;
} else {
int lineHeight = font->Height();
- height = config.timersLogoHeight + (numLines +1)* lineHeight + 2*space;
+ height = config.GetValue("timersLogoHeight") + (numLines +1)* lineHeight + 2*space;
}
}
@@ -124,7 +124,7 @@ void cNopacityTimer::Render(void) {
if (isTimerConflict) {
pixmapLogo->Fill(clrTransparent);
pixmap->Fill(Theme.Color(clrDiskAlert));
- if (config.doBlending) {
+ if (config.GetValue("displayType") == dtBlending) {
cImage imgBack = imgCache->GetBackground(Theme.Color(clrDiskAlert), Theme.Color(clrMenuItemHigh), width-2, height-2);
pixmap->DrawImage(cPoint(1,1), imgBack);
} else {
@@ -144,7 +144,7 @@ void cNopacityTimer::Render(void) {
DrawLogo();
if (timer->Recording()) {
pixmap->Fill(Theme.Color(clrDiskAlert));
- if (config.doBlending) {
+ if (config.GetValue("displayType") == dtBlending) {
cImage imgBack = imgCache->GetBackground(Theme.Color(clrDiskAlert), Theme.Color(clrMenuItemHigh), width-2, height-2);
pixmap->DrawImage(cPoint(1,1), imgBack);
} else {
@@ -152,7 +152,7 @@ void cNopacityTimer::Render(void) {
}
} else {
pixmap->Fill(Theme.Color(clrMenuBorder));
- if (config.doBlending) {
+ if (config.GetValue("displayType") == dtBlending) {
cImage imgBack = imgCache->GetBackground(Theme.Color(clrTimersBack), Theme.Color(clrTimersBackBlend), width-2, height-2);
pixmap->DrawImage(cPoint(1,1), imgBack);
} else {
@@ -160,10 +160,10 @@ void cNopacityTimer::Render(void) {
}
}
- pixmapText->DrawText(cPoint(5, config.timersLogoHeight), *Date, Theme.Color(clrMenuFontTimersHeader), clrTransparent, fontLarge);
+ pixmapText->DrawText(cPoint(5, config.GetValue("timersLogoHeight")), *Date, Theme.Color(clrMenuFontTimersHeader), clrTransparent, fontLarge);
int lineHeight = font->Height();
- int yStart = config.timersLogoHeight + lineHeight + 3;
+ int yStart = config.GetValue("timersLogoHeight") + lineHeight + 3;
int numLines = showName.Lines();
for (int line=0; line<numLines; line++)
pixmapText->DrawText(cPoint(5, yStart+line*(lineHeight-2)), showName.GetLine(line), Theme.Color(clrMenuFontTimers), clrTransparent, font);
@@ -172,9 +172,9 @@ void cNopacityTimer::Render(void) {
void cNopacityTimer::DrawLogo(void) {
pixmapLogo->Fill(clrTransparent);
- int showTimerLogo = (config.showTimers < 2) ? 1 : 0;
- int logoWidth = config.timersLogoWidth;
- int logoHeight = config.timersLogoHeight;
+ int showTimerLogo = (config.GetValue("showTimers") < 2) ? 1 : 0;
+ int logoWidth = config.GetValue("timersLogoWidth");
+ int logoHeight = config.GetValue("timersLogoHeight");
const cChannel *Channel = timer->Channel();
if (Channel) {
bool logoFound = false;