aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2015-12-28 23:17:45 +0100
committerAngelo Naselli <anaselli@linux.it>2015-12-28 23:17:45 +0100
commit08e8f100571f904266437c801a7570f531458cd9 (patch)
treed7860fbae982295c0543f3b6d0652779da34a091 /scripts
parentaa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59 (diff)
downloadmanatools-08e8f100571f904266437c801a7570f531458cd9.tar
manatools-08e8f100571f904266437c801a7570f531458cd9.tar.gz
manatools-08e8f100571f904266437c801a7570f531458cd9.tar.bz2
manatools-08e8f100571f904266437c801a7570f531458cd9.tar.xz
manatools-08e8f100571f904266437c801a7570f531458cd9.zip
MainDisplay now use Moose and Shared::GUI::Dialog
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mpan28
1 files changed, 21 insertions, 7 deletions
diff --git a/scripts/mpan b/scripts/mpan
index 1933baaf..760d771d 100755
--- a/scripts/mpan
+++ b/scripts/mpan
@@ -34,6 +34,18 @@ has 'devel' => (
documentation => $loc->N('Developers mode'),
);
+has 'name' => (
+ is => 'ro',
+ isa => 'Str',
+ documentation => $loc->N('Application name, used for logging identifier and x application configuration directory. Default mpan'),
+);
+
+has 'title' => (
+ is => 'ro',
+ isa => 'Str',
+ documentation => $loc->N('Window title. Default name value'),
+);
+
no Moose;
__PACKAGE__->meta->make_immutable;
@@ -61,19 +73,21 @@ else {
ask_for_authentication($settings->{priv_method}) if is_root_capability_required();
}
-my $mainWin = new ManaTools::MainDisplay();
+my $param = {};
+
+$param->{title} = $cmdline->title() if $cmdline->title();
+$param->{name} = $cmdline->name() if $cmdline->name();
+$param->{configDir} = $cmdline->conf_dir() if $cmdline->conf_dir();
+
+
+my $mainWin = new ManaTools::MainDisplay($param);
while (1) {
my $launch = $mainWin->start();
+ $mainWin->cleanup();
if ($launch) {
- $mainWin->destroy();
$launch->start();
}
- else {
- $mainWin->destroy();
- last;
- }
- $mainWin->setupGui();
}