… | |
… | |
417 | my $fc = new Gtk2::FileChooserDialog ( |
417 | my $fc = new Gtk2::FileChooserDialog ( |
418 | $title, undef, $save ? 'save' : 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok' |
418 | $title, undef, $save ? 'save' : 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok' |
419 | ); |
419 | ); |
420 | |
420 | |
421 | $fc->add_shortcut_folder ("$Crossfire::LIB/maps") if -d "$Crossfire::LIB/maps"; |
421 | $fc->add_shortcut_folder ("$Crossfire::LIB/maps") if -d "$Crossfire::LIB/maps"; |
422 | $fc->add_shortcut_folder ($_) for keys %{$self->{fc_last_folders}}; |
422 | $fc->add_shortcut_folder ($_) for grep { $_ && ($_ ne '') } keys %{$self->{fc_last_folders}}; |
423 | $fc->set_current_folder ($self->{fc_last_folder} || "$Crossfire::LIB/maps"); |
423 | $fc->set_current_folder ($self->{fc_last_folder} || "$Crossfire::LIB/maps"); |
424 | |
424 | |
425 | if ($filename) { |
425 | if ($filename) { |
426 | $fc->set_filename ($filename); |
426 | $fc->set_filename ($filename); |
427 | } |
427 | } |