From 0b15aba82a3a8fbd2a1bc41da6f58399346794b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 25 Dec 2020 12:07:08 +0100 Subject: [PATCH] label: Remove mnemonics_visible_apply_recursively from private header This is only used in gtklabel.c --- gtk/gtklabel.c | 59 ++++++++++++++++++++++--------------------- gtk/gtklabelprivate.h | 2 -- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index ef655b29e1..f4920c8667 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -2641,6 +2641,36 @@ gtk_label_new_with_mnemonic (const char *str) return GTK_WIDGET (self); } +static void +_gtk_label_mnemonics_visible_apply_recursively (GtkWidget *widget, + gboolean visible) +{ + if (GTK_IS_LABEL (widget)) + { + GtkLabel *self = GTK_LABEL (widget); + + if (self->mnemonics_visible != visible) + { + self->mnemonics_visible = visible; + gtk_label_recalculate (self); + } + } + else + { + GtkWidget *child; + + for (child = gtk_widget_get_first_child (widget); + child; + child = gtk_widget_get_next_sibling (child)) + { + if (GTK_IS_NATIVE (child)) + continue; + + _gtk_label_mnemonics_visible_apply_recursively (child, visible); + } + } +} + static void label_mnemonics_visible_changed (GtkWidget *widget, GParamSpec *pspec, @@ -2712,35 +2742,6 @@ gtk_label_setup_mnemonic (GtkLabel *self) } } -void -_gtk_label_mnemonics_visible_apply_recursively (GtkWidget *widget, - gboolean visible) -{ - if (GTK_IS_LABEL (widget)) - { - GtkLabel *self = GTK_LABEL (widget); - - if (self->mnemonics_visible != visible) - { - self->mnemonics_visible = visible; - gtk_label_recalculate (self); - } - } - else - { - GtkWidget *child; - - for (child = gtk_widget_get_first_child (widget); - child; - child = gtk_widget_get_next_sibling (child)) - { - if (GTK_IS_NATIVE (child)) - continue; - - _gtk_label_mnemonics_visible_apply_recursively (child, visible); - } - } -} static void label_mnemonic_widget_weak_notify (gpointer data, GObject *where_the_object_was) diff --git a/gtk/gtklabelprivate.h b/gtk/gtklabelprivate.h index 68ecc1a1e3..8eb73d3af0 100644 --- a/gtk/gtklabelprivate.h +++ b/gtk/gtklabelprivate.h @@ -24,8 +24,6 @@ G_BEGIN_DECLS -void _gtk_label_mnemonics_visible_apply_recursively (GtkWidget *widget, - gboolean mnemonics_visible); int _gtk_label_get_cursor_position (GtkLabel *label); int _gtk_label_get_selection_bound (GtkLabel *label);