~ubuntu-branches/debian/sid/padre/sid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Damyan Ivanov, gregor herrmann, Damyan Ivanov
  • Date: 2009-11-18 17:48:27 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20091118174827-srz62scl23gdl88v
Tags: 0.50.ds1-1
[ gregor herrmann ]
* debian/control: change dependency on "libclass-xsaccessor-array-perl
  (>= 1.02)" to "libclass-xsaccessor-perl (>= 1.05-2) |
  libclass-xsaccessor-array-perl (>= 1.02)".

[ Damyan Ivanov ]
* New upstream release
  + copyright: add a new translator
    - describe share/doc/perlopref copyright and licensing
  + update patches:
    - refresh disable-tcp-server.patch
    - drop fix-man-whatis.patch and fix-pod.patch (merged upstream)
    - drop fix-helpprovider-with-no-perlopref.patch: no longer necessary
* repack.sh: in 0.49 padre.exe moved from script/ to bin/
  + perlopref is now properly licensed
* add perl (>= 5.10.1) as a preferred alternative to versioned (build)
  dependencies on libtest-simple-perl and libpod-simple-perl
* update debian/not-real-manual.list for 0.50 (one file added, two files
  changed in size)
* rules: remove cruft from padre.deb
  + license etc from perlopref directory (already present in d/copyright)
  + remove .po files from the .deb (there are .mo files installed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
use Padre::Wx       ();
13
13
use Padre::Wx::Menu ();
14
14
 
15
 
our $VERSION = '0.48';
 
15
our $VERSION = '0.50';
16
16
our @ISA     = 'Padre::Wx::Menu';
17
17
 
18
18
 
31
31
        $self->{main} = $main;
32
32
 
33
33
        # Add the POD-based help launchers
34
 
        $self->add_menu_item(
35
 
                $self,
36
 
                name       => 'help.help',
37
 
                id         => Wx::wxID_HELP,
38
 
                label      => Wx::gettext('Help'),
39
 
                menu_event => sub {
40
 
                        $_[0]->help();
41
 
                },
42
 
        );
43
 
        $self->add_menu_item(
44
 
                $self,
45
 
                name       => 'help.context_help',
46
 
                label      => Wx::gettext('Context Help'),
47
 
                shortcut   => 'F1',
48
 
                menu_event => sub {
49
 
                        my $focus = Wx::Window::FindFocus();
50
 
                        if ( ( defined $focus ) and $focus->isa('Padre::Wx::ErrorList') ) {
51
 
                                $_[0]->errorlist->on_menu_help_context_help;
52
 
                        } else {
53
 
 
54
 
                                # TODO This feels wrong, the help menu code shouldn't
55
 
                                # populate the main window hash.
56
 
                                $_[0]->help( $_[0]->current->text );
57
 
                                return;
58
 
                        }
59
 
                },
60
 
        );
61
 
 
62
 
        $self->add_menu_item(
63
 
                $self,
64
 
                name       => 'help.search',
65
 
                label      => Wx::gettext('Help Search'),
66
 
                shortcut   => 'F2',
67
 
                menu_event => sub {
68
 
 
69
 
                        #Show Help Search with no topic...
70
 
                        $_[0]->help_search;
71
 
                },
72
 
        );
73
 
 
74
 
        $self->{current} = $self->add_menu_item(
75
 
                $self,
76
 
                name       => 'help.current',
77
 
                label      => Wx::gettext('Current Document'),
78
 
                menu_event => sub {
79
 
                        $_[0]->help( $_[0]->current->document );
80
 
                },
 
34
        $self->add_menu_action(
 
35
                $self,
 
36
                'help.help'
 
37
        );
 
38
 
 
39
        $self->add_menu_action(
 
40
                $self,
 
41
                'help.context_help',
 
42
        );
 
43
 
 
44
        $self->add_menu_action(
 
45
                $self,
 
46
                'help.search',
 
47
        );
 
48
 
 
49
        $self->{current} = $self->add_menu_action(
 
50
                $self,
 
51
                'help.current',
81
52
        );
82
53
 
83
54
        # Live Support
90
61
                $self->{live}
91
62
        );
92
63
 
93
 
        $self->add_menu_item(
 
64
        $self->add_menu_action(
94
65
                $self->{live},
95
 
                name       => 'help.live_support',
96
 
                label      => Wx::gettext('Padre Support (English)'),
97
 
                menu_event => sub {
98
 
                        Padre::Wx::launch_irc('padre');
99
 
                },
 
66
                'help.live_support',
100
67
        );
101
68
 
102
69
        $self->{live}->AppendSeparator;
103
70
 
104
 
        $self->add_menu_item(
 
71
        $self->add_menu_action(
105
72
                $self->{live},
106
 
                name       => 'help.perl_help',
107
 
                label      => Wx::gettext('Perl Help'),
108
 
                menu_event => sub {
109
 
                        Padre::Wx::launch_irc('general');
110
 
                },
 
73
                'help.perl_help',
111
74
        );
112
75
 
113
76
        if (Padre::Constant::WIN32) {
114
 
                $self->add_menu_item(
 
77
                $self->add_menu_action(
115
78
                        $self->{live},
116
 
                        name       => 'help.win32_questions',
117
 
                        label      => Wx::gettext('Win32 Questions (English)'),
118
 
                        menu_event => sub {
119
 
                                Padre::Wx::launch_irc('win32');
120
 
                        },
 
79
                        'help.win32_questions',
121
80
                );
122
81
        }
123
82
 
124
83
        $self->AppendSeparator;
125
84
 
126
85
        # Add interesting and helpful websites
127
 
        $self->add_menu_item(
 
86
        $self->add_menu_action(
128
87
                $self,
129
 
                name       => 'help.visit_perlmonks',
130
 
                label      => Wx::gettext('Visit the PerlMonks'),
131
 
                menu_event => sub {
132
 
                        Padre::Wx::launch_browser('http://perlmonks.org/');
133
 
                },
 
88
                'help.visit_perlmonks',
134
89
        );
135
90
 
136
91
        $self->AppendSeparator;
137
92
 
138
93
        # Add Padre website tools
139
 
        $self->add_menu_item(
140
 
                $self,
141
 
                name       => 'help.report_a_bug',
142
 
                label      => Wx::gettext('Report a New &Bug'),
143
 
                menu_event => sub {
144
 
                        Padre::Wx::launch_browser('http://padre.perlide.org/trac/wiki/Tickets');
145
 
                },
146
 
        );
147
 
        $self->add_menu_item(
148
 
                $self,
149
 
                name       => 'help.view_all_open_bugs',
150
 
                label      => Wx::gettext('View All &Open Bugs'),
151
 
                menu_event => sub {
152
 
                        Padre::Wx::launch_browser('http://padre.perlide.org/trac/report/1');
153
 
                },
154
 
        );
155
 
 
156
 
        $self->add_menu_item(
157
 
                $self,
158
 
                name       => 'help.translate_padre',
159
 
                label      => Wx::gettext('&Translate Padre...'),
160
 
                menu_event => sub {
161
 
                        Padre::Wx::launch_browser('http://padre.perlide.org/trac/wiki/TranslationIntro');
162
 
                },
 
94
        $self->add_menu_action(
 
95
                $self,
 
96
                'help.report_a_bug',
 
97
        );
 
98
 
 
99
        $self->add_menu_action(
 
100
                $self,
 
101
                'help.view_all_open_bugs',
 
102
        );
 
103
 
 
104
        $self->add_menu_action(
 
105
                $self,
 
106
                'help.translate_padre',
163
107
        );
164
108
 
165
109
        $self->AppendSeparator;
166
110
 
167
111
        # Add the About
168
 
        $self->add_menu_item(
 
112
        $self->add_menu_action(
169
113
                $self,
170
 
                name       => 'help.about',
171
 
                id         => Wx::wxID_ABOUT,
172
 
                label      => Wx::gettext('&About'),
173
 
                menu_event => sub {
174
 
                        $_[0]->about->ShowModal;
175
 
                },
 
114
                'help.about',
176
115
        );
177
116
 
178
117
        return $self;
179
118
}
180
119
 
 
120
sub title {
 
121
        my $self = shift;
 
122
 
 
123
        return Wx::gettext('&Help');
 
124
}
 
125
 
181
126
sub refresh {
182
127
        my $self    = shift;
183
128
        my $current = _CURRENT(@_);