aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-12-30 15:17:05 +0100
committerAngelo Naselli <anaselli@linux.it>2015-12-30 15:17:05 +0100
commitb58d17211cd556246ba6775229704ee5e6e6e770 (patch)
treebff8bbb48832de8285f7a3f5bbb387457f422da1 /lib
parent7237888ec7e511f64c98dd81c59e7a2450c2b496 (diff)
downloadmanatools-b58d17211cd556246ba6775229704ee5e6e6e770.tar
manatools-b58d17211cd556246ba6775229704ee5e6e6e770.tar.gz
manatools-b58d17211cd556246ba6775229704ee5e6e6e770.tar.bz2
manatools-b58d17211cd556246ba6775229704ee5e6e6e770.tar.xz
manatools-b58d17211cd556246ba6775229704ee5e6e6e770.zip
fixed icon and title
Diffstat (limited to 'lib')
-rw-r--r--lib/ManaTools/Module/LogViewer.pm45
1 files changed, 12 insertions, 33 deletions
diff --git a/lib/ManaTools/Module/LogViewer.pm b/lib/ManaTools/Module/LogViewer.pm
index e456256c..0d17ca53 100644
--- a/lib/ManaTools/Module/LogViewer.pm
+++ b/lib/ManaTools/Module/LogViewer.pm
@@ -69,11 +69,21 @@ use yui;
extends qw( ManaTools::Module );
-### TODO icon
has '+icon' => (
default => File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/manalog.png'),
);
+has '+name' => (
+ lazy => 1,
+ builder => '_nameInitializer',
+);
+
+sub _nameInitializer {
+ my $self = shift;
+
+ return ($self->loc->N("Log viewer"));
+}
+
has 'sh_gui' => (
is => 'rw',
init_arg => undef,
@@ -107,31 +117,6 @@ my %prior = ('emerg' => 0,
#=============================================================
-=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("Log viewer"));
- }
-}
-
-
-#=============================================================
-
=head2 start
=head3 INPUT
@@ -165,11 +150,6 @@ sub _logViewerPanel {
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 $factory = yui::YUI::widgetFactory;
my $optFactory = yui::YUI::optionalWidgetFactory;
@@ -459,13 +439,12 @@ print " log lines: ". scalar (@{$log}) ."\n";
sub _warn_about_user_mode {
my $self = shift;
- my $title = $self->loc->N("Running in user mode");
+ my $title = $self->loc->N("manalog - running in user mode");
my $msg = $self->loc->N("You are launching this program as a normal user.\n".
"You will not be able to read system logs which you do not have rights to,\n".
"but you may still browse all the others.");
if(($EUID != 0) and (!$self->sh_gui->ask_OkCancel({title => $title, text => $msg}))) {
- # TODO add Privileges?
return 0;
}