Re: Copying property information
- From: Alex Larsson <alexl redhat com>
- To: Tim Janik <timj gtk org>
- Cc: Owen Taylor <otaylor redhat com>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Copying property information
- Date: Tue, 28 Aug 2001 11:00:32 -0400 (EDT)
On Tue, 28 Aug 2001, Tim Janik wrote:
> there are plugins which do create pspec name/blurbs on the fly and free
> those after creating param specs from it.
Those would be very simple to fix, leading to one less strdup().
> > And add g_param_spec_get_nick/blurb() that looks up the information frmo the .objdoc file
> > for paramspec->owner_type.
> >
> > <od:class name="GtkLabel">
> > <od:textdomain domain="gtk20"/>
> > <od:property name="name">
> > <od:nick>Widget Name</od:nick>
> > <od:blurb>
> > The name of the widget
> > </od:blurb>
> > </od:property>
> > </od:class>
> >
> > (Yes, that could be done as sexps, if you really want to fight the standardization tide.)
>
> "sexps"?
> i basically like the idea of looking up doc strigs lazily, however i don't at all
> like the type of markup you suggest above. considering that:
> 1) such doc files need to be easy to write so people actually suplly them
Yes. And I truly believe that people in general think it is easier to
read/write XML than some custom sexp format. (sexps is the format you
show below). XML is used in many places, and it looks like HTML which
people are used to. There is also a lot of tools out there to handle them,
including good validation testers and parsers.
> 2) they need to be easy to parse (also for code) and quick to scan, after
> all, g_param_spec_blurb() will want just one string from the doc files,
> something like:
> (GtkWidget
> (GParamSpec "name"
> (nick "Widget Name")
> (blurb "The name of the widget")
> )
> )
> will be way faster to handle, is more compact, and i could cook up a
> _fast_ parser (which just skip-scans over unrelated portions, such as
> (GtkLabel ...) or (GParamSpec "foo")) for this in about an hour.
> one problem i see with this is finding yet another install-dir for the doc
> files to go, and have this mechanism supported by non-gtk-proper param spec
> using code as well.
Well. We already have an "xml-like" parser. The GMarkup one.
> remaining questions i have on this are:
> - should we "cache" strings already read in from doc-files in pspec->{blurb|nick}
> (probably yes, so we can hand them out as "constant" strings)
Probably yes. Once you've shown interest in on doc string you've basically
said that you're an "glade-like" app.
> - is this leading towards having seperate doc files per language, or do we
> want to have a single doc file handling multiple languages?
> either way, this means translators have to figure a new doc file concept
If we use xml-i18n-tools we should be able to extract the doc strings to
po-files just like all other gnome projects that have translatable
contents in external files do.
/ Alex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]