diff --git a/src/daemon.vala b/src/daemon.vala index 960ad6ed8990fb77f28cc573637c6c2a1eeb5d0e..66ed321a7baf15a5cd1b45334553d604c69c8e9e 100644 --- a/src/daemon.vala +++ b/src/daemon.vala @@ -834,7 +834,7 @@ private void cb_event (Alpm.Event.Data data) { break; case Alpm.Event.Type.HOOK_RUN_START: details += data.hook_run_name; - details += data.hook_run_desc; + details += data.hook_run_desc ?? ""; details += data.hook_run_position.to_string (); details += data.hook_run_total.to_string (); break; diff --git a/src/transaction.vala b/src/transaction.vala index 1cbfd94a6513c337cf53ed0dcfd716da639ae893..4c7a53393ec3c367d7be47becc5234eb6290814f 100644 --- a/src/transaction.vala +++ b/src/transaction.vala @@ -685,7 +685,21 @@ namespace Pamac { } break; case Alpm.Event.Type.HOOK_RUN_START: - msg = "%s:%s %s/%s".printf (details[0], details[1], details[2], details[3]); + string textbar = "%s/%s".printf (details[2], details[3]); + if (textbar != previous_textbar) { + previous_textbar = textbar; + progress_dialog.progressbar.set_text (textbar); + } + float fraction = (float) int.parse (details[2]) / int.parse (details[3]); + if (fraction != previous_percent) { + previous_percent = fraction; + progress_dialog.progressbar.set_fraction (fraction); + } + if (details[1] != "") { + msg = details[1] + ":"; + } else { + msg = details[0] + ":"; + } progress_dialog.spawn_in_term ({"echo", msg}); break; case Alpm.Event.Type.CHECKDEPS_START: