diff options
author | Angelo Naselli <anaselli@linux.it> | 2016-01-04 18:52:35 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2016-01-04 18:52:35 +0100 |
commit | 96942e4ddfa330bb339d13d0ac2c0a8941db168a (patch) | |
tree | 2ad14cb2fde4e1eefb12cb5256c1d1e44168b2ec /lib | |
parent | edd211c4827a0ce8b19d7baf5ce6c1c8163192da (diff) | |
download | manatools-96942e4ddfa330bb339d13d0ac2c0a8941db168a.tar manatools-96942e4ddfa330bb339d13d0ac2c0a8941db168a.tar.gz manatools-96942e4ddfa330bb339d13d0ac2c0a8941db168a.tar.bz2 manatools-96942e4ddfa330bb339d13d0ac2c0a8941db168a.tar.xz manatools-96942e4ddfa330bb339d13d0ac2c0a8941db168a.zip |
managed also relative pathnamed icons
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ManaTools/MainDisplay.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/ManaTools/MainDisplay.pm b/lib/ManaTools/MainDisplay.pm index 5be17d01..59915b69 100644 --- a/lib/ManaTools/MainDisplay.pm +++ b/lib/ManaTools/MainDisplay.pm @@ -641,6 +641,10 @@ sub _loadSettings { ); $self->logger()->I($self->loc()->N("Load settings: %s content is <<%s>>", $key, $settings->{$key})); } + elsif (($key eq "icon" || $key eq "logo") && (substr( $read->{$key}, 0, 1) ne '/')) { + # icon with relative path? + $settings->{$key} = File::ShareDir::dist_file(ManaTools::Shared::distName(), $read->{$key}); + } else { $settings->{$key} = $read->{$key}; } @@ -825,11 +829,17 @@ sub _loadCategories { $tmp, 'title' ); + my $icon = $tmp->{icon}; + if ((substr( $icon, 0, 1) ne '/')) { + # icon with relative path? + $icon = File::ShareDir::dist_file(ManaTools::Shared::distName(), $tmp->{icon}); + } + $self->logger()->D($self->loc()->N("Load categories: module title is <<%s>>", $title)); if (not $currCategory->moduleLoaded($title)) { $tmpMod = ManaTools::Module->create( name => $title, - icon => $tmp->{icon}, + icon => $icon, launch => $tmp->{launcher} ); } |