gtk-css-engine r179 - in trunk: . src
- From: robsta svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-css-engine r179 - in trunk: . src
- Date: Mon, 3 Nov 2008 16:41:09 +0000 (UTC)
Author: robsta
Date: Mon Nov 3 16:41:09 2008
New Revision: 179
URL: http://svn.gnome.org/viewvc/gtk-css-engine?rev=179&view=rev
Log:
* src/css2gtkrc.c (main):
* src/gce-serialize.c (iter_func), (gce_serialize):
Fix after libccss API change (glib header dep removal).
Modified:
trunk/ChangeLog
trunk/src/css2gtkrc.c
trunk/src/gce-serialize.c
Modified: trunk/src/css2gtkrc.c
==============================================================================
--- trunk/src/css2gtkrc.c (original)
+++ trunk/src/css2gtkrc.c Mon Nov 3 16:41:09 2008
@@ -48,8 +48,8 @@
return EXIT_FAILURE;
}
- printf (gtkrc);
- printf ("\n");
+ puts (gtkrc);
+ puts ("\n");
g_free (gtkrc), gtkrc = NULL;
Modified: trunk/src/gce-serialize.c
==============================================================================
--- trunk/src/gce-serialize.c (original)
+++ trunk/src/gce-serialize.c Mon Nov 3 16:41:09 2008
@@ -258,38 +258,39 @@
return TRUE;
}
+static void
+iter_func (ccss_stylesheet_t const *stylesheet,
+ char const *type_name,
+ GString *rc_string)
+{
+ struct RcBlock block;
+ gboolean ret;
+
+ /* Only feed widget styles back into gtk, not primitives. */
+ if (strcmp ("*", type_name) != 0 &&
+ strncmp ("Gtk", type_name, 3) != 0) {
+ return;
+ }
+
+ memset (&block, 0, sizeof (block));
+ block.type_name = type_name;
+ ret = accumulate (stylesheet, &block);
+ if (ret) {
+ serialize (&block, rc_string);
+ }
+}
+
char *
gce_serialize (ccss_stylesheet_t const *stylesheet)
{
- ccss_stylesheet_iter_t iter;
- char const *type_name;
- ccss_selector_group_t const *group;
- struct RcBlock block;
- GString *rc_string;
- char *str;
- gboolean ret;
+ GString *rc_string;
+ char *str;
rc_string = g_string_new ("");
- ccss_stylesheet_iter_init (&iter, stylesheet);
-
- type_name = NULL;
- group = NULL;
- while (ccss_stylesheet_iter_next (&iter, &type_name, &group)) {
-
- /* Only feed widget styles back into gtk, not primitives. */
- if (strcmp ("*", type_name) != 0 &&
- strncmp ("Gtk", type_name, 3) != 0) {
- continue;
- }
-
- memset (&block, 0, sizeof (block));
- block.type_name = type_name;
- ret = accumulate (stylesheet, &block);
- if (ret) {
- serialize (&block, rc_string);
- }
- }
+ ccss_stylesheet_foreach (stylesheet,
+ (ccss_stylesheet_iterator_f) iter_func,
+ rc_string);
str = rc_string->str;
g_string_free (rc_string, FALSE), rc_string = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]