[gtk/shortcuts-rebased-again: 111/159] model button: Stop parsing accels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shortcuts-rebased-again: 111/159] model button: Stop parsing accels
- Date: Mon, 24 Jun 2019 11:44:29 +0000 (UTC)
commit 8e2acaa97ef00796aceb2548727cd3f2fd09b8a4
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]