[gtk+] GtkSymbolicColor: Only require styleproperties when resolving named colors.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkSymbolicColor: Only require styleproperties when resolving named colors.
- Date: Sat, 4 Dec 2010 15:09:34 +0000 (UTC)
commit 765f653df620c7e9a83c637c7e9d88e19c7b2ea8
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]