[gnome-builder] notifications: Add mnemonics to labeled buttons



commit 09f20077436412334ec29e010acdd794979d2e9e
Author: vanadiae <vanadiae35 gmail com>
Date:   Tue Jun 29 16:03:12 2021 +0200

    notifications: Add mnemonics to labeled buttons

 src/libide/core/ide-transfer.c                            | 2 +-
 src/libide/gui/ide-notification-list-box-row.c            | 1 +
 src/plugins/flatpak/gbp-flatpak-runtime-provider.c        | 2 +-
 src/plugins/update-manager/gbp-update-manager-app-addin.c | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/core/ide-transfer.c b/src/libide/core/ide-transfer.c
index c054be9cd..c61ba0040 100644
--- a/src/libide/core/ide-transfer.c
+++ b/src/libide/core/ide-transfer.c
@@ -546,7 +546,7 @@ ide_transfer_create_notification (IdeTransfer *self)
    * using action state.
    */
   action_name = g_strdup_printf ("transfer-manager.cancel-%d", priv->unique_id);
-  ide_notification_add_button (notif, _("Cancel"), icon, action_name);
+  ide_notification_add_button (notif, _("_Cancel"), icon, action_name);
 
   g_signal_connect_object (self,
                            "notify::completed",
diff --git a/src/libide/gui/ide-notification-list-box-row.c b/src/libide/gui/ide-notification-list-box-row.c
index dd7e32033..69958b7af 100644
--- a/src/libide/gui/ide-notification-list-box-row.c
+++ b/src/libide/gui/ide-notification-list-box-row.c
@@ -88,6 +88,7 @@ setup_buttons_locked (IdeNotificationListBoxRow *self)
             child = g_object_new (GTK_TYPE_LABEL,
                                   "label", label,
                                   "visible", TRUE,
+                                  "use-underline", TRUE,
                                   NULL);
           else if (icon != NULL)
             child = g_object_new (GTK_TYPE_IMAGE,
diff --git a/src/plugins/flatpak/gbp-flatpak-runtime-provider.c 
b/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
index d7ca10053..418952f30 100644
--- a/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
+++ b/src/plugins/flatpak/gbp-flatpak-runtime-provider.c
@@ -313,7 +313,7 @@ gbp_flatpak_runtime_provider_bootstrap_complete (gpointer data)
       /* Register an action that can be cancelled */
       detailed_action_name = ide_application_create_cancel_action (IDE_APPLICATION_DEFAULT,
                                                                    ide_task_get_cancellable (task));
-      ide_notification_add_button (state->notif, _("Cancel"), icon, detailed_action_name);
+      ide_notification_add_button (state->notif, _("_Cancel"), icon, detailed_action_name);
       ide_notification_attach (state->notif, IDE_OBJECT (self));
 
       ipc_flatpak_service_call_install (state->service,
diff --git a/src/plugins/update-manager/gbp-update-manager-app-addin.c 
b/src/plugins/update-manager/gbp-update-manager-app-addin.c
index 69d83e21f..7717d50ac 100644
--- a/src/plugins/update-manager/gbp-update-manager-app-addin.c
+++ b/src/plugins/update-manager/gbp-update-manager-app-addin.c
@@ -166,7 +166,7 @@ on_update_available_cb (GbpUpdateManagerAppAddin *self,
       ide_notification_set_title (self->update_notif, _("Update Available"));
       ide_notification_set_body (self->update_notif, _("An update to Builder is available. Builder can 
download and install it for you."));
       ide_notification_set_urgent (self->update_notif, TRUE);
-      ide_notification_add_button (self->update_notif, _("Update"), NULL, "app.update-builder");
+      ide_notification_add_button (self->update_notif, _("_Update"), NULL, "app.update-builder");
       ide_notification_attach (self->update_notif, IDE_OBJECT (context));
     }
 


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