[gnome-software/gnome-42: 1/2] fwupd: Fix the user action dialogs




commit 5bf8c0c44cc3bb52588f92ef908f1a4db6d43bd8
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jun 14 13:04:31 2022 +0100

    fwupd: Fix the user action dialogs
    
    When gnome-software was ported from appstream-glib to libappstream we
    missed that the locale arguments are now swapped -- i.e. the former
    specified "locale, value" and the latter specified "value, locale".
    
    This fixes installing software on any devices that require some kind of
    user-prompting to complete the update, e.g. buttons that need pressing
    or cables that need replugging.

 plugins/fwupd/gs-fwupd-app.c    | 2 +-
 plugins/fwupd/gs-plugin-fwupd.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
index c0faf0519..0790dbc10 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -278,7 +278,7 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
                as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT);
                as_screenshot_add_image (ss, im);
                if (fwupd_release_get_detach_caption (rel) != NULL)
-                       as_screenshot_set_caption (ss, NULL, fwupd_release_get_detach_caption (rel));
+                       as_screenshot_set_caption (ss, fwupd_release_get_detach_caption (rel), NULL);
                gs_app_set_action_screenshot (app, ss);
        }
 }
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index 66b76dfce..8d82fadad 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -945,7 +945,7 @@ gs_plugin_fwupd_install (GsPluginFwupd  *self,
 
                        /* caption is required */
                        as_screenshot_set_kind (ss, AS_SCREENSHOT_KIND_DEFAULT);
-                       as_screenshot_set_caption (ss, NULL, fwupd_device_get_update_message (dev));
+                       as_screenshot_set_caption (ss, fwupd_device_get_update_message (dev), NULL);
                        gs_app_set_action_screenshot (app, ss);
 
                        /* require the dialog */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]