[gnome-software/146-gnome-software-needs-to-be-restarted-to-enable-new-plugins-message-could-be-better] gs-shell: Change notification text when Software needs restart




commit 7b1f0d49ce0bb0397ffd658c2a6f1cb9c7071791
Author: Milan Crha <mcrha redhat com>
Date:   Mon Oct 19 18:27:18 2020 +0200

    gs-shell: Change notification text when Software needs restart
    
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/146
    Closes https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/528

 src/gs-shell.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index a849770d..b05896ac 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -1915,13 +1915,11 @@ gs_shell_show_event_url_to_app (GsShell *shell, GsPluginEvent *event)
 static gboolean
 gs_shell_show_event_fallback (GsShell *shell, GsPluginEvent *event)
 {
-       GsApp *app = gs_plugin_event_get_app (event);
        GsApp *origin = gs_plugin_event_get_origin (event);
        GsShellEventButtons buttons = GS_SHELL_EVENT_BUTTON_NONE;
        GsShellPrivate *priv = gs_shell_get_instance_private (shell);
        const GError *error = gs_plugin_event_get_error (event);
        g_autoptr(GString) str = g_string_new (NULL);
-       g_autofree gchar *str_app = NULL;
        g_autofree gchar *str_origin = NULL;
 
        switch (error->code) {
@@ -1942,18 +1940,8 @@ gs_shell_show_event_fallback (GsShell *shell, GsPluginEvent *event)
                buttons |= GS_SHELL_EVENT_BUTTON_NO_SPACE;
                break;
        case GS_PLUGIN_ERROR_RESTART_REQUIRED:
-               if (app != NULL) {
-                       str_app = gs_shell_get_title_from_app (app);
-                       /* TRANSLATORS: failure text for the in-app notification,
-                        * where the %s is the application name (e.g. "GIMP") */
-                       g_string_append_printf (str, _("%s needs to be restarted "
-                                                      "to use new plugins."),
-                                               str_app);
-               } else {
-                       /* TRANSLATORS: failure text for the in-app notification */
-                       g_string_append (str, _("This application needs to be "
-                                               "restarted to use new plugins."));
-               }
+               /* TRANSLATORS: failure text for the in-app notification */
+               g_string_append (str, _("This application needs to be restarted to use new plugins."));
                buttons |= GS_SHELL_EVENT_BUTTON_RESTART_REQUIRED;
                break;
        case GS_PLUGIN_ERROR_AC_POWER_REQUIRED:


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