[gtk+] Cosmetic: Avoid explicit state variables



commit 10a8533bd3d453bd6b9b3f5bfe03c28e4b5409fc
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Nov 14 10:29:25 2015 -0500

    Cosmetic: Avoid explicit state variables
    
    Using the state of the context makes this more obviously correct.

 gtk/gtkrecentchooserdefault.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index f6b0b87..f178fa9 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -875,14 +875,12 @@ set_default_size (GtkRecentChooserDefault *impl)
   GtkRequisition req;
   GdkRectangle monitor;
   GtkStyleContext *context;
-  GtkStateFlags state;
 
   widget = GTK_WIDGET (impl);
   context = gtk_widget_get_style_context (widget);
-  state = gtk_widget_get_state_flags (widget);
 
   /* Size based on characters and the icon size */
-  gtk_style_context_get (context, state, "font-size", &font_size, NULL);
+  gtk_style_context_get (context, gtk_style_context_get_state (context), "font-size", &font_size, NULL);
 
   width = impl->priv->icon_size + font_size * NUM_CHARS + 0.5;
   height = (impl->priv->icon_size + font_size) * NUM_LINES + 0.5;


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