Skip to content

Commit

Permalink
Various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Feb 17, 2024
1 parent 1c1a16b commit 0f5b968
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Backends/UbuntuDrivers.vala
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public class SettingsDaemon.Backends.UbuntuDrivers : Object {
return true;
}

public async void install (string pkg_id) throws DBusError, IOError {
public async void install (string pkg_name) throws DBusError, IOError {
if (current_state.state != AVAILABLE) {
warning ("No drivers available, or already downloading a driver.");
return;
Expand All @@ -177,17 +177,16 @@ public class SettingsDaemon.Backends.UbuntuDrivers : Object {

update_state (DOWNLOADING);

string[] package_names = {};
available_drivers[pkg_id].@foreach ((package_name) => package_names += package_name);

try {
var results = yield task.install_packages_async (package_names, cancellable, progress_callback);
var results = yield task.install_packages_async ((owned) available_drivers[pkg_name].data, cancellable, progress_callback);

if (results.get_exit_code () == CANCELLED) {
debug ("Installation was cancelled");
return;
}

available_drivers_with_installed[pkg_name] = true;

Pk.offline_trigger (REBOOT);

var notification = new Notification (_("Restart required"));
Expand Down

0 comments on commit 0f5b968

Please sign in to comment.