Hi,
> Gesendet: Freitag, 08. Januar 2021 um 19:08 Uhr
> Von: "Torsten Schoenfeld via gtk-perl-list" <gtk-perl-list@gnome.org>
> An: gtk-perl-list@gnome.org
> Betreff: Re: Gtk3::MessageDialog - missing methods
>
> On 08.01.21 02:15, Thomas Funk via gtk-perl-list wrote:
> > ---|--------------|--------------------------------------------
> > OK | GtkWidget *  | gtk_message_dialog_new ()
> > FF | GtkWidget *  | gtk_message_dialog_new_with_markup ()
> > OK | void     | gtk_message_dialog_set_markup ()
> > OK | void     | gtk_message_dialog_set_image ()
> > ?? | GtkWidget *  | gtk_message_dialog_get_image ()
> > FF | void     | gtk_message_dialog_format_secondary_text ()
> > FF | void     | gtk_message_dialog_format_secondary_markup ()
> > ?? | GtkWidget *  | gtk_message_dialog_get_message_area ()
>
> Indeed, it looks like we're missing overrides for the ones you marked as
> missing, except for get_image() which should work.  The other ones are
> not available automatically, and are therefor shown as "NOT
> INTROSPECTABLE" in perli11ndoc, because they use the varargs mechanism.
>
> In Gtk2, they are handled in XS code:
> <https://gitlab.gnome.org/GNOME/perl-gtk2/-/blob/master/xs/GtkMessageDialog.xs>.
>   In Gtk3, we would need Perl overrides that accompany
> Gtk3::MessageDialog::new, which already exists:
> <https://gitlab.gnome.org/GNOME/perl-gtk3/-/blob/master/lib/Gtk3.pm#L1408>.
>   Could you be bothered to write them?

For new_with_markup() it wasn't a problem:

=item * A Perl reimplementation of C<Gtk3::MessageDialog::new_with_markup> is 
provided.

=cut

sub Gtk3::MessageDialog::new_with_markup {
  my ($class, $parent, $flags, $type, $buttons, $format, @args) = @_;
  my $dialog = Gtk3::MessageDialog::new ($class, $parent, $flags, $type, 
$buttons, undef);
  $dialog->set_markup(sprintf $format, @args);
  return $dialog;
}

But for the methods ... I've tried several things but got every time:

*** unhandled exception in callback:
***   Can't find information for method MessageDialog::format_secondary_text at 
/home/tf/workspace/Perl/Testem/messagedialog.pl line 52.
***  ignoring at /usr/share/perl5/Gtk3.pm line 572.

My last try was this:

sub Gtk3::MessageDialog::format_secondary_text {
  my ($dialog, $format, @args) = @_;
  my $ref = _rest_to_ref (\@args);
  return Glib::Object::Introspection->invoke (
    $_GTK_BASENAME, 'MessageDialog', 'format_secondary_text',
    $dialog, $format, $ref);
}

But no success.


Best Regards,
Thomas


>
> -Torsten
> _______________________________________________
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to