~ubuntu-branches/ubuntu/karmic/padre/karmic

« back to all changes in this revision

Viewing changes to lib/Wx/Perl/Dialog/SingleChoice.pm

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov
  • Date: 2009-04-28 16:21:53 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090428162153-9p3ygfznr9xt08sn
Tags: 0.34-1
* New upstream release

* bump liborlite-perl (build-)dependency to 1.20
* bump liborlite-migrate-perl (build-)dependency to 0.03
* refresh patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
use strict;
4
4
use warnings;
5
5
 
6
 
use Wx qw(:everything);
7
 
use Wx::Event qw(:everything);
 
6
use Wx::Perl::Dialog;
8
7
 
9
 
our $VERSION = '0.33';
 
8
our $VERSION = '0.34';
10
9
 
11
10
$| = 1;
12
11
 
28
27
 
29
28
        return if not @{ $args{values} };
30
29
 
31
 
        my $box  = Wx::BoxSizer->new(wxVERTICAL);
32
 
        my $row1 = Wx::BoxSizer->new(wxHORIZONTAL);
33
 
        my $row2 = Wx::BoxSizer->new(wxHORIZONTAL);
 
30
        my $box  = Wx::BoxSizer->new(Wx::wxVERTICAL);
 
31
        my $row1 = Wx::BoxSizer->new(Wx::wxHORIZONTAL);
 
32
        my $row2 = Wx::BoxSizer->new(Wx::wxHORIZONTAL);
34
33
        $box->Add($row1);
35
34
        $box->Add($row2);
36
35
 
47
46
        }
48
47
        $tb->SetFocus;
49
48
 
50
 
        my $ok = Wx::Button->new( $dialog, wxID_OK, '' );
51
 
        EVT_BUTTON( $dialog, $ok, sub { $dialog->EndModal(wxID_OK) } );
 
49
        my $ok = Wx::Button->new( $dialog, Wx::wxID_OK, '' );
 
50
        Wx::Event::EVT_BUTTON( $dialog, $ok, sub { $dialog->EndModal(Wx::wxID_OK) } );
52
51
        $ok->SetDefault;
53
52
 
54
 
        my $cancel = Wx::Button->new( $dialog, wxID_CANCEL, '', [ -1, -1 ], $ok->GetSize );
55
 
        EVT_BUTTON( $dialog, $cancel, sub { $dialog->EndModal(wxID_CANCEL) } );
 
53
        my $cancel = Wx::Button->new( $dialog, Wx::wxID_CANCEL, '', [ -1, -1 ], $ok->GetSize );
 
54
        Wx::Event::EVT_BUTTON( $dialog, $cancel, sub { $dialog->EndModal(Wx::wxID_CANCEL) } );
56
55
 
57
56
        $row1->Add($tb);
58
57
        $row2->Add($ok);
64
63
        $dialog->SetSize( -1, -1, $dialog_width, $height + $bh );
65
64
 
66
65
        my $ret = $dialog->ShowModal;
67
 
        if ( $ret eq wxID_CANCEL ) {
 
66
        if ( $ret eq Wx::wxID_CANCEL ) {
68
67
                $dialog->Destroy;
69
68
                return;
70
69
        }