summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-25 08:23:43 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-25 08:23:43 +0000
commit66ef81d8aa16b87a97dd75ac8ad0b29e679da499 (patch)
tree1f26025405ebbacde09b902417e416a84a1b4e53 /perl-install/ugtk.pm
parent8b1d4d4953b81b9a34b1092bffc257414bc48073 (diff)
downloaddrakx-66ef81d8aa16b87a97dd75ac8ad0b29e679da499.tar
drakx-66ef81d8aa16b87a97dd75ac8ad0b29e679da499.tar.gz
drakx-66ef81d8aa16b87a97dd75ac8ad0b29e679da499.tar.bz2
drakx-66ef81d8aa16b87a97dd75ac8ad0b29e679da499.tar.xz
drakx-66ef81d8aa16b87a97dd75ac8ad0b29e679da499.zip
- simplify mcc stuff
- prevent bad stacking of right icons in mcc at startup
Diffstat (limited to 'perl-install/ugtk.pm')
-rw-r--r--perl-install/ugtk.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm
index e33aec1ae..66b616eaa 100644
--- a/perl-install/ugtk.pm
+++ b/perl-install/ugtk.pm
@@ -541,7 +541,6 @@ sub gtkicons_labels_widget {
$y_round, $x_back2, $y_back2, $icon_width, $icon_height, $exec_func, $exec_hash) = @_;
my @tab;
- my $i = 0;
my $cursor_hand = new Gtk::Gdk::Cursor 60;
my $cursor_normal = new Gtk::Gdk::Cursor 68;
my @args = @$args;
@@ -599,15 +598,13 @@ sub gtkicons_labels_widget {
$exec_func->($tag, $exec_hash->{$label});
});
$darea->signal_connect(realize => sub { $darea->window->set_cursor($cursor_hand) });
- $tab[$i] = $darea;
- $i++;
+ push @tab, $darea;
}
my $fixed = new Gtk::Fixed;
foreach (@tab) { $fixed->put($_, 75, 65) }
my $w_ret = createScrolledWindow($fixed, undef, 'none');
- my $redraw_function;
- $redraw_function = sub {
- $fixed->move(@$_) foreach compute_icons($fixed->allocation->[2]-22, $fixed->allocation->[3], 40, 15, 20, @tab);
+ my $redraw_function = sub {
+ $fixed->move(@$_) foreach compute_icons($fixed->allocation->[2], $fixed->allocation->[3], 40, 15, 20, @tab);
};
$fixed->signal_connect(expose_event => $redraw_function);
$fixed->signal_connect(realize => sub { $fixed->window->set_back_pixmap($background, 0) });
@@ -863,8 +860,8 @@ sub compute_icons {
bcl_init:
@dx2 = undef;
bcl:
- @dx = map { $_->{dx} } @tab[$index..$index+$nb];
- $dy[$index] = max(map { $_->{dy} } @tab[$index..$index+$nb]);
+ @dx = map { $_->{dx} || 78 } @tab[$index..$index+$nb];
+ $dy[$index] = max(map { $_->{dy} || 89 } @tab[$index..$index+$nb]);
foreach (0..$#dx) {
if ($dx[$_] > $dx2[$_]) { $dx2[$_] = $dx[$_] } else { $dx[$_] = $dx2[$_] }
}