diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-12-30 15:27:35 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-12-30 15:27:35 +0100 |
commit | 53ae9c05ba6dbdaecdf6613577522c124ddb2170 (patch) | |
tree | e2acd859196786c1fd6438aca4a2eea7cee84f04 | |
parent | 7275ed577dcb901b378ca87390e66fd29ec6603d (diff) | |
download | manatools-53ae9c05ba6dbdaecdf6613577522c124ddb2170.tar manatools-53ae9c05ba6dbdaecdf6613577522c124ddb2170.tar.gz manatools-53ae9c05ba6dbdaecdf6613577522c124ddb2170.tar.bz2 manatools-53ae9c05ba6dbdaecdf6613577522c124ddb2170.tar.xz manatools-53ae9c05ba6dbdaecdf6613577522c124ddb2170.zip |
fixed icon and title
-rw-r--r-- | lib/ManaTools/Module/Services.pm | 28 | ||||
-rwxr-xr-x | scripts/manaservice | 9 |
2 files changed, 12 insertions, 25 deletions
diff --git a/lib/ManaTools/Module/Services.pm b/lib/ManaTools/Module/Services.pm index fc73587f..20864c67 100644 --- a/lib/ManaTools/Module/Services.pm +++ b/lib/ManaTools/Module/Services.pm @@ -78,6 +78,17 @@ has '+icon' => ( default => File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/manaservice.png'), ); +has '+name' => ( + lazy => 1, + builder => '_nameInitializer', +); + +sub _nameInitializer { + my $self = shift; + + return ($self->loc->N("Services and daemons")); +}; + has '_services' => ( traits => ['Array'], is => 'rw', @@ -181,10 +192,6 @@ our $VERSION = '1.0.0'; sub BUILD { my $self = shift; - if (! $self->name) { - $self->name ($self->loc->N("adminService")); - } - $self->loadServices(); } @@ -208,14 +215,6 @@ sub BUILD { sub start { my $self = shift; -# if ($EUID != 0) { -# $self->sh_gui->warningMsgBox({ -# title => $self->name, -# text => $self->loc->N("root privileges required"), -# }); -# return; -# } - $self->_servicePanel(); }; @@ -351,11 +350,6 @@ sub _servicePanel { my $appTitle = yui::YUI::app()->applicationTitle(); - ## set new title to get it in dialog - yui::YUI::app()->setApplicationTitle($self->name); - ## set icon if not already set by external launcher - yui::YUI::app()->setApplicationIcon($self->icon); - my $mageiaPlugin = "mga"; my $factory = yui::YUI::widgetFactory; my $mgaFactory = yui::YExternalWidgets::externalWidgetFactory($mageiaPlugin); diff --git a/scripts/manaservice b/scripts/manaservice index 6029562f..6e9a2b49 100755 --- a/scripts/manaservice +++ b/scripts/manaservice @@ -21,14 +21,7 @@ use strict; use ManaTools::Module::Services; use ManaTools::Shared::Locales; -my $locale_dir = ManaTools::Shared::custom_locale_dir();; -my $loc = ManaTools::Shared::Locales->new( - domain_name => 'manatools', - dir_name => $locale_dir, -); - -my $serviceMan = ManaTools::Module::Services->new({icon => "/usr/share/mcc/themes/default/service-mdk.png", - name => $loc->N("Services and daemons"),}); +my $serviceMan = ManaTools::Module::Services->new(); $serviceMan->start(); 1; |