[gtk+/gtk-style-context: 470/540] 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: 470/540] GtkStyle: Return the default icon set if no context is attached.
- Date: Fri, 3 Dec 2010 03:15:37 +0000 (UTC)
commit 9ef7bc647572b56b3b9e9bcf7798f64530493eee
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]