summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@gnome.org>2003-12-12 14:22:53 +0000
committerDodji Seketeli <dodji@src.gnome.org>2003-12-12 14:22:53 +0000
commit953b643be4a2d4fe4bbf7bed4f5c355d3756be45 (patch)
tree4f281f0e270296eefa346b1ccd7888528b2438ad
parent754268015a45bbe6df0382a4dba44efaf0ff176a (diff)
downloadlibcroco-953b643be4a2d4fe4bbf7bed4f5c355d3756be45.tar.gz
a bit of cleanup and bug fix here. added more test cases.
2003-12-12 Dodji Seketeli <dodji@gnome.org> * docs/examples/selection-example-1.c: a bit of cleanup and bug fix here. * docs/examples/selection-example-1.css: added more test cases.
-rw-r--r--ChangeLog6
-rw-r--r--docs/examples/selection-example-1.c32
-rw-r--r--docs/examples/selection-example-1.css12
3 files changed, 41 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d302a54..e17032d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-12-12 Dodji Seketeli <dodji@gnome.org>
+
+ * docs/examples/selection-example-1.c: a bit of cleanup
+ and bug fix here.
+ * docs/examples/selection-example-1.css: added more test cases.
+
2003-12-11 Dodji Seketeli <dodji@gnome.org>
* configure.in: updated version numbers for 0.4.
diff --git a/docs/examples/selection-example-1.c b/docs/examples/selection-example-1.c
index 0e0f111..ab94492 100644
--- a/docs/examples/selection-example-1.c
+++ b/docs/examples/selection-example-1.c
@@ -86,12 +86,32 @@ int init(struct workspace *ws, char **args)
/* ...and destruct in reverse order*/
void fini(struct workspace *ws)
{
- if (ws->selector) cr_sel_eng_destroy(ws->selector);
- if (ws->cascade) cr_cascade_destroy(ws->cascade);
- if (ws->stylesheet) cr_stylesheet_destroy(ws->stylesheet);
- if (ws->result) xmlXPathFreeObject(ws->result);
- if (ws->xpath) xmlXPathFreeContext(ws->xpath);
- if (ws->document) xmlFreeDoc(ws->document);
+ if (ws->selector)
+ {
+ cr_sel_eng_destroy(ws->selector);
+ ws->selector = NULL ;
+ }
+ if (ws->cascade)
+ {
+ cr_cascade_destroy(ws->cascade);
+ ws->cascade = NULL ;
+ }
+
+ if (ws->result)
+ {
+ xmlXPathFreeObject(ws->result);
+ ws->result = NULL ;
+ }
+ if (ws->xpath)
+ {
+ xmlXPathFreeContext(ws->xpath);
+ ws->xpath = NULL ;
+ }
+ if (ws->document)
+ {
+ xmlFreeDoc(ws->document);
+ ws->document = NULL ;
+ }
}
void print_property(gpointer name, gpointer decl, gpointer data)
diff --git a/docs/examples/selection-example-1.css b/docs/examples/selection-example-1.css
index 8bf681b..a50fdb4 100644
--- a/docs/examples/selection-example-1.css
+++ b/docs/examples/selection-example-1.css
@@ -10,22 +10,28 @@ report > entry
note
{
- color : green;
+ color : note-color;
frame : solid;
}
note[id]
{
- color : blue;
+ color : note-id-color;
frame : solid;
}
note[id=bar]
{
margin : 5px;
+ color: note-id-bar-color ;
+}
+
+note[id=foo]
+{
+ color : note-id-foo-color;
}
entry[type=notice] note[id=bar]
{
padding : 5px;
-} \ No newline at end of file
+}