[gtk/shortcuts-rebased-again: 118/139] model button: Stop parsing	accels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk/shortcuts-rebased-again: 118/139] model button: Stop parsing	accels
- Date: Sat, 22 Jun 2019 05:25:54 +0000 (UTC)
commit cffbf7a88d4d8bf4409a794775b2fb520cd403a9
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jun 21 15:05:55 2019 +0000
    model button: Stop parsing accels
    
    The new shortcuts machinery gives us formatted
    strings, so just use them as-is without parsing
    and reformatting.
 gtk/gtkmodelbutton.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 092b0d6977..5ad75a0d47 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -524,16 +524,7 @@ update_accel (GtkModelButton *button,
 {
   if (accel)
     {
-      guint key;
-      GdkModifierType mods;
-      char *str;
-
-      gtk_accelerator_parse (accel, &key, &mods);
-
-      str = gtk_accelerator_get_label (key, mods);
-      gtk_label_set_label (GTK_LABEL (button->accel_label), str);
-      g_free (str);
-
+      gtk_label_set_label (GTK_LABEL (button->accel_label), accel);
       gtk_widget_show (button->accel_label);
     }
   else
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]