summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-17 17:05:26 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2013-11-17 17:05:26 +0100
commita0c769064b4f93f1dbe852f3cfe6150adc809deb (patch)
tree8d759c2e493939535163d6b04f012bb57577742f
parentb5993e70b53eb7397fc7af812e737f94513fe3a8 (diff)
downloadskin-flatplus-a0c769064b4f93f1dbe852f3cfe6150adc809deb.tar.gz
skin-flatplus-a0c769064b4f93f1dbe852f3cfe6150adc809deb.tar.bz2
use icon from default theme if current theme does not have this icon
-rw-r--r--displaychannel.c5
-rw-r--r--imageloader.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/displaychannel.c b/displaychannel.c
index 128fa780..559008cc 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -123,10 +123,7 @@ void cFlatDisplayChannel::SetChannel(const cChannel *Channel, int Number) {
void cFlatDisplayChannel::ChannelIconsDraw(const cChannel *Channel, bool Resolution) {
if( !Resolution ) {
chanIconsPixmap->Fill( clrTransparent );
- printf("no resolution\n");
- } else
- printf("resolution width: %d\n", screenWidth);
-
+ }
int width = fontSmlHeight;
int top = fontHeight*2 + fontSmlHeight*2 + marginItem;
diff --git a/imageloader.c b/imageloader.c
index 1c0ec688..1b5c3772 100644
--- a/imageloader.c
+++ b/imageloader.c
@@ -49,8 +49,12 @@ bool cImageLoader::LoadIcon(const char *cIcon, int size) {
return false;
cString iconThemePath = cString::sprintf("%s%s/", *Config.iconPath, Setup.OSDTheme);
bool success = LoadImage(cString(cIcon), iconThemePath, "png");
- if (!success)
- return false;
+ if( !success ) {
+ iconThemePath = cString::sprintf("%s%s/", *Config.iconPath, "default");
+ success = LoadImage(cString(cIcon), iconThemePath, "png");
+ if( !success )
+ return false;
+ }
if( size >= 0 )
buffer.sample(Geometry(size, size));
return true;
@@ -62,8 +66,12 @@ bool cImageLoader::LoadIcon(const char *cIcon, int width, int height, bool prese
return false;
cString iconThemePath = cString::sprintf("%s%s/", *Config.iconPath, Setup.OSDTheme);
bool success = LoadImage(cString(cIcon), iconThemePath, "png");
- if (!success)
- return false;
+ if( !success ) {
+ iconThemePath = cString::sprintf("%s%s/", *Config.iconPath, "default");
+ success = LoadImage(cString(cIcon), iconThemePath, "png");
+ if( !success )
+ return false;
+ }
if (preserveAspect) {
buffer.sample(Geometry(width, height));
} else {