diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-12-09 09:29:59 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-12-09 09:29:59 +0000 |
commit | 64c8682f1f937f09f08263416a5169333753b4ef (patch) | |
tree | 9804dede4a01e41e849c8bb094b71dd5c73447e3 /perl-install/standalone/net_monitor | |
parent | 2baa59a821300031414763affd66f1a7bc66edaa (diff) | |
download | drakx-backup-do-not-use-64c8682f1f937f09f08263416a5169333753b4ef.tar drakx-backup-do-not-use-64c8682f1f937f09f08263416a5169333753b4ef.tar.gz drakx-backup-do-not-use-64c8682f1f937f09f08263416a5169333753b4ef.tar.bz2 drakx-backup-do-not-use-64c8682f1f937f09f08263416a5169333753b4ef.tar.xz drakx-backup-do-not-use-64c8682f1f937f09f08263416a5169333753b4ef.zip |
handle multiple interfaces: let's have a buffer pixmap per network
interface
Diffstat (limited to 'perl-install/standalone/net_monitor')
-rwxr-xr-x | perl-install/standalone/net_monitor | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index 755ce6c73..4a4a8b135 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -384,10 +384,10 @@ sub update() { $notebook->set_current_page($notebook->page_num($page)); $monitor->{$intf}{page} = $notebook->page_num($page); $darea->{$intf}->realize; - $pixmap = Gtk2::Gdk::Pixmap->new($darea->{$intf}->window, $width, $height, $darea->{$intf}->window->get_depth); + $pixmap->{$intf} = Gtk2::Gdk::Pixmap->new($darea->{$intf}->window, $width, $height, $darea->{$intf}->window->get_depth); $monitor->{$intf}{referencer} = $monitor->{$intf}{val}[0]; $monitor->{$intf}{referencet} = $monitor->{$intf}{val}[8]; - $pixmap->draw_rectangle($darea->{$intf}->style->black_gc, 1, 0, 0, $width, $height); + $pixmap->{$intf}->draw_rectangle($darea->{$intf}->style->black_gc, 1, 0, 0, $width, $height); $darea->{$intf}->signal_connect(motion_notify_event => sub { my (undef, $e) = @_; my $x = $e->x - 50; @@ -401,7 +401,7 @@ sub update() { $measure_t->set_label(formatXiB($transmitted)); }); $darea->{$intf}->signal_connect(expose_event => sub { - $darea->{$intf}->window->draw_drawable($darea->{$intf}->style->bg_gc('normal'), $pixmap, 0, 0, 0, 0, $width, $height); + $darea->{$intf}->window->draw_drawable($darea->{$intf}->style->bg_gc('normal'), $pixmap->{$intf}, 0, 0, 0, 0, $width, $height); }); } } @@ -440,6 +440,7 @@ sub in_ifconfig { sub draw_monitor { my ($o, $intf) = @_; defined $darea->{$intf} or return; + my $pixmap = $pixmap->{$intf}; $pixmap->draw_rectangle($darea->{$intf}->style->black_gc, 1, 0, 0, $width, $height); my $maxr = 0; foreach (@{$o->{stack_r}}) { $maxr = $_ if $_ > $maxr } |