package-manager: Show a message when no packages are available

This commit is contained in:
K. Lange 2022-08-18 07:21:21 +09:00
parent 5d36d27bb9
commit da7651cec6

View File

@ -237,6 +237,10 @@ static void load_manifest(void) {
} }
qsort(pkg_pointers, pkg_pointers_len, sizeof(struct Package *), comparator); qsort(pkg_pointers, pkg_pointers_len, sizeof(struct Package *), comparator);
} }
if (!pkg_pointers_len) {
system("showdialog 'Package Manager' '/usr/share/icons/48/package.png' 'No packages are available.' &");
}
} }
static struct Package * get_package_at_offset(int offset) { static struct Package * get_package_at_offset(int offset) {