Changeset 10022
- Timestamp:
- 12/28/09 18:41:44 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/lib/Padre/Wx/Editor.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Wx/Editor.pm
r10021 r10022 74 74 Wx::Event::EVT_SET_FOCUS( $self, \&on_focus ); 75 75 Wx::Event::EVT_MIDDLE_UP( $self, \&on_middle_up ); 76 76 Wx::Event::EVT_KILL_FOCUS( $self, \&on_kill_focus ); 77 77 # Smart highlighting: 78 78 # Selecting a word or small block of text causes all other occurrences to be highlighted … … 904 904 } 905 905 906 # Manipulate the window manager selection buffer when editor looses focus 907 sub on_kill_focus { 908 my ($self,$event) = @_; 909 if ( Padre::Constant::WXGTK ) { 910 my $selection = $self->GetSelectedText; 911 Wx::wxTheClipboard->Open; 912 Wx::wxTheClipboard->UsePrimarySelection(1); 913 my $clip = Wx::TextDataObject->new; 914 $clip->SetText($selection); 915 Wx::wxTheClipboard->SetData($clip); 916 Wx::wxTheClipboard->UsePrimarySelection(0); 917 Wx::wxTheClipboard->Close; 918 } 919 920 } 921 922 906 923 sub on_right_down { 907 924 my $self = shift;
Note: See TracChangeset
for help on using the changeset viewer.
