On Fri, Jul 27, 2012 at 3:35 AM, Torsten Schoenfeld <kaffeeti...@gmx.de> wrote: > On 27.07.2012 00:49, Dave M wrote: >> >> my $dialog = Gtk3::FileChooserDialog->new( >> 'Select a file', undef, >> 'open', >> 'gtk-cancel' => 'cancel', >> 'gtk-ok' => 'ok', >> ); > > > This doesn't work because we are missing an override. The C function > gtk_file_chooser_dialog_new takes a variable number of arguments, which > gobject-introspection does not support at the moment. Hence your call to > Gtk3::FileChooserDialog->new actually resolves to Gtk3::Dialog->new, which > creates an empty dialog only. We'd need a custom > Gtk3::FileChooserDialog::new implementation equivalent to the C version: > <http://git.gnome.org/browse/gtk+/tree/gtk/gtkfilechooserdialog.c#n560> and > our old XS override: > <http://git.gnome.org/browse/perl-Gtk2/tree/xs/GtkFileChooserDialog.xs#n17>. > I've attached a diff which seems to work. How best to handle the GtkResponseType part? I just arranged it as a hash with a lookup... if it's needed in any other overrides though, we probably need a better solution.
Thanks, Dave M
filechooserdialog.diff
Description: Binary data
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list