[gtk+/gtk-style-context: 323/533] GtkSymbolicColor: Only require styleproperties when resolving named colors.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 323/533] GtkSymbolicColor: Only require styleproperties when resolving named colors.
- Date: Wed, 1 Dec 2010 02:32:58 +0000 (UTC)
commit 6b3577a825d98ec4e3bfdd2a35ec79cd10ee0665
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Nov 6 12:36:05 2010 +0100
GtkSymbolicColor: Only require styleproperties when resolving named colors.
It is not necessary for resolving colors based on literals,
so be a bit less strict here.
gtk/gtksymboliccolor.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtksymboliccolor.c b/gtk/gtksymboliccolor.c
index d2506dc..cb5a919 100644
--- a/gtk/gtksymboliccolor.c
+++ b/gtk/gtksymboliccolor.c
@@ -488,7 +488,6 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
GdkRGBA *resolved_color)
{
g_return_val_if_fail (color != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
g_return_val_if_fail (resolved_color != NULL, FALSE);
switch (color->type)
@@ -500,6 +499,8 @@ gtk_symbolic_color_resolve (GtkSymbolicColor *color,
{
GtkSymbolicColor *named_color;
+ g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
+
named_color = gtk_style_properties_lookup_color (props, color->name);
if (!named_color)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]