[gtk+] Handle float and uint style properties
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Handle float and uint style properties
- Date: Sat, 4 Dec 2010 15:15:17 +0000 (UTC)
commit 627b33265b8208d519e016d0e5410736ba4d9fd1
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 17 00:21:21 2010 -0500
Handle float and uint style properties
These were giving errors in testgtk.
gtk/gtkcssprovider.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index f9ae56d..7af8291 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2467,8 +2467,12 @@ css_provider_parse_value (GtkCssProvider *css_provider,
}
else if (type == G_TYPE_INT)
g_value_set_int (value, atoi (value_str));
+ else if (type == G_TYPE_UINT)
+ g_value_set_uint (value, (guint) atoi (value_str));
else if (type == G_TYPE_DOUBLE)
g_value_set_double (value, g_ascii_strtod (value_str, NULL));
+ else if (type == G_TYPE_FLOAT)
+ g_value_set_float (value, (gfloat) g_ascii_strtod (value_str, NULL));
else if (type == GTK_TYPE_THEMING_ENGINE)
{
GtkThemingEngine *engine;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]