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

« back to all changes in this revision

Viewing changes to lib/Padre/Wx/FBP/VCS.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:
 
1
package Padre::Wx::FBP::VCS;
 
2
 
 
3
## no critic
 
4
 
 
5
# This module was generated by Padre::Plugin::FormBuilder::Perl.
 
6
# To change this module edit the original .fbp file and regenerate.
 
7
# DO NOT MODIFY THIS FILE BY HAND!
 
8
 
 
9
use 5.008;
 
10
use strict;
 
11
use warnings;
 
12
use Padre::Wx ();
 
13
use Padre::Wx::Role::Main ();
 
14
 
 
15
our $VERSION = '0.92';
 
16
our @ISA     = qw{
 
17
        Padre::Wx::Role::Main
 
18
        Wx::Panel
 
19
};
 
20
 
 
21
sub new {
 
22
        my $class  = shift;
 
23
        my $parent = shift;
 
24
 
 
25
        my $self = $class->SUPER::new(
 
26
                $parent,
 
27
                -1,
 
28
                Wx::DefaultPosition,
 
29
                [ 195, 530 ],
 
30
                Wx::TAB_TRAVERSAL,
 
31
        );
 
32
 
 
33
        $self->{add} = Wx::BitmapButton->new(
 
34
                $self,
 
35
                -1,
 
36
                Wx::NullBitmap,
 
37
                Wx::DefaultPosition,
 
38
                Wx::DefaultSize,
 
39
                Wx::BU_AUTODRAW,
 
40
        );
 
41
        $self->{add}->SetToolTip(
 
42
                Wx::gettext("Schedule the file or directory for addition to the repository")
 
43
        );
 
44
 
 
45
        Wx::Event::EVT_BUTTON(
 
46
                $self,
 
47
                $self->{add},
 
48
                sub {
 
49
                        shift->on_add_click(@_);
 
50
                },
 
51
        );
 
52
 
 
53
        $self->{delete} = Wx::BitmapButton->new(
 
54
                $self,
 
55
                -1,
 
56
                Wx::NullBitmap,
 
57
                Wx::DefaultPosition,
 
58
                Wx::DefaultSize,
 
59
                Wx::BU_AUTODRAW,
 
60
        );
 
61
        $self->{delete}->SetToolTip(
 
62
                Wx::gettext("Schedule the file or directory for deletion from the repository")
 
63
        );
 
64
 
 
65
        Wx::Event::EVT_BUTTON(
 
66
                $self,
 
67
                $self->{delete},
 
68
                sub {
 
69
                        shift->on_delete_click(@_);
 
70
                },
 
71
        );
 
72
 
 
73
        $self->{update} = Wx::BitmapButton->new(
 
74
                $self,
 
75
                -1,
 
76
                Wx::NullBitmap,
 
77
                Wx::DefaultPosition,
 
78
                Wx::DefaultSize,
 
79
                Wx::BU_AUTODRAW,
 
80
        );
 
81
        $self->{update}->SetToolTip(
 
82
                Wx::gettext("Bring changes from the repository into the working copy")
 
83
        );
 
84
 
 
85
        Wx::Event::EVT_BUTTON(
 
86
                $self,
 
87
                $self->{update},
 
88
                sub {
 
89
                        shift->on_update_click(@_);
 
90
                },
 
91
        );
 
92
 
 
93
        $self->{commit} = Wx::BitmapButton->new(
 
94
                $self,
 
95
                -1,
 
96
                Wx::NullBitmap,
 
97
                Wx::DefaultPosition,
 
98
                Wx::DefaultSize,
 
99
                Wx::BU_AUTODRAW,
 
100
        );
 
101
        $self->{commit}->SetToolTip(
 
102
                Wx::gettext("Send changes from your working copy to the repository")
 
103
        );
 
104
 
 
105
        Wx::Event::EVT_BUTTON(
 
106
                $self,
 
107
                $self->{commit},
 
108
                sub {
 
109
                        shift->on_commit_click(@_);
 
110
                },
 
111
        );
 
112
 
 
113
        $self->{revert} = Wx::BitmapButton->new(
 
114
                $self,
 
115
                -1,
 
116
                Wx::NullBitmap,
 
117
                Wx::DefaultPosition,
 
118
                Wx::DefaultSize,
 
119
                Wx::BU_AUTODRAW,
 
120
        );
 
121
        $self->{revert}->SetToolTip(
 
122
                Wx::gettext("Restore pristine working copy file (undo most local edits)")
 
123
        );
 
124
 
 
125
        Wx::Event::EVT_BUTTON(
 
126
                $self,
 
127
                $self->{revert},
 
128
                sub {
 
129
                        shift->on_revert_click(@_);
 
130
                },
 
131
        );
 
132
 
 
133
        $self->{refresh} = Wx::BitmapButton->new(
 
134
                $self,
 
135
                -1,
 
136
                Wx::NullBitmap,
 
137
                Wx::DefaultPosition,
 
138
                Wx::DefaultSize,
 
139
                Wx::BU_AUTODRAW,
 
140
        );
 
141
        $self->{refresh}->SetToolTip(
 
142
                Wx::gettext("Refresh the status of working copy files and directories")
 
143
        );
 
144
 
 
145
        Wx::Event::EVT_BUTTON(
 
146
                $self,
 
147
                $self->{refresh},
 
148
                sub {
 
149
                        shift->on_refresh_click(@_);
 
150
                },
 
151
        );
 
152
 
 
153
        $self->{list} = Wx::ListCtrl->new(
 
154
                $self,
 
155
                -1,
 
156
                Wx::DefaultPosition,
 
157
                Wx::DefaultSize,
 
158
                Wx::LC_REPORT | Wx::LC_SINGLE_SEL,
 
159
        );
 
160
 
 
161
        Wx::Event::EVT_LIST_COL_CLICK(
 
162
                $self,
 
163
                $self->{list},
 
164
                sub {
 
165
                        shift->on_list_column_click(@_);
 
166
                },
 
167
        );
 
168
 
 
169
        Wx::Event::EVT_LIST_ITEM_ACTIVATED(
 
170
                $self,
 
171
                $self->{list},
 
172
                sub {
 
173
                        shift->on_list_item_activated(@_);
 
174
                },
 
175
        );
 
176
 
 
177
        $self->{show_normal} = Wx::CheckBox->new(
 
178
                $self,
 
179
                -1,
 
180
                Wx::gettext("Normal"),
 
181
                Wx::DefaultPosition,
 
182
                Wx::DefaultSize,
 
183
        );
 
184
 
 
185
        Wx::Event::EVT_CHECKBOX(
 
186
                $self,
 
187
                $self->{show_normal},
 
188
                sub {
 
189
                        shift->on_show_normal_click(@_);
 
190
                },
 
191
        );
 
192
 
 
193
        $self->{show_unversioned} = Wx::CheckBox->new(
 
194
                $self,
 
195
                -1,
 
196
                Wx::gettext("Unversioned"),
 
197
                Wx::DefaultPosition,
 
198
                Wx::DefaultSize,
 
199
        );
 
200
 
 
201
        Wx::Event::EVT_CHECKBOX(
 
202
                $self,
 
203
                $self->{show_unversioned},
 
204
                sub {
 
205
                        shift->on_show_unversioned_click(@_);
 
206
                },
 
207
        );
 
208
 
 
209
        $self->{show_ignored} = Wx::CheckBox->new(
 
210
                $self,
 
211
                -1,
 
212
                Wx::gettext("Ignored"),
 
213
                Wx::DefaultPosition,
 
214
                Wx::DefaultSize,
 
215
        );
 
216
 
 
217
        Wx::Event::EVT_CHECKBOX(
 
218
                $self,
 
219
                $self->{show_ignored},
 
220
                sub {
 
221
                        shift->on_show_ignored_click(@_);
 
222
                },
 
223
        );
 
224
 
 
225
        $self->{status} = Wx::TextCtrl->new(
 
226
                $self,
 
227
                -1,
 
228
                "",
 
229
                Wx::DefaultPosition,
 
230
                [ -1, 50 ],
 
231
                Wx::TE_MULTILINE | Wx::TE_READONLY,
 
232
        );
 
233
 
 
234
        my $button_sizer = Wx::BoxSizer->new(Wx::HORIZONTAL);
 
235
        $button_sizer->Add( $self->{add}, 0, Wx::ALL, 1 );
 
236
        $button_sizer->Add( $self->{delete}, 0, Wx::ALL, 1 );
 
237
        $button_sizer->Add( $self->{update}, 0, Wx::ALL, 1 );
 
238
        $button_sizer->Add( $self->{commit}, 0, Wx::ALL, 1 );
 
239
        $button_sizer->Add( $self->{revert}, 0, Wx::ALL, 1 );
 
240
        $button_sizer->Add( $self->{refresh}, 0, Wx::ALL, 1 );
 
241
 
 
242
        my $checkbox_sizer = Wx::StaticBoxSizer->new(
 
243
                Wx::StaticBox->new(
 
244
                        $self,
 
245
                        -1,
 
246
                        Wx::gettext("Show"),
 
247
                ),
 
248
                Wx::VERTICAL,
 
249
        );
 
250
        $checkbox_sizer->Add( $self->{show_normal}, 0, Wx::ALL, 2 );
 
251
        $checkbox_sizer->Add( $self->{show_unversioned}, 0, Wx::ALL, 2 );
 
252
        $checkbox_sizer->Add( $self->{show_ignored}, 0, Wx::ALL, 2 );
 
253
 
 
254
        my $main_sizer = Wx::BoxSizer->new(Wx::VERTICAL);
 
255
        $main_sizer->Add( $button_sizer, 0, Wx::EXPAND, 5 );
 
256
        $main_sizer->Add( $self->{list}, 1, Wx::ALL | Wx::EXPAND, 5 );
 
257
        $main_sizer->Add( $checkbox_sizer, 0, Wx::EXPAND, 2 );
 
258
        $main_sizer->Add( $self->{status}, 0, Wx::ALL | Wx::EXPAND, 5 );
 
259
 
 
260
        $self->SetSizer($main_sizer);
 
261
        $self->Layout;
 
262
 
 
263
        return $self;
 
264
}
 
265
 
 
266
sub on_add_click {
 
267
        $_[0]->main->error('Handler method on_add_click for event add.OnButtonClick not implemented');
 
268
}
 
269
 
 
270
sub on_delete_click {
 
271
        $_[0]->main->error('Handler method on_delete_click for event delete.OnButtonClick not implemented');
 
272
}
 
273
 
 
274
sub on_update_click {
 
275
        $_[0]->main->error('Handler method on_update_click for event update.OnButtonClick not implemented');
 
276
}
 
277
 
 
278
sub on_commit_click {
 
279
        $_[0]->main->error('Handler method on_commit_click for event commit.OnButtonClick not implemented');
 
280
}
 
281
 
 
282
sub on_revert_click {
 
283
        $_[0]->main->error('Handler method on_revert_click for event revert.OnButtonClick not implemented');
 
284
}
 
285
 
 
286
sub on_refresh_click {
 
287
        $_[0]->main->error('Handler method on_refresh_click for event refresh.OnButtonClick not implemented');
 
288
}
 
289
 
 
290
sub on_list_column_click {
 
291
        $_[0]->main->error('Handler method on_list_column_click for event list.OnListColClick not implemented');
 
292
}
 
293
 
 
294
sub on_list_item_activated {
 
295
        $_[0]->main->error('Handler method on_list_item_activated for event list.OnListItemActivated not implemented');
 
296
}
 
297
 
 
298
sub on_show_normal_click {
 
299
        $_[0]->main->error('Handler method on_show_normal_click for event show_normal.OnCheckBox not implemented');
 
300
}
 
301
 
 
302
sub on_show_unversioned_click {
 
303
        $_[0]->main->error('Handler method on_show_unversioned_click for event show_unversioned.OnCheckBox not implemented');
 
304
}
 
305
 
 
306
sub on_show_ignored_click {
 
307
        $_[0]->main->error('Handler method on_show_ignored_click for event show_ignored.OnCheckBox not implemented');
 
308
}
 
309
 
 
310
1;
 
311
 
 
312
# Copyright 2008-2011 The Padre development team as listed in Padre.pm.
 
313
# LICENSE
 
314
# This program is free software; you can redistribute it and/or
 
315
# modify it under the same terms as Perl 5 itself.
 
316