[gtk/shortcuts-rebased-again: 50/96] model button: Use simpler api for accels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/shortcuts-rebased-again: 50/96] model button: Use simpler api for accels
- Date: Tue, 18 Jun 2019 23:42:40 +0000 (UTC)
commit f2625ed31d3bd48c5059d1a3548243121550791d
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 18 21:29:00 2019 +0000
model button: Use simpler api for accels
gtk/gtkmodelbutton.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 80552ec33b..092b0d6977 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -39,7 +39,6 @@
#include "gtkcontainerprivate.h"
#include "gtkiconprivate.h"
#include "gtksizegroup.h"
-#include "gtkaccellabelprivate.h"
#include "gtkactionable.h"
#include "gtkeventcontrollermotion.h"
#include "gtkeventcontrollerkey.h"
@@ -527,16 +526,13 @@ update_accel (GtkModelButton *button,
{
guint key;
GdkModifierType mods;
- GtkAccelLabelClass *accel_class;
char *str;
gtk_accelerator_parse (accel, &key, &mods);
- accel_class = g_type_class_ref (GTK_TYPE_ACCEL_LABEL);
- str = _gtk_accel_label_class_get_accelerator_label (accel_class, key, mods);
+ str = gtk_accelerator_get_label (key, mods);
gtk_label_set_label (GTK_LABEL (button->accel_label), str);
g_free (str);
- g_type_class_unref (accel_class);
gtk_widget_show (button->accel_label);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]