fix .files dl progress display

This commit is contained in:
guinux 2017-06-03 17:55:18 +02:00
parent cce87ba286
commit 7905b76f6d
2 changed files with 10 additions and 0 deletions

View File

@ -214,6 +214,7 @@ namespace Pamac {
message = _("Failed to initialize alpm library") message = _("Failed to initialize alpm library")
}; };
trans_commit_finished (false); trans_commit_finished (false);
return;
} else { } else {
alpm_handle.eventcb = (Alpm.EventCallBack) cb_event; alpm_handle.eventcb = (Alpm.EventCallBack) cb_event;
alpm_handle.progresscb = (Alpm.ProgressCallBack) cb_progress; alpm_handle.progresscb = (Alpm.ProgressCallBack) cb_progress;
@ -224,6 +225,12 @@ namespace Pamac {
lockfile = GLib.File.new_for_path (alpm_handle.lockfile); lockfile = GLib.File.new_for_path (alpm_handle.lockfile);
} }
files_handle = alpm_config.get_handle (true); files_handle = alpm_config.get_handle (true);
files_handle.eventcb = (Alpm.EventCallBack) cb_event;
files_handle.progresscb = (Alpm.ProgressCallBack) cb_progress;
files_handle.questioncb = (Alpm.QuestionCallBack) cb_question;
files_handle.fetchcb = (Alpm.FetchCallBack) cb_fetch;
files_handle.totaldlcb = (Alpm.TotalDownloadCallBack) cb_totaldownload;
files_handle.logcb = (Alpm.LogCallBack) cb_log;
} }
private bool check_extern_lock () { private bool check_extern_lock () {

View File

@ -1402,6 +1402,9 @@ namespace Pamac {
if (filename.has_suffix (".db")) { if (filename.has_suffix (".db")) {
string action = dgettext (null, "Refreshing %s").printf (filename.replace (".db", "")) + "..."; string action = dgettext (null, "Refreshing %s").printf (filename.replace (".db", "")) + "...";
reset_progress_box (action); reset_progress_box (action);
} else if (filename.has_suffix (".files")) {
string action = dgettext (null, "Refreshing %s").printf (filename.replace (".files", "")) + "...";
reset_progress_box (action);
} }
} else if (xfered == total) { } else if (xfered == total) {
timer.stop (); timer.stop ();