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

« back to all changes in this revision

Viewing changes to lib/Padre/Wx/Output.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:
11
11
use Encode                ();
12
12
use File::Spec            ();
13
13
use Params::Util          ();
 
14
use Padre::Feature        ();
14
15
use Padre::Wx::Role::View ();
15
16
use Padre::Wx::Role::Main ();
16
17
use Padre::Wx             ();
17
18
use Padre::Logger;
18
19
use Wx::RichText; # Is this necesary?
19
20
 
20
 
our $VERSION = '0.90';
 
21
our $VERSION = '0.92';
21
22
our @ISA     = qw{
22
23
        Padre::Wx::Role::View
23
24
        Padre::Wx::Role::Main
41
42
                $panel,
42
43
                -1,
43
44
                "",
44
 
                Wx::wxDefaultPosition,
45
 
                Wx::wxDefaultSize,
46
 
                Wx::wxTE_READONLY
47
 
                        | Wx::wxTE_MULTILINE
48
 
                        | Wx::wxTE_DONTWRAP
49
 
                        | Wx::wxNO_FULL_REPAINT_ON_RESIZE,
 
45
                Wx::DefaultPosition,
 
46
                Wx::DefaultSize,
 
47
                Wx::TE_READONLY
 
48
                        | Wx::TE_MULTILINE
 
49
                        | Wx::TE_DONTWRAP
 
50
                        | Wx::NO_FULL_REPAINT_ON_RESIZE,
50
51
        );
51
52
 
52
53
        # Do custom start-up stuff here
63
64
                },
64
65
        );
65
66
 
 
67
        if (Padre::Feature::STYLE_GUI) {
 
68
                $self->main->theme->apply($self);
 
69
        }
 
70
 
66
71
        return $self;
67
72
}
68
73
 
187
192
#####################################################################
188
193
# General Methods
189
194
 
190
 
sub bottom {
191
 
        warn "Unexpectedly called Padre::Wx::Output::bottom, it should be deprecated";
192
 
        shift->main->bottom;
193
 
}
194
 
 
195
195
sub gettext_label {
196
196
        Wx::gettext('Output');
197
197
}
280
280
                                                $style->SetTextColour( $fg_colors->[9] );       # reset text color
281
281
                                                $style->SetBackgroundColour( $bg_colors->[9] ); # reset bg color
282
282
                                                                                                # reset bold/italic/underlined state
283
 
                                                $font->SetWeight(Wx::wxFONTWEIGHT_NORMAL);
 
283
                                                $font->SetWeight(Wx::FONTWEIGHT_NORMAL);
284
284
                                                $font->SetUnderlined(0);
285
 
                                                $font->SetStyle(Wx::wxFONTSTYLE_NORMAL);
 
285
                                                $font->SetStyle(Wx::FONTSTYLE_NORMAL);
286
286
                                        } elsif ( $cmd == 1 ) {                             # bold
287
 
                                                $font->SetWeight(Wx::wxFONTWEIGHT_BOLD);
 
287
                                                $font->SetWeight(Wx::FONTWEIGHT_BOLD);
288
288
                                        } elsif ( $cmd == 2 ) {                             # faint
289
 
                                                $font->SetWeight(Wx::wxFONTWEIGHT_LIGHT);
 
289
                                                $font->SetWeight(Wx::FONTWEIGHT_LIGHT);
290
290
                                        } elsif ( $cmd == 3 ) {                             # italic
291
 
                                                $font->SetStyle(Wx::wxFONTSTYLE_ITALIC);
 
291
                                                $font->SetStyle(Wx::FONTSTYLE_ITALIC);
292
292
                                        } elsif ( $cmd == 4 || $cmd == 21 ) {               # underline (21==double, but we can't do that)
293
293
                                                $font->SetUnderlined(1);
294
294
                                        } elsif ( $cmd == 22 ) {                            # reset bold and faint
295
 
                                                $font->SetWeight(Wx::wxFONTWEIGHT_NORMAL);
 
295
                                                $font->SetWeight(Wx::FONTWEIGHT_NORMAL);
296
296
                                        } elsif ( $cmd == 24 ) {                            # reset underline
297
297
                                                $font->SetUnderlined(0);
298
298
                                        }
420
420
 
421
421
sub set_font {
422
422
        my $self = shift;
423
 
        my $font = Wx::Font->new( 10, Wx::wxTELETYPE, Wx::wxNORMAL, Wx::wxNORMAL );
 
423
        my $font = Wx::Font->new( 10, Wx::TELETYPE, Wx::NORMAL, Wx::NORMAL );
424
424
        my $name = $self->config->editor_font;
425
425
        if ( defined $name and length $name ) {
426
426
                $font->SetNativeFontInfoUserDesc($name);