]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/installer/main.c
installer+setup: Update translations
[ipfire-2.x.git] / src / installer / main.c
index 254aae8ea5fa9700a82c2767e4005cd6922c2c3e..88b3735cc8354663cf1e3cd1194982ff84e71dd3 100644 (file)
@@ -111,8 +111,11 @@ static int newtWinOkCancel(const char* title, const char* message, int width, in
        newtTextboxSetText(textbox, message);
        newtFormAddComponent(form, textbox);
 
-       newtComponent btn_ok = newtButton((width - 16) / 3, height - 4, btn_txt_ok);
-       newtComponent btn_cancel = newtButton((width - 16) / 3 * 2 + 9, height - 4,
+       unsigned int btn_width_ok = strlen(btn_txt_ok);
+       unsigned int btn_width_cancel = strlen(btn_txt_cancel);
+
+       newtComponent btn_ok = newtButton((width / 3) - (btn_width_ok / 2) - 2, height - 4, btn_txt_ok);
+       newtComponent btn_cancel = newtButton((width * 2 / 3) - (btn_width_cancel / 2) - 2, height - 4,
                btn_txt_cancel);
 
        newtFormAddComponents(form, btn_ok, btn_cancel, NULL);
@@ -209,11 +212,13 @@ static struct lang {
        const char* code;
        char* name;
 } languages[NUM_LANGS + 1] = {
+       { "da.utf8",    "Danish (Dansk)" },
        { "nl_NL.utf8", "Dutch (Nederlands)" },
        { "en_US.utf8", "English" },
        { "fr_FR.utf8", "French (Français)" },
        { "de_DE.utf8", "German (Deutsch)" },
        { "pl_PL.utf8", "Polish (Polski)" },
+       { "pt_BR.utf8", "Portuguese (Brasil)" },
        { "ru_RU.utf8", "Russian (Русский)" },
        { "es_ES.utf8", "Spanish (Español)" },
        { "tr_TR.utf8", "Turkish (Türkçe)" },
@@ -384,7 +389,7 @@ int main(int argc, char *argv[]) {
        int part_type = HW_PART_TYPE_NORMAL;
 
        // Scan for disks to install on.
-       struct hw_disk** disks = hw_find_disks(hw);
+       struct hw_disk** disks = hw_find_disks(hw, sourcedrive);
 
        struct hw_disk** selected_disks = NULL;
        unsigned int num_selected_disks = 0;
@@ -464,6 +469,7 @@ int main(int argc, char *argv[]) {
                // Currently not supported
                } else {
                        errorbox(_("You disk configuration is currently not supported."));
+                       fprintf(flog, "Num disks selected: %d\n", num_selected_disks);
                }
 
                if (selected_disks) {
@@ -540,6 +546,10 @@ int main(int argc, char *argv[]) {
                }
 
                newtPopWindow();
+       } else {
+               // We will have to destroy all RAID setups that may have
+               // been on the devices that we want to use now.
+               hw_destroy_raid_superblocks(destination, logfile);
        }
 
        // Execute the partitioning...