[gnome-boxes/dont-duplicate-downloadable-oses] wizard-downloads-page, search: Don't duplicate recommended downloads
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/dont-duplicate-downloadable-oses] wizard-downloads-page, search: Don't duplicate recommended downloads
- Date: Wed, 19 Jun 2019 15:18:11 +0000 (UTC)
commit dc7d8f6b1c8d3aff034317f457018b6f06b49f3e
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Jun 19 16:30:11 2019 +0200
wizard-downloads-page, search: Don't duplicate recommended downloads
The recommended downloads are OSes defined in the recommended-downloads.xml
file. Some of them are already retrieved from os_db.list_downloadable_oses,
so there's no need to duplicate them.
Custom OSes, such as the Free RHEL option, still need to be added.
A custom OS is an OS Media that doesn't have a defined URL, since it will
be handled specially (a login gate).
Fixes #374
src/search.vala | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/search.vala b/src/search.vala
index a416f26d..09ef2889 100644
--- a/src/search.vala
+++ b/src/search.vala
@@ -41,16 +41,17 @@
try {
media_list = os_db.list_downloadable_oses.end (result);
- load_recommended_downloads.begin ();
+ load_custom_downloads.begin ();
} catch (OSDatabaseError error) {
debug ("Failed to populate the list of downloadable OSes: %s", error.message);
}
});
}
- private async void load_recommended_downloads () {
+ private async void load_custom_downloads () {
foreach (var media in yield get_recommended_downloads ()) {
- media_list.append (media);
+ if (media.url == null)
+ media_list.append (media);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]