From 7eb72e5ef7b68001827c04111708886396faaee0 Mon Sep 17 00:00:00 2001 From: guinux Date: Mon, 31 Jul 2017 14:01:30 +0200 Subject: [PATCH] fix #267 --- src/installer.vala | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/installer.vala b/src/installer.vala index 4b51a8f..db67997 100644 --- a/src/installer.vala +++ b/src/installer.vala @@ -75,8 +75,21 @@ namespace Pamac { foreach (unowned File file in files) { transaction.to_load.add (file.get_path ()); } - transaction.run (); progress_dialog.show (); + if (transaction.get_lock ()) { + transaction.run (); + } else { + transaction.progress_box.action_label.label = dgettext (null, "Waiting for another package manager to quit") + "..."; + transaction.start_progressbar_pulse (); + Timeout.add (5000, () => { + bool locked = transaction.get_lock (); + if (locked) { + transaction.stop_progressbar_pulse (); + transaction.run (); + } + return !locked; + }); + } } }