summaryrefslogtreecommitdiffstats
path: root/perl-install/install_gtk.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-02-18 19:21:29 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-02-18 19:21:29 +0000
commitafcb914c8de131b99656f99a6bbef4650c516521 (patch)
tree84d1446c3967ecf5b8d1b80c06cfa781fdaff1c7 /perl-install/install_gtk.pm
parent011dac42ace99bbcc235dd47bff81cacff7f568a (diff)
downloaddrakx-afcb914c8de131b99656f99a6bbef4650c516521.tar
drakx-afcb914c8de131b99656f99a6bbef4650c516521.tar.gz
drakx-afcb914c8de131b99656f99a6bbef4650c516521.tar.bz2
drakx-afcb914c8de131b99656f99a6bbef4650c516521.tar.xz
drakx-afcb914c8de131b99656f99a6bbef4650c516521.zip
reposition main and steps window when in RTL language
Diffstat (limited to 'perl-install/install_gtk.pm')
-rw-r--r--perl-install/install_gtk.pm12
1 files changed, 10 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}}) {