From f987521c149c0a5b47a8893febcfaa1f92d4504a Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 23 Sep 2008 16:43:21 +0000 Subject: (set_wm_hints_if_needed) extract if from finish-install so that it can reused elsewhere (eg: gurpmi.update) --- perl-install/any.pm | 7 +++++++ perl-install/standalone/finish-install | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/perl-install/any.pm b/perl-install/any.pm index a0d923780..071d23222 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1314,6 +1314,13 @@ sub running_window_manager() { undef; } +sub set_wm_hints_if_needed { + my ($o_in) = @_; + my $wm = any::running_window_manager(); + $o_in->{no_Window_Manager} = !$wm if $o_in; + $::set_dialog_hint = $wm eq 'drakx-matchbox-window-manager'; +} + sub ask_window_manager_to_logout { my ($wm) = @_; diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install index 6e4d844dc..694df3b9b 100755 --- a/perl-install/standalone/finish-install +++ b/perl-install/standalone/finish-install @@ -24,9 +24,7 @@ network::network::read_net_conf($net); $::isWizard = 1; my $in = 'interactive'->vnew; -my $wm = any::running_window_manager(); -$in->{no_Window_Manager} = !$wm; -$::set_dialog_hint = $wm eq 'drakx-matchbox-window-manager'; +any::set_wm_hints_if_needed($in); sub get_conf { my ($name) = @_; -- cgit v1.2.1