public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* Gnatsweb: patch to add stylesheet support
@ 2001-03-20  4:48 Yngve Svendsen
  2001-03-21  1:15 ` Gerald Pfeifer
  0 siblings, 1 reply; 2+ messages in thread
From: Yngve Svendsen @ 2001-03-20  4:48 UTC (permalink / raw)
  To: gnats-devel; +Cc: Gerald Pfeifer

The following patch adds the ability to have an external stylesheet linked 
to all pages generated by Gnatsweb. It is against the version in the 
current GNATS 4 CVS.

Gerald: Isn't it a good idea to change the version number of the 
development Gnatsweb in CVS to distinguish it from the version that works 
with GNATS 3.x? I would suggest going to "4.0-dev". In the future, version 
numbers don't need to be synced between GNATS and Gnatsweb, but I think it 
is a good idea to use a common starting point for version 4, since older 
versions of Gnatsweb won't work with GNATS 4. Does that make sense?

Next, I'll be going through some of the HTML constructs produced by 
Gnatsweb in order to make them more amenable to formatting with 
stylesheets. Expect more patches soon.

- Yngve



Index: gnatsweb.pl
===================================================================
RCS file: /cvs/gnats/gnats/contrib/gnatsweb/gnatsweb.pl,v
retrieving revision 2.24
diff -u -p -r2.24 gnatsweb.pl
--- gnatsweb.pl 2001/02/08 10:49:15     2.24
+++ gnatsweb.pl 2001/03/20 12:40:10
@@ -26,6 +26,11 @@ $site_banner_text = 'gnatsweb';
  $site_banner_background = '#000000';
  $site_banner_foreground = '#ffffff';

+# Uncomment the following line and insert stylesheet URL in order to
+# link all generated pages to an external stylesheet. Both absolute
+# and relative URLs are supported.
+#$site_stylesheet=' http://url.of/stylesheet ';
+
  $popup_menu_becomes_obnoxious = 20;

  $client_would_have_exited = 0;
@@ -2182,6 +2187,8 @@ sub page_start_html
    my @args = (-title=>"$title - $site_banner_text");
    push(@args, -bgcolor=>$site_background)
          if defined($site_background);
+  push(@args, -style=>{-src=>$site_stylesheet})
+        if defined($site_stylesheet);
    print $q->start_html(@args);

    # Add the page banner.  This banner is a string slammed to the right



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gnatsweb: patch to add stylesheet support
  2001-03-20  4:48 Gnatsweb: patch to add stylesheet support Yngve Svendsen
@ 2001-03-21  1:15 ` Gerald Pfeifer
  0 siblings, 0 replies; 2+ messages in thread
From: Gerald Pfeifer @ 2001-03-21  1:15 UTC (permalink / raw)
  To: Yngve Svendsen; +Cc: gnats-devel

On Tue, 20 Mar 2001, Yngve Svendsen wrote:
> The following patch adds the ability to have an external stylesheet linked
> to all pages generated by Gnatsweb. It is against the version in the
> current GNATS 4 CVS.

That patch did not apply automatically (it seems your mailer lost
spaces?), but I added it manually. Thanks for the patch!

Note that we also need ChangeLog entries for patches. I wrote the
following for you this time, though it'd be great could you supply
them in the future.

  2001-03-21  Yngve Svendsen  <yngve.svendsen@clustra.com>

        * gnatsweb.pl: New configuration variable $site_stylesheet.
        (page_start_html): Use it.

> Gerald: Isn't it a good idea to change the version number of the
> development Gnatsweb in CVS to distinguish it from the version that works
> with GNATS 3.x? I would suggest going to "4.0-dev". In the future, version
> numbers don't need to be synced between GNATS and Gnatsweb, but I think it
> is a good idea to use a common starting point for version 4, since older
> versions of Gnatsweb won't work with GNATS 4. Does that make sense?

Yes, a lot of sense, though I'd prefer 3.95, which also leaves a bit of
room for signifcant bumps before 4.0 in case we need that.

I installed the following:

  2001-03-21  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>

        * gnatsweb.pl ($VERSION): Bump to 3.95.

> Next, I'll be going through some of the HTML constructs produced by
> Gnatsweb in order to make them more amenable to formatting with
> stylesheets. Expect more patches soon.

Great. In that case I'd like to give you CVS write access and preapprove
these changes (that is, you can go ahead and commit them w/o any further
approval), especially as I'll be out-of-town and offline for about two
weeks starting next weekend.

Please contact me privately for details!

Also, if you're interested in fixing the HTML output of gnatsweb,
you  might want to have a look at the bug report at
< http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=961&database=gcc >

Thanks for your contributions!
Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-21  1:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-20  4:48 Gnatsweb: patch to add stylesheet support Yngve Svendsen
2001-03-21  1:15 ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).