diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-04-23 17:48:29 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-06-05 20:35:09 +0100 |
commit | 6e52ef96a4f3c1812dc8d7ec8698608fbcb951e0 (patch) | |
tree | 7220442bebfc34f011bdc5821c289725fbdf8664 /gtk/gtkbox.c | |
parent | 9606c1eee9faaca7a7822ada3509b27fa98966e7 (diff) | |
download | gtk+-6e52ef96a4f3c1812dc8d7ec8698608fbcb951e0.tar.gz |
Move orientable style classes into GtkWidget
It feels slightly wrong to have GtkOrientable operate on widgets, but at
least what happens when an orientable widget changes orientation should
be part of GtkWidget.
This will allow to add more state changes without accessing widget state
from the outside of gtkwidget.c.
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r-- | gtk/gtkbox.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c index e1539ff4ce..d4c296e7df 100644 --- a/gtk/gtkbox.c +++ b/gtk/gtkbox.c @@ -61,7 +61,6 @@ #include "gtkcsspositionvalueprivate.h" #include "gtkintl.h" #include "gtkorientable.h" -#include "gtkorientableprivate.h" #include "gtkprivate.h" #include "gtktypebuiltins.h" #include "gtksizerequest.h" @@ -120,7 +119,7 @@ gtk_box_set_property (GObject *object, priv->orientation = orientation; gtk_orientable_set_orientation (GTK_ORIENTABLE (box_layout), priv->orientation); - _gtk_orientable_set_style_classes (GTK_ORIENTABLE (box)); + gtk_widget_update_orientation (GTK_WIDGET (box), priv->orientation); g_object_notify (object, "orientation"); } } @@ -288,7 +287,7 @@ gtk_box_init (GtkBox *box) GtkBoxPrivate *priv = gtk_box_get_instance_private (box); priv->orientation = GTK_ORIENTATION_HORIZONTAL; - _gtk_orientable_set_style_classes (GTK_ORIENTABLE (box)); + gtk_widget_update_orientation (GTK_WIDGET (box), priv->orientation); } static GtkBuildableIface *parent_buildable_iface; |