diff options
-rw-r--r-- | perl-install/install_gtk.pm | 12 | ||||
-rw-r--r-- | perl-install/lang.pm | 3 |
2 files changed, 13 insertions, 2 deletions
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}}) { diff --git a/perl-install/lang.pm b/perl-install/lang.pm index d642106f5..772b443a1 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -118,6 +118,9 @@ sub list_langs { $options{exclude_non_installed} ? grep { -e "/usr/share/locale/".l2locale($_)."/LC_CTYPE" } @l : @l; } +sub text_direction_rtl { N("default:LTR") eq "default:RTL" } + + #- key: country name (that should be YY in xx_YY locale) #- [0]: country name in natural language #- [1]: default locale for that country |