2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

New icons

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

View File

@ -774,13 +774,14 @@ FW_showRoom()
if(!$FW_iconsread || (time() - $FW_iconsread) > 5) {
%FW_icons = ();
if(opendir(DH, $FW_dir)) {
while(my $l = readdir(DH)) {
next if($l =~ m/^\./);
my @files = readdir(DH);
closedir(DH);
foreach my $l (sort @files) { # Order: .gif,.jpg,.png
next if($l !~ m/\.(png|gif|jpg)$/i);
my $x = $l;
$x =~ s/\.[^.]+$//; # Cut .gif/.jpg
$FW_icons{$x} = $l;
}
closedir(DH);
}
$FW_iconsread = time();
}
@ -843,11 +844,11 @@ FW_showRoom()
} elsif($iv) {
$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{"$type"} if($FW_icons{"$type"});
$iname = $FW_icons{"$type.$iv"} if($FW_icons{"$type.$iv"});
$iname = $FW_icons{"$d"} if($FW_icons{"$d"});
$iname = $FW_icons{"$d.$iv"} if($FW_icons{"$d.$iv"});
$iname = $FW_icons{"$iv"} if($FW_icons{$iv}); # on.png
$iname = $FW_icons{"$type"} if($FW_icons{$type}); # FS20.png
$iname = $FW_icons{"$type.$iv"} if($FW_icons{"$type.$iv"}); # FS20.on.png
$iname = $FW_icons{"$d"} if($FW_icons{$d}); # lamp.png
$iname = $FW_icons{"$d.$iv"} if($FW_icons{"$d.$iv"}); # lamp.on.png
}
$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