1 | #! perl -w |
1 | #! perl -w |
2 | |
2 | |
3 | # ---------------------------------------------------------------------- |
3 | # ---------------------------------------------------------------------- |
4 | # File: macosx-clipboard |
4 | # File: macosx-clipboard |
5 | # ---------------------------------------------------------------------- |
5 | # ---------------------------------------------------------------------- |
6 | # |
6 | # |
7 | # All portions of code are copyright by their respective author/s. |
7 | # All portions of code are copyright by their respective author/s. |
8 | # Copyright (c) 2006 Samuel Ljungkvist <salj@triplefusion.net> |
8 | # Copyright (c) 2006 Samuel Ljungkvist <salj@triplefusion.net> |
9 | # 2009 Reza Jelveh <reza.jelveh@gmail.com> |
9 | # 2009 Reza Jelveh <reza.jelveh@gmail.com> |
10 | # |
10 | # |
11 | # This program is free software; you can redistribute it and/or modify |
11 | # This program is free software; you can redistribute it and/or modify |
… | |
… | |
43 | } |
43 | } |
44 | |
44 | |
45 | sub paste { |
45 | sub paste { |
46 | my ($self) = @_; |
46 | my ($self) = @_; |
47 | |
47 | |
48 | # $str = $pasteboard->stringForType_($type)->UTF8String; |
|
|
49 | my $str = $pasteboard->paste; |
48 | my $str = $pasteboard->paste; |
50 | utf8::decode $str; |
49 | utf8::decode $str; |
51 | $self->tt_write ($self->locale_encode ($str)); |
50 | $self->tt_write ($self->locale_encode ($str)); |
52 | |
51 | |
53 | () |
52 | () |