[gtk+/gtk-style-context: 471/490] GtkStyle: Return the default icon	set if no context is attached.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+/gtk-style-context: 471/490] GtkStyle: Return the default icon	set if no context is attached.
- Date: Wed, 24 Nov 2010 14:19:18 +0000 (UTC)
commit 0cc57a001e4c26f160b58f46ca803f570a9c25a8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Nov 24 01:13:27 2010 +0100
    GtkStyle: Return the default icon set if no context is attached.
 gtk/gtkstyle.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index cdd1249..ad23f22 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -1007,7 +1007,10 @@ gtk_style_lookup_icon_set (GtkStyle   *style,
 
   priv = GTK_STYLE_GET_PRIVATE (style);
 
-  return gtk_style_context_lookup_icon_set (priv->context, stock_id);
+  if (priv->context)
+    return gtk_style_context_lookup_icon_set (priv->context, stock_id);
+
+  return gtk_icon_factory_lookup_default (stock_id);
 }
 
 /**
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]