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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-07-03 23:35:34 UTC
  • mfrom: (5.1.2 karmic)
  • Revision ID: james.westby@ubuntu.com-20090703233534-i81q25s451pyid2d
Tags: 0.36-3
* remove build dep on locales-all (Closes: #535248) (LP: #394128)
* Debian Policy 3.8.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
use Padre::Wx::Menu ();
10
10
use Padre::Current qw{_CURRENT};
11
11
 
12
 
our $VERSION = '0.35';
 
12
our $VERSION = '0.36';
13
13
our @ISA     = 'Padre::Wx::Menu';
14
14
 
15
15
#####################################################################
112
112
                },
113
113
        );
114
114
 
115
 
        $self->{open_selection} = $self->Append(
116
 
                -1,
117
 
                Wx::gettext("Open Selection\tCtrl-Shift-O")
118
 
        );
119
 
        Wx::Event::EVT_MENU(
120
 
                $main,
121
 
                $self->Append( -1, Wx::gettext("Open Session...\tCtrl-Alt-O") ),
122
 
                sub {
123
 
                        require Padre::Wx::Dialog::SessionManager;
124
 
                        Padre::Wx::Dialog::SessionManager->new( $_[0] )->show;
125
 
                },
126
 
        );
127
 
 
128
 
        Wx::Event::EVT_MENU(
129
 
                $main,
130
 
                $self->{open_selection},
131
 
                sub {
132
 
                        $_[0]->on_open_selection;
133
 
                },
134
 
        );
135
 
 
136
115
        $self->{close} = $self->Append(
137
116
                Wx::wxID_CLOSE,
138
117
                Wx::gettext("&Close\tCtrl-W"),
215
194
                        $_[0]->on_save_all;
216
195
                },
217
196
        );
 
197
 
 
198
        $self->AppendSeparator;
 
199
 
 
200
        # Specialised open and close functions
 
201
        $self->{open_selection} = $self->Append(
 
202
                -1,
 
203
                Wx::gettext("Open Selection\tCtrl-Shift-O")
 
204
        );
 
205
        Wx::Event::EVT_MENU(
 
206
                $main,
 
207
                $self->{open_selection},
 
208
                sub {
 
209
                        $_[0]->on_open_selection;
 
210
                },
 
211
        );
 
212
 
 
213
        Wx::Event::EVT_MENU(
 
214
                $main,
 
215
                $self->Append( -1, Wx::gettext("Open Session...\tCtrl-Alt-O") ),
 
216
                sub {
 
217
                        require Padre::Wx::Dialog::SessionManager;
 
218
                        Padre::Wx::Dialog::SessionManager->new( $_[0] )->show;
 
219
                },
 
220
        );
 
221
 
218
222
        Wx::Event::EVT_MENU(
219
223
                $main,
220
224
                $self->Append( -1, Wx::gettext("Save Session...\tCtrl-Alt-S") ),
249
253
 
250
254
        $self->AppendSeparator;
251
255
 
252
 
        # Conversions and Transforms
253
 
        $self->{convert_nl} = Wx::Menu->new;
254
 
        $self->Append(
255
 
                -1,
256
 
                Wx::gettext("Convert..."),
257
 
                $self->{convert_nl}
258
 
        );
259
 
 
260
 
        $self->{convert_nl_windows} = $self->{convert_nl}->Append(
261
 
                -1,
262
 
                Wx::gettext("EOL to Windows")
263
 
        );
264
 
        Wx::Event::EVT_MENU(
265
 
                $main,
266
 
                $self->{convert_nl_windows},
267
 
                sub {
268
 
                        $_[0]->convert_to("WIN");
269
 
                },
270
 
        );
271
 
 
272
 
        $self->{convert_nl_unix} = $self->{convert_nl}->Append(
273
 
                -1,
274
 
                Wx::gettext("EOL to Unix")
275
 
        );
276
 
        Wx::Event::EVT_MENU(
277
 
                $main,
278
 
                $self->{convert_nl_unix},
279
 
                sub {
280
 
                        $_[0]->convert_to("UNIX");
281
 
                },
282
 
        );
283
 
 
284
 
        $self->{convert_nl_mac} = $self->{convert_nl}->Append(
285
 
                -1,
286
 
                Wx::gettext("EOL to Mac Classic")
287
 
        );
288
 
        Wx::Event::EVT_MENU(
289
 
                $main,
290
 
                $self->{convert_nl_mac},
291
 
                sub {
292
 
                        $_[0]->convert_to("MAC");
293
 
                },
294
 
        );
295
 
 
296
 
        $self->AppendSeparator;
297
 
 
298
256
        # Recent things
299
257
        $self->{recentfiles} = Wx::Menu->new;
300
258
        $self->Append(
374
332
        $self->{save_as}->Enable($doc);
375
333
        $self->{save_all}->Enable($doc);
376
334
        $self->{print}->Enable($doc);
377
 
        $self->{convert_nl_windows}->Enable($doc);
378
 
        $self->{convert_nl_unix}->Enable($doc);
379
 
        $self->{convert_nl_mac}->Enable($doc);
380
335
        $self->{docstat}->Enable($doc);
381
336
 
382
337
        return 1;