summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-04-06 04:22:51 +0000
committerdamien <damien@mandriva.com>2001-04-06 04:22:51 +0000
commited6f784bdb25a54ed065d29b195bc2d3ac32389a (patch)
tree8c730eca33edaaa28f6ee3a96e320380f1a5969e /perl-install
parentef9a90a2d0681a669dbf166077bfc3ece445029b (diff)
downloaddrakx-backup-do-not-use-ed6f784bdb25a54ed065d29b195bc2d3ac32389a.tar
drakx-backup-do-not-use-ed6f784bdb25a54ed065d29b195bc2d3ac32389a.tar.gz
drakx-backup-do-not-use-ed6f784bdb25a54ed065d29b195bc2d3ac32389a.tar.bz2
drakx-backup-do-not-use-ed6f784bdb25a54ed065d29b195bc2d3ac32389a.tar.xz
drakx-backup-do-not-use-ed6f784bdb25a54ed065d29b195bc2d3ac32389a.zip
updated
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/net_monitor18
1 files changed, 13 insertions, 5 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index d4f7a9350..5a3e648d3 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -73,7 +73,7 @@ my $time_tag = Gtk->timeout_add(1000, sub {
my $refr = $monitor->{$intf}{referencer};
my $reft = $monitor->{$intf}{referencet};
$monitor->{sr} += $recv - $refr;
- $monitor->{st} += $transmit - reft;
+ $monitor->{st} += $transmit - $reft;
push(@{$monitor->{$intf}{stack_r}}, $recv - $refr);
shift @{$monitor->{$intf}{stack_r}} if @{$monitor->{$intf}{stack_r}} > 300;
$labelr->set(formatXiB($recv - $monitor->{$intf}{initialr}));
@@ -89,7 +89,7 @@ my $time_tag = Gtk->timeout_add(1000, sub {
$monitor->{$_} = 0 foreach ('sr', 'st');
1;
});
-my $time_tag = Gtk->timeout_add(5000, \&update);
+my $time_tag2 = Gtk->timeout_add(5000, \&update);
Gtk->main;
Gtk->exit(0);
@@ -158,13 +158,21 @@ sub draw_monitor {
$ech = $maxr + $maxt;
$ech == 0 and $ech = 1;
my $step=0;
+ my $color = my_gtk::gtkcolor(65535, 65535, 655);
+
+ my $gc = new Gtk::Gdk::GC($o->{darea}->window);
+ $gc->set_foreground($color); #$color
+
+#$o->{darea}->get_style->copy();
+# print "\n##\n" . Data::Dumper->Dump([$gc],['$gc']) . "\n##\n";
+# $o->{darea}->set_style ($style);
foreach (@{$o->{stack_t}}) {
- $o->{pixmap_db}->draw_rectangle($o->{darea}->style->white_gc, 1, $step, 0, 1, $_*150/$ech);
+ $o->{pixmap_db}->draw_rectangle($gc, 1, $step, 0, 1, $_*150/$ech);
$step++;
}
- my $step=0;
+ $step=0;
foreach (@{$o->{stack_r}}) {
- $o->{pixmap_db}->draw_rectangle($o->{darea}->style->white_gc, 1, $step, 151-$_*150/$ech, 1, $_*150/$ech);
+ $o->{pixmap_db}->draw_rectangle($gc, 1, $step, 151-$_*150/$ech, 1, $_*150/$ech);
$step++;
}
$o->{darea}->draw(undef);