Re: gnome2-perl API?



Bruno Boettcher said:
seems as if i wnat to use customized labels, i need to use Gnome2... i
installed it now even if its called beta. But it seems the whole
interface changed.... and i can't find the docu for that one...

gnome has actually remained more stable between 1 and 2 than gtk did; but a
large set of objects have been deprecated and thus don't appear in Gnome2 (the
perl module).

in gtk-perl, the Gnome module wrapped up several different libraries in one;
in gtk2-perl (specifically the -xs tree), they are split at a finer
granularity.  libgnome and libgnomeui are together in Gnome2, libgnomecanvas
is in GnomeCanvas , libgnomeprint and libgnomeprintui are separate (but
largely unimplemented); the bonobo stuff has not been attempted.

this is largely because i do not use gnome in my own programs and am writing
the gnome bindings because they're easy to do.  i have said many times that
anyone who wishes to take over the Gnome modules is fully invited to do so,
otherwise it's up to people using them and finding bugs in a slow passive
development cycle, rather than the active one seen on Glib and Gtk2.


it begun with the Gnome::Program->init which has now to take a 3rd
argument of unkown purpose (BTW the example given in the POD doesn't
    work...)

the third argument is a module info structure, which is supposed to be used to
determine what submodules to initialize.[1]  for example, you may want a
gui-less gnome app, in which case you'd pass 'libgnome' (or undef), or
'libgnomeui' for a gui app, or you may have some custom thing, for which you'd
pass a module info structure.

if you pass undef for that third parameter, you get the default, which is
'libgnome'.  since this default is not what people would expect, the code
doesn't allow the parameter to default (and thus be omitted).  thinking back
on it, most people are probably going to want to write GUI apps, so the proper
default should be 'libgnomeui' and the value should default.

if no one disagrees, i'll change that in CVS.


and now i am stuck at the create_menus stage.... i get a report that
Gnome2::App has no such method.... i can't even find where that class is
defined to try to look it up in the code itself...

create_menus went into CVS on the 11th, which was four days ago, and the 0.26
release was on the 4th.  ;-)

however, i borrowed most of the implementation of create_menus from gtk-perl,
so your data structures should need only minimal changes (pass an array
reference rather than list, that sort of thing).


[1]
http://developer.gnome.org/doc/API/2.0/libgnome/libgnome-gnome-program.html#GNOME-PROGRAM-INIT


-- 
muppet <scott at asofyet dot org>



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