New icons

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@938 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2011-07-11 07:08:15 +00:00
parent 2d45cc97c5
commit baa2cd0cec
9 changed files with 9 additions and 8 deletions

View File

@@ -774,13 +774,14 @@ FW_showRoom()
if(!$FW_iconsread || (time() - $FW_iconsread) > 5) { if(!$FW_iconsread || (time() - $FW_iconsread) > 5) {
%FW_icons = (); %FW_icons = ();
if(opendir(DH, $FW_dir)) { if(opendir(DH, $FW_dir)) {
while(my $l = readdir(DH)) { my @files = readdir(DH);
next if($l =~ m/^\./); closedir(DH);
foreach my $l (sort @files) { # Order: .gif,.jpg,.png
next if($l !~ m/\.(png|gif|jpg)$/i);
my $x = $l; my $x = $l;
$x =~ s/\.[^.]+$//; # Cut .gif/.jpg $x =~ s/\.[^.]+$//; # Cut .gif/.jpg
$FW_icons{$x} = $l; $FW_icons{$x} = $l;
} }
closedir(DH);
} }
$FW_iconsread = time(); $FW_iconsread = time();
} }
@@ -843,11 +844,11 @@ FW_showRoom()
} elsif($iv) { } elsif($iv) {
$iv =~ s/ .*//; # Want to be able to have icons for "on-for-timer xxx" $iv =~ s/ .*//; # Want to be able to have icons for "on-for-timer xxx"
$iname = $FW_icons{"FS20.$iv"} if($FW_icons{"FS20.$iv"}); $iname = $FW_icons{"$iv"} if($FW_icons{$iv}); # on.png
$iname = $FW_icons{"$type"} if($FW_icons{"$type"}); $iname = $FW_icons{"$type"} if($FW_icons{$type}); # FS20.png
$iname = $FW_icons{"$type.$iv"} if($FW_icons{"$type.$iv"}); $iname = $FW_icons{"$type.$iv"} if($FW_icons{"$type.$iv"}); # FS20.on.png
$iname = $FW_icons{"$d"} if($FW_icons{"$d"}); $iname = $FW_icons{"$d"} if($FW_icons{$d}); # lamp.png
$iname = $FW_icons{"$d.$iv"} if($FW_icons{"$d.$iv"}); $iname = $FW_icons{"$d.$iv"} if($FW_icons{"$d.$iv"}); # lamp.on.png
} }
$v = "" if(!defined($v)); $v = "" if(!defined($v));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB