Re: Gnome2::PanelApplet now functional



On Sun, 2007-07-29 at 23:45 +0100, Emmanuele Bassi wrote:

I just committed some bits and pieces to Gnome2::PanelApplet.  It should
now work.  It certainly does for me.

Torsten, you're definitely my hero. :-)

You're welcome. :-)

I put some instructions on how to avoid this problem into
examples/README.  Please test.

I will certainly do. thanks again for nailing this out!

Apart from testing, I'd also like to hear what you all think about the
API.  The basics are:

  # Initialize.
  Gnome2::Program->init ('A Stupid Applet Written in Perl', '0.01');

  # Register our applet with that bonobo thingy.
  Gnome2::PanelApplet::Factory->main (
    'OAFIID:PerlSampleApplet_Factory', # a string that identifies the applet
    'Gnome2::PanelApplet',             # the type of the applet
    \&fill                             # the sub that populates the applet
  );

  sub fill {
    my ($applet, $iid, $data) = @_;

    if ($iid ne 'OAFIID:PerlSampleApplet') {
      return FALSE;
    }

    my $label = Gtk2::Label->new ('Hi, there!');
    $applet->add ($label);
    $applet->show_all;

    return TRUE;
  }

Is Gnome2::PanelApplet::Factory->main a good name?  Other bindings seem
to prefer Gnome2::PanelApplet->factory_main.

-- 
Bye,
-Torsten




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