Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Writing Gnome Panel applets in Perl

by kilinrax (Deacon)
on Oct 02, 2000 at 15:48 UTC ( [id://34884]=perlquestion: print w/replies, xml ) Need Help??

kilinrax has asked for the wisdom of the Perl Monks concerning the following question:

I'm looking to write some simple Gnome Panel applets, but the only information I've been able to find on the subject is a few very basic tutorials on how to write them in Python.
Obviously, I'd much rather write them in Perl, which I've been informed is possible, but I have no idea where to start.
Can anyone recommend any good tutorials / CPAN modules that would help me get started?

Replies are listed 'Best First'.
RE: Writing Gnome Panel applets in Perl
by Jouke (Curate) on Oct 02, 2000 at 15:55 UTC
    I'm not completely sure, but you could look at the Perl-Gtk module from CPAN.

    Jouke Visser, Perl 'Adept'
      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 :-{
RE: Writing Gnome Panel applets in Perl
by bastard (Hermit) on Oct 02, 2000 at 17:35 UTC
    Jouke's got it with the module.

    Glade seems to be a sort of "Visual Basic" type application for GTK+ with the ability to create code for/in a few different languages. (Perl is one of them.) I've tinkered with it, but haven't gotten the perl output to work yet.

      That's right. Glade allows you to design the interface, and define the actions that correspond to certain events. This will result in an XML-file, which in turn can be used from within Perl-Gtk, so you can create Perl-methods with the names of the actions defined in Glade.

      I saw an excellent presentation of this by Paolo Molaro (the author of this package) at YAPC::Europe in London

      Jouke Visser, Perl 'Adept'
Re: Writing Gnome Panel applets in Perl
by pope (Friar) on Oct 02, 2000 at 19:16 UTC
    Once you have installed Gtk-Perl, you may find CORBA::ORBit useful and interesting. Also there's a gnome tictactoe game included.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://34884]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-20 00:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found