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.54 by elmex, Sun Mar 26 20:42:12 2006 UTC vs.
Revision 1.55 by elmex, Sat Apr 1 18:45:05 2006 UTC

4 4
5 GCE::MainWindow - the main window class for gce 5 GCE::MainWindow - the main window class for gce
6 6
7=cut 7=cut
8 8
9use Cwd;
9use Gtk2; 10use Gtk2;
10use Gtk2::Gdk::Keysyms; 11use Gtk2::Gdk::Keysyms;
11use Gtk2::SimpleMenu; 12use Gtk2::SimpleMenu;
12 13
13use Crossfire; 14use Crossfire;
40 $main::CFG->{main_window} = main::get_pos_and_size ($self); 41 $main::CFG->{main_window} = main::get_pos_and_size ($self);
41 $main::CFG->{map_window} = main::get_pos_and_size ($self->{last_map_window}) if $self->{last_map_window}; 42 $main::CFG->{map_window} = main::get_pos_and_size ($self->{last_map_window}) if $self->{last_map_window};
42 $main::CFG->{stack_view} = main::get_pos_and_size ($self->{sv_win}) if $self->{sv_win}; 43 $main::CFG->{stack_view} = main::get_pos_and_size ($self->{sv_win}) if $self->{sv_win};
43 $main::CFG->{attr_view} = main::get_pos_and_size ($self->{attr_edit_win}) if $self->{attr_edit_win}; 44 $main::CFG->{attr_view} = main::get_pos_and_size ($self->{attr_edit_win}) if $self->{attr_edit_win};
44 45
45 $main::CFG->{last_folder} = $self->{fc_last_folder};
46 $main::CFG->{last_folders} = $self->{fc_last_folders}; 46 $main::CFG->{last_folders} = $self->{fc_last_folders};
47 47
48 $main::CFG->{open_pickers} = []; 48 $main::CFG->{open_pickers} = [];
49 49
50 for (@{$self->{open_pick_windows}}) { 50 for (@{$self->{open_pick_windows}}) {
61} 61}
62 62
63sub load_layout { 63sub load_layout {
64 my ($self) = @_; 64 my ($self) = @_;
65 65
66 $self->{fc_last_folder} = $main::CFG->{last_folder};
67 $self->{fc_last_folders} = $main::CFG->{last_folders}; 66 $self->{fc_last_folders} = $main::CFG->{last_folders};
68 67
69 $main::CFG->{attr_edit_on} 68 $main::CFG->{attr_edit_on}
70 and $self->show_attr_editor; 69 and $self->show_attr_editor;
71 70
494 $title, undef, $save ? 'save' : 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok' 493 $title, undef, $save ? 'save' : 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok'
495 ); 494 );
496 495
497 $fc->add_shortcut_folder ($::CFG->{MAPDIR}) if -d $::CFG->{MAPDIR}; 496 $fc->add_shortcut_folder ($::CFG->{MAPDIR}) if -d $::CFG->{MAPDIR};
498 $fc->add_shortcut_folder ($_) for grep { $_ && ($_ ne '') } keys %{$self->{fc_last_folders}}; 497 $fc->add_shortcut_folder ($_) for grep { $_ && ($_ ne '') } keys %{$self->{fc_last_folders}};
499 $fc->set_current_folder ($self->{fc_last_folder} || $::CFG->{MAPDIR}); 498 $fc->set_current_folder (getcwd);
500 499
501 if ($filename) { 500 if ($filename) {
502 $fc->set_filename ($filename); 501 $fc->set_filename ($filename);
503 } 502 }
504 503

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines