Commit 0376d1b1 authored by Torsten Schönfeld's avatar Torsten Schönfeld

Add an override for Pango::Layout::set_markup

Making the length argument optional.
parent 156dddf0
...@@ -2036,7 +2036,8 @@ sub Gtk3::Gdk::Pixbuf::save_to_callback { ...@@ -2036,7 +2036,8 @@ sub Gtk3::Gdk::Pixbuf::save_to_callback {
# --- Pango --- # --- Pango ---
=item * C<Pango::Layout::set_text> takes no C<length> argument. =item * The C<length> arguments of C<Pango::Layout::set_text> and C<set_markup>
are optional.
=cut =cut
...@@ -2046,6 +2047,12 @@ sub Pango::Layout::set_text { ...@@ -2046,6 +2047,12 @@ sub Pango::Layout::set_text {
@_ == 3 ? @_ : (@_[0,1], -1)); # wants length in bytes @_ == 3 ? @_ : (@_[0,1], -1)); # wants length in bytes
} }
sub Pango::Layout::set_markup {
return Glib::Object::Introspection->invoke (
$_PANGO_BASENAME, 'Layout', 'set_markup',
@_ == 3 ? @_ : (@_[0,1], -1)); # wants length in bytes
}
=back =back
=cut =cut
......
...@@ -7,7 +7,7 @@ use warnings; ...@@ -7,7 +7,7 @@ use warnings;
use utf8; use utf8;
use Encode; use Encode;
plan tests => 210; plan tests => 212;
note('Gtk3::CHECK_VERSION and check_version'); note('Gtk3::CHECK_VERSION and check_version');
{ {
...@@ -770,4 +770,10 @@ note('Pango::Layout'); ...@@ -770,4 +770,10 @@ note('Pango::Layout');
$layout->set_text('Bla bla.'); $layout->set_text('Bla bla.');
is ($layout->get_text, 'Bla bla.'); is ($layout->get_text, 'Bla bla.');
$layout->set_markup('<b>Bla</b> bla.', 10);
is ($layout->get_text, 'Bla');
$layout->set_markup('<b>Bla</b> bla.');
is ($layout->get_text, 'Bla bla.');
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment