aboutsummaryrefslogtreecommitdiffstats
path: root/apanel.pl
diff options
context:
space:
mode:
Diffstat (limited to 'apanel.pl')
-rwxr-xr-xapanel.pl26
1 files changed, 14 insertions, 12 deletions
diff --git a/apanel.pl b/apanel.pl
index e2042da..38755eb 100755
--- a/apanel.pl
+++ b/apanel.pl
@@ -36,21 +36,21 @@ my $settings = getSettings();
ask_for_authentication($settings->{priv_method}) if(require_root_capability());
-my $mainWin = new MainDisplay();
-my $launch = $mainWin->start();
+while (1) {
+ my $mainWin = new MainDisplay();
+ my $launch = $mainWin->start();
-while ($launch) {
- $mainWin->destroy();
- undef($mainWin);
-
- $launch->start();
-
- $mainWin = new MainDisplay();
- $launch = $mainWin->start();
+ if ($launch) {
+ $launch->start();
+ undef($mainWin);
+ }
+ else {
+ $mainWin->destroy();
+ undef($mainWin);
+ last;
+ }
}
-$mainWin->destroy();
-undef($mainWin);
sub usage {
print "\n";
@@ -90,3 +90,5 @@ sub getSettings {
main launcher
=cut
+
+1;