]> Pileus Git - ~andy/gtk/commitdiff
let title and logo be configurable so that GNOME can use this script too.
authorJonathan Blandford <jrb@redhat.com>
Fri, 25 Feb 2000 22:56:58 +0000 (22:56 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Fri, 25 Feb 2000 22:56:58 +0000 (22:56 +0000)
2000-02-25  Jonathan Blandford  <jrb@redhat.com>

* docs/make-todo (lineno): let title and logo be configurable so
that GNOME can use this script too.

* TODO.xml: added logourl and a title

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
TODO.xml
docs/make-todo

index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 7087b596704b0b5864ee353906f6fa47ead34ad6..d5c54d946e19284218dbdf07a3173322ff302c46 100644 (file)
@@ -1,3 +1,10 @@
+2000-02-25  Jonathan Blandford  <jrb@redhat.com>
+
+       * docs/make-todo (lineno): let title and logo be configurable so
+       that GNOME can use this script too.
+
+       * TODO.xml: added logourl and a title
+
 Fri Feb 25 11:12:00 2000  Owen Taylor  <otaylor@redhat.com>
 
        * TODO.xml: Added some UI items, and an explanatory
index 36cb733a7e5fdbc0c49f05ddef0d412af547e494..6fee7f0f87ca5121fe2c47fba49531af399a4bf1 100644 (file)
--- a/TODO.xml
+++ b/TODO.xml
@@ -7,7 +7,8 @@
      $ docs/make-todo > /dev/null
 
      before committing, or you may screw up the online version --> 
-<todo>
+<todo logourl="gtk-logo-rgb.gif">
+  <title>GTK+ TODO list</title>
   <section>
     <title>GDK</title>
     
index 498a1e8a419c52fd1170b6662608b43efe6a3fc1..c874519e39d0993454a513a7428dd68af5871d20 100755 (executable)
@@ -124,6 +124,8 @@ class TodoParser (xmllib.XMLParser):
         self.data = ""
         self.section = None
         self.entry = None
+        self.logourl = None
+        self.title = None
         self.sections = []
 
         self.entitydefs = {}
@@ -131,6 +133,8 @@ class TodoParser (xmllib.XMLParser):
     def start_todo(self,attributes):
         if self.in_todo:
             raise ParseError, "<todo> tags may not be nested"
+        if attributes.has_key ("logourl"):
+            self.logourl = attributes["logourl"]
         self.in_todo = 1
 
     def end_todo(self):
@@ -150,8 +154,8 @@ class TodoParser (xmllib.XMLParser):
         self.section = None
 
     def start_title(self,attributes):
-        if not self.section and not self.entry:
-            raise ParseError, "<title> tag must be in <section> or <entry>"
+        if not self.in_todo:
+            raise ParseError, "<title> tag must be in <todo>, <section> or <entry>"
         if self.in_data:
             raise ParseError, "Unexpected <title> tag in content"
         self.in_data = 1
@@ -160,10 +164,11 @@ class TodoParser (xmllib.XMLParser):
         self.in_data = 0
         if self.entry:
             self.entry.title = self.data
-            self.data = ""
-        else:
+        elif self.section:
             self.section.title = self.data
-            self.data = ""
+        else:
+            self.title = self.data
+        self.data = ""
             
     def start_description(self,attributes):
         if not self.entry:
@@ -295,18 +300,21 @@ while 1:
     lineno = lineno + 1
 
 parser.close()
+if parser.title == None:
+    sys.stderr.write ("<todo> Document must have a <title>\n")
+    sys.exit (1)
 
 print '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
 <html>
 <head>
-<title>GTK+ TODO List</title>
+<title>%s</title>
 </head>
 <body bgcolor="#ffffff">
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<table width="100%%" cellspacing="0" cellpadding="0" border="0">
   <tbody>
     <tr valign="top">
       <td>
-        <h1>GTK+ TODO List</h1>'''
+        <h1>%s</h1>''' % (parser.title, parser.title)
 
 
 for section in parser.sections:
@@ -318,14 +326,16 @@ for section in parser.sections:
         print '<a href="#%s">%s</a> (%d items)<br>' % (id,section.title,ntasks)
 
 print '''
-      </td>
-      <td align="right">
-        <img src="gtk-logo-rgb.gif" alt="GTK+ Logo"></img>
-      </td>
+      </td>'''
+if parser.logourl != None:
+    print '''      <td align="right">
+       <img src="%s" alt="Logo"></img>
+      </td>''' % parser.logourl
+print '''
     </tr>
   </tbody>
 </table>
-'''
+''' 
 
 first = 1
 for section in parser.sections: