diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-03-04 19:10:28 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-03-04 19:10:28 +0000 |
commit | 9cb20748b9ce79a27c937ca750b579e8879a97c1 (patch) | |
tree | 5fbc3a5b6f915d7898d376a839a09230bc1b540d /perl-install/interactive/gtk.pm | |
parent | 3d93ee6ae8a7715327ba89f3250f49c81ca47c7d (diff) | |
download | drakx-9cb20748b9ce79a27c937ca750b579e8879a97c1.tar drakx-9cb20748b9ce79a27c937ca750b579e8879a97c1.tar.gz drakx-9cb20748b9ce79a27c937ca750b579e8879a97c1.tar.bz2 drakx-9cb20748b9ce79a27c937ca750b579e8879a97c1.tar.xz drakx-9cb20748b9ce79a27c937ca750b579e8879a97c1.zip |
fork displaying help, thus workarounding a webkit segfault (mga#9124)
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r-- | perl-install/interactive/gtk.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 881bfc7e2..ee6c34bf2 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -802,15 +802,15 @@ sub get_html_file { $anchor ? "$url#$anchor" : $url; } -sub display_help { - my ($o, $common, $mainw) = @_; +sub display_help_window { + my ($o, $common) = @_; if (my $file = $common->{interactive_help_id}) { require Gtk2::WebKit; my $view = gtknew('WebKit_View'); load_from_uri($view, $file); - my $w = ugtk2->new(N("Help"), transient => $mainw->{real_window}, modal => 1); + my $w = ugtk2->new(N("Help"), modal => 1); gtkadd($w->{rwindow}, gtkpack_(Gtk2::VBox->new, 1, create_scrolled_window(gtkset_border_width($view, 5), @@ -832,6 +832,16 @@ sub display_help { } } +sub display_help { + my ($_o, $common) = @_; + # not very safe but we run in a restricted environment anyway: + my $f = '/tmp/help.txt'; + if ($common->{interactive_help}) { + output($f, $common->{interactive_help}->()); + } + system('display_installer_help', $common->{interactive_help_id} || $f); +} + sub ask_fromW { my ($o, $common, $l) = @_; @@ -850,7 +860,7 @@ sub ask_fromW { my @more_buttons = ( if_($common->{interactive_help} || $common->{interactive_help_id}, [ gtknew('Install_Button', text => N("Help"), - clicked => sub { display_help($o, $common, $mainw) }), undef, 1 ]), + clicked => sub { display_help($o, $common) }), undef, 1 ]), if_($common->{more_buttons}, @{$common->{more_buttons}}), ); my $buttons_pack = ($common->{ok} || !exists $common->{ok}) && $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @more_buttons); |