[gtk+/gtk-style-context: 470/533] 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/533] GtkStyle: Return the default icon set if no context is attached.
- Date: Wed, 1 Dec 2010 02:45:20 +0000 (UTC)
commit ccae262b93f062672d8b0c5287e6d2b0c98480d5
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]