label: Remove mnemonics_visible_apply_recursively from private header

This is only used in gtklabel.c
This commit is contained in:
Timm Bäder 2020-12-25 12:07:08 +01:00
parent d8fa9de93a
commit 0b15aba82a
2 changed files with 30 additions and 31 deletions

View File

@ -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)

View File

@ -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);