From afcb914c8de131b99656f99a6bbef4650c516521 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 18 Feb 2003 19:21:29 +0000 Subject: reposition main and steps window when in RTL language --- perl-install/install_gtk.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'perl-install/install_gtk.pm') diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index b4176c975..a1e68617b 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -66,6 +66,14 @@ sub load_rc { #------------------------------------------------------------------------------ sub load_font { my ($o) = @_; + + if (lang::text_direction_rtl()) { + Gtk2::Widget->set_default_direction('rtl'); + my ($x, $y) = $::WizardWindow->get_position; + my ($width) = $::WizardWindow->get_size; + $::WizardWindow->move($::rootwidth - $width - $x, $y); + } + Gtk2::Rc->parse_string(q( style "default-font" { @@ -121,12 +129,12 @@ sub create_steps_window { $o->{steps_window} and $o->{steps_window}->destroy; my $w = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); - $w->{rwindow}->set_uposition(8, 160); + $w->{rwindow}->set_uposition(lang::text_direction_rtl() ? ($::rootwidth - $::stepswidth - 8) : 8, 160); $w->{rwindow}->set_size_request($::stepswidth, -1); $w->{rwindow}->set_name('Steps'); $w->{rwindow}->set_title('skip'); - $steps{$_} = gtkcreate_pixbuf("steps_$_") foreach qw(on off); + $steps{$_} ||= gtkcreate_pixbuf("steps_$_") foreach qw(on off); gtkpack__(my $vb = Gtk2::VBox->new(0, 3), $steps{inst} = Gtk2::Label->new(N("System installation")), ''); foreach (grep { !eval $o->{steps}{$_}{hidden} } @{$o->{orderedSteps}}) { -- cgit v1.2.1