After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 420946 - interfacing Gtk2::FileChooser
interfacing Gtk2::FileChooser
Status: RESOLVED NOTABUG
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-21 11:12 UTC by Holger Seelig
Modified: 2007-03-21 19:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Holger Seelig 2007-03-21 11:12:25 UTC
package Gtk2::Ex::::RecycleButton;
use strict;
use warnings;

use Gtk2;
use Glib::Object::Subclass
  Gtk2::Button::,
  interfaces => [ Gtk2::FileChooser:: ],
  ;

1;
__END__

running the code above, i get the following error

Can't locate object method "_ADD_INTERFACE" via package "Gtk2::FileChooser" at /usr/local/lib/perl/5.8.8/Glib.pm line 211.
BEGIN failed--compilation aborted at /home/holger/perl/Gtk2/Ex/RecycleButton.pm line 9.
Comment 1 Emmanuele Bassi (:ebassi) 2007-03-21 11:21:03 UTC
GtkFileChooser is not a public interface in GTK+, so you can't implement it in the perl bindings.
Comment 2 Torsten Schoenfeld 2007-03-21 19:09:23 UTC
Holger: to see what Emmanuele means, take a look at gtk+'s gtkfilechooser.h.  It contains:

typedef struct _GtkFileChooser      GtkFileChooser;

and that's all we no about the GtkFileChooser interface.  In contrast, take a look at gtkcelleditable.h:

struct _GtkCellEditableIface
{
  GTypeInterface g_iface;

  /* signals */
  void (* editing_done)  (GtkCellEditable *cell_editable);
  void (* remove_widget) (GtkCellEditable *cell_editable);

  /* virtual table */
  void (* start_editing) (GtkCellEditable *cell_editable,
                          GdkEvent        *event);
};

In this case, we know which virtual methods exist.  In short: GtkCellEdtiable is a public interface whereas GtkFileChooser isn't.