summaryrefslogtreecommitdiff
path: root/gtk/gtkgrid.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2011-01-12 22:55:55 +0100
committerCarlos Garnacho <carlosg@gnome.org>2011-01-12 22:58:41 +0100
commite2e7075533b003f54ed0852af8595d3ef4f23b01 (patch)
treece65645fa59ed53ee5b8d52010e3ef6a8f466980 /gtk/gtkgrid.c
parentb6464b6c0a467226057e21d7f35e8afa50321422 (diff)
downloadgtk+-e2e7075533b003f54ed0852af8595d3ef4f23b01.tar.gz
Redo patch in efae64b (Set vertical/horizontal class...)
Add a _gtk_orientable_set_style_classes() function so all orientation changes to style happen in a single place.
Diffstat (limited to 'gtk/gtkgrid.c')
-rw-r--r--gtk/gtkgrid.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 525f970df6..9e1498d3e2 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -187,23 +187,11 @@ gtk_grid_set_orientation (GtkGrid *grid,
GtkOrientation orientation)
{
GtkGridPrivate *priv = grid->priv;
- GtkStyleContext *context;
if (priv->orientation != orientation)
{
priv->orientation = orientation;
- context = gtk_widget_get_style_context (GTK_WIDGET (grid));
-
- if (grid->priv->orientation == GTK_ORIENTATION_VERTICAL)
- {
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_VERTICAL);
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_HORIZONTAL);
- }
- else
- {
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_HORIZONTAL);
- gtk_style_context_remove_class (context, GTK_STYLE_CLASS_VERTICAL);
- }
+ _gtk_orientable_set_style_classes (GTK_ORIENTABLE (grid));
g_object_notify (G_OBJECT (grid), "orientation");
}