in reply to Writing Gnome Panel applets in Perl

I'm not completely sure, but you could look at the Perl-Gtk module from CPAN.

Jouke Visser, Perl 'Adept'
  • Comment on RE: Writing Gnome Panel applets in Perl

Replies are listed 'Best First'.
RE: RE: Writing Gnome Panel applets in Perl
by mdillon (Priest) on Oct 02, 2000 at 19:25 UTC
    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.

      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 :-{