foxygit / doom Log in
commit 56dc1c62fe439af965d6c1cd1a563d41de28d1d6
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Wed Jan 25 21:10:48 2017 +0000
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Wed Jan 25 21:10:48 2017 +0000

    setup: Simplify by using TXT_MakeTable().

    We were making multiple conditional widgets just to avoid creating a
    table; now we have TXT_MakeTable() it's cleaner to just use this.
---
 src/setup/sound.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/setup/sound.c b/src/setup/sound.c
index 426fd7de..eeef7f24 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -162,12 +162,9 @@ void ConfigSound(void)

         TXT_NewRadioButton("GUS (emulated)", &snd_musicdevice, SNDDEVICE_GUS),
         TXT_NewConditional(&snd_musicdevice, SNDDEVICE_GUS,
-            TXT_NewHorizBox(
+            TXT_MakeTable(2,
                 TXT_NewStrut(4, 0),
                 TXT_NewLabel("Path to patch files: "),
-                NULL)),
-        TXT_NewConditional(&snd_musicdevice, SNDDEVICE_GUS,
-            TXT_NewHorizBox(
                 TXT_NewStrut(4, 0),
                 TXT_NewFileSelector(&gus_patch_path, 34,
                                     "Select path to GUS patches",
@@ -176,12 +173,9 @@ void ConfigSound(void)

         TXT_NewRadioButton("Native MIDI", &snd_musicdevice, SNDDEVICE_GENMIDI),
         TXT_NewConditional(&snd_musicdevice, SNDDEVICE_GENMIDI,
-            TXT_NewHorizBox(
+            TXT_MakeTable(2,
                 TXT_NewStrut(4, 0),
                 TXT_NewLabel("Timidity configuration file: "),
-                NULL)),
-        TXT_NewConditional(&snd_musicdevice, SNDDEVICE_GENMIDI,
-            TXT_NewHorizBox(
                 TXT_NewStrut(4, 0),
                 TXT_NewFileSelector(&timidity_cfg_path, 34,
                                     "Select Timidity config file",