[gtk+/refactor: 118/138] tests/testiconview-keynav.c: Use accessor functions to access GtkWidget



commit 3be760655ec0495caf00ef5748ebc0695793280c
Author: Javier Jardón <jjardon gnome org>
Date:   Mon Aug 16 00:33:40 2010 +0200

    tests/testiconview-keynav.c: Use accessor functions to access GtkWidget

 tests/testiconview-keynav.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tests/testiconview-keynav.c b/tests/testiconview-keynav.c
index 367a227..928fbc5 100644
--- a/tests/testiconview-keynav.c
+++ b/tests/testiconview-keynav.c
@@ -213,11 +213,15 @@ static void
 header_style_set (GtkWidget *widget,
                   GtkStyle  *old_style)
 {
+  GtkStyle *style;
+
+  style = gtk_widget_get_style (widget);
+
   g_signal_handlers_block_by_func (widget, header_style_set, NULL);
   gtk_widget_modify_bg (widget, GTK_STATE_NORMAL,
-                        &widget->style->base[GTK_STATE_NORMAL]);
+                        &style->base[GTK_STATE_NORMAL]);
   gtk_widget_modify_fg (widget, GTK_STATE_NORMAL,
-                        &widget->style->text[GTK_STATE_NORMAL]);
+                        &style->text[GTK_STATE_NORMAL]);
   g_signal_handlers_unblock_by_func (widget, header_style_set, NULL);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]