Pixmap problems

I'm trying to load a pixmap into a panel applet with the following

use Gnome::Applet;
init Gnome::AppletWidget 'myapplet.pl';

my $applet = new Gnome::AppletWidget 'myapplet.pl';

( $pixmap, $mask ) =
 Gtk::Gdk::Pixmap->create_from_xpm( $applet->window,
                                     "./green-cloud-large.xpm" )
   or die "$!";

$image = new Gtk::Pixmap( $pixmap, $mask );

but each time I try to run it it dies with the error:

transparent_color is not of type Gtk::Gdk::Color at ./panel.pl line 5.

the xpm has no transparent pixels, although it does contain:
/* XPM */
static char * green_cloud_large_xpm[] = {
"64 64 32 1",
"  c None",
". c #FFFFFF",
"+ c #000000",
"@ c #042C0A",
"# c #042308",

as the first part of the header. I'm obviously screwing something up, but I'm not sure what. Any hints?

Get your FREE download of MSN Explorer at http://explorer.msn.com

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