~ubuntu-branches/ubuntu/saucy/padre/saucy-proposed

« back to all changes in this revision

Viewing changes to lib/Padre/Wx/FindResult.pm

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont, gregor herrmann, Dominique Dumont
  • Date: 2012-01-04 12:04:20 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20120104120420-i5oybqwf91m1d3il
Tags: 0.92.ds1-1
[ gregor herrmann ]
* Remove debian/source/local-options; abort-on-upstream-changes
  and unapply-patches are default in dpkg-source since 1.16.1.
* Swap order of alternative (build) dependencies after the perl
  5.14 transition.

[ Dominique Dumont ]
* Imported Upstream version 0.92.ds1
* removed fix-spelling patch (applied upstream)
* lintian-override: use wildcard to avoid listing a gazillion files
* updated size of some 'not-real-man-page' entries
* rules: remove dekstop cruft (replaced by a file provided in debian
  directory)
* control: removed Breaks statement. Add /me to uploaders. Updated
  dependencies
* rules: make sure that non-DFSG file (i.e. the cute butterfly, sigh)
  is not distributed

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
use Wx::Event qw( EVT_BUTTON );
22
22
 
23
23
 
24
 
our $VERSION = '0.90';
 
24
our $VERSION = '0.92';
25
25
our @ISA     = 'Wx::ListView';
26
26
 
27
27
use Class::XSAccessor {
49
49
        my $self = $class->SUPER::new(
50
50
                Padre::Current->main->bottom,
51
51
                -1,
52
 
                Wx::wxDefaultPosition,
53
 
                Wx::wxDefaultSize,
54
 
                Wx::wxLC_REPORT | Wx::wxLC_SINGLE_SEL
 
52
                Wx::DefaultPosition,
 
53
                Wx::DefaultSize,
 
54
                Wx::LC_REPORT | Wx::LC_SINGLE_SEL
55
55
        );
56
56
 
57
57
        $self->set_column_widths;
63
63
                        $self->on_list_item_activated( $_[1], $main, $editor );
64
64
                },
65
65
        );
66
 
        Wx::Event::EVT_RIGHT_DOWN(
67
 
                $self, \&on_right_down,
 
66
 
 
67
        # FIXME Find out why EVT_CONTEXT_MENU doesn't work on Ubuntu
 
68
        Wx::Event::EVT_CONTEXT_MENU(
 
69
 
 
70
                #Wx::Event::EVT_CONTEXT_MENU(
 
71
                $self, \&on_context_menu,
68
72
        );
69
73
 
70
74
        $self->{line_count} = scalar(@$lines);
102
106
sub set_column_widths {
103
107
        my $self = shift;
104
108
 
105
 
        $self->SetColumnWidth( 0, Wx::wxLIST_AUTOSIZE );
106
 
        $self->SetColumnWidth( 1, Wx::wxLIST_AUTOSIZE );
 
109
        $self->SetColumnWidth( 0, Wx::LIST_AUTOSIZE );
 
110
        $self->SetColumnWidth( 1, Wx::LIST_AUTOSIZE );
107
111
 
108
112
        return;
109
113
}
204
208
 
205
209
=pod
206
210
 
207
 
=head3 C<on_right_down>
 
211
=head3 C<on_context_menu>
208
212
 
209
 
Called when the user presses a right click or a context menu key (on Win32).
 
213
Called when the user ask for the context menu (either a right click
 
214
or the context menu key (Win32, GTK), or Shift+F10).
210
215
 
211
216
=cut
212
217
 
213
 
sub on_right_down {
 
218
sub on_context_menu {
214
219
        my ( $self, $event ) = @_;
215
220
 
216
221
        return if $self->GetItemCount == 0;
234
239
                                        $msg = "$text\n";
235
240
 
236
241
                                        # And copy it to clipboard
237
 
                                        if ( ( length $msg > 0 ) and Wx::wxTheClipboard->Open ) {
238
 
                                                Wx::wxTheClipboard->SetData( Wx::TextDataObject->new($msg) );
239
 
                                                Wx::wxTheClipboard->Close;
 
242
                                        if ( ( length $msg > 0 ) and Wx::TheClipboard->Open ) {
 
243
                                                Wx::TheClipboard->SetData( Wx::TextDataObject->new($msg) );
 
244
                                                Wx::TheClipboard->Close;
240
245
                                        }
241
246
                                }
242
247
                        }
258
263
                        }
259
264
 
260
265
                        # And copy it to clipboard
261
 
                        if ( ( length $msg > 0 ) and Wx::wxTheClipboard->Open ) {
262
 
                                Wx::wxTheClipboard->SetData( Wx::TextDataObject->new($msg) );
263
 
                                Wx::wxTheClipboard->Close;
 
266
                        if ( ( length $msg > 0 ) and Wx::TheClipboard->Open ) {
 
267
                                Wx::TheClipboard->SetData( Wx::TextDataObject->new($msg) );
 
268
                                Wx::TheClipboard->Close;
264
269
                        }
265
270
                }
266
271
        );