From 985e8349ccb4384c2499c900150c7693c6b56e37 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 26 Sep 2007 10:52:06 +0000 Subject: split init code in init() (simplify stuff for drakbug) --- perl-install/mygtk2.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index ff8a75c1f..02beca234 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -13,7 +13,7 @@ use common; use Gtk2; use Gtk2::Gdk::Keysyms; -unless ($::no_ugtk_init) { +sub init() { !check_for_xserver() and print("Cannot be run in console mode.\n"), c::_exit(0); $::one_message_has_been_translated and warn("N() was called from $::one_message_has_been_translated BEFORE gtk2 initialisation, replace it with a N_() AND a translate() later.\n"), c::_exit(1); @@ -22,6 +22,7 @@ unless ($::no_ugtk_init) { 'drakx-net', 'drakx-kbd-mouse-x11', # shared translation @::textdomains; } +init() unless ($::no_ugtk_init); Gtk2->croak_execeptions if (!$::no_ugtk_init || $::isInstall) && 0.95 < $Gtk2::VERSION; -- cgit v1.2.1