ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/gde/GCE/MainWindow.pm
(Generate patch)

Comparing deliantra/gde/GCE/MainWindow.pm (file contents):
Revision 1.46 by elmex, Mon Mar 20 02:53:49 2006 UTC vs.
Revision 1.47 by elmex, Mon Mar 20 04:06:05 2006 UTC

110 110
111 $w->open_map ($mapfile, $mapkey); 111 $w->open_map ($mapfile, $mapkey);
112 112
113 ::set_pos_and_size ($w, $main::CFG->{map_window}, 500, 500, 200, 0); 113 ::set_pos_and_size ($w, $main::CFG->{map_window}, 500, 500, 200, 0);
114 114
115 $w->show_all;
116}
117
118sub show_help_window {
119 my ($self) = @_;
120
121 return if defined $self->{help_win};
122 require Gtk2::PodViewer;
123 my $w = $self->{help_win} = Gtk2::Window->new;
124 $w->set_title ("gce - help");
125 $w->set_default_size (500, 300);
126 $w->signal_connect (delete_event => sub { $self->{help_win}->hide; $self->{help_win} = undef; 1 });
127 $w->add (my $sw = Gtk2::ScrolledWindow->new);
128 $sw->add (my $h = Gtk2::PodViewer->new);
129 $h->load_string ($::DOCUMENTATION);
115 $w->show_all; 130 $w->show_all;
116} 131}
117 132
118sub show_stack_view { 133sub show_stack_view {
119 my ($self) = @_; 134 my ($self) = @_;
241 }, 256 },
242 "_Properties" => { 257 "_Properties" => {
243 callback => sub { $self->show_editor_properties }, 258 callback => sub { $self->show_editor_properties },
244 accelerator => "<ctrl>T" 259 accelerator => "<ctrl>T"
245 }, 260 },
261 _Help => {
262 callback => sub { $self->show_help_window },
263 accelerator => "<ctrl>H"
264 },
246 _Quit => { 265 _Quit => {
247 callback => sub { Gtk2->main_quit }, 266 callback => sub { Gtk2->main_quit },
248 accelerator => '<ctrl>Q' 267 accelerator => '<ctrl>Q'
249 } 268 },
250 ] 269 ]
251 }, 270 },
252 _Dialogs => { 271 _Dialogs => {
253 item_type => '<Branch>', 272 item_type => '<Branch>',
254 children => [ 273 children => [
263 "_Stack View" => { 282 "_Stack View" => {
264 callback => sub { $self->show_stack_view }, 283 callback => sub { $self->show_stack_view },
265 accelerator => "<ctrl>V" 284 accelerator => "<ctrl>V"
266 }, 285 },
267 ] 286 ]
268 } 287 },
269
270 ]; 288 ];
271 289
272 my $men = 290 my $men =
273 Gtk2::SimpleMenu->new ( 291 Gtk2::SimpleMenu->new (
274 menu_tree => $menu_tree, 292 menu_tree => $menu_tree,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines