aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsergio <sergiotarxz@posteo.net>2026-09-13 20:58:30 +0200
committersergio <sergiotarxz@posteo.net>2026-09-13 20:58:30 +0200
commit1e5630d242e0c50261e1365375f91ab8e35aaebc (patch)
tree000c95d140186cda04ab00b2697a0db726453ea1
parent46134cbe06ab54d49cda2e5430d145273a65e640 (diff)
Finishing the updater by the moment.v1.0.0-rc11.0.0-rc1
-rw-r--r--lib/AlgaOS/Updater/GUI.pm18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/AlgaOS/Updater/GUI.pm b/lib/AlgaOS/Updater/GUI.pm
index 70b1321..31fa244 100644
--- a/lib/AlgaOS/Updater/GUI.pm
+++ b/lib/AlgaOS/Updater/GUI.pm
@@ -156,6 +156,9 @@ sub is_there_updates($self) {
sub _check_pid($self) {
if ( 0 < waitpid $self->pid, WNOHANG ) {
$self->_have_update( $? == 0 );
+ if ($self->_have_update) {
+ $self->notify('Hay actualizaciones disponibles, para mantener su ordenador seguro actualice ahora.');
+ }
if ( $self->_have_update
&& $self->_have_update != $self->_frontend_shows_update )
{
@@ -166,9 +169,9 @@ sub _check_pid($self) {
# act like it knows what happened.
$self->_frontend_shows_update( $self->_have_update );
$self->pid(0);
- return 1;
+ return 0;
}
- return 0;
+ return 1;
}
sub _start_pid($self) {
@@ -281,15 +284,26 @@ sub _update($self) {
1000,
sub {
if ( 0 < waitpid $pid, WNOHANG ) {
+ say 'Update finished';
+ $self->notify('La actualización terminó');
$self->_have_update(0);
$self->_is_updating(0);
$self->_frontend_shows_update(1);
$self->activate;
+ return 0;
}
+ say 'Waiting another second for update finish';
+ return 1;
}
);
}
+sub notify( $self, $description ) {
+ system qw{notify-send --icon com.algaos.Updater}, 'Actualiza AlgaOS',
+ $description, '-a',
+ 'Actualizador AlgaOS';
+}
+
sub _show_updating($self) {
my $grid = Gtk::Grid->new;
my $const = $self->const;