summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-22 13:14:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-22 13:14:24 +0000
commitb19b34a08590f33973ffc9449accc21cdb1adbba (patch)
treec9f1ba71ae1588e87ab4b3b430aa2e4528c47aa8
parentae35def9865df3f82303a8c72c41d0b966651f5a (diff)
downloaddrakx-backup-do-not-use-b19b34a08590f33973ffc9449accc21cdb1adbba.tar
drakx-backup-do-not-use-b19b34a08590f33973ffc9449accc21cdb1adbba.tar.gz
drakx-backup-do-not-use-b19b34a08590f33973ffc9449accc21cdb1adbba.tar.bz2
drakx-backup-do-not-use-b19b34a08590f33973ffc9449accc21cdb1adbba.tar.xz
drakx-backup-do-not-use-b19b34a08590f33973ffc9449accc21cdb1adbba.zip
no_comment
-rw-r--r--perl-install/Xconfigurator.pm15
-rw-r--r--perl-install/common.pm2
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/install_any.pm7
-rw-r--r--perl-install/install_steps_gtk.pm9
-rw-r--r--perl-install/my_gtk.pm14
6 files changed, 29 insertions, 20 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index c1dcefcfa..755678dcd 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -225,7 +225,8 @@ Do You want to use XFree 3.3 instead of XFree 4.0?"), 1) and $card->{driver} = '
unless ($card->{type}) {
$card->{flags}{noclockprobe} = member($card->{server}, qw(I128 S3 S3V Mach64));
}
- $card->{options}{DPMS} = 1;
+ $card->{options_xf3}{power_saver} = 1;
+ $card->{options_xf4}{DPMS} = 1;
$card->{flags}{needVideoRam} and
$card->{memory} ||=
@@ -411,7 +412,7 @@ sub testFinalConfig($;$$) {
$ENV{DISPLAY} = ":9";
- gtkset_mousecursor(68);
+ gtkset_mousecursor_normal();
gtkset_background(200 * 257, 210 * 257, 210 * 257);
my ($h, $w) = Gtk::Gdk::Window->new_foreign(Gtk::Gdk->ROOT_WINDOW)->get_size;
$my_gtk::force_position = [ $w / 3, $h / 2.4 ];
@@ -885,8 +886,14 @@ EndSection
# Option "sw_cursor"
);
- print F map { (!$O->{options}{$_} && '#') . qq( Option "$_"\n) } keys %{$O->{options} || {}};
- print G map { (!$O->{options}{$_} && '#') . qq( Option "$_"\n) } keys %{$O->{options} || {}};
+ my $p = sub {
+ my ($l) = @_;
+ map { (!$l->{$_} && '#') . qq( Option "$_"\n) } keys %{$l || {}};
+ };
+ print F $p->('options');
+ print F $p->('options_xf3');
+ print G $p->('options');
+ print G $p->('options_xf4');
print F "EndSection\n\n\n";
print G "EndSection\n\n\n";
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 89d41b516..1be6d4f95 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -595,7 +595,7 @@ sub df {
my ($blocksize, $size, $free);
my $buf = ' ' x 20000;
syscall_('statfs', $mntpoint, $buf) or return;
- (undef, $blocksize, $size, undef, $free, undef) = unpack "L2L4", $buf;
+ (undef, $blocksize, $size, $free, undef, undef) = unpack "L6", $buf;
map { $_ * ($blocksize / 1024) } $size, $free;
}
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index ece25b600..9185b980b 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -291,7 +291,7 @@ sub mount_all($;$$) {
log::l("mounting all filesystems");
#- order mount by alphabetical ordre, that way / < /home < /home/httpd...
- foreach (sort { $a->{mntpoint} cmp $b->{mntpoint} } grep { $_->{mntpoint} } @$fstab) {
+ foreach (sort { $a->{mntpoint} cmp $b->{mntpoint} } grep { $_->{mntpoint} && isTrueFS($_) } @$fstab) {
mount_part($_, $prefix);
}
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 3c5c6801c..38ca70d54 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -113,7 +113,7 @@ sub errorOpeningFile($) {
}
sub getFile {
my ($f, $method) = @_;
- my $rel = install_any::relGetFile($f);
+ my $rel = relGetFile($f);
log::l("getFile $f ($method) relGetFile $rel");
do {
if ($method =~ /crypto/i) {
@@ -133,10 +133,9 @@ sub getFile {
my $f2 = "$postinstall_rpms/$f";
$f2 = "/tmp/rhimage/$rel" unless -e $f2;
log::l("local getFile $f2");
- open GETFILE, $f2;
- *GETFILE;
+ open GETFILE, $f2 and *GETFILE;
}
- } or errorOpeningFile($f);
+ } || errorOpeningFile($f);
}
sub getAndSaveFile {
my ($file, $local) = @_;
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 8d639f105..20d69018b 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -449,11 +449,12 @@ sub installPackages {
$progress_total,
'',
gtkadd(create_hbox(),
- gtksignal_connect(new Gtk::Button(_("Cancel")),
- clicked => sub { $pkgs::cancel_install = 1 })),
+ my $cancel = new Gtk::Button(_("Cancel"))),
));
- $msg->set(_("Preparing installation"));
$w->sync;
+ $msg->set(_("Preparing installation"));
+ gtkset_mousecursor_normal($cancel->window);
+ $cancel->signal_connect(clicked => sub { $pkgs::cancel_install = 1 });
my $oldInstallCallback = \&pkgs::installCallback;
local *pkgs::installCallback = sub {
@@ -541,8 +542,6 @@ sub install_theme {
my ($o, $theme) = @_;
$o->{theme} = $theme || $o->{theme} || $themes[0];
- gtkset_mousecursor(68);
-
load_rc($_) foreach "themes-$o->{theme}", "install", "themes";
if (my ($font, $font2) = lang::get_x_fontset($o->{lang})) {
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 4cb2e4657..6c94f4ca8 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -10,7 +10,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $border @grabbed);
@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 create_treeitem) ],
- wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkpack__ gtkappend gtkadd gtktext_insert gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_background gtkset_default_fontset gtkxpm gtkcreate_xpm) ],
+ wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkpack__ gtkappend gtkadd gtktext_insert gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_mousecursor_normal gtkset_mousecursor_wait gtkset_background gtkset_default_fontset gtkxpm gtkcreate_xpm) ],
ask => [ qw(ask_warn ask_okcancel ask_yesorno ask_from_entry ask_from_list ask_file) ],
);
$EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ];
@@ -46,6 +46,7 @@ sub new {
}
sub main($;$) {
my ($o, $f) = @_;
+ gtkset_mousecursor_normal();
$o->show;
do {
@@ -65,6 +66,7 @@ sub destroy($) {
(pop @grabbed)->grab_remove if @grabbed;
top(@grabbed)->grab_add if @grabbed;
$o->{rwindow}->destroy;
+ gtkset_mousecursor_wait();
flush();
}
sub DESTROY { goto &destroy }
@@ -73,7 +75,7 @@ sub sync($) {
show($o);
flush();
}
-sub flush(;$) {
+sub flush {
Gtk->main_iteration while Gtk->events_pending;
}
sub bigsize($) {
@@ -155,10 +157,12 @@ sub gtkcolor($$$) {
gtkroot()->get_colormap->color_alloc($color);
}
-sub gtkset_mousecursor($) {
- my ($type) = @_;
- gtkroot()->set_cursor(Gtk::Gdk::Cursor->new($type));
+sub gtkset_mousecursor {
+ my ($type, $w) = @_;
+ ($w || gtkroot())->set_cursor(Gtk::Gdk::Cursor->new($type));
}
+sub gtkset_mousecursor_normal { gtkset_mousecursor(68, @_) }
+sub gtkset_mousecursor_wait { gtkset_mousecursor(150, @_) }
sub gtkset_background {
my ($r, $g, $b) = @_;