aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AdminPanel/Services/AdminService.pm14
-rwxr-xr-xmodules/services/adminService16
2 files changed, 10 insertions, 20 deletions
diff --git a/AdminPanel/Services/AdminService.pm b/AdminPanel/Services/AdminService.pm
index 2f3f1d9..3dfb38f 100644
--- a/AdminPanel/Services/AdminService.pm
+++ b/AdminPanel/Services/AdminService.pm
@@ -21,9 +21,6 @@
package AdminPanel::Services::AdminService;
-
-
-
#-######################################################################################
#- misc imports
#-######################################################################################
@@ -239,8 +236,11 @@ sub servicePanel {
my $self = shift;
my $appTitle = yui::YUI::app()->applicationTitle();
+
## set new title to get it in dialog
- yui::YUI::app()->setApplicationTitle(N("Services and daemons"));
+ yui::YUI::app()->setApplicationTitle($self->name);
+ ## set icon if not already set by external launcher
+ yui::YUI::app()->setApplicationIcon($self->icon);
my ($l, $on_services) = services();
my @xinetd_services = map { $_->[0] } xinetd_services();
@@ -329,8 +329,8 @@ sub servicePanel {
elsif ($widget == $aboutButton) {
my $license = translate($::license);
# TODO fix version value
- AboutDialog({ name => N("Services and daemons"),
- version => "1.0.0",
+ AboutDialog({ name => N("AdminService"),
+ version => $self->VERSION,
copyright => N("Copyright (C) %s Mageia community", '2013-2014'),
license => $license,
comments => N("Service Manager is the Mageia service and daemon management tool \n(from the original idea of Mandriva draxservice)."),
@@ -376,7 +376,7 @@ sub servicePanel {
$dialog->destroy();
#restore old application title
- yui::YUI::app()->setApplicationTitle($appTitle);
+ yui::YUI::app()->setApplicationTitle($appTitle) if $appTitle;
}
no Moose;
diff --git a/modules/services/adminService b/modules/services/adminService
index d4f8fe3..953b2cc 100755
--- a/modules/services/adminService
+++ b/modules/services/adminService
@@ -3,21 +3,11 @@
use strict;
use lib qw(/usr/lib/libDrakX);
-use standalone; #- warning, standalone must be loaded very first, for 'explanations'
-
-use common;
-use AdminPanel::Shared;
+use common qw(N);
use AdminPanel::Services::AdminService;
-use log;
-
-use yui;
-
-my $wm_icon = "/usr/share/mcc/themes/default/service-mdk.png";
-
-yui::YUI::app()->setApplicationTitle(N("Services and daemons"));
-yui::YUI::app()->setApplicationIcon($wm_icon);
-my $serviceMan = AdminPanel::Services::AdminService->new();
+my $serviceMan = AdminPanel::Services::AdminService->new({icon => "/usr/share/mcc/themes/default/service-mdk.png",
+ name => N("Services and daemons"),});
$serviceMan->start();
1;