Re: filechooserdialog

On Fri, Jul 27, 2012 at 3:35 AM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 27.07.2012 00:49, Dave M wrote:

my $dialog = Gtk3::FileChooserDialog->new(
     'Select a file', undef,
     '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:
<> and
our old XS override:

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.

Dave M

Attachment: filechooserdialog.diff
Description: Binary data

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