add download and installed size to details
This commit is contained in:
@@ -42,6 +42,8 @@ namespace Pamac {
|
||||
public string installdate;
|
||||
public string reason;
|
||||
public string has_signature;
|
||||
public string downloadsize;
|
||||
public string installsize;
|
||||
public string[] licenses;
|
||||
public string[] depends;
|
||||
public string[] optdepends;
|
||||
|
@@ -710,6 +710,12 @@ namespace Pamac {
|
||||
if (details.repo != "") {
|
||||
previous_widget = populate_details_grid (dgettext (null, "Repository"), details.repo, previous_widget);
|
||||
}
|
||||
if (uint64.parse(details.downloadsize) > 0) {
|
||||
previous_widget = populate_details_grid (dgettext (null, "Download size"), GLib.format_size(uint64.parse(details.downloadsize)).to_string (), previous_widget);
|
||||
}
|
||||
if (uint64.parse(details.installsize) > 0) {
|
||||
previous_widget = populate_details_grid (dgettext (null, "Installed size"), GLib.format_size(uint64.parse(details.installsize)).to_string (), previous_widget);
|
||||
}
|
||||
if (details.groups.length > 0) {
|
||||
var label = new Gtk.Label ("<b>%s</b>".printf (dgettext (null, "Groups") + ":"));
|
||||
label.use_markup = true;
|
||||
|
@@ -611,6 +611,8 @@ namespace Pamac {
|
||||
string packager = "";
|
||||
string builddate = "";
|
||||
string installdate = "";
|
||||
string downloadsize = "";
|
||||
string installsize = "";
|
||||
string[] groups = {};
|
||||
string[] backups = {};
|
||||
string[] licenses = {};
|
||||
@@ -648,6 +650,10 @@ namespace Pamac {
|
||||
groups += ((Alpm.List<unowned string>) list).data;
|
||||
list.next ();
|
||||
}
|
||||
// download size
|
||||
downloadsize = alpm_pkg.download_size.to_string ();
|
||||
// installed size
|
||||
installsize = alpm_pkg.isize.to_string ();
|
||||
// licenses
|
||||
list = alpm_pkg.licenses;
|
||||
while (list != null) {
|
||||
@@ -744,6 +750,8 @@ namespace Pamac {
|
||||
details.builddate = (owned) builddate;
|
||||
details.installdate = (owned) installdate;
|
||||
details.reason = (owned) reason;
|
||||
details.downloadsize = (owned) downloadsize;
|
||||
details.installsize = (owned) installsize;
|
||||
details.has_signature = (owned) has_signature;
|
||||
details.licenses = (owned) licenses;
|
||||
details.depends = (owned) depends;
|
||||
|
@@ -815,7 +815,9 @@ namespace Pamac {
|
||||
builddate = "",
|
||||
installdate = "",
|
||||
reason = "",
|
||||
has_signature = ""
|
||||
has_signature = "",
|
||||
downloadsize = "",
|
||||
installsize = ""
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user