diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-08-16 01:58:52 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-08-16 01:58:52 +0000 |
commit | d076acea4a244bf2b4209920dc99916443502bdd (patch) | |
tree | d00257103e82e0b517732d7ed7b23c27e59c3ffd /urpmi | |
parent | 7f7047b4638da10d2fd8923edfe1dcd5721ab194 (diff) | |
download | urpmi-d076acea4a244bf2b4209920dc99916443502bdd.tar urpmi-d076acea4a244bf2b4209920dc99916443502bdd.tar.gz urpmi-d076acea4a244bf2b4209920dc99916443502bdd.tar.bz2 urpmi-d076acea4a244bf2b4209920dc99916443502bdd.tar.xz urpmi-d076acea4a244bf2b4209920dc99916443502bdd.zip |
Optionally use zenity instead of gchooser if found, it's much prettier
Diffstat (limited to 'urpmi')
-rwxr-xr-x | urpmi | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -400,8 +400,14 @@ sub ask_choice { if (@l > 1 && !$urpm->{options}{auto}) { my $msg = N("One of the following packages is needed:"); if ($urpm::args::options{X}) { - system(qq(gchooser "$msg" @l)); - $n = $? >> 8 or die "\n"; + if (-x '/usr/bin/zenity') { + my $choice = qx(zenity --list --column=RPM --text="$msg" @l); + chomp $choice; + each_index { $_ eq $choice and $n = $::i } @l; + } else { + system(qq(gchooser "$msg" @l)); + $n = $? >> 8 or die "\n"; + } } else { message($msg); my $i = 0; foreach (@l) { message(" " . ++$i . "- $_") } |