summaryrefslogtreecommitdiffstats
path: root/perl-install/install/gtk.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-22 13:12:49 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-22 13:12:49 +0000
commit4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea (patch)
tree5ce522ed8bd39ce3e04f1efcf5bcea0f3f157051 /perl-install/install/gtk.pm
parent8d7214a403d87ae7bc92d35319de25b3dd56ac38 (diff)
downloaddrakx-4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea.tar
drakx-4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea.tar.gz
drakx-4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea.tar.bz2
drakx-4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea.tar.xz
drakx-4e51a3864c6e4ddf9fb0f423d678e6fff3ea8aea.zip
(create_steps_window,update_steps_position) use the new widget in
order to render the sidepanel
Diffstat (limited to 'perl-install/install/gtk.pm')
-rw-r--r--perl-install/install/gtk.pm31
1 files changed, 11 insertions, 20 deletions
diff --git a/perl-install/install/gtk.pm b/perl-install/install/gtk.pm
index 6447076b0..8f2a74785 100644
--- a/perl-install/install/gtk.pm
+++ b/perl-install/install/gtk.pm
@@ -135,26 +135,11 @@ sub create_steps_window {
}
my $offset = 10;
- my $height = 600;
$o->{steps_widget} =
- gtknew('Fixed', widget_name => 'Steps', pixbuf_file => 'left-background',
- has_window => 1, x => 0, y => 145, height => $height, width => $::stepswidth, # -1
- child => gtknew('VBox', spacing => 6, width => ($::stepswidth - $offset), children_tight => \@l));
-
- # prevent logo to be tiled (do mosazic style rendering):
- $o->{steps_widget}->put(gtknew('Image', file => 'left-background-filler.png'), 0, $height);
-
- $o->{steps_widget}->put(
- # FIXME: not RTL compliant (lang::text_direction_rtl() ? ...)
- gtknew('VBox', height => $::rootheight,
- children => [
- 0, gtknew('Image', file => 'left-top-corner'),
- (map { (1, gtknew('Image', file => 'left-border')) } 1 .. $::rootheight),
- 0, gtknew('Image', file => 'left-bottom-corner'),
- ]),
- $::stepswidth - 21, 0);
-
- $o->{steps_widget}->show;
+ gtknew('MDV_Notebook', widget_name => 'Steps', children => [
+ # 145 is the vertical offset in order to be below the actual logo:
+ [ gtknew('VBox', spacing => 6, width => ($::stepswidth - $offset), children_tight => \@l), 0, 145 ]
+ ]);
$root_window->add(
$o->{steps_window} =
@@ -168,6 +153,9 @@ sub create_steps_window {
);
$root_window->show_all;
+
+ # hide default selection since its position is bogus:
+ $o->{steps_widget}->hide_selection;
}
sub update_steps_position {
@@ -177,7 +165,10 @@ sub update_steps_position {
foreach (@{$o->{orderedSteps}}) {
exists $steps{steps}{$_} or next;
if ($o->{steps}{$_}{entered} && !$o->{steps}{$_}{done}) {
- $steps{steps}{$_}{img}->set_from_pixbuf($steps{on});
+ # we need to flush the X queue since else we got a temporary Y position of -1 when switching locales:
+ mygtk2::flush(); #- for auto_installs which never go through the Gtk2 main loop
+ $o->{steps_widget}->move_selection($steps{steps}{$_}{text}->allocation->y);
+
if ($last_step) {
$steps{steps}{$last_step}{img}->set_from_pixbuf($steps{done});
}