summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-19 20:23:15 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-19 20:23:15 +0000
commit19ca59fe329e6cb97cc3681e70c12d81a022dbcc (patch)
tree63854174408e6a69b7735815d35d053dafc4e8c9
parent25f65beed0677fa247c513705dbf538225f979c4 (diff)
downloaddrakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar
drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar.gz
drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar.bz2
drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.tar.xz
drakx-19ca59fe329e6cb97cc3681e70c12d81a022dbcc.zip
no_comment
-rw-r--r--docs/TODO4
-rw-r--r--perl-install/Xconfig.pm2
-rw-r--r--perl-install/common.pm16
-rw-r--r--perl-install/help.pm24
-rw-r--r--perl-install/my_gtk.pm31
-rw-r--r--perl-install/pkgs.pm8
-rw-r--r--perl-install/share/themes-blackwhite.rc10
-rw-r--r--perl-install/share/themes-blue.rc17
-rw-r--r--perl-install/share/themes-savane.rc24
9 files changed, 103 insertions, 33 deletions
diff --git a/docs/TODO b/docs/TODO
index 11b668325..8d1bcba03 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -3,6 +3,8 @@ tolook qw(fstab )
upgrade
+propose fb in XFdrake
+
update the list of modules (in update_kernel)
look at the pcmcia case
@@ -70,6 +72,8 @@ maybe: do a iotcl FDGETPRM to detect fd1, fd0.
test smp (is it enough to scan /proc/cpuinfo for multiple /^processor/ lines?)
+remove the nasty wrapping arrow (in help) by patching gtk :(
+
use ddcprobe monitor's size info for pnp monitors
use ddcprobe video card memory size info
use ddcprobe modelines to reduce the available resolutions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm
index ba3dab2f6..befb0f7dd 100644
--- a/perl-install/Xconfig.pm
+++ b/perl-install/Xconfig.pm
@@ -79,7 +79,7 @@ sub getinfoFromXF86Config {
sub getinfoFromSysconfig {
my $o = shift || {};
- add2hash($o->{mouse}, mouse::read("/etc/sysconfig/mouse"));
+ add2hash($o->{mouse}, { mouse::read("/etc/sysconfig/mouse") });
if (my %keyboard = getVarsFromSh "/etc/sysconfig/keyboard") {
$keyboard{KEYTABLE} or last;
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 41ddbf98e..279307e85 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $printable_chars $sizeof_int $bitof_int
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- common => [ qw(__ min max sqr sum sign product bool listlength bool2text to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash set_new set_add round round_up round_down first second top uniq translate untranslate warp_text) ],
+ common => [ qw(__ min max sqr sum sign product bool listlength bool2text to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash set_new set_add round round_up round_down first second top uniq translate untranslate warp_text formatAlaTeX) ],
functional => [ qw(fold_left map_index map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie) ],
file => [ qw(dirname basename touch all glob_ cat_ chop_ mode) ],
system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ crypt_ getVarsFromSh setVarsInSh) ],
@@ -246,6 +246,19 @@ sub warp_text($;$) {
@l;
}
+sub formatAlaTeX($) {
+ my ($t, $tmp);
+ foreach (split "\n", $_[0]) {
+ if (/^$/) {
+ $t .= ($t && "\n") . $tmp;
+ $tmp = '';
+ } else {
+ $tmp = ($tmp && "$tmp ") . $_;
+ }
+ }
+ $t . ($t && $tmp && "\n") . $tmp;
+}
+
sub getVarsFromSh($) {
my %l;
local *F;
@@ -275,7 +288,6 @@ sub setVarsInSh {
$l->{$_} and print F "$_=$l->{$_}\n" foreach @fields;
}
-
sub best_match {
my ($str, @lis) = @_;
my @words = split /\W+/, $str;
diff --git a/perl-install/help.pm b/perl-install/help.pm
index f906093ae..af8b15632 100644
--- a/perl-install/help.pm
+++ b/perl-install/help.pm
@@ -13,19 +13,24 @@ selectPath =>
__("Choose \"Installation\" if there are no previous versions of Linux
installed, or if you wish use to multiple distributions or versions.
+
Choose \"Update\" if you wish to update a previous version of Mandrake
Linux: 5.1 (Venice), 5.2 (Leeloo), 5.3 (Festen) or 6.0 (Venus)."),
selectInstallClass =>
__("Select:
+
- Beginner: If you have not installed Linux before, or wish to install
the distribution elected \"Product of the year\" for 1999, click here.
+
- Developer: If you are familiar with Linux and will be using the
computer primarily for software development, you will find happiness
here.
+
- Server: If you wish to install a general purpose server, or the
Linux distribution elected \"Distribution/Server\" for 1999, select
this.
+
- Expert: If you know GNU/Linux and want to perform a highly
customized installation, this Install Class is for you."),
@@ -34,6 +39,7 @@ setupSCSI =>
click on \"Yes\" and choose the module(s) to be tested. Otherwise,
select \"No\".
+
If you don't know if your computer has SCSI interfaces, consult the
original documentation delivered with the computer, or if you use
Microsoft Windows 95/98, inspect the information available via the \"Control
@@ -62,12 +68,14 @@ data you wish to keep. Typically retained are: /home and /usr/local."),
choosePackages =>
__("You may now select the packages you wish to install.
+
Please note that some packages require the installation of others. These
are referred to as package dependencies. The packages you select, and
the packages they require will automatically be added to the
installation configuration. It is impossible to install a package
without installing all of its dependencies.
+
Information on each category and specific package is available in the
area titled \"Info\". This is located above the buttons: [confirmation]
[selection] [unselection]."),
@@ -96,6 +104,7 @@ setRootPassword =>
assigned. The password must be entered twice to verify that both
password entries are identical.
+
Choose this password carefully. Only persons with access to an
administrator account can maintain and administer the system.
Alternatively, unauthorized use of an administrator account can be
@@ -105,6 +114,7 @@ mixture of alphanumeric characters and a least 8 characters long. It
should never be written down. Do not make the password too long or
complicated that it will be difficult to remember.
+
When you login as Administrator, at \"login\" type \"root\" and at
\"password\", type the password that was created here."),
@@ -112,6 +122,7 @@ addUser =>
__("You can now authorize one or more people to use your Linux
system. Each user account will have their own customizable environment.
+
It is very important that you create a regular user account, even if
there will only be one principle user of the system. The administrative
\"root\" account should not be used for day to day operation of the
@@ -127,6 +138,7 @@ setupBootloader =>
__("You need to indicate where you wish
to place the information required to boot to Linux.
+
Unless you know exactly what you are doing, choose \"First sector of
drive\"."),
@@ -151,19 +163,24 @@ selectPath =>
__("Choose \"Installation\" if there are no previous versions of Linux
installed, or if you wish use to multiple distributions or versions.
+
Choose \"Update\" if you wish to update a previous version of Mandrake
Linux: 5.1 (Venice), 5.2 (Leeloo), 5.3 (Festen) or 6.0 (Venus)."),
selectInstallClass =>
__("Select:
+
- Beginner: If you have not installed Linux before, or wish to install
the distribution elected \"Product of the year\" for 1999, click here.
+
- Developer: If you are familiar with Linux and will be using the
computer primarily for software development, you will find happiness
here.
+
- Server: If you wish to install a general purpose server, or the
Linux distribution elected \"Distribution/Server\" for 1999, select
this.
+
- Expert: If you know GNU/Linux and want to perform a highly
customized installation, this Install Class is for you."),
@@ -172,6 +189,7 @@ setupSCSI =>
click on \"Yes\" and choose the module(s) to be tested. Otherwise,
select \"No\".
+
If you don't know if your computer has SCSI interfaces, consult the
original documentation delivered with the computer, or if you use
Microsoft Windows 95/98, inspect the information available via the \"Control
@@ -200,12 +218,14 @@ data you wish to keep. Typically retained are: /home and /usr/local."),
choosePackages =>
__("You may now select the packages you wish to install.
+
Please note that some packages require the installation of others. These
are referred to as package dependencies. The packages you select, and
the packages they require will automatically be added to the
installation configuration. It is impossible to install a package
without installing all of its dependencies.
+
Information on each category and specific package is available in the
area titled \"Info\". This is located above the buttons: [confirmation]
[selection] [unselection]."),
@@ -234,6 +254,7 @@ setRootPassword =>
assigned. The password must be entered twice to verify that both
password entries are identical.
+
Choose this password carefully. Only persons with access to an
administrator account can maintain and administer the system.
Alternatively, unauthorized use of an administrator account can be
@@ -243,6 +264,7 @@ mixture of alphanumeric characters and a least 8 characters long. It
should never be written down. Do not make the password too long or
complicated that it will be difficult to remember.
+
When you login as Administrator, at \"login\" type \"root\" and at
\"password\", type the password that was created here."),
@@ -250,6 +272,7 @@ addUser =>
__("You can now authorize one or more people to use your Linux
system. Each user account will have their own customizable environment.
+
It is very important that you create a regular user account, even if
there will only be one principle user of the system. The administrative
\"root\" account should not be used for day to day operation of the
@@ -265,6 +288,7 @@ setupBootloader =>
__("You need to indicate where you wish
to place the information required to boot to Linux.
+
Unless you know exactly what you are doing, choose \"First sector of
drive\"."),
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 30406cac0..bd822f67b 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 gtkset_default_fontset) ],
+ wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkappend gtkadd gtktext_insert 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 ];
@@ -126,6 +126,14 @@ sub gtkadd($@) {
$w
}
+sub gtktext_insert($$) {
+ my ($w, $t) = @_;
+ $w->insert(undef, undef, undef, "$t\n"); #- needs \n otherwise in case of one line text the beginning is not shown (even with the vadj->set_value)
+ $w->set_word_wrap(1);
+ $w->vadj->set_value(0);
+ $w;
+}
+
sub gtkroot {
Gtk->init;
Gtk::Gdk::Window->new_foreign(Gtk::Gdk->ROOT_WINDOW);
@@ -200,13 +208,20 @@ sub create_box_with_title($@) {
}
sub createScrolledWindow($) {
- my $w = new Gtk::ScrolledWindow(undef, undef);
- $w->set_policy('automatic', 'automatic');
- member(ref $_[0], qw(Gtk::CList)) ?
- $w->add($_[0]) :
- $w->add_with_viewport($_[0]);
- $_[0]->show;
- $w
+ my ($W) = @_;
+ if (ref $W eq "Gtk::Text") {
+ gtkpack_(new Gtk::HBox(0,0),
+ 1, $W,
+ 0, new Gtk::VScrollbar($W->vadj));
+ } else {
+ my $w = new Gtk::ScrolledWindow(undef, undef);
+ $w->set_policy('automatic', 'automatic');
+ member(ref $W, qw(Gtk::CList)) ?
+ $w->add($W) :
+ $w->add_with_viewport($W);
+ $W->show;
+ $w
+ }
}
sub create_menu($@) {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index eb5f02a0a..2d50d8712 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -19,7 +19,7 @@ $size_correction_ratio = 1.04;
sub Package {
my ($packages, $name) = @_;
- $packages->{$name} or log::l("unknown package $name") && undef;
+ $packages->{$name} or log::l("unknown package `$name'") && undef;
}
sub select($$;$) {
@@ -28,9 +28,8 @@ sub select($$;$) {
$p->{base} ||= $base;
$p->{selected} = -1; #- selected by user
my %l; @l{@{$p->{deps} || die "missing deps file"}} = ();
- while (do { while (($n, $v) = each %l) { last if !defined $v; } $n }) {
+ while (do { my %l = %l; while (($n, $v) = each %l) { last if $v != 1; } $n }) {
$l{$n} = 1;
- $n =~ /|/ and $n = first(split '\|', $n); #-TODO better handling of choice
my $i = Package($packages, $n) or next;
$i->{base} ||= $base;
$i->{deps} or log::l("missing deps for $n");
@@ -39,6 +38,7 @@ sub select($$;$) {
}
$i->{selected}++ unless $i->{selected} == -1;
}
+ 1;
}
sub unselect($$;$) {
my ($packages, $p, $size) = @_;
@@ -139,7 +139,7 @@ sub getDeps($) {
my $f = install_any::getFile("depslist") or die "can't find dependencies list";
foreach (<$f>) {
my ($name, $size, @deps) = split;
- ($name, @deps) = map { chop_version($_) } ($name, @deps);
+ ($name, @deps) = map { chop_version(first(split '\|')) } ($name, @deps); #-TODO better handling of choice
$packages->{$name} or next;
$packages->{$name}{size} = $size;
$packages->{$name}{deps} = \@deps;
diff --git a/perl-install/share/themes-blackwhite.rc b/perl-install/share/themes-blackwhite.rc
index b662185fb..a370637eb 100644
--- a/perl-install/share/themes-blackwhite.rc
+++ b/perl-install/share/themes-blackwhite.rc
@@ -1,14 +1,18 @@
style "any"
{
+ base[NORMAL] = { 0.67, 0.67, 0.67 }
bg[NORMAL] = { 0.67, 0.67, 0.67 }
+ bg[INSENSITIVE] = { 0.67, 0.67, 0.67 }
+ base[INSENSITIVE]={ 0.67, 0.67, 0.67 }
bg[ACTIVE] = { 0, 0, 0 }
bg[PRELIGHT] = { 0, 0, 0 }
- bg[INSENSITIVE] = { 0, 0, 0 }
+ text[NORMAL] = { 1.0, 1.0, 1.0 }
fg[NORMAL] = { 1.0, 1.0, 1.0 }
fg[ACTIVE] = { 1.0, 1.0, 1.0 }
fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
fg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
+ text[INSENSITIVE]={ 1.0, 1.0, 1.0 }
}
style "entry"
@@ -21,7 +25,7 @@ style "entry"
fg[SELECTED] = { 1.0, 1.0, 1.0 }
}
-style "button"
+style "button" = "any"
{
bg[NORMAL] = { 1.0, 1.0, 1.0 }
fg[NORMAL] = { 0, 0, 0 }
@@ -36,8 +40,8 @@ style "background"
}
widget_class "*" style "any"
-widget_class "*GtkEntry*" style "entry"
widget_class "*GtkSpin*" style "entry"
+widget_class "*GtkEntry*" style "entry"
widget_class "*Gtk*List*" style "entry"
widget "*GtkButton*" style "button"
widget "*background*" style "background"
diff --git a/perl-install/share/themes-blue.rc b/perl-install/share/themes-blue.rc
index 2db67f43b..291c5be2e 100644
--- a/perl-install/share/themes-blue.rc
+++ b/perl-install/share/themes-blue.rc
@@ -1,22 +1,25 @@
style "any"
{
+ base[NORMAL] = { 0, 0, 0.67 }
bg[NORMAL] = { 0, 0, 0.67 }
+ bg[INSENSITIVE] = { 0, 0, 0.67 }
+ base[INSENSITIVE]={ 0, 0, 0.67 }
bg[ACTIVE] = { 0, 0.67, 1.0 }
bg[PRELIGHT] = { 0, 0, 1.0 }
- bg[INSENSITIVE] = { 1.0, 0, 0.67 }
+ text[NORMAL] = { 1.0, 1.0, 1.0 }
fg[NORMAL] = { 1.0, 1.0, 1.0 }
+ fg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
+ text[INSENSITIVE]={ 1.0, 1.0, 1.0 }
fg[ACTIVE] = { 1.0, 1.0, 1.0 }
fg[PRELIGHT] = { 1.0, 1.0, 1.0 }
- fg[INSENSITIVE] = { 1.0, 1.0, 1.0 }
-
}
style "entry"
{
base[NORMAL] = { 0, 1.0, 1.0 }
base[ACTIVE] = { 0, 1.0, 1.0 }
- fg[NORMAL] = { 0.67, 0, 0.67 }
+ fg[NORMAL] = { 0.67, 0, 0.67 }
bg[SELECTED] = { 1.0, 1.0, 1.0 }
fg[SELECTED] = { 0, 0, 1.0 }
@@ -24,6 +27,10 @@ style "entry"
style "button" = "any"
{
+ bg[NORMAL] = { 0, 0, 1.0 }
+ fg[NORMAL] = { 1.0, 1.0, 1.0 }
+ bg[PRELIGHT] = { 0, 0, 1.0 }
+ fg[PRELIGHT] = { 0, 1.0, 1.0 }
}
style "background"
@@ -33,8 +40,8 @@ style "background"
}
widget_class "*" style "any"
-widget_class "*GtkEntry*" style "entry"
widget_class "*GtkSpin*" style "entry"
+widget_class "*GtkEntry*" style "entry"
widget_class "*Gtk*List*" style "entry"
widget "*GtkButton*" style "button"
widget "*background*" style "background"
diff --git a/perl-install/share/themes-savane.rc b/perl-install/share/themes-savane.rc
index 52845bf94..123a523cc 100644
--- a/perl-install/share/themes-savane.rc
+++ b/perl-install/share/themes-savane.rc
@@ -1,14 +1,18 @@
style "any"
{
- bg[NORMAL] = { 0.67, 0.33, 0 }
- bg[ACTIVE] = { 1.0, 0.67, 0 }
- bg[PRELIGHT] = { 1.0, 1.0, 0 }
- bg[INSENSITIVE] = { 1.0, 0, 0.67 }
+ base[NORMAL] = { 0.67, 0.33, 0 }
+ bg[NORMAL] = { 0.67, 0.33, 0 }
+ bg[INSENSITIVE] = { 0.67, 0.33, 0 }
+ base[INSENSITIVE]={ 0.67, 0.33, 0 }
+ bg[ACTIVE] = { 1.0, 0.67, 0 }
+ bg[PRELIGHT] = { 1.0, 1.0, 0 }
- fg[NORMAL] = { 1.0, 1.0, 1.0 }
- fg[ACTIVE] = { 0, 0, 0 }
- fg[PRELIGHT] = { 0, 0, 0 }
- fg[INSENSITIVE] = { 0, 0, 0 }
+ text[NORMAL] = { 1.0, 1.0, 1.0 }
+ fg[NORMAL] = { 1.0, 1.0, 1.0 }
+ fg[ACTIVE] = { 0, 0, 0 }
+ fg[PRELIGHT] = { 0, 0, 0 }
+ fg[INSENSITIVE] = { 0, 0, 0 }
+ text[INSENSITIVE]={ 0, 0, 0 }
}
style "entry"
@@ -21,7 +25,7 @@ style "entry"
fg[SELECTED] = { 0.67, 0.33, 0 }
}
-style "button"
+style "button" = "any"
{
bg[NORMAL] = { 1.0, 0.67, 0 }
fg[NORMAL] = { 0, 0, 0 }
@@ -36,8 +40,8 @@ style "background"
}
widget_class "*" style "any"
-widget_class "*GtkEntry*" style "entry"
widget_class "*GtkSpin*" style "entry"
+widget_class "*GtkEntry*" style "entry"
widget_class "*Gtk*List*" style "entry"
widget "*GtkButton*" style "button"
widget "*background*" style "background"