summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authorStefan Siegel <siegel@linux-mandrake.com>2001-08-18 10:48:17 +0000
committerStefan Siegel <siegel@linux-mandrake.com>2001-08-18 10:48:17 +0000
commit743e70ab3923c7d008163f468bf4b7858014db82 (patch)
tree2af364c925d2d17cc0704f90c58c72b27cee7b6d /po
parent3e5fb86d3ed932ffbc34cb6744320697e12de664 (diff)
downloadurpmi-743e70ab3923c7d008163f468bf4b7858014db82.tar
urpmi-743e70ab3923c7d008163f468bf4b7858014db82.tar.gz
urpmi-743e70ab3923c7d008163f468bf4b7858014db82.tar.bz2
urpmi-743e70ab3923c7d008163f468bf4b7858014db82.tar.xz
urpmi-743e70ab3923c7d008163f468bf4b7858014db82.zip
new german version
Diffstat (limited to 'po')
-rw-r--r--po/de.po136
1 files changed, 73 insertions, 63 deletions
diff --git a/po/de.po b/po/de.po
index a9332735..ce7c7b04 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: urpmi 1.7\n"
"POT-Creation-Date: 2001-08-17 13:07+0200\n"
-"PO-Revision-Date: 2001-07-11 09:21+0200\n"
+"PO-Revision-Date: 2001-08-18 12:45+0200\n"
"Last-Translator: Stefan Siegel <siegel@linux-mandrake.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@@ -79,73 +79,79 @@ msgstr "Verwendung: rpmf [Optionen] <Datei>"
msgid ""
" --quiet - do not print tag name (default if no tag given on command"
msgstr ""
+" --quiet - Keine Parameter ausgeben (Standard, wenn kein Parameter"
#: po/placeholder.h:11
msgid " line, incompatible with interactive mode)."
-msgstr ""
+msgstr " in der Kommandozeile vorgegeben wurde)."
#: po/placeholder.h:12
msgid " --all - print all tags."
-msgstr ""
+msgstr " --all - Alle Parameter ausgeben."
#: po/placeholder.h:13
msgid ""
" --name - print tag name: rpm filename (assumed if no tag given on"
msgstr ""
+" --name - Ausgabe des Attributs „Name des RPMs“ (Dieses Attribut"
#: po/placeholder.h:14
msgid " command line but without package name)."
-msgstr ""
+msgstr " wird angenommen, wenn kein Parameter angegeben wird)"
#: po/placeholder.h:15
msgid " --group - print tag group: group."
-msgstr ""
+msgstr " --group - Ausgabe des Attributs „Gruppe“."
#: po/placeholder.h:16
msgid " --size - print tag size: size."
-msgstr ""
+msgstr " --size - Ausgabe des Attributs „Größe“."
#: po/placeholder.h:17
msgid " --serial - print tag serial: serial."
-msgstr ""
+msgstr " --serial - Ausgabe des Attributs „Seriennummer“."
#: po/placeholder.h:18
msgid " --summary - print tag summary: summary."
-msgstr ""
+msgstr " --summary - Ausgabe des Attributs „Zusammenfassung“."
#: po/placeholder.h:19
msgid " --description - print tag description: description."
-msgstr ""
+msgstr " --description - Ausgabe des Attributs „Beschreibung“."
#: po/placeholder.h:20
msgid " --provides - print tag provides: all provides (mutliple lines)."
-msgstr ""
+msgstr " --provides - Ausgabe des Attributs „Stellt zur Verfügung“ (mehrere\n"
+" Zeilen möglich)."
#: po/placeholder.h:21
msgid " --requires - print tag requires: all requires (multiple lines)."
-msgstr ""
+msgstr " --requires - Ausgabe des Attributs „Benötigt“ (mehrere Zeilen möglich)."
#: po/placeholder.h:22
msgid " --files - print tag files: all files (multiple lines)."
-msgstr ""
+msgstr " --files - Ausgabe des Attribus „Dateien“ (mehrere Zeilen möglich)."
#: po/placeholder.h:23
msgid ""
" --conflicts - print tag conflicts: all conflicts (multiple lines)."
-msgstr ""
+msgstr " --conflicts - Ausgabe des Attributs „Steht in Konflikt mit“ (mehrere\n"
+" Zeilen möglich)."
#: po/placeholder.h:24
msgid ""
" --obsoletes - print tag obsoletes: all obsoletes (multiple lines)."
-msgstr ""
+msgstr " --obsoletes - Ausgabe des Attributs „Macht überflüssig“ (mehrere Zeilen\n"
+" möglich)."
#: po/placeholder.h:25
msgid " --prereqs - print tag prereqs: all prereqs (multiple lines)."
-msgstr ""
+msgstr " --prereqs - Ausgabe des Attributs „Benötigt zur Installation“\n"
+" (mehrere Zeilen möglich)"
#: po/placeholder.h:27
msgid "try urpmf --help for more options"
-msgstr "Benutzen Sie urmpf --help für mehr Optionen"
+msgstr "Mit „urmpf --help“ erhatlen Sie weitere Optionen"
#: po/placeholder.h:28
msgid "urpmi is not installed"
@@ -154,32 +160,32 @@ msgstr "urpmi ist nicht installiert."
#: po/placeholder.h:29 urpm.pm:256
#, c-format
msgid "unable to write config file [%s]"
-msgstr ""
+msgstr "Die Konfigurationsdatei [%s] kann nicht geschrieben werden."
#: po/placeholder.h:30 urpm.pm:167
#, c-format
msgid "unable to use name \"%s\" for unamed medium because it is already used"
-msgstr ""
+msgstr "Sie können „%s“ nicht als Name für dieses Medium verwenden, da er bereits verwendet wird."
#: po/placeholder.h:31
-#, fuzzy, c-format
+#, c-format
msgid "nothing to write in list file for \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Für die Dateiliste von „%s“ muss nichts geschrieben werden."
#: po/placeholder.h:32 urpm.pm:216
#, c-format
msgid "unable to find list file for \"%s\", medium ignored"
-msgstr ""
+msgstr "Die Dateiliste für das Medium „%s“ wurde nicht gefunden, es wird ignoriert."
#: po/placeholder.h:33
-#, fuzzy, c-format
+#, c-format
msgid "unable to parse hdlist file of \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht aktualisieren.\n"
+msgstr "Die Struktur der HD-Liste von „%s“ ist nicht korrekt."
#: po/placeholder.h:34
-#, fuzzy, c-format
+#, c-format
msgid "nothing written in list file for \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Es wurde nichts in die Dateiliste von „%s“ geschrieben."
#: po/placeholder.h:35 urpm.pm:1747
#, c-format
@@ -191,12 +197,12 @@ msgstr ""
#: po/placeholder.h:39 urpm.pm:764
#, c-format
msgid "read provides file [%s]"
-msgstr ""
+msgstr "Lesen der Anbieter-Datei [%s]"
#: po/placeholder.h:40
-#, fuzzy, c-format
+#, c-format
msgid "trying to remove inexistant medium \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Ich versuche das nicht existierende Medium „%s“ zu entfernen."
#: po/placeholder.h:41 urpm.pm:1540
#, c-format
@@ -221,21 +227,21 @@ msgstr "Aushängen von „%s“"
#: po/placeholder.h:45
#, c-format
msgid "removing %d obsolete headers in cache"
-msgstr ""
+msgstr "Entferne %d veraltete Informationen aus dem Cache."
#: po/placeholder.h:46
-#, fuzzy, c-format
+#, c-format
msgid "no hdlist file found for medium \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht aktualisieren.\n"
+msgstr "Keine HD-Liste für das Medium „%s“ gefunden."
#: po/placeholder.h:47 urpm.pm:174
#, c-format
msgid "unable to take medium \"%s\" into account as no list file [%s] exists"
-msgstr ""
+msgstr "Es ist nicht möglich, das Medium „%s“ zu verwenden, da keine Dateilise [%s] existiert."
#: po/placeholder.h:48
msgid "keeping only files referenced in provides"
-msgstr ""
+msgstr "Nur Behalten der Dateien, die als Anbieter referenziert werden."
#: po/placeholder.h:49
#, fuzzy, c-format
@@ -245,12 +251,12 @@ msgstr "Ich kann das Medium „%s“ nicht aktualisieren.\n"
#: po/placeholder.h:50
#, c-format
msgid "found %d headers in cache"
-msgstr ""
+msgstr "%d Informationen im Cache gefunden."
#: po/placeholder.h:51 urpm.pm:761
-#, fuzzy, c-format
+#, c-format
msgid "unable to read provides file [%s]"
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Ich kann die Anbieter-Datei [%s] nicht lesen."
#: po/placeholder.h:52 urpm.pm:1827
#, c-format
@@ -260,27 +266,27 @@ msgstr ""
#: po/placeholder.h:53 urpm.pm:284
#, c-format
msgid "medium \"%s\" already exists"
-msgstr ""
+msgstr "Das Medium „%s“ existiert bereits."
#: po/placeholder.h:54 urpm.pm:268
#, c-format
msgid "write config file [%s]"
-msgstr ""
+msgstr "Schreiben der Konfigurationsdatei [%s]."
#: po/placeholder.h:55
-#, fuzzy, c-format
+#, c-format
msgid "unable to write list file of \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Ich kann die Dateiliste für „%s“ nicht schreiben."
#: po/placeholder.h:56 urpm.pm:1651
#, c-format
msgid "retrieving [%s]"
-msgstr ""
+msgstr "Holen von [%s]"
#: po/placeholder.h:57 urpm.pm:1653
#, c-format
msgid "wget of [%s] failed"
-msgstr ""
+msgstr "Wget von [%s] schlug fehl."
#: po/placeholder.h:58 urpm.pm:1012
#, c-format
@@ -295,7 +301,7 @@ msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
#: po/placeholder.h:60 urpm.pm:211
#, c-format
msgid "unable to find hdlist file for \"%s\", medium ignored"
-msgstr ""
+msgstr "Die hd-Liste für das Medium „%s“ wurde nicht gefunden, es wird ignoriert."
#: po/placeholder.h:61
#, fuzzy, c-format
@@ -309,12 +315,12 @@ msgstr "Berechnen der Abhängigkeiten"
#: po/placeholder.h:63 urpm.pm:793
#, c-format
msgid "write provides file [%s]"
-msgstr ""
+msgstr "Schreiben der Anbieter-Datei [%s]."
#: po/placeholder.h:64 urpm.pm:738
-#, fuzzy, c-format
+#, c-format
msgid "mounting %s"
-msgstr "Installiere %s\n"
+msgstr "Einhängen von „%s“"
#: po/placeholder.h:65 urpm.pm:161
#, c-format
@@ -322,16 +328,19 @@ msgid ""
"unable to take care of medium \"%s\" as list file is already used by another "
"medium"
msgstr ""
+"Das Medium „%s“ kann nicht verwendet werden, da die Dateiliste bereits "
+"von einem anderen Medium verwendet wird."
#: po/placeholder.h:66 urpm.pm:146
#, c-format
msgid "medium \"%s\" try to use an already used list, medium ignored"
-msgstr ""
+msgstr "Das Medium „%s“ versucht eine bereits verwendete Liste ebenfalls "
+"zu verwenden, es wird daher ignoriert."
#: po/placeholder.h:67
-#, fuzzy, c-format
+#, c-format
msgid "reading hdlist file [%s]"
-msgstr "Lesen der Depslist-Datei „%s“"
+msgstr "Lesen der HD-Liste [%s]"
#: po/placeholder.h:68 urpm.pm:798
#, c-format
@@ -344,19 +353,20 @@ msgid "read depslist file [%s]"
msgstr "Lesen der Depslist-Datei „%s“"
#: po/placeholder.h:70
-#, fuzzy, c-format
+#, c-format
msgid "trying to select inexistant medium \"%s\""
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Versuch, das nicht existierende Medium „%s“ auszuwählen."
#: po/placeholder.h:71 urpm.pm:1646
#, c-format
msgid "malformed input: [%s]"
-msgstr ""
+msgstr "Inkorrekte Eingabe: [%s]"
#: po/placeholder.h:72 urpm.pm:143
#, c-format
msgid "medium \"%s\" try to use an already used hdlist, medium ignored"
-msgstr ""
+msgstr "Das Medium „%s“ versucht eine bereits verwendete HD-Liste ebenfalls "
+"zu verwenden, es wird daher ignoriert."
#: po/placeholder.h:73 urpm.pm:1739
#, c-format
@@ -366,19 +376,19 @@ msgid ""
msgstr ""
#: po/placeholder.h:77 urpm.pm:790
-#, fuzzy, c-format
+#, c-format
msgid "unable to write provides file [%s]"
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Ich kann die Anbieter-Datei [%s] nicht schreiben."
#: po/placeholder.h:78 urpm.pm:189
#, c-format
msgid "unable to access hdlist file of \"%s\", medium ignored"
-msgstr ""
+msgstr "Es ist nicht möglich, auf die HD-Liste „%s“ zuzugreifen,\n"
+"das Medium wird daher ignoriert."
#: po/placeholder.h:79 urpm.pm:916
-#, fuzzy
msgid "unable to register rpm file"
-msgstr "Ich kann das Medium „%s“ nicht anlegen.\n"
+msgstr "Die RPM-Datei kann nicht registriert werden."
#: po/placeholder.h:80 urpm.pm:1208
msgid "unable to find all synthesis file, using parsehdlist server"
@@ -387,7 +397,7 @@ msgstr ""
#: po/placeholder.h:81 urpm.pm:239
#, c-format
msgid "unable to inspect list file for \"%s\", medium ignored"
-msgstr ""
+msgstr "Die Dateiliste für „%s“ kann nicht kontrolliert werden, es wird ignoriert."
#: po/placeholder.h:82 urpm.pm:231
#, c-format
@@ -397,12 +407,12 @@ msgstr "Die Dateiliste für „%s“ ist inkonsistent, das Medium wird ignoriert
#: po/placeholder.h:83
#, c-format
msgid "copy of [%s] failed"
-msgstr "Kopieren von „%s“ schlug fehl."
+msgstr "Kopieren von [%s] schlug fehl."
#: po/placeholder.h:84 urpm.pm:822 urpm.pm:1480
-#, fuzzy, c-format
+#, c-format
msgid "unable to parse correctly [%s]"
-msgstr "Ich kann das Medium „%s“ nicht aktualisieren.\n"
+msgstr "Die Struktur von [%s] ist nicht korrekt."
#: po/placeholder.h:85 urpm.pm:749
#, fuzzy, c-format
@@ -450,7 +460,7 @@ msgstr "Ich kann das Medium „%s“ nicht aktualisieren.\n"
#: po/placeholder.h:94 urpm.pm:911
#, c-format
msgid "invalid rpm file name [%s]"
-msgstr "Ungültiger RPM Name „%s“"
+msgstr "Ungültiger RPM Name [%s]"
#: po/placeholder.h:95 urpm.pm:1592
#, c-format
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975
package install_steps_gtk;

