in reply to RE: Writing Gnome Panel applets in Perl
in thread Writing Gnome Panel applets in Perl

this is correct. the Gtk-Perl package contains a Gnome subpackage that allows access to GNOME-specific stuff like Gnome::Canvas and the panel. in order to get panel support in Gtk-Perl, you must build your Gnome module with panel bindings by passing --with-panel to Makefile.PL for the Gnome subpackage.

i'm not aware of any tutorials or sample code for writing stuff for the panel in Perl, but i am recompiling my Gnome module with --with-panel as i write this and may have some sample code myself later in the day.

instructions:

  1. download Gtk-Perl
  2. perl Makefile.PL, make, and make install for the main module
  3. perl Makefile.PL, make, and make install for the GdkImlib sub-module (i had to create a symlink GdkImlib/xs/GdkImlibImage.h pointing to ../GdkImlibImage.h for this to work)
  4. perl Makefile.PL --with-panel, make, and make install for the Gnome sub-module
  5. make test for main module
for me, all the Gnome stuff works fine, except for the panel applet, which, not unexpectedly, segfaults and crashes my panel (along with the less robust applets like the tasklist). 8^(

perhaps i'll try to figure this out later, but i tend not to do much with the Panel anyways.

update: trying the procedure above on another machine, i was able to successfully build the Gnome module and use the sample applet (Gnome/samples/applet.pl). the code is included in the Gtk-Perl distribution, so i see no need for me to post it here.

Replies are listed 'Best First'.
RE: RE: RE: Writing Gnome Panel applets in Perl
by kilinrax (Deacon) on Oct 13, 2000 at 18:03 UTC
    Yeah, whenever I run applet.pl, it segfaults and crashes my panel also :-(
    I'm definitely beginning to contemplate the idea of buying a book, though no doubt most/all of the books in existence on this topic will be hideously out of date :-{