summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-04-21 11:37:30 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-04-21 11:37:30 +0000
commit3772f5ba1d182769f27c708586b5fe8039323320 (patch)
tree66470ec8610624d64016e4891c06f643c2d339eb /perl-install/standalone
parent5dbabd077818372e24c7b6d031b001c97e31a6f9 (diff)
downloaddrakx-3772f5ba1d182769f27c708586b5fe8039323320.tar
drakx-3772f5ba1d182769f27c708586b5fe8039323320.tar.gz
drakx-3772f5ba1d182769f27c708586b5fe8039323320.tar.bz2
drakx-3772f5ba1d182769f27c708586b5fe8039323320.tar.xz
drakx-3772f5ba1d182769f27c708586b5fe8039323320.zip
(filedialog_generic) switch to gtk+-2.6's new file selector
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakbackup16
1 files changed, 10 insertions, 6 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index 885ad79eb..8ad1797ef 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -1372,10 +1372,14 @@ sub filedialog_generic {
#- a more generic file dialog
#- a title prompt, the widget to get updated
my ($prompt, $widget) = @_;
- my $file_dialog;
- $file_dialog = gtksignal_connect(Gtk2::FileSelection->new($prompt), destroy => sub { $file_dialog->destroy });
- $file_dialog->ok_button->signal_connect(clicked => sub {
+ my $file_dialog = Gtk2::FileChooserDialog->new($prompt, $my_win->{real_window}, 'select_folder', N("Cancel") => 'cancel', N("Ok") => 'ok');
+ $file_dialog->show;
+ while (my $answer = $file_dialog->run) {
+ if (member($answer, qw(cancel delete-event))) {
+ $file_dialog->destroy;
+ return;
+ } elsif ($answer eq 'ok') {
if (defined($widget)) {
$$widget->set_text($file_dialog->get_filename);
} else {
@@ -1388,9 +1392,9 @@ sub filedialog_generic {
}
}
$file_dialog->destroy;
- });
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
- $file_dialog->show;
+ return;
+ }
+ }
}
################################################ ADVANCED ################################################