diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-08 18:41:06 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-08 18:41:06 +0000 |
commit | db4013c2a40eaeb3752cc69623037e4bb274693b (patch) | |
tree | 673a8af442a819373d5ef1a12960622ed03fe7e6 /perl-install | |
parent | 76e650b30ec0a17c0e3647cab46386744e837281 (diff) | |
download | drakx-backup-do-not-use-db4013c2a40eaeb3752cc69623037e4bb274693b.tar drakx-backup-do-not-use-db4013c2a40eaeb3752cc69623037e4bb274693b.tar.gz drakx-backup-do-not-use-db4013c2a40eaeb3752cc69623037e4bb274693b.tar.bz2 drakx-backup-do-not-use-db4013c2a40eaeb3752cc69623037e4bb274693b.tar.xz drakx-backup-do-not-use-db4013c2a40eaeb3752cc69623037e4bb274693b.zip |
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 2 | ||||
-rw-r--r-- | perl-install/install2.pm | 7 | ||||
-rw-r--r-- | perl-install/lang.pm | 46 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 10 | ||||
-rw-r--r-- | perl-install/share/install.rc | 20 |
5 files changed, 56 insertions, 29 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 6330f0ea2..c8c14736b 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -32,7 +32,7 @@ sub hds() { grep { $_->{type} eq 'hd' } get(); } sub cdroms() { grep { $_->{type} eq 'cdrom' } get(); } sub floppies() { (grep { - my $fd = tryOpen(); + my $fd = tryOpen($_); } qw(fd0 fd1)), (grep { $_->{type} eq 'fd' } get()); } diff --git a/perl-install/install2.pm b/perl-install/install2.pm index c46226bb0..abcae4402 100644 --- a/perl-install/install2.pm +++ b/perl-install/install2.pm @@ -584,9 +584,10 @@ sub main { }; $clicked = 0; while ($@) { - $@ =~ /^setstep (.*)/ and $o->{step} = $1, $clicked = 1, redo MAIN; - $@ =~ /^theme_changed$/ and redo MAIN; - eval { $o->errorInStep($@) }; + local $_ = $@; + /^setstep (.*)/ and $o->{step} = $1, $clicked = 1, redo MAIN; + /^theme_changed$/ and redo MAIN; + eval { $o->errorInStep($_) }; $@ and next; $o->{step} = $o->{steps}{$o->{step}}{onError}; redo MAIN; diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 7de6917a2..b28fd081f 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -77,9 +77,8 @@ my %charsets = ( "*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-15" ], # japanese needs special console driver for text mode [kon2] "jisx0208" => [ "????", "????", - "*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1," . - "-*-*-medium-r-normal--14-*-*-*-*-*-jisx0208.1983-0," . - "-*-*-medium-r-normal--14-*-*-*-*-*-jisx0201.1976-0" ], + "-misc-fixed-medium-r-normal--14-130-75-75-c-70-jisx0201.1976-0" + ], "koi8-r" => [ "Cyr_a8x16.psf", "koi2alt", "*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1," . "*-helvetica-medium-r-normal--14-*-*-*-*-koi8-r" ], @@ -115,7 +114,6 @@ sub set { $ENV{LC_ALL} = $lang; $ENV{LANG} = $languages{$lang}[2]; $ENV{LANGUAGES} = $languages{$lang}[3]; - if (my $f = $languages{$lang}[1]) { load_font($f) } } else { # stick with the default (English) */ delete $ENV{LANG}; @@ -152,25 +150,29 @@ sub write { } } -sub load_font { - my ($charset) = @_; - my $fontFile = "lat0-sun16"; - my $fontSet = "*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1"; - - if (my $c = $charsets{$charset}) { - log::l("loading $charset font"); - $fontFile = $c->[0]; - $fontSet = $c->[2]; - } - - # text mode font - log::l("loading font /usr/share/consolefonts/$fontFile"); - #c::loadFont("/tmp/$fontFile") or log::l("error in loadFont: one of PIO_FONT PIO_UNIMAPCLR PIO_UNIMAP PIO_UNISCRNMAP failed: $!"); - #print STDERR "\033(K"; +#sub load_font { +# my ($charset) = @_; +# my $fontFile = "lat0-sun16"; +# +# if (my $c = $charsets{$charset}) { +# log::l("loading $charset font"); +# $fontFile = $c->[0]; +# } +# +# # text mode font +# log::l("loading font /usr/share/consolefonts/$fontFile"); +# #c::loadFont("/tmp/$fontFile") or log::l("error in loadFont: one of PIO_FONT PIO_UNIMAPCLR PIO_UNIMAP PIO_UNISCRNMAP failed: $!"); +# #print STDERR "\033(K"; +# +#} + +sub get_x_fontset { + my ($lang) = @_; + my $def = "*-helvetica-medium-r-normal--14-*-*-*-*-iso8859-1"; - # X11 font - log::l("fontset: " . $fontSet); -# Gtk::Gdk::Font::fontset_load("*",$fontSet); + my $l = $languages{$lang} or return $def; + my $c = $charsets{$l->[1]} or return $def; + $c->[2]; } #-###################################################################################### diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index e5f7a6f26..7ebbd0fda 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -7,7 +7,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $border); @ISA = qw(Exporter); %EXPORT_TAGS = ( helpers => [ qw(create_okcancel createScrolledWindow create_menu create_notebook create_packtable create_hbox create_vbox create_adjustment create_box_with_title) ], - wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkappend gtkadd gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_background) ], + wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkappend gtkadd gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_background gtkset_default_fontset) ], ask => [ qw(ask_warn ask_okcancel ask_yesorno ask_from_entry ask_from_list ask_file) ], ); $EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ]; @@ -159,6 +159,14 @@ sub gtkset_background { $root->draw_rectangle($gc, 1, 0, 0, $w, $h); } +sub gtkset_default_fontset($) { + my ($fontset) = @_; + + my $style = Gtk::Widget->get_default_style; + my $f = Gtk::Gdk::Font->fontset_load($fontset) or die; + $style->font($f); + Gtk::Widget->set_default_style($style); +} ################################################################################ diff --git a/perl-install/share/install.rc b/perl-install/share/install.rc index 20dbbe915..585595df4 100644 --- a/perl-install/share/install.rc +++ b/perl-install/share/install.rc @@ -1,13 +1,29 @@ style "default-font" { - font = "-adobe-helvetica-medium-r-normal-*-*-100-*-*-p-*-iso8859-1" + fontset = "-*-helvetica-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-arial-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-*helvetica*-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-*arial*-medium-r-normal--*-*-*-*-*-*-*-*,\ + -*-tahoma-medium-r-normal--*-*-*-*-*-*-*-*,\ + -ricoh-*-medium-r-normal--*-*-*-*-*-*-jisx0208.1983-0,\ + -misc-fixed-medium-r-normal--*-*-*-*-*-*-jisx0208.1983-0,\ + -*-*-medium-r-normal--*-*-*-*-*-*-jisx0208.1983-0,\ + -*-*-medium-r-normal--*-*-*-*-*-*-jisx0201.1976-0,\ + -*-*-medium-r-normal--*-*-*-*-*-*-georgian-academy,\ + -*-*-medium-r-normal--*-*-*-*-*-*-georgian-rs,\ + -*-*-medium-*-*--*-*-*-*-*-*-ksc5601.1987-*,\ + -*-*-medium-r-normal-*-*-*-*-*-*-*-mulelao-1,\ + -*-*-medium-r-normal-*-*-*-*-*-*-*-ibm-cp1133,\ + -*-*-medium-r-normal-*-*-*-*-*-*-*-iso10646-1,\ + -taipei-*-medium-r-normal--*-*-*-*-*-*-big5-0" +# fontset = "-adobe-helvetica-medium-r-normal-*-*-100-*-*-p-*-iso8859-1" } style "steps" { bg[NORMAL] = { 0, 0, 0 } fg[NORMAL] = { 1.0, 1.0, 1.0 } - font = "-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso8859-1" +# fontset = "-adobe-helvetica-medium-r-normal-*-*-80-*-*-p-*-iso8859-1" } style "logo" |