use diagnostics;
use strict;
use vars qw(@ISA);

@ISA = qw(install_steps_interactive interactive_gtk);

#-######################################################################################
#- misc imports
#-######################################################################################
use common qw(:common :file :functional :system);
use partition_table qw(:types);
use my_gtk qw(:helpers :wrappers);
use Gtk;
#-use Gtk::XmHTML;
use devices;
use fsedit;
use commands;
use modules;
use pkgs;
use install_steps;
use install_steps_interactive;
use interactive_gtk;
use install_any;
use diskdrake;
use log;
use help;
use lang;

#-#####################################################################################
#-INTERN CONSTANT
#-#####################################################################################
my $w_help;
my $itemsNB = 1;
my (@background1, @background2);

my @themes_vga16 = qw(blue blackwhite savane);
my @themes = qw(mdk DarkMarble marble3d blueHeart);


#-######################################################################################
#- In/Out Steps Functions
#-######################################################################################
sub new($$) {
    my ($type, $o) = @_;

    my $old = $SIG{__DIE__};
    $SIG{__DIE__} = sub { $_[0] !~ /my_gtk\.pm/ and goto $old };

    $ENV{DISPLAY} ||= $o->{display} || ":0";
    unless ($::testing) {
	$my_gtk::force_focus = $ENV{DISPLAY} eq ":0";

	my $f = "/tmp/Xconf";
	createXconf($f, @{$o->{mouse}}{"XMOUSETYPE", "device"}, $o->{wacom});

	if ($ENV{DISPLAY} eq ":0") {
	    my $launchX = sub {
		my $ok = 1;
		local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 };
		unless (fork) {
		    exec $_[0], (arch() =~ /^sparc/ ? () : ("-kb")), "-dpms","-s" ,"240",
		      ($_[0] =~ /Xsun/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") :
		       ("-allowMouseOpenFail", "-xf86config", $f)) or exit 1;
		}
		foreach (1..60) {
		    sleep 1;
		    log::l("Server died"), return 0 if !$ok;
		    return 1 if c::Xtest($ENV{DISPLAY});
		}
		log::l("Timeout!!");
		0;
	    };
	    my @servers = qw(FBDev VGA16); #-)
	    if (arch() eq "alpha") {
		require Xconfigurator;
		my $card = Xconfigurator::cardConfigurationAuto();
		add2hash($card, Xconfigurator::cardName2card($card->{type})) if $card && $card->{type};
		@servers = $card->{server} || "TGA";
		#-@servers = qw(SVGA 3DLabs TGA) 
	    } elsif (arch() =~ /^sparc/) {
		local $_ = cat_("/proc/fb");
		if (/Mach64/) { @servers = qw(Mach64) }
		else { @servers = qw(Xsun24) }
	    }
	    @servers = qw(PPCDummy) if arch() eq "ppc";

	    foreach (@servers) {
		log::l("Trying with server $_");
		my $dir = "/usr/X11R6/bin";
		my $prog = /Xsun/ ? $_ : "XF86_$_";
		unless (-x "$dir/XF86_$_") {
		    unlink $_ foreach glob_("$dir/X*");
		    install_any::getAndSaveFile("$dir/$prog", "$dir/$prog") or die "failed to get server: $!";
		    chmod 0755, "$dir/$prog";
		}
		if (/FB/) {
		    !$o->{vga16} && $o->{allowFB} or next;

		    $o->{allowFB} = &$launchX($prog) #- keep in mind FB is used.
		      and goto OK;
		} else {
		    $o->{vga16} = 1 if /VGA16/;
		    &$launchX($prog) and goto OK;
		}
	    }
	    return undef;
	}
    }
  OK: @themes = @themes_vga16 if $o->{simple_themes} || $o->{vga16};

    init_sizes();
    install_theme($o);
    create_logo_window($o);

    $my_gtk::force_center = [ $::rootwidth - $::windowwidth, $::logoheight, $::windowwidth, $::windowheight ];

    (bless {}, ref $type || $type)->SUPER::new($o);
}

