summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-04-21 11:39:06 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-04-21 11:39:06 +0000
commit91051621fce6892365ee92c76c3a5d4a05a6549b (patch)
treeca624f48b740b999b1da49786c8d38b077ab31a3 /perl-install
parent0de24731d4d351b98250768ce45f170883c998fb (diff)
downloaddrakx-91051621fce6892365ee92c76c3a5d4a05a6549b.tar
drakx-91051621fce6892365ee92c76c3a5d4a05a6549b.tar.gz
drakx-91051621fce6892365ee92c76c3a5d4a05a6549b.tar.bz2
drakx-91051621fce6892365ee92c76c3a5d4a05a6549b.tar.xz
drakx-91051621fce6892365ee92c76c3a5d4a05a6549b.zip
switch to gtk+-2.6's new file selector
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/draksplash16
1 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index 7b0d9ea81..da027d73a 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -164,13 +164,21 @@ $first{widgets}{combo}{res}->entry->signal_connect(changed => sub {
#$first{widgets}{button}{boot_conf}->signal_connect(clicked => sub{show_act(\%boot_conf_frame) } );
#- image file selection for new theme
$first{widgets}{button}{file}->signal_connect(clicked => sub {
- my $file_dialog = gtkset_modal(Gtk2::FileSelection->new(N("choose image")), 1);
- $file_dialog->set_transient_for($window->{real_window});
+ my $file_dialog = my $file_dlg = Gtk2::FileChooserDialog->new(N("choose image"), $window->{real_window}, 'open', N("Cancel") => 'cancel', N("Ok") => 'ok');
$file_dialog->set_filename($img_file || '~/');
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
- $file_dialog->ok_button->signal_connect(clicked => sub { $img_file = $file_dialog->get_filename; $file_dialog->destroy });
$file_dialog->show;
+
+ while (my $answer = $file_dlg->run) {
+ if (member($answer, qw(cancel delete-event))) {
+ $file_dialog->destroy;
+ return;
+ } elsif ($answer eq 'ok') {
+ $img_file = $file_dialog->get_filename;
+ $file_dialog->destroy;
+ return;
+ }
+ }
});
#- changing theme name
$first{widgets}{combo}{name}->entry->signal_connect(changed => sub { get_this_thm_res_conf(); $theme{name} = $first{widgets}{combo}{name}->entry->get_text });