Gtk2::Clipboard



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hiya...

I wan't to store a string in a Gtk2::Clipboard, so
that I can paste it somewhere else (like in an file manager or editor).

My code doesn't work as expected and the clipboard remains untouched:

my $clipboard =
Gtk2::Clipboard->get_for_display(Gtk2::Gdk::Display->open($ENV{'DISPLAY'}),
Gtk2::Gdk::Atom->new('GDK_SELECTION_CLIPBOARD'));

my $contents = join "\r\n", @items;
$clipboard->set_text($contents);

@items is a list of path-names.

any hints? TIA.

Jens

- --
Jens Luedicke
web: http://perldude.de

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCb5vtiCvkc4H0gTERAlQcAKC3+SqoLpvFSEtUEfz2FfRwp/Jm+QCdFFpW
ysTY27jmI/wdUVouxw2yu1Q=
=ARxh
-----END PGP SIGNATURE-----



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