summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-07-27 04:20:49 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-07-27 04:20:49 +0000
commite6d2db3754c2e3ab047470fe06111c681528b734 (patch)
tree5a5aa13c480dcc04479d444df7431ff9a0d3c736 /perl-install
parente24272a642b3717cca1b84514032f2af39c94815 (diff)
downloaddrakx-e6d2db3754c2e3ab047470fe06111c681528b734.tar
drakx-e6d2db3754c2e3ab047470fe06111c681528b734.tar.gz
drakx-e6d2db3754c2e3ab047470fe06111c681528b734.tar.bz2
drakx-e6d2db3754c2e3ab047470fe06111c681528b734.tar.xz
drakx-e6d2db3754c2e3ab047470fe06111c681528b734.zip
(create_okcancel) enforce GNOME button order when not under KDE (aka rollback
old IHM team request since they never achieved to complete the plan ie enforcing the same button order in both GNOME and KDE)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ugtk2.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 99e4560f4..463adbc3b 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -495,6 +495,7 @@ sub create_packtable {
gtkset_border_width($w, $::isInstall ? 3 : 10);
}
+my $wm_is_kde;
sub create_okcancel {
my ($w, $o_ok, $o_cancel, $_o_spread, @other) = @_;
# @other is a list of extra buttons (usually help (eg: XFdrake/drakx caller) or advanced (eg: interactive caller) button)
@@ -514,6 +515,10 @@ sub create_okcancel {
sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk2->main_quit });
}
$w->{wizcancel} = gtknew('Button', text => N("Cancel"), clicked => sub { die 'wizcancel' }) if $::isWizard && !$::isInstall;
+ if (!defined $wm_is_kde) {
+ require any;
+ $wm_is_kde = !$::isInstall && any::running_window_manager() eq "kwin" || 0;
+ }
my $f = sub { $w->{buttons}{$_[0][0]} = gtknew('Button', text => $_[0][0], clicked => $_[0][1]) };
my @left = ((map { $f->($_) } grep { $_->[2] && !$_->[3] } @other),
map { $f->($_) } grep { !$_->[2] && !$_->[3] } @other);
@@ -528,9 +533,9 @@ sub create_okcancel {
push @right, $bprev, $bok;
} else {
# normal mode: cancel/ok button follow GNOME's HIG
- unshift @left, $bprev;
+ unshift @left, ($wm_is_kde ? $bok : $bprev);
push @left, gtknew('Label') if $ok && $cancel; # space buttons but if there's only one button
- push @right, $bok;
+ push @right, ($wm_is_kde ? $bprev : $bok);
}
gtknew('VBox', spacing => 5, children_loose => [