summaryrefslogtreecommitdiff
path: root/gtk/gtkcellview.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/gtkcellview.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/gtkcellview.c')
-rw-r--r--gtk/gtkcellview.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 87c56ed8bc..e47d5eac71 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -415,25 +415,6 @@ gtk_cell_view_get_property (GObject *object,
}
static void
-reset_orientation_style (GtkCellView *view)
-{
- GtkStyleContext *context;
-
- context = gtk_widget_get_style_context (GTK_WIDGET (view));
-
- if (view->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);
- }
-}
-
-static void
gtk_cell_view_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -450,7 +431,7 @@ gtk_cell_view_set_property (GObject *object,
if (view->priv->context)
gtk_cell_area_context_reset (view->priv->context);
- reset_orientation_style (view);
+ _gtk_orientable_set_style_classes (GTK_ORIENTABLE (object));
break;
case PROP_BACKGROUND:
{