diff options
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -207,9 +207,10 @@ sub refresh_contents { foreach my $l (['first', 'red'], ['second', 'royalblue3'], ['third', 'green']) { $color->{$l->[0]} = { 'foreground' => $l->[1], 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD } } - my $fixed_tag = { 'font' => 'monospace' }; + my $fixed_tag = { 'font' => 'monospace' }; + setLastTime(); my $last = lastCheck(); - my $contents = [ [ N("Network Connection: "), $color->{second} ], [ isNetwork() ? N("Up") . "\n" : N("Down") . "\n", isNetwork() ? $color->{third} : $color->{first} ], + my $contents = [ [ N("Network Connection: "), $color->{second} ], [ isNetwork() ? N("Up") . "\n" : N("Down") . "\n", isNetwork() ? $color->{third} : $color->{first} ], [ N("Last check: "), $color->{second} ], [ "$last\n", $fixed_tag ], [ N("Machine name:"), $color->{second} ], [ $h{MACHINE} . "\n", $fixed_tag ], [ N("Updates: "), $color->{second} ], [ common::sprintf_fixutf8($state{$status}{tt}[0]), $status eq 'okay' ? $color->{third} : $color->{first} ], @@ -274,7 +275,7 @@ sub silentCheck { 99 => sub { logIt(N("Wrong Action or host or login.\n")); go2State('critical') }, 500 => sub { logIt(N("Something is wrong with your network settings (check your route, firewall or proxy settings)\n")); go2State('critical') } }; - $retcode->{$u}->(); + eval { $retcode->{$u}->() }; if ($@) { logIt(N("Problem occured while connecting to the server, please contact the support team")); go2State('critical') } } sub okState { $isAvailable = 0; logIt(N("System is up-to-date\n")); go2State('okay') } sub compareWithInstalled { |