diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2005-07-27 04:20:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2005-07-27 04:20:49 +0000 |
commit | e6d2db3754c2e3ab047470fe06111c681528b734 (patch) | |
tree | 5a5aa13c480dcc04479d444df7431ff9a0d3c736 /perl-install/ugtk2.pm | |
parent | e24272a642b3717cca1b84514032f2af39c94815 (diff) | |
download | drakx-backup-do-not-use-e6d2db3754c2e3ab047470fe06111c681528b734.tar drakx-backup-do-not-use-e6d2db3754c2e3ab047470fe06111c681528b734.tar.gz drakx-backup-do-not-use-e6d2db3754c2e3ab047470fe06111c681528b734.tar.bz2 drakx-backup-do-not-use-e6d2db3754c2e3ab047470fe06111c681528b734.tar.xz drakx-backup-do-not-use-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/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 9 |
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 => [ |