sub enteringStep {
    my ($o, $step) = @_;

    print _("Entering step `%s'\n", translate($o->{steps}{$step}{text}));
    $o->SUPER::enteringStep($step);
    create_steps_window($o);
    create_help_window($o);
}
sub leavingStep {
    my ($o, $step) = @_;
    $o->SUPER::leavingStep($step);
}



#-######################################################################################
#- Steps Functions
#-######################################################################################
sub selectLanguage {
    my ($o) = @_;
    $o->SUPER::selectLanguage;
    Gtk->set_locale;
    install_theme($o);
}

#------------------------------------------------------------------------------
sub selectInstallClass1 {
    my ($o, $verif, $l, $def, $l2, $def2) = @_;

    my $w = my_gtk->new('');
    my ($radio, $focused);
    gtkadd($w->{window},
	   gtkpack($o->create_box_with_title(_("Please, choose one of the following classes of installation:")),
		   (my @radios = map { $radio = new Gtk::RadioButton($_, $radio ? $radio : ()); 
			 $radio->set_active($_ eq $def); $radio } @$l),
		   gtkadd(create_hbox(),
			  map { my $v = $_; 
				my $b = new Gtk::Button(translate($_));
				$focused = $b if $_ eq $def2;
				gtksignal_connect($b, "clicked" => sub { $w->{retval} = $v; Gtk->main_quit });
			    } @$l2)
		  ));
    $focused->grab_focus if $focused;
    $w->main;

    mapn { $verif->($_[1]) if $_[0]->active } \@radios, $l;
    create_steps_window($o);

    $w->{retval};
}

#------------------------------------------------------------------------------
sub selectMouse {
    my ($o, $force) = @_;
    my $old_dev = $o->{mouse}{device};
    $o->SUPER::selectMouse($force);

    my $dev = $o->{mouse}{device};
    if ($old_dev ne $dev && $dev =~ /ttyS/ && !$::testing) {
	log::l("telling X server to use another mouse");
	eval { commands::modprobe("serial") };
	symlinkf($dev, "/dev/mouse");
	c::setMouseMicrosoft($ENV{DISPLAY});
    }
}

#------------------------------------------------------------------------------
sub doPartitionDisks {
    my ($o, $hds, $raid) = @_;

    if ($o->{lnx4win}) {
	eval { install_steps::doPartitionDisks(@_) };
	if ($@ =~ /no fat/) {
	    $o->ask_warn('', _("You don't have any windows partitions!"));
	} elsif ($@ =~ /not enough room/) {
	    $o->ask_warn('', _("You don't have any enough room for Lnx4win"));
	} else { return }
#-	delete $o->{lnx4win};
    }
    if ($::beginner && fsedit::is_one_big_fat($hds)) {
	#- wizard
	my $min_linux = 600 << 11;
	my $max_linux = 1500 << 11;
	my $min_freewin = 300 << 11;

	my ($part) = fsedit::get_fstab(@{$o->{hds}});
	my $w = $o->wait_message(_("Resizing"), _("Computing FAT filesystem bounds"));
	my $resize_fat = eval { resize_fat::main->new($part->{device}, devices::make($part->{device})) };
	$@ and goto diskdrake;
	my $min_win = $resize_fat->min_size;
	if (!$@ && $part->{size} > $min_linux + $min_freewin + $min_win && $o->ask_okcancel('',
_("WARNING!

DrakX now needs to resize your Windows partition. Be careful: this operation is
dangerous. If you have not already done so, you should first exit the
installation, run scandisk under Windows (and optionally run defrag), then
restart the installation. You should also backup your data.
When sure, press Ok."))) {
	    my $hd = $hds->[0];
	    my $oldsize = $part->{size};
	    $hd->{isDirty} = $hd->{needKernelReread} = 1;
	    $part->{size} -= min($max_linux, $part->{size} - $min_win);
	    $hd->adjustEnd($part);
	    partition_table::adjust_local_extended($hd, $part);
	    partition_table::adjust_main_extended($hd);

	    local *log::l = sub { $w->set(join(' ', @_)) };
	    eval { $resize_fat->resize($part->{size}) };
	    if ($@) {
		$part->{size} = $oldsize;
		$o->ask_warn('', _("Automatic resizing failed"));
	    } else {
		$part->{isFormatted} = 1;
		eval { fsedit::auto_allocate($hds, $o->{partitions}) };
		if (!$@) {
		    partition_table::write($hd) unless $::testing;
		    return;
		}
	    }
	}
    }

  diskdrake:
    while (1) {
	diskdrake::main($hds, $raid, interactive_gtk->new, $o->{partitions});
	if (!grep { isSwap($_) } fsedit::get_fstab(@{$o->{hds}})) {
	    if ($::beginner) {
		$o->ask_warn('', _("You must have a swap partition"));
	    } elsif (!$::expert) {
		$o->ask_okcancel('', _("You don't have a swap partition\n\nContinue anyway?")) and last;
	    } else { last }
	} else { last }
    }
}

sub doPartitionDisksLnx4winDev {
    my ($o, $l) = @_;
    return if $::beginner;

    my ($dev) = $o->ask_from_list('', _("Which partition do you want to use to put Linux4Win?"),
				  [ map { sprintf "%s (%s) [%dMB]", $_->{device_windobe}, $_->{device}, $_->{size} >> 11 } @$l ]
				 ) =~ /\((\S+)\)/;
    $_->{device} eq $dev and return $_ foreach @$l;
}

sub doPartitionDisksLnx4winSize {
    my ($o, $root_size, $swap_size, $max_root_size, $max_swap_size) = @_;
    return if $::beginner;
    
    my $w = my_gtk->new('');

    my $root_adj = create_adjustment($max_root_size >> 11, 250, $$root_size >> 11);
    my $swap_adj = create_adjustment($max_swap_size >> 11, 32, $$swap_size >> 11);
    my $root_spin = new Gtk::SpinButton($root_adj, 0, 0);
    my $swap_spin = new Gtk::SpinButton($swap_adj, 0, 0);

    gtkadd($w->{window},
	  gtkpack(new Gtk::VBox(0,20),
_("Choose the sizes"),
		 create_packtable({},
		  [ _("Root partition size in MB: "), $root_spin ],
		  [ undef, new Gtk::HScrollbar($root_adj) ],
		  [ _("Swap partition size in MB: "), $swap_spin ],
		  [ undef, new Gtk::HScrollbar($swap_adj) ],
		 ),
		 create_okcancel($w)
		 ),
    );
    $w->{ok}->grab_focus;
    $w->main(sub {
		 $$root_size = $root_spin->get_value_as_int << 11;
		 $$swap_size = $swap_spin->get_value_as_int << 11;
	     });	     
    
}

#------------------------------------------------------------------------------
sub chooseSizeToInstall {
    my ($o, $packages, $min_size, $max_size_, $availableC, $individual) = @_;
    my $max_size = min($max_size_, $availableC);
    my $enough = $max_size == $max_size_;
    my $percentage = int 100 * $max_size / $max_size_;

    #- don't ask anything if the difference between min and max is too small
    return $max_size if $min_size && $max_size / $min_size < 1.05;

    log::l("choosing size to install between $min_size and $max_size");
    my $w = my_gtk->new('');
    my $adj = create_adjustment($percentage, $min_size * 100 / $max_size_, $percentage);
    my $spin = gtkset_usize(new Gtk::SpinButton($adj, 0, 0), 20, 0);
    my $val;

    gtkadd($w->{window},
	  gtkpack(new Gtk::VBox(0,20),
		  _("The total size for the groups you have selected is approximately %d MB.\n", pkgs::correctSize($max_size_ / sqr(1024))) .
		  ($enough ?
_("If you wish to install less than this size,
select the percentage of packages that you want to install.

A low percentage will install only the most important packages;
a percentage of 100%% will install all selected packages.") : 
_("You have space on your disk for only %d%% of these packages.

If you wish to install less than this,
select the percentage of packages that you want to install.
A low percentage will install only the most important packages;
a percentage of %d%% will install as many packages as possible.", $percentage, $percentage))
. ($individual ? "\n\n" . _("You will be able to choose them more specifically in the next step.") : ''),
		 create_packtable({},
				  [ _("Percentage of packages to install") . '  ', $spin, "%", my $mb = new Gtk::Label ],
				  [ undef, new Gtk::HScrollbar($adj) ],
			       ),
		 create_okcancel($w)
		)
	 );
    $spin->signal_connect(changed => my $changed = sub { 
	$val = $spin->get_value_as_int / 100 * $max_size_;
	$mb->set(sprintf("(%dMB)", pkgs::correctSize($val / sqr(1024)))); 
    }); &$changed();
    $spin->signal_connect(activate => sub { $w->{retval} = 1; Gtk->main_quit });
    $spin->grab_focus();
    $w->main and $val;
}
sub choosePackagesTree {
    my ($o, $packages, $compss) = @_;

    my ($curr, $info_widget, $w_size, $go, $idle, $flat, $auto_deps);
    my (%wtree, %ptree);

    my $w = my_gtk->new('');
    my $details = new Gtk::VBox(0,0);
    my $tree = Gtk::CTree->new(3, 0);
    $tree->set_selection_mode('browse');
    $tree->set_column_width(0, 200);
    $tree->set_column_auto_resize($_, 1) foreach 1..2;

    gtkadd($w->{window}, 
	   gtkpack_(new Gtk::VBox(0,5),
		    0, _("Choose the packages you want to install"),
		    1, gtkpack(new Gtk::HBox(0,0),
			       createScrolledWindow($tree),
			       gtkadd(gtkset_usize(new Gtk::Frame(_("Info")), 150, 0),
				      createScrolledWindow($info_widget = new Gtk::Text),
				     )),
		    0, my $l = new Gtk::HBox(0,15),
		    0, gtkpack(new Gtk::HBox(0,10),
			       $go = gtksignal_connect(new Gtk::Button(_("Install")), "clicked" => sub { $w->{retval} = 1; Gtk->main_quit }),
			      )
    ));
    gtkpack__($l, my $toolbar = new Gtk::Toolbar('horizontal', 'icons'));
    gtkpack__($l, gtksignal_connect(new Gtk::CheckButton(_("Automatic dependencies")), clicked => sub { invbool \$auto_deps }));
    $l->pack_end($w_size = new Gtk::Label(''), 0, 1, 20);

    $w->{window}->set_usize(map { $_ - 2 * $my_gtk::border - 4 } $::windowwidth, $::windowheight);
    $go->grab_focus;
    $w->{rwindow}->show_all;

    my $pix_base     = [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-base.xpm") ];
    my $pix_selected = [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-selected.xpm") ];
    my $pix_unselect = [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-unselected.xpm") ];
    my $pix_installed= [ gtkcreate_xpm($w->{window}, "$ENV{SHARE_PATH}/rpm-installed.xpm") ];

    my $parent; $parent = sub {
	if (my $w = $wtree{$_[0]}) { return $w }
	my $s; foreach (split '/', $_[0]) {
	    $wtree{"$s/$_"} ||= 
	      $tree->insert_node($s ? $parent->($s) : undef, undef, [$_, '', ''], 5, (undef) x 4, 0, 0);
	    $s = "$s/$_";
	}
	$wtree{$s};
    };
    my $add_node = sub {
	my ($leaf, $root) = @_;
	my $node = $tree->insert_node($parent->($root), undef, [$leaf, '', ''], 5, (undef) x 4, 1, 0);
	my $p = $packages->[0]{$leaf} or return;
	$p->{medium}{selected} or return;
	my $pix = pkgs::packageFlagBase($p) ? $pix_base : pkgs::packageFlagSelected($p) ? $pix_selected : pkgs::packageFlagInstalled($p) ? $pix_installed : $pix_unselect;
	$tree->node_set_pixmap($node, 1, $pix->[0], $pix->[1]);
	push @{$ptree{$leaf}}, $node;
    };
    my $add_nodes = sub {
	%ptree = %wtree = ();

	$tree->freeze;
	while (1) { $tree->remove_node($tree->node_nth(0) || last) }

	my ($root, $leaf);
	if ($flat = $_[0]) {
	    $add_node->($_, undef) foreach sort grep { my $pkg = pkgs::packageByName($packages, $_);
						       $pkg->{medium}{selected} } keys %{$packages->[0]};
	} else {
	    foreach (sort @$compss) {
		($root, $leaf) = m|(.*)/(.+)|o or ($root, $leaf) = ('', $_);
		my $pkg = pkgs::packageByName($packages, $leaf);
		$add_node->($leaf, $root) if $pkg->{medium}{selected};
	    }
	}
	$tree->thaw;
    };
    $add_nodes->($flat);

    my %toolbar = my @toolbar = 
      (
       ftout =>  [ _("Expand Tree") , sub { $tree->expand_recursive(undef) } ],
       ftin  =>  [ _("Collapse Tree") , sub { $tree->collapse_recursive(undef) } ],
       reload=>  [ _("Toggle between flat and group sorted"), sub { $add_nodes->(!$flat) } ],
      );
    $toolbar->set_button_relief("none");
    foreach (grep_index { $::i % 2 == 0 } @toolbar) {
	gtksignal_connect($toolbar->append_item(undef, $toolbar{$_}[0], undef, gtkxpm($tree, "$ENV{SHARE_PATH}/$_.xpm")),
			  clicked => $toolbar{$_}[1]);
    }
    $toolbar->set_style("icons");


    my $display_info = sub {
	my $p = $packages->[0]{$curr} or return gtktext_insert($info_widget, '');
	pkgs::extractHeaders($o->{prefix}, [$p], $p->{medium});
	$p->{header} or die;

	my $ind = $o->{compssListLevels}{$o->{installClass}};
	my $imp = translate($pkgs::compssListDesc{pkgs::packageFlagBase($p) ? 100 : round_down($p->{values}[$ind], 10)});

	gtktext_insert($info_widget, $@ ? _("Bad package") :
		       _("Name: %s\n", pkgs::packageName($p)) .
		       _("Version: %s\n", pkgs::packageVersion($p) . '-' . pkgs::packageRelease($p)) .
		       _("Size: %d KB\n", pkgs::packageSize($p) / 1024) .
		       ($imp && _("Importance: %s\n", $imp)) . "\n" .
		       formatLines(c::headerGetEntry($p->{header}, 'description')));
	c::headerFree(delete $p->{header});
	0;
    };

    my $update_size = sub {
	my $size = pkgs::selectedSize($packages);
	$w_size->set(_("Total size: %d / %d MB", 
		       pkgs::correctSize($size / sqr(1024)),
		       install_any::getAvailableSpace($o) / sqr(1024)));
    };
    my $toggle = sub {
	if (ref $curr) {
	    $tree->toggle_expansion($curr);
	} else {
	    my $p = $packages->[0]{$curr} or return;
	    if (pkgs::packageFlagBase($p)) {
		return $o->ask_warn('', _("This is a mandatory package, it can't be unselected"));
	    } elsif (pkgs::packageFlagInstalled($p)) {
		return $o->ask_warn('', _("You can't unselect this package. It is already installed"));
	    } elsif (pkgs::packageFlagUpgrade($p)) {
		if ($::expert) {
		    if (pkgs::packageFlagSelected($p)) {
			$o->ask_yesorno('', _("This package must be upgraded\nAre you sure you want to deselect it?")) or return;
		    }
		} else {
		    return $o->ask_warn('', _("You can't unselect this package. It must be upgraded"));
		}
	    }

	    pkgs::togglePackageSelection($packages, $p, my $l = {});
	    if (my @l = grep { $l->{$_} } keys %$l) {
		#- check for size before trying to select.
		my $size = pkgs::selectedSize($packages);
		foreach (@l) {
		    my $p = $packages->[0]{$_};
		    pkgs::packageFlagSelected($p) or $size += pkgs::packageSize($p);
		}
		if (pkgs::correctSize($size / sqr(1024)) > install_any::getAvailableSpace($o) / sqr(1024)) {
		    return $o->ask_warn('', _("You can't select this package as there is not enough space left to install it"));
		}

		@l > 1 && !$auto_deps and $o->ask_okcancel('', [ _("The following packages are going to be installed/removed"), join(", ", sort @l) ], 1) || return;
		pkgs::togglePackageSelection($packages, $p);
		foreach (@l) {
		    my $p = $packages->[0]{$_};
		    my $pix = pkgs::packageFlagSelected($p) ? $pix_selected : $pix_unselect;
		    $tree->node_set_pixmap($_, 1, $pix->[0], $pix->[1]) foreach @{$ptree{$_}};
		}
		&$update_size;
	    } else {
		$o->ask_warn('', _("You can't select/unselect this package"));
	    }
	}
    };
    $tree->signal_connect(button_press_event => sub { &$toggle if $_[1]{type} =~ /^2/ });
    $tree->signal_connect(key_press_event => sub {
        my ($w, $e) = @_;
	my $c = chr $e->{keyval};
	&$toggle if $e->{keyval} >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ';
	1;
    });
    $tree->signal_connect(tree_select_row => sub {
	Gtk->timeout_remove($idle) if $idle;

	if ($_[1]->row->is_leaf) {
	    ($curr) = $tree->node_get_pixtext($_[1], 0);
	    $idle = Gtk->timeout_add(100, $display_info);
	} else {
	    $curr = $_[1];
	}
	&$toggle if $_[2] == 1;
    });
    &$update_size;
    $w->main;
}

#------------------------------------------------------------------------------
sub installPackages {
    my ($o, $packages) = @_;

    my ($current_total_size, $last_size, $nb, $total_size, $start_time, $last_dtime, $trans_progress_total);

    my $w = my_gtk->new(_("Installing"), grab => 1);
    $w->{window}->set_usize($::windowwidth * 0.8, 260);
    my $text = new Gtk::Label;
    my ($msg, $msg_time_remaining, $msg_time_total) = map { new Gtk::Label($_) } '', (_("Estimating")) x 2;
    my ($progress, $progress_total) = map { new Gtk::ProgressBar } (1..2);
    gtkadd($w->{window}, gtkpack(new Gtk::VBox(0,10),
			       _("Please wait, "), $msg, $progress,
			       create_packtable({},
						[_("Time remaining "), $msg_time_remaining],
						[_("Total time "), $msg_time_total],
						),
			       $text,
			       $progress_total,
			       '',
			       gtkadd(create_hbox(),
				      gtksignal_connect(new Gtk::Button(_("Cancel")), 
							clicked => sub { $pkgs::cancel_install = 1 })),
			      ));
    $msg->set(_("Preparing installation"));
    $w->sync;

    my $oldInstallCallback = \&pkgs::installCallback;
    local *pkgs::installCallback = sub {
	my $m = shift;
	if ($m =~ /^Starting installation/) {
	    $nb = $_[0];
	    $total_size = $_[1]; $current_total_size = 0;
	    $start_time = time();
	    $msg->set(_("%d packages", $nb) . _(", %U MB", $total_size / sqr(1024)));
	    $w->flush;
	} elsif ($m =~ /^Starting installing package/) {
	    $progress->update(0);
	    my $name = $_[0];
	    $msg->set(_("Installing package %s", $name));
	    $current_total_size += $last_size;
	    $last_size = c::headerGetEntry($o->{packages}[0]{$name}{header}, 'size');
	    $text->set((split /\n/, c::headerGetEntry($o->{packages}[0]{$name}{header}, 'summary'))[0] || '');
	    $w->flush;
	} elsif ($m =~ /^Progressing installing package/) {
	    $progress->update($_[2] ? $_[1] / $_[2] : 0);

	    my $dtime = time() - $start_time;
	    my $ratio = $total_size ? ($_[1] + $current_total_size) / $total_size : 0;
	    my $total_time = $ratio ? $dtime / $ratio : time();

	    $progress_total->update($ratio);
	    if ($dtime != $last_dtime && $current_total_size > 2 * 1024 * 1024) {
		$msg_time_total->set(formatTime(10 * round($total_time / 10)));
		$msg_time_remaining->set(formatTime(10 * round(max($total_time - $dtime, 0) / 10)));
		$last_dtime = $dtime;
	    }
	    $w->flush;
	} else { unshift @_, $m; goto $oldInstallCallback }
    };
    #- the modification is not local as the box should be living for other package installation.
    undef *install_any::changeMedium;
    *install_any::changeMedium = sub {
	my ($method, $medium) = @_;
	my $msg =
_("Change your Cd-Rom!

Please insert the Cd-Rom labelled \"%s\" in your drive and press Ok when done.
If you don't have it, press Cancel to avoid installation from this Cd-Rom.", pkgs::mediumDescr($o->{packages}, $medium));

	#- if not using a cdrom medium, always abort.
	$method eq 'cdrom' and do {
	    local $my_gtk::grab = 1;
	    $o->ask_okcancel('', $msg);
	};
    };
    catch_cdie { $o->install_steps::installPackages($packages); }
      sub {
	  if ($@ =~ /^error ordering package list: (.*)/) {
	      $o->ask_yesorno('', [
_("There was an error ordering packages:"), $1, _("Go on anyway?") ], 1) and return 1;
	      ${$_[0]} = "already displayed";
	  } elsif ($@ =~ /^error installing package list: (.*)/) {
	      $o->ask_yesorno('', [
_("There was an error installing packages:"), $1, _("Go on anyway?") ], 1) and return 1;
	      ${$_[0]} = "already displayed";
	  }
	  0;
      };
    if ($pkgs::cancel_install) {
	$pkgs::cancel_install = 0;
	die "setstep choosePackages\n";
    }
    $w->destroy;
}

#------------------------------------------------------------------------------
sub load_rc($) {
    if (my ($f) = grep { -r $_ } map { "$_/$_[0].rc" } ("share", $ENV{SHARE_PATH}, dirname(__FILE__))) {
	Gtk::Rc->parse($f);
	foreach (cat_($f)) {
	    if (/style\s+"background"/ .. /^\s*$/) {
		@background1 = map { $_ * 256 * 257 } split ',', $1 if /NORMAL.*\{(.*)\}/;
		@background2 = map { $_ * 256 * 257 } split ',', $1 if /PRELIGHT.*\{(.*)\}/;
	    }
	}
    }
}

sub install_theme {
    my ($o, $theme) = @_;    
    $o->{theme} = $theme || $o->{theme} || $themes[0];

    gtkset_mousecursor(68);

    load_rc($_) foreach "themes-$o->{theme}", "install", "themes";

    if (my ($font, $font2) = lang::get_x_fontset($o->{lang})) {
	$font2 ||= $font;
	Gtk::Rc->parse_string(qq(
style "default-font" 
{
   fontset = "$font"
}
style "small-font"
{
   fontset = "$font2"
}
widget "*" style "default-font"
widget "*Steps*" style "small-font"

));
   }
    gtkset_background(@background1);# unless $::testing;

    create_logo_window($o);
    create_help_window($o);
}

#------------------------------------------------------------------------------
sub create_big_help {
    my $w = my_gtk->new('', grab => 1, force_position => [ $::stepswidth, $::logoheight ]);
    $w->{rwindow}->set_usize($::logowidth, $::rootheight - $::logoheight);
    gtkadd($w->{window},
	   gtkpack_(new Gtk::VBox(0,0),
		    1, createScrolledWindow(gtktext_insert(new Gtk::Text, 
							   formatAlaTeX(translate($help::steps{$::o->{step}})))),
		    0, gtksignal_connect(new Gtk::Button(_("Ok")), "clicked" => sub { Gtk->main_quit }),
		   ));
    $w->main;
}

#------------------------------------------------------------------------------
sub create_help_window {
    my ($o) = @_;

#    $o->{help_window}->destroy if $o->{help_window};

    my $w;
    if ($w = $o->{help_window}) {
	$_->destroy foreach $w->{window}->children;
    } else {
	$w = bless {}, 'my_gtk';
	$w->{rwindow} = $w->{window} = new Gtk::Window;
	$w->{rwindow}->set_uposition($::rootwidth - $::helpwidth, $::rootheight - $::helpheight);
	$w->{rwindow}->set_usize($::helpwidth, $::helpheight);
	$w->sync;
    }

#-    my $b = new Gtk::Button;
#-    $b->signal_connect(clicked => sub {
#-	  my $w = my_gtk->new('', grab => 1, force_position => [ $stepswidth, $logoheight ]);
#-	  $w->{rwindow}->set_usize($logowidth, $height - $logoheight);
#-	  gtkadd($w->{window},
#-		 gtkpack_(new Gtk::VBox(0,0),