[Glade-devel] Writing a glade plugin, and documenting how to do it; can any experienced glade developer/user help me in this ?



Hello,

Tristan Van Berkom wrote:

Well I wonder first did you stumble on the existing documentation
at http://glade.gnome.org/docs/index.html ?

Yes, I had a look at that link before. I've succeeded in adding it to 
the palette in the meantime: I had noticed in the meantime that the xml 
wasn't 100% correct. But then again I'm that much of experience richer 
having succeeded in building a library-xml-file-icon_set combination 
that is shown in the glade palette (have learned a lot on how to build 
the library ...) However, let me make the remark that the link to the 
information you point me to immediately goes (for my level of 
experience) a level of detail *way* too deep for a non-glade-developer, 
even relatively inexperienced in GTK itself... I hope to be able to fill 
that lacune with my document. I'm enchanted by glade and enthousiastic 
about it's possibilities, but a more 'starter-like' documentation can 
make it a lot more accessible !

The "adding your own widgets" section should be helpfull, along with
looking at the existing gtk+ & gnome catalogs for some reference
(but I think we need a simplified example for reference).

That's what I'm busy doing  :)  What I missed, was some kind of 
"systematic approach"- guide. Kind of:
1. build your widget (set)
2. build your glade library that is to be used for that widget set  -> 
with an overview of the most probable build errors and causes - at least 
the ones I have encountered   :/
3. make your catalog
4. make the glade icons for your widgets
5. put all available to be used by glade (glade library, catalog, glade 
icon set, ...)
6. .....
7. .....
8. activate glade-3 and start using it...

I've nowhere found this kind of documentation up to now. Yes, sure, it's 
all in there, but then again 'well hidden' ;) between the API 
documentation, glade-gtk.c, gtk+.xml (as a reference), and the glade 
code  :(

BTW, refering to the paragraph you point me to, are you aware of the 
fact that

xmllint --dtdvalid glade-catalog.dtd --noout my-catalog.xml

doesn't validate (and glade-catalog.dtd should at present actually read 
glade-2.0.dtd) the gtk+.xml ?

Also (another doc error),

pkg-config --variable=catalogdir glade-3

yields
/usr/local/gtk/share/glade-3/catalogs, while it is really located at ...
/usr/local/gtk/share/glade3/catalogs

I already intended to flag this as an error, but still have to look at 
how to do this officially

To answer that question above at a glance, assuming you have a 
tictactoe_get_type()
function (and a Tictactoe object ofcourse) in libgladetictactoe (or 
the library
that libgladetictactoe links against) then glade will recognize it and 
load all
its properties automatically, if you need to change anything, than you 
start
playing with the <properties> tag etc.

I found out about the tictactoe_get_type()- error already. I had that 
function (as any gtk widget should have it, of course), but the library 
wasn't built properly (I made libglade-ttt.so from a stripped-down 
glade-gtk.c but didn't build the library depending on tictactoe.so). So 
I think to be able to add this kind of documentation in my document ... 
for later users.

You should note too that *ahem* this api is going to change alot in the
near future and has already in cvs HEAD (currently unstable), but
I'd love to help you anyway I can to document it !

I'll be finding this out in the near future. But let me note that I 
don't think the API itself is not well enough documented : it's more the 
'concepts' that are not too well described. Anyway, for the moment, I'm 
using gdb to see how the (glade) widget properties are loaded from my 
new (own) widget (see next paragraph).

We hang out quite alot at irc.gnome.org in #glade3, you're more than
welcome to swing by and ask us whatever :)

Thanks ! Glad to hear this. You'll notice me around shortly.

I will put a first version of my document available shortly.

Kind regards,

PhB




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]