On Sat, 9 Jan 2021 at 17:16, Thomas Funk via gtk-perl-list < gtk-perl-list@gnome.org> wrote:
> Hi, > > On Sat, 9 Jan 2021 at 02:35, Emmanuele Bassi via gtk-perl-list < > gtk-perl-list@gnome.org> wrote: > > As Torsten wrote, those methods are not introspectable because of their > use of variadic arguments in C; this means you cannot call them from Perl. > > > > You will need to re-implement them; luckily, they are easier to deal in > Perl than the printf-style format of C: > > > > ``` > > sub Gtk3::MessageDialog::format_secondary_text { > > my ($dialog, $format, @args) = @_; > > > > my $text = sprintf $format, @args; > > $dialog->set('secondary-text', $text, 'secondary-use-markup' => 0); > > } > > > > sub Gtk3::MessageDialog::format_secondary_markup { > > my ($dialog, $format, @args) = @_; > > > > my $text = sprintf $format, @args; > > $dialog->set('secondary-text' => $text, 'secondary-use-markup' => 1); > > } > > ``` > > > > Works like a charme ^^ > Thank you very much! > > What is the next step? Will you or Torsten push the code into gtk3-perl? > I've opened an MR: https://gitlab.gnome.org/GNOME/perl-gtk3/-/merge_requests/5 Ciao, Emmanuele. -- https://www.bassi.io [@] ebassi [@gmail.com]
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list