aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2016-05-09 09:22:32 +0200
committerMaarten Vanraes <alien@mageia.org>2016-05-14 09:25:24 +0200
commit153ab7b66ea396dcb627126acc26d6d6238054ae (patch)
tree92905d8b8b0c5155f33264ed428c66a373c1a1a0
parent6e70e6b2fdb51c307fc3a4dba4aa955337681679 (diff)
downloadmanatools-153ab7b66ea396dcb627126acc26d6d6238054ae.tar
manatools-153ab7b66ea396dcb627126acc26d6d6238054ae.tar.gz
manatools-153ab7b66ea396dcb627126acc26d6d6238054ae.tar.bz2
manatools-153ab7b66ea396dcb627126acc26d6d6238054ae.tar.xz
manatools-153ab7b66ea396dcb627126acc26d6d6238054ae.zip
Disk: provide title & icon using the new Module
-rw-r--r--lib/ManaTools/Module/Disk.pm36
1 files changed, 10 insertions, 26 deletions
diff --git a/lib/ManaTools/Module/Disk.pm b/lib/ManaTools/Module/Disk.pm
index 95226583..a5228a64 100644
--- a/lib/ManaTools/Module/Disk.pm
+++ b/lib/ManaTools/Module/Disk.pm
@@ -73,10 +73,18 @@ use yui;
extends qw( ManaTools::Module );
-has '+icon' => (
- default => File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/manadisk.png'),
+has '+name' => (
+ default => 'manadisk',
+ required => 0,
+ init_arg => undef,
);
+override('_titleInitializer', sub {
+ my $self = shift;
+
+ return $self->loc->N("%s - Storage partitioning & Mounts", $self->name());
+});
+
has 'sh_gui' => (
is => 'rw',
lazy => 1,
@@ -188,30 +196,6 @@ our $VERSION = '1.0.1';
#=============================================================
-=head2 BUILD
-
-=head3 INPUT
-
- $self: this object
-
-=head3 DESCRIPTION
-
- The BUILD method is called after a Moose object is created,
- in this methods Services loads all the service information.
-
-=cut
-
-#=============================================================
-sub BUILD {
- my $self = shift;
-
- if (! $self->name) {
- $self->name ($self->loc->N("Storage partitioning & Mounts"));
- }
-}
-
-#=============================================================
-
=head2 start
=head3 INPUT