[gnome-software/wip/hughsie/as_screenshot_set_caption-locale-order] fwupd: Fix the user action dialogs




commit 9aba963f2274e929658b632d6f6ce9c73ee83156
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 03103a3e9..7fcbdadab 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -283,7 +283,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 cac6a324a..3171eb96d 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]