https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1899a09399c76a21f27ceeb284d8f41190ef9c88

commit 1899a09399c76a21f27ceeb284d8f41190ef9c88
Author:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
AuthorDate: Tue Oct 24 20:15:57 2023 +0200
Commit:     Hermès Bélusca-Maïto <hermes.belusca-ma...@reactos.org>
CommitDate: Sat Oct 28 17:08:39 2023 +0200

    [USETUP] Simplify display of partitions being formatted (#5837)
---
 base/setup/usetup/usetup.c | 54 +++++++++++-----------------------------------
 1 file changed, 13 insertions(+), 41 deletions(-)

diff --git a/base/setup/usetup/usetup.c b/base/setup/usetup/usetup.c
index f0243187454..7f2e07032e2 100644
--- a/base/setup/usetup/usetup.c
+++ b/base/setup/usetup/usetup.c
@@ -2108,11 +2108,6 @@ CreatePrimaryPartitionPage(PINPUT_RECORD Ir)
 
     CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE));
 
-#if 0
-    CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB",
-                        CurrentPartition->SectorCount * 
DiskEntry->BytesPerSector / MB);
-#endif
-
     CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION));
 
     PartEntry = CurrentPartition;
@@ -2226,11 +2221,6 @@ CreateExtendedPartitionPage(PINPUT_RECORD Ir)
 
     CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE));
 
-#if 0
-    CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB",
-                        CurrentPartition->SectorCount * 
DiskEntry->BytesPerSector / MB);
-#endif
-
     CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION));
 
     PartEntry = CurrentPartition;
@@ -2343,11 +2333,6 @@ CreateLogicalPartitionPage(PINPUT_RECORD Ir)
 
     CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDPARTSIZE));
 
-#if 0
-    CONSOLE_PrintTextXY(8, 10, "Maximum size of the new partition is %I64u MB",
-                        CurrentPartition->SectorCount * 
DiskEntry->BytesPerSector / MB);
-#endif
-
     CONSOLE_SetStatusText(MUIGetString(STRING_CREATEPARTITION));
 
     PartEntry = CurrentPartition;
@@ -2489,7 +2474,7 @@ DeletePartitionPage(PINPUT_RECORD Ir)
     MUIDisplayPage(DELETE_PARTITION_PAGE);
 
     PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer));
-    CONSOLE_PrintTextXY(6, 10, "   %s", LineBuffer);
+    CONSOLE_SetTextXY(6, 10, LineBuffer);
 
     DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer));
     CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2),
@@ -2822,20 +2807,9 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
 
     if (PartEntry->AutoCreate)
     {
-        CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION));
-
-#if 0
-        PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer));
-        CONSOLE_SetTextXY(8, 10, LineBuffer);
-#endif
-
-        DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer));
-        CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDISK1),
-                            LineBuffer);
-
-        CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT));
-
         PartEntry->AutoCreate = FALSE;
+
+        CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION));
     }
     else if (PartEntry->New)
     {
@@ -2857,24 +2831,22 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
                 ASSERT(FALSE);
                 break;
         }
-
-        DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer));
-        CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDISK1),
-                            LineBuffer);
-
-        CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT));
     }
     else
     {
         CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_INSTALLONPART));
+    }
 
-        PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer));
-        CONSOLE_SetTextXY(8, 10, LineBuffer);
+    PartitionDescription(PartEntry, LineBuffer, ARRAYSIZE(LineBuffer));
+    CONSOLE_SetTextXY(6, 10, LineBuffer);
 
-        DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer));
-        CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2),
-                            LineBuffer);
-    }
+    DiskDescription(DiskEntry, LineBuffer, ARRAYSIZE(LineBuffer));
+    CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDDISK2),
+                        LineBuffer);
+
+    /* Show "This Partition will be formatted next" only if it is unformatted 
*/
+    if (PartEntry->New || PartEntry->FormatState == Unformatted)
+        CONSOLE_SetTextXY(6, 14, MUIGetString(STRING_PARTFORMAT));
 
     ASSERT(FileSystemList == NULL);
 

Reply via email to