diff options
author | damien <damien@mandriva.com> | 2002-01-17 09:54:12 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2002-01-17 09:54:12 +0000 |
commit | 681f19024f255a1ebc18d7ddee17622887bb94eb (patch) | |
tree | 57809a641648736e93cb8861883ca0eece4b7962 | |
parent | 2d03c9d1c7e5eb6b5bb0fd360ff5c809ec259c66 (diff) | |
download | drakx-backup-do-not-use-681f19024f255a1ebc18d7ddee17622887bb94eb.tar drakx-backup-do-not-use-681f19024f255a1ebc18d7ddee17622887bb94eb.tar.gz drakx-backup-do-not-use-681f19024f255a1ebc18d7ddee17622887bb94eb.tar.bz2 drakx-backup-do-not-use-681f19024f255a1ebc18d7ddee17622887bb94eb.tar.xz drakx-backup-do-not-use-681f19024f255a1ebc18d7ddee17622887bb94eb.zip |
added timeout for redrawing icon widget
-rw-r--r-- | perl-install/my_gtk.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index ef9928839..6cfb501ec 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -542,11 +542,15 @@ sub gtkicons_labels_widget { $fixed->put($_, 75, 65); $i++; } + my $timeout; $fixed->signal_connect(expose_event => sub { my ($fx, $fy) = ($fixed->allocation->[2], $fixed->allocation->[3]); - foreach (compute($fx, $fy, 40, 30, 5, @tab)) { - $fixed->move(@$_); - } + defined($timeout) or $timeout = Gtk->timeout_add(100, sub { + $fixed->move(@$_) foreach compute_icons($fx, $fy, 40, 30, 5, @tab); + Gtk->timeout_remove($timeout); + undef $timeout; + 0; + }); }); $fixed->signal_connect( realize => sub { $fixed->window->set_back_pixmap($background, 0) }); @@ -555,7 +559,7 @@ sub gtkicons_labels_widget { $fixed; } -sub compute { +sub compute_icons { my ($fx, $fy, $decx, $decy, $interstice, @tab) = @_; my $nb = $#tab; my $nb_sav = $nb; |