Can't locate object method "popup" via package "Gtk3::Menu"



Hi,

when running:

  #!/usr/bin/perl

  use strict;
  use warnings;

  use Gtk3 -init;

  my $icon = Gtk3::StatusIcon->new;
  $icon->set_from_stock('gtk-media-pause');
  my $menu = Gtk3::Menu->new;
  my $item = Gtk3::MenuItem->new('something');

  $icon->signal_connect('popup-menu', sub {
    my ($ticon, $button, $time) = @_;
    $menu->show_all;
    $menu->popup(undef, undef, undef, undef, $button, $time);
  });

  Gtk3->main;

and right-clicking on the status icon, on gets:

  *** unhandled exception in callback:
  ***   Can't locate object method "popup" via package "Gtk3::Menu" at /tmp/test.pl line 16.
  ***  ignoring at /usr/share/perl5/Gtk3.pm line 135.


Am I doing something wrong, or is the gobject-introspection
binding incomplete?

Regards,
-- 
  intrigeri
  | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc
  | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr.asc



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