summaryrefslogtreecommitdiff
path: root/gtk/gtkmodelbutton.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-08-13 04:59:49 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-03-25 23:14:27 -0400
commit66102dacf13813473a82c02cb7b67d1971f1397e (patch)
treeb59bc749eccd675dd862fcb8c727d20169ef9e62 /gtk/gtkmodelbutton.c
parentd84b60e5f94df05965df48dad9bd17e515a151d8 (diff)
downloadgtk+-66102dacf13813473a82c02cb7b67d1971f1397e.tar.gz
accellabel: Move gtk_accelerator_get_label() code
The function lives in gtkaccelgroup.c, so there's no need to have that call a private function in another source file. Instead, make that other source file call gtk_accelerator_get_label() instead.
Diffstat (limited to 'gtk/gtkmodelbutton.c')
-rw-r--r--gtk/gtkmodelbutton.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index 25c75087ef..49b69b28e8 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -727,7 +727,6 @@ update_accel (GtkModelButton *self,
{
guint key;
GdkModifierType mods;
- GtkAccelLabelClass *accel_class;
char *str;
if (!self->accel_label)
@@ -739,12 +738,9 @@ update_accel (GtkModelButton *self,
}
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 (self->accel_label), str);
g_free (str);
- g_type_class_unref (accel_class);
}
else
{