[gtk+/gtk-style-context] GtkStyleContext: Add gtk_style_context_reset_widgets()



commit 77531a431f817e938224a04bec4b729fc82b8bb7
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Sep 22 23:40:59 2010 +0200

    GtkStyleContext: Add gtk_style_context_reset_widgets()
    
    This function recalculates the style for all widgets on a screen.

 gtk/gtkstylecontext.c |   10 +++++-----
 gtk/gtkstylecontext.h |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 522a3e2..cc234ee 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -707,13 +707,13 @@ gtk_style_context_remove_provider (GtkStyleContext  *context,
     }
 }
 
-static void
-reset_toplevels (GdkScreen *screen)
+void
+gtk_style_context_reset_widgets (GdkScreen *screen)
 {
   GList *list, *toplevels;
 
   toplevels = gtk_window_list_toplevels ();
-  g_list_foreach (toplevels, (GFunc)g_object_ref, NULL);
+  g_list_foreach (toplevels, (GFunc) g_object_ref, NULL);
 
   for (list = toplevels; list; list = list->next)
     {
@@ -745,7 +745,7 @@ gtk_style_context_add_provider_for_screen (GdkScreen        *screen,
   if (list != providers)
     g_object_set_qdata (G_OBJECT (screen), provider_list_quark, list);
 
-  reset_toplevels (screen);
+  gtk_style_context_reset_widgets (screen);
 }
 
 void
@@ -767,7 +767,7 @@ gtk_style_context_remove_provider_for_screen (GdkScreen        *screen,
       if (list != providers)
         g_object_set_qdata (G_OBJECT (screen), provider_list_quark, list);
 
-      reset_toplevels (screen);
+      gtk_style_context_reset_widgets (screen);
     }
 }
 
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 07cec5b..5064bf6 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -169,7 +169,7 @@ void gtk_style_context_state_transition_stop   (GtkStyleContext *context,
                                                 gpointer         identifier);
 
 void gtk_style_context_invalidate (GtkStyleContext *context);
-
+void gtk_style_context_reset_widgets (GdkScreen *screen);
 
 /* Paint methods */
 void gtk_render_check (GtkStyleContext *context,



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