diff options
author | Maarten Vanraes <alien@mageia.org> | 2016-05-09 00:21:17 +0200 |
---|---|---|
committer | Maarten Vanraes <alien@mageia.org> | 2016-05-09 00:21:17 +0200 |
commit | 0db6f42eadd442e494f95fed75b4ff6b190674b7 (patch) | |
tree | 9f59d212d8ca264ed80abee074337d304cec6e93 /lib/ManaTools | |
parent | 14f4701faac6ed5d25076428989c2f0f335b9816 (diff) | |
download | manatools-0db6f42eadd442e494f95fed75b4ff6b190674b7.tar manatools-0db6f42eadd442e494f95fed75b4ff6b190674b7.tar.gz manatools-0db6f42eadd442e494f95fed75b4ff6b190674b7.tar.bz2 manatools-0db6f42eadd442e494f95fed75b4ff6b190674b7.tar.xz manatools-0db6f42eadd442e494f95fed75b4ff6b190674b7.zip |
Module: default icon is dependant on name
Diffstat (limited to 'lib/ManaTools')
-rw-r--r-- | lib/ManaTools/Module.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ManaTools/Module.pm b/lib/ManaTools/Module.pm index ee2a8bb9..d4f2eb0f 100644 --- a/lib/ManaTools/Module.pm +++ b/lib/ManaTools/Module.pm @@ -51,8 +51,16 @@ use yui; has 'icon' => ( is => 'rw', isa => 'Str', + lazy => 1, + builder => '_iconInitializer', ); +sub _iconInitializer { + my $self = shift; + + return File::ShareDir::dist_file(ManaTools::Shared::distName(), sprintf('images/%s.png', $self->name())), +} + #============================================================= =head2 name |