summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-01-28 15:39:51 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-01-28 15:39:51 +0000
commit0f1a363af19d12e8bc38ec02f5a99ecbae1eadc1 (patch)
tree8ca816bf1fff041b773ac512d3a1e3604e75743e /perl-install/ugtk2.pm
parent09676045bd344ea218b7e2abeec8d2f0b5334d76 (diff)
downloaddrakx-0f1a363af19d12e8bc38ec02f5a99ecbae1eadc1.tar
drakx-0f1a363af19d12e8bc38ec02f5a99ecbae1eadc1.tar.gz
drakx-0f1a363af19d12e8bc38ec02f5a99ecbae1eadc1.tar.bz2
drakx-0f1a363af19d12e8bc38ec02f5a99ecbae1eadc1.tar.xz
drakx-0f1a363af19d12e8bc38ec02f5a99ecbae1eadc1.zip
cleaning the utf8 support stuff:
- consolidate check_for_xserver() to check for x11 access - introduce prepare_gtk2() to do what gtk+2 needs, so that tools that're not part of drakxtools (aka: rpmdrake, mcc, ...) can just do : unshift @::textdomains, 'drakconf'; prepare_gtk2();
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 7b25900b3..16a9db1a2 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -14,7 +14,8 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @icon_paths $force_center $force_focus
gtkhide gtkdestroy gtkflush gtkset_mousecursor gtkset_mousecursor_normal gtkset_markup gtkmodify_font gtkset_property
gtkset_mousecursor_wait gtkappend_text gtkprepend_text gtkinsert_text gtkroot gtksetstyle gtkappend_page) ],
helpers => [ qw(add2notebook add_icon_path n_line_size fill_tiled fill_tiled_coords string_size
- get_text_coord gtkcolor gtkset_background gtkfontinfo gtkcreate_img gtkcreate_pixbuf set_back_pixbuf) ],
+ get_text_coord gtkcolor gtkset_background gtkfontinfo gtkcreate_img gtkcreate_pixbuf set_back_pixbuf
+ prepare_gtk2) ],
create => [ qw(create_box_with_title create_adjustment create_scrolled_window create_hbox create_vbox
create_dialog destroy_window create_factory_menu create_menu create_notebook create_packtable
create_vpaned create_hpaned create_okcancel) ],
@@ -31,10 +32,11 @@ use common;
use Gtk2;
unless ($::no_ugtk_init) {
- !$ENV{DISPLAY} || system('/usr/X11R6/bin/xtest') and die "Cannot be run in console mode.\n";
+ !check_for_xserver() and die "Cannot be run in console mode.\n";
Gtk2->init(\@ARGV);
}
+
$border = 5;
@@ -1260,4 +1262,9 @@ sub ask_browse_tree_info_given_widgets {
}
+sub prepare_gtk2 {
+ c::bind_textdomain_codeset($_, 'UTF8') foreach 'libDrakX', @::textdomains;
+ $::need_utf8_i18n = 1;
+}
+
1;