summaryrefslogtreecommitdiff
path: root/gtk/gtktoolpalette.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/gtktoolpalette.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/gtktoolpalette.c')
-rw-r--r--gtk/gtktoolpalette.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/gtk/gtktoolpalette.c b/gtk/gtktoolpalette.c
index 491cf9e9af..ed3aed282d 100644
--- a/gtk/gtktoolpalette.c
+++ b/gtk/gtktoolpalette.c
@@ -234,25 +234,6 @@ gtk_tool_palette_reconfigured (GtkToolPalette *palette)
}
static void
-reset_orientation_style (GtkToolPalette *palette)
-{
- GtkStyleContext *context;
-
- context = gtk_widget_get_style_context (GTK_WIDGET (palette));
-
- if (palette->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_tool_palette_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -282,7 +263,7 @@ gtk_tool_palette_set_property (GObject *object,
if ((guint) g_value_get_enum (value) != palette->priv->orientation)
{
palette->priv->orientation = g_value_get_enum (value);
- reset_orientation_style (palette);
+ _gtk_orientable_set_style_classes (GTK_ORIENTABLE (palette));
gtk_tool_palette_reconfigured (palette);
}
break;