Commit 9aa1a85b authored by Torsten Schönfeld's avatar Torsten Schönfeld

Gtk3::Clipboard::set_text: make length arg optional

parent 1164406d
......@@ -924,6 +924,16 @@ sub Gtk3::CheckMenuItem::new {
$_GTK_BASENAME, 'CheckMenuItem', 'new', @_);
}
=item * The C<length> argument of C<Gtk3::Clipboard::set_text> is optional.
=cut
sub Gtk3::Clipboard::set_text {
return Glib::Object::Introspection->invoke (
$_GTK_BASENAME, 'Clipboard', 'set_text',
@_ == 3 ? @_ : (@_[0,1], -1)); # wants length in bytes
}
=item * C<Gtk3::Container::get_focus_chain> returns a list of widgets, or an
empty list.
......
......@@ -7,7 +7,7 @@ use warnings;
use utf8;
use Encode;
plan tests => 212;
plan tests => 214;
note('Gtk3::CHECK_VERSION and check_version');
{
......@@ -87,6 +87,15 @@ note('Gtk3::CheckButton::new');
is ($button->get_label, '_Test');
}
note('Gtk3::Clipboard::set_text');
{
my $clipboard = Gtk3::Clipboard::get (Gtk3::Gdk::Atom::intern ('PRIMARY', Glib::FALSE));
$clipboard->set_text ('→←');
is ($clipboard->wait_for_text, '→←');
$clipboard->set_text ('→←', 3); # wants length in bytes
is ($clipboard->wait_for_text, '');
}
note('Gtk3::ColorButton::new');
{
my $button = Gtk3::ColorButton->new;
......
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