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.


In reply to RE: RE: Writing Gnome Panel applets in Perl by mdillon
in thread Writing Gnome Panel applets in Perl by kilinrax

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.