summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center16
1 files changed, 11 insertions, 5 deletions
diff --git a/control-center b/control-center
index 7c375a0f..8dd777a3 100755
--- a/control-center
+++ b/control-center
@@ -41,8 +41,10 @@ use strict;
# require Gtk;
# require Gtk::Gdk::ImlibImage;
# init Gtk;
-# Gtk->set_locale;
# Gtk::Gdk::ImlibImage->init;
+
+# set the locale, needed for proper fontset and charset selection
+Gtk->set_locale;
use Config;
use POSIX;
@@ -147,6 +149,9 @@ my @back;
($back[2], undef) = gtkcreate_png('mcc-left-back2');
$back[1] = $back[0];
my $style_dflt = new Gtk::Style;
+# fontsets *must* be used in order to allow proper font selection for non
+# latin1 languages; never use a simple font, *always* load a fontset
+$style_dflt->font(Gtk::Gdk::Font->fontset_load(_("-*-times-bold-r-normal-*-14-*-*-*-p-*-iso8859-1,*-r-*")));
my $index = 0;
foreach (@tree) {
$index++;
@@ -273,8 +278,9 @@ $darea_title->signal_connect( expose_event => sub {
my @dim = @{$_[1]->{area}};
my ($dx, $dy) = ($darea_title->allocation->[2], $darea_title->allocation->[3]);
if (!defined($dbl_area)) {
- my ($pix, $width, $height) = create_pix_text($darea_title, "welcome", "#255#255#255",
- _("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1"),
+# *always* uyse a fontset to write something on screen
+ my ($pix, $width, $height) = create_pix_text($darea_title, _("welcome"), "#255#255#255",
+ Gtk::Gdk::Font->fontset_load( _("-*-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1,*-r-*")),
max($dx-336, 0), $dy, 0, 1, $pixmap_back, 110, 55, 0, 0);
$dbl_area = new Gtk::Gdk::Pixmap($darea_title->window, $dx, $dy);
fill_tiled($darea_title, $dbl_area, $pixmap_back, 110, 55, $dx, $dy);
@@ -308,7 +314,7 @@ my ($pixmap_back_right, undef) = gtkcreate_png('mcc-core-back');
# 0, 0, ($dx-540)/2, ($dy-460)/2, 540, 460);
# my $style = new Gtk::Style;
# my $style_dflt = new Gtk::Style;
-# $style->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1")));
+# $style->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-190-*-*-p-*-iso8859-1,*-r-*")));
# #_("-adobe-times-bold-r-normal--17-*-100-100-p-*-iso8859-*,*-r-*")));
# $pix_dbl->draw_string($style->font, $darea1->style->black_gc, 80, 165, _("Welcome to the Mandrake Control Center") );
# my @revtree;
@@ -317,7 +323,7 @@ my ($pixmap_back_right, undef) = gtkcreate_png('mcc-core-back');
# my @info_tree = split / /, $revtree[0];
# my ($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
# my $style1 = new Gtk::Style;
-# $style1->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-90-*-*-p-*-iso8859-1")));
+# $style1->font(Gtk::Gdk::Font->fontset_load(_("-urw-helvetica-medium-r-normal-*-*-90-*-*-p-*-iso8859-1,*-r-*")));
# #_("-adobe-times-bold-r-normal--14-*-100-100-p-*-iso8859-*,*-r-*")));
# my $i=0;
# foreach(