~ubuntu-branches/ubuntu/quantal/padre/quantal

« back to all changes in this revision

Viewing changes to lib/Padre/Wx/Menu/Debug.pm

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont
  • Date: 2012-01-25 16:16:07 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20120125161607-ydc0rgxlfqk2ctrb
Tags: 0.94+dfsg1-1
* new upstream version
* watch: updated to match dfsg tag
* debian/not-real-manual.list: updated lib/Padre/Document/Perl.pm entry
* debian/copyright:
  * fixed DEP-5 syntax errors
  * updated copyright years.
  * reformatted with cme
* control: updated dependency list

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
use Padre::Wx::Menu ();
10
10
use Padre::Current  ();
11
11
 
12
 
our $VERSION = '0.92';
 
12
our $VERSION = '0.94';
13
13
our @ISA     = 'Padre::Wx::Menu';
14
14
 
15
15
 
29
29
        # Add additional properties
30
30
        $self->{main} = $main;
31
31
 
32
 
        $self->{step_in} = $self->add_menu_action(
33
 
                'debug.step_in',
34
 
        );
35
 
 
36
 
        $self->{step_over} = $self->add_menu_action(
37
 
                'debug.step_over',
38
 
        );
39
 
 
40
 
        $self->{step_out} = $self->add_menu_action(
41
 
                'debug.step_out',
42
 
        );
43
 
 
44
 
        $self->{run} = $self->add_menu_action(
45
 
                'debug.run',
46
 
        );
47
 
 
48
 
        $self->AppendSeparator;
49
 
 
50
 
        $self->{jump_to} = $self->add_menu_action(
51
 
                'debug.jump_to',
52
 
        );
53
 
 
54
 
        $self->AppendSeparator;
 
32
        $self->{breakpoints} = $self->add_menu_action(
 
33
                'debug.breakpoints',
 
34
        );
 
35
 
 
36
        $self->{debugoutput} = $self->add_menu_action(
 
37
                'debug.debugoutput',
 
38
        );
 
39
 
 
40
        $self->{debugger} = $self->add_menu_action(
 
41
                'debug.debugger',
 
42
        );
 
43
 
 
44
        $self->AppendSeparator;
 
45
 
 
46
        $self->{launch} = $self->add_menu_action(
 
47
                'debug.launch',
 
48
        );
55
49
 
56
50
        $self->{set_breakpoint} = $self->add_menu_action(
57
51
                'debug.set_breakpoint',
58
52
        );
59
53
 
60
 
        $self->{remove_breakpoint} = $self->add_menu_action(
61
 
                'debug.remove_breakpoint',
62
 
        );
63
 
 
64
 
        $self->{list_breakpoints} = $self->add_menu_action(
65
 
                'debug.list_breakpoints',
66
 
        );
67
 
 
68
 
        $self->AppendSeparator;
69
 
 
70
 
        $self->{show_stack_trace} = $self->add_menu_action(
71
 
                'debug.show_stack_trace',
72
 
        );
73
 
 
74
 
        $self->{display_value} = $self->add_menu_action(
75
 
                'debug.display_value',
76
 
        );
77
 
 
78
 
        $self->AppendSeparator;
79
 
 
80
 
        $self->{show_value} = $self->add_menu_action(
81
 
                'debug.show_value',
82
 
        );
83
 
 
84
 
        $self->{evaluate_expression} = $self->add_menu_action(
85
 
                'debug.evaluate_expression',
86
 
        );
87
 
 
88
 
        $self->AppendSeparator;
89
 
 
90
54
        $self->{quit} = $self->add_menu_action(
91
55
                'debug.quit',
92
56
        );
93
57
 
 
58
        $self->AppendSeparator;
 
59
 
 
60
        $self->{visit_debug_wiki} = $self->add_menu_action(
 
61
                'debug.visit_debug_wiki',
 
62
        );
 
63
 
94
64
        return $self;
95
65
}
96
66
 
100
70
 
101
71
sub refresh {
102
72
        my $self     = shift;
 
73
        my $main     = shift;
 
74
        my $current  = Padre::Current::_CURRENT(@_);
 
75
        my $config   = $current->config;
103
76
        my $document = Padre::Current::_CURRENT(@_)->document;
104
77
        my $hasdoc   = $document ? 1 : 0;
105
78
 
106
 
        $self->{step_in}->Enable($hasdoc);
107
 
        $self->{step_over}->Enable($hasdoc);
108
 
        $self->{step_out}->Enable($hasdoc);
109
 
        $self->{run}->Enable($hasdoc);
110
 
        $self->{jump_to}->Enable($hasdoc);
111
 
        $self->{set_breakpoint}->Enable($hasdoc);
112
 
        $self->{remove_breakpoint}->Enable($hasdoc);
113
 
        $self->{list_breakpoints}->Enable($hasdoc);
114
 
        $self->{show_stack_trace}->Enable($hasdoc);
115
 
        $self->{display_value}->Enable($hasdoc);
116
 
        $self->{show_value}->Enable($hasdoc);
117
 
        $self->{evaluate_expression}->Enable($hasdoc);
 
79
        $self->{breakpoints}->Check( $config->main_breakpoints );
 
80
        $self->{debugoutput}->Check( $config->main_debugoutput );
 
81
        $self->{debugger}->Check( $config->main_debugger );
 
82
 
 
83
        $self->{launch}->Enable(1);
 
84
        $self->{set_breakpoint}->Enable(1);
 
85
        $self->{quit}->Enable(1);
 
86
 
 
87
        $self->{visit_debug_wiki}->Enable(1);
118
88
 
119
89
        return 1;
120
90
}
121
91
 
122
92
1;
123
93
 
124
 
# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
 
94
# Copyright 2008-2012 The Padre development team as listed in Padre.pm.
125
95
# LICENSE
126
96
# This program is free software; you can redistribute it and/or
127
97
# modify it under the same terms as Perl 5 itself.