From 1997f681bf1275f99ff1569017b9e56d1dd04992 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 18 Feb 2003 10:48:54 +0000 Subject: internalize prepare_gtk2 in the BEGIN {} of ugtk2 already containing the Gtk2->init --- perl-install/interactive/gtk.pm | 1 - perl-install/standalone/harddrake2 | 6 +----- perl-install/ugtk2.pm | 10 +++------- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'perl-install') diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 98c50250a..361e3a1a1 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -727,5 +727,4 @@ sub kill { $o->{before_killing} = @interactive::objects; } -prepare_gtk2(); 1; diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index b65c40fa0..d4600d9b6 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -8,11 +8,7 @@ use common; use ugtk2 qw(:create :helpers :wrappers); use interactive; -#- needed for proper execution for non-8bits locales -ugtk2::prepare_gtk2(); -#- this must come *after* gtk2 and gettext initialization, as it uses some -#- translatable strings -require harddrake::data; +use harddrake::data; #- needs to stay after use-ugtk2 as long as this module defines globals containing some N() # { field => [ short_translation, full_description] } diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index f508c9e96..6f176160b 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -16,7 +16,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $force_center $force_focus gtktext_insert ) ], helpers => [ qw(add2notebook add_icon_path fill_tiled fill_tiled_coords get_text_coord gtkcolor gtkcreate_img - gtkcreate_pixbuf gtkfontinfo gtkset_background n_line_size prepare_gtk2 set_back_pixbuf string_size) ], + gtkcreate_pixbuf gtkfontinfo gtkset_background n_line_size set_back_pixbuf string_size) ], create => [ qw(create_adjustment create_box_with_title create_dialog create_factory_menu create_hbox create_hpaned create_menu create_notebook create_okcancel create_packtable create_scrolled_window create_vbox @@ -38,6 +38,8 @@ use Gtk2; unless ($::no_ugtk_init) { !check_for_xserver() and die "Cannot be run in console mode.\n"; Gtk2->init(\@ARGV); + c::bind_textdomain_codeset($_, 'UTF8') foreach 'libDrakX', @::textdomains; + $::need_utf8_i18n = 1; } @@ -1251,10 +1253,4 @@ sub ask_browse_tree_info_given_widgets { $w->{w}->main; } - -sub prepare_gtk2 { - c::bind_textdomain_codeset($_, 'UTF8') foreach 'libDrakX', @::textdomains; - $::need_utf8_i18n = 1; -} - 1; -- cgit v1.2.1