buildsystem,ecc,ecp,ecs,ide; (#1055) allow cross-compile from 64 bit sdk to Android...
[sdk] / ide / src / dialogs / GlobalSettingsDialog.ec
index 47b1526..e39f2a8 100644 (file)
@@ -16,20 +16,20 @@ class GlobalSettingsDialog : Window
    hasClose = true;
    borderStyle = sizable;
    text = $"Global Settings";
-   minClientSize = { 560, 446 };
+   minClientSize = { 560, 506 };
    nativeDecorations = true;
 
    IDESettings ideSettings;
    IDESettingsContainer settingsContainer;
    String workspaceActiveCompiler;
-   
+
    TabControl tabControl { this, background = formColor, anchor = { left = 8, top = 8, right = 8, bottom = 40 } };
-   
+
    EditorTab editorTab { this, tabControl = tabControl };
    CompilersTab compilersTab { this, tabControl = tabControl };
    ProjectOptionsTab projectOptionsTab { this, tabControl = tabControl };
    WorkspaceOptionsTab workspaceOptionsTab { this, tabControl = tabControl };
-   
+
    property bool settingsModified
    {
       get
@@ -72,7 +72,7 @@ class GlobalSettingsDialog : Window
             bool compilerSettingsChanged = false;
             bool projectOptionsChanged = false;
             bool workspaceOptionsChanged = false;
-            
+
             if(editorTab.modifiedDocument)
             {
                if(editorTab.useFreeCaret.checked != ideSettings.useFreeCaret ||
@@ -85,14 +85,18 @@ class GlobalSettingsDialog : Window
                   editorSettingsChanged = true;
                }
             }
-            
+
             if(compilersTab.modifiedDocument)
             {
+               Workspace workspace = ide.workspace;
                if(strcmp(compilersTab.compilerConfigsDir.path, ideSettings.compilerConfigsDir))
                   ideSettings.compilerConfigsDir = compilersTab.compilerConfigsDir.path;
                ideSettings.compilerConfigs.Free();
                for(compiler : compilersTab.compilerConfigs)
+               {
                   ideSettings.compilerConfigs.Add(compiler.Copy());
+               }
+
                compilerSettingsChanged = true;
             }
 
@@ -134,7 +138,7 @@ class GlobalSettingsDialog : Window
             projectOptionsTab.modifiedDocument = false;
             workspaceOptionsTab.modifiedDocument = false;
          }
-         
+
          Destroy(DialogResult::ok);
          return true;
       }
@@ -189,7 +193,7 @@ class GlobalSettingsDialog : Window
          activateCompiler = readonlyCompiler;
       if(!activateCompiler && ideSettings.compilerConfigs.count)
          activateCompiler = ideSettings.compilerConfigs[0];
-      
+
       for(compiler : ideSettings.compilerConfigs)
          compilersTab.AddCompiler(compiler.Copy(), compiler == activateCompiler);
       compilersTab.compilerConfigsDir.path = ideSettings.compilerConfigsDir;
@@ -197,7 +201,7 @@ class GlobalSettingsDialog : Window
       // ProjectOptionsTab
       projectOptionsTab.defaultTargetDir.path = ideSettings.projectDefaultTargetDir;
       projectOptionsTab.defaultIntermediateObjDir.path = ideSettings.projectDefaultIntermediateObjDir;
-      
+
       return true;
    }
 
@@ -259,7 +263,7 @@ static void DrawStipple(Surface surface, Size clientSize)
 
    surface.LineStipple(0x5555);
    surface.Rectangle(x1, y1, x2, y2);
-   surface.LineStipple(0);            
+   surface.LineStipple(0);
 }
 
 class CompilersTab : GlobalSettingsSubTab
@@ -294,7 +298,7 @@ class CompilersTab : GlobalSettingsSubTab
          }
          return SelectorBar::OnKeyDown(key, ch);
       }
-      
+
       bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
       {
          ((CompilersTab)master).labelCompilers.Update(null);
@@ -318,7 +322,7 @@ class CompilersTab : GlobalSettingsSubTab
    };
 
    TabControl tabControl { this, background = formColor, anchor = { left = 8, top = 68, right = 8, bottom = 8 } };
-   
+
    CompilerDirectoriesTab dirsTab { this, tabControl = tabControl };
    CompilerToolchainTab toolchainTab { this, tabControl = tabControl };
    CompilerEnvironmentTab environmentTab { this, tabControl = tabControl };
@@ -451,7 +455,7 @@ class CompilersTab : GlobalSettingsSubTab
             String msg = PrintString($"Are you sure you wish to delete the ", compilerToDelete.name, $" compiler configuration?");
             if(MessageBox { type = okCancel, text = title, contents = msg }.Modal() == ok)
             {
-               SelectorButton button = compilerSelector.FindButtonByID((int)compilerToDelete);
+               SelectorButton button = compilerSelector.FindButtonByID((int64)compilerToDelete);
                if(button)
                   compilerSelector.RemoveButton(button);
                //DeleteCompiler(compilerToDelete);
@@ -476,7 +480,7 @@ class CompilersTab : GlobalSettingsSubTab
       {
          SelectorButton button
          {
-            compilerSelector, master = this, text = compiler.name, id = (int)compiler;
+            compilerSelector, master = this, text = compiler.name, id = (int64)compiler;
             NotifyClicked = CompilerClicked;
          };
          selectButton = button;
@@ -485,7 +489,7 @@ class CompilersTab : GlobalSettingsSubTab
       {
          EditableSelectorButton button
          {
-            compilerSelector, master = this, renameable = true, text = compiler.name, id = (int)compiler;
+            compilerSelector, master = this, renameable = true, text = compiler.name, id = (int64)compiler;
             NotifyClicked = CompilerClicked;
 
             bool OnRename(EditableSelectorButton button, char ** oldName, char ** newName)
@@ -546,6 +550,7 @@ class CompilersTab : GlobalSettingsSubTab
 
    bool NotifyModifiedDocument(PathBox pathBox)
    {
+      BasicValidatePathBoxPath(pathBox);
       modifiedDocument = true;
       return true;
    }
@@ -609,12 +614,17 @@ class CompilerDirectoriesTab : CompilersSubTab
                }
                return true;
             }
+            bool NotifyPathBoxModified(DirectoriesBox dirsBox, PathBox pathBox)
+            {
+               BasicValidatePathBoxPath(pathBox);
+               return true;
+            }
          };
          incref dirs[c];
-         
+
          if(c)
             dirs[c].visible = false;
-         
+
          // (width) Should be 324 for text...
          //field[c] = { dataType = class(char *), editable = true };
          //dirs[c].AddField(field[c]);
@@ -647,7 +657,7 @@ class CompilerDirectoriesTab : CompilersSubTab
          else if(c == executables)
             dirTypeTglBtn[c].hotKey = altE;
          }
-      }   
+      }
       currentDirs = dirs[includes];
       dirTypeTglBtn[includes].checked = true;
       return true;
@@ -655,9 +665,9 @@ class CompilerDirectoriesTab : CompilersSubTab
 
    void Load()
    {
-      if(loadedCompiler)
+      CompilerConfig compiler = loadedCompiler;
+      if(compiler)
       {
-         CompilerConfig compiler = loadedCompiler;
          dirs[includes].strings = compiler.includeDirs;
          dirs[libraries].strings = compiler.libraryDirs;
          dirs[executables].strings = compiler.executableDirs;
@@ -673,66 +683,82 @@ class CompilerToolchainTab : CompilersSubTab
    background = formColor;
    text = $"Toolchain";
 
+   int margin;
+   margin = 130;
+
    Label ecpLabel { this, position = { 8, 12 }, labeledWindow = ecp, tabCycle = false, inactive = true };
    PathBox ecp
    {
-      this, anchor = { left = 120, top = 8, right = 8 };
+      this, anchor = { left = margin, top = 8, right = 8 };
       text = $"eC Precompiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label eccLabel { this, position = { 8, 38 }, labeledWindow = ecc, tabCycle = false, inactive = true };
    PathBox ecc
    {
-      this, anchor = { left = 120, top = 34, right = 8 };
+      this, anchor = { left = margin, top = 34, right = 8 };
       text = $"eC Compiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label ecsLabel { this, position = { 8, 64 }, labeledWindow = ecs, tabCycle = false, inactive = true };
    PathBox ecs
    {
-      this, anchor = { left = 120, top = 60, right = 8 };
+      this, anchor = { left = margin, top = 60, right = 8 };
       text = $"eC Symbol Loader", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label earLabel { this, position = { 8, 90 }, labeledWindow = ear, tabCycle = false, inactive = true };
    PathBox ear
    {
-      this, anchor = { left = 120, top = 86, right = 8 };
+      this, anchor = { left = margin, top = 86, right = 8 };
       text = $"Ecere Archiver", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label cppLabel { this, position = { 8, 116 }, labeledWindow = cpp, tabCycle = false, inactive = true };
    PathBox cpp
    {
-      this, anchor = { left = 120, top = 112, right = 8 };
+      this, anchor = { left = margin, top = 112, right = 8 };
       text = $"C Preprocessor", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label ccLabel { this, position = { 8, 142 }, labeledWindow = cc, tabCycle = false, inactive = true };
    PathBox cc
    {
-      this, anchor = { left = 120, top = 138, right = 8 };
+      this, anchor = { left = margin, top = 138, right = 8 };
       text = $"C Compiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label cxxLabel { this, position = { 8, 168 }, labeledWindow = cxx, tabCycle = false, inactive = true };
    PathBox cxx
    {
-      this, anchor = { left = 120, top = 164, right = 8 };
+      this, anchor = { left = margin, top = 164, right = 8 };
       text = $"C++ Compiler", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
    Label makeLabel { this, position = { 8, 194 }, labeledWindow = make, tabCycle = false, inactive = true };
    PathBox make
    {
-      this, anchor = { left = 120, top = 190, right = 8 };
+      this, anchor = { left = margin, top = 190, right = 8 };
       text = $"GNU Make", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
-   Label execPrefixLabel { this, position = { 8, 220 }, labeledWindow = execPrefix, tabCycle = false, inactive = true };
-   PathBox execPrefix
+   Label gnuToolchainPrefixLabel { this, position = { 8, 220 }, labeledWindow = gnuToolchainPrefix, tabCycle = false, inactive = true };
+   PathBox gnuToolchainPrefix
+   {
+      this, anchor = { left = margin, top = 216, right = 8 };
+      text = $"GNU Toolchain Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+   };
+   Label sysrootLabel { this, position = { 8, 246 }, labeledWindow = sysroot, tabCycle = false, inactive = true };
+   PathBox sysroot
    {
-      this, anchor = { left = 120, top = 216, right = 8 };
-      text = $"Execution Prefix", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+      this, anchor = { left = margin, top = 242, right = 8 };
+      text = $"SYSROOT", typeExpected = directory, browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
+   };
+   Label executableLauncherLabel { this, position = { 8, 272 }, labeledWindow = executableLauncher, tabCycle = false, inactive = true };
+   PathBox executableLauncher
+   {
+      this, anchor = { left = margin, top = 268, right = 8 };
+      text = $"Executable Launcher", browseDialog = toolchainFileDialog, NotifyModified = NotifyModifiedDocument;
    };
 
    bool NotifyModifiedDocument(PathBox pathBox)
    {
-      if(loadedCompiler)
+      CompilerConfig compiler = loadedCompiler;
+      if(compiler)
       {
-         CompilerConfig compiler = loadedCompiler;
+         BasicValidatePathBoxPath(pathBox);
          if(pathBox == ecp)
             compiler.ecpCommand = pathBox.slashPath;
          else if(pathBox == ecc)
@@ -749,8 +775,12 @@ class CompilerToolchainTab : CompilersSubTab
             compiler.cxxCommand = pathBox.slashPath;
          else if(pathBox == make)
             compiler.makeCommand = pathBox.slashPath;
-         else if(pathBox == execPrefix)
+         else if(pathBox == executableLauncher)
             compiler.execPrefixCommand = pathBox.slashPath;
+         else if(pathBox == gnuToolchainPrefix)
+            compiler.gccPrefix = pathBox.slashPath;
+         else if(pathBox == sysroot)
+            compiler.sysroot = pathBox.slashPath;
          modifiedDocument = true;
          compilersTab.modifiedDocument = true;
       }
@@ -759,9 +789,9 @@ class CompilerToolchainTab : CompilersSubTab
 
    void Load()
    {
-      if(loadedCompiler)
+      CompilerConfig compiler = loadedCompiler;
+      if(compiler)
       {
-         CompilerConfig compiler = loadedCompiler;
          bool disabled = compiler.readOnly;
          bool isVC = compiler.type.isVC;
          ecp.path = compiler.ecpCommand;
@@ -772,16 +802,21 @@ class CompilerToolchainTab : CompilersSubTab
          cc.path = compiler.ccCommand;
          cxx.path = compiler.cxxCommand;
          make.path = compiler.makeCommand;
-         execPrefix.path = compiler.execPrefixCommand;
+         executableLauncher.path = compiler.executableLauncher;
+         gnuToolchainPrefix.path = compiler.gnuToolchainPrefix;
+         sysroot.path = compiler.sysroot;
 
          ecpLabel.disabled = ecp.disabled = disabled;
          eccLabel.disabled = ecc.disabled = disabled;
          ecsLabel.disabled = ecs.disabled = disabled;
          earLabel.disabled = ear.disabled = disabled;
          cppLabel.disabled = cpp.disabled = isVC || disabled;
+         cxxLabel.disabled = cxx.disabled = isVC || disabled;
          ccLabel.disabled = cc.disabled = isVC || disabled;
          makeLabel.disabled = make.disabled = disabled;
-         execPrefixLabel.disabled = execPrefix.disabled = disabled;
+         executableLauncherLabel.disabled = executableLauncher.disabled = disabled;
+         gnuToolchainPrefixLabel.disabled = gnuToolchainPrefix.disabled = disabled;
+         sysrootLabel.disabled = sysroot.disabled = disabled;
       }
       modifiedDocument = false;
    }
@@ -800,9 +835,13 @@ class CompilerEnvironmentTab : CompilersSubTab
 
       bool NotifyModified(NamedStringsBox stringsBox)
       {
-         loadedCompiler.environmentVars = stringsBox.namedStrings;
-         modifiedDocument = true;
-         compilersTab.modifiedDocument = true;
+         CompilerConfig compiler = loadedCompiler;
+         if(compiler)
+         {
+            compiler.environmentVars = stringsBox.namedStrings;
+            modifiedDocument = true;
+            compilersTab.modifiedDocument = true;
+         }
          return true;
       }
    };
@@ -813,9 +852,9 @@ class CompilerEnvironmentTab : CompilersSubTab
 
    void Load()
    {
-      if(loadedCompiler)
+      CompilerConfig compiler = loadedCompiler;
+      if(compiler)
       {
-         CompilerConfig compiler = loadedCompiler;
          envVars.namedStrings = compiler.environmentVars;
 
          modifiedDocument = false;
@@ -856,14 +895,14 @@ class CompilerOptionsTab : CompilersSubTab
       bool OnKeyDown(Key key, unichar ch)
       {
          if((SmartKey)key == enter)
-         {  
+         {
             DataBox::OnKeyDown(key, ch);
             return true;
          }
          else
             return DataBox::OnKeyDown(key, ch);
       }
-      
+
       bool OnActivate(bool active, Window previous, bool * goOnWithActivation, bool direct)
       {
          if(!active)
@@ -874,7 +913,7 @@ class CompilerOptionsTab : CompilersSubTab
          return true;
       }
 
-      bool NotifyChanged(bool closingDropDown)
+      bool NotifyChanged(DataBox dataBox, bool closingDropDown)
       {
          CompilerConfig compiler = loadedCompiler;
          if(compiler)
@@ -907,7 +946,7 @@ class CompilerOptionsTab : CompilersSubTab
 
    Button distccEnabled
    {
-      this, text = $"Use distcc", hotKey = altD, position = { 8, 96 };
+      this, text = $"Use distcc", hotKey = altD, position = { 158, 68 };
       isCheckbox = true;
 
       bool NotifyClicked(Button button, int x, int y, Modifiers mods)
@@ -924,18 +963,37 @@ class CompilerOptionsTab : CompilersSubTab
       }
    };
 
-   Label distccHostsLabel { this, position = { 8, 124 }, labeledWindow = distccHosts };
+   Label distccHostsLabel { this, position = { 8, 96 }, labeledWindow = distccHosts };
    EditBox distccHosts
    {
       this, text = $"distcc hosts", hotKey = altH;
-      position = { 88, 120 }, size = { 300 };
+      position = { 88, 92 }, size = { 300, 22 };
+
+      bool NotifyModified(EditBox editBox)
+      {
+         CompilerConfig compiler = loadedCompiler;
+         if(compiler)
+         {
+            compiler.distccHosts = editBox.contents;
+            modifiedDocument = true;
+            compilersTab.modifiedDocument = true;
+         }
+         return true;
+      }
+   }
+
+   Label lblPrepDefs { this, position = { 8, 126 }, labeledWindow = prepDefs };
+   StringListBox prepDefs
+   {
+      this, text = $"Preprocessor directives", hotKey = altP;
+      position = { 148, 124 }, size = { 300, 22 }, anchor = { left = 148, top = 124, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
          if(loadedCompiler)
          {
             CompilerConfig compiler = loadedCompiler;
-            compiler.distccHosts = editBox.contents;
+            compiler.prepDirectives = ((StringListBox)editBox).strings;
             modifiedDocument = true;
             compilersTab.modifiedDocument = true;
          }
@@ -943,18 +1001,18 @@ class CompilerOptionsTab : CompilersSubTab
       }
    }
 
-   Label lblExcludedLibraries { this, position = { 8, 152 }, labeledWindow = excludedLibraries };
-   StringListBox excludedLibraries
+   Label leCcompilerFlags { this, position = { 8, 156 }, labeledWindow = eCcompilerFlags };
+   StringListBox eCcompilerFlags
    {
-      this, text = $"Libraries to exclude:", hotKey = altX;
-      position = { 148, 152 }, size = { 300 };
+      this, text = $"Additional eC compiler flags", hotKey = altG;
+      position = { 148, 154 }, size = { 300, 22 }, anchor = { left = 148, top = 154, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
          if(loadedCompiler)
          {
             CompilerConfig compiler = loadedCompiler;
-            compiler.excludeLibs = ((StringListBox)editBox).strings;
+            compiler.eCcompilerFlags = ((StringListBox)editBox).strings;
             modifiedDocument = true;
             compilersTab.modifiedDocument = true;
          }
@@ -962,18 +1020,56 @@ class CompilerOptionsTab : CompilersSubTab
       }
    }
 
-   Label lblPrepDefs { this, position = { 8, 180 }, labeledWindow = prepDefs };
-   StringListBox prepDefs
+   Label lblCompilerFlags { this, position = { 8, 186 }, labeledWindow = compilerFlags };
+   StringListBox compilerFlags
    {
-      this, text = $"Preprocessor directives:", hotKey = altP;
-      position = { 148, 180 }, size = { 300 };
+      this, text = $"Additional compiler flags", hotKey = altR;
+      position = { 148, 184 }, size = { 300, 22 }, anchor = { left = 148, top = 184, right = 8 };
 
       bool NotifyModified(EditBox editBox)
       {
          if(loadedCompiler)
          {
             CompilerConfig compiler = loadedCompiler;
-            compiler.prepDirectives = ((StringListBox)editBox).strings;
+            compiler.compilerFlags = ((StringListBox)editBox).strings;
+            modifiedDocument = true;
+            compilersTab.modifiedDocument = true;
+         }
+         return true;
+      }
+   }
+
+   Label lblLinkerFlags { this, position = { 8, 216 }, labeledWindow = linkerFlags };
+   StringListBox linkerFlags
+   {
+      this, text = $"Additional linker flags", hotKey = altL;
+      position = { 148, 214 }, size = { 300, 22 }, anchor = { left = 148, top = 214, right = 8 };
+
+      bool NotifyModified(EditBox editBox)
+      {
+         if(loadedCompiler)
+         {
+            CompilerConfig compiler = loadedCompiler;
+            compiler.linkerFlags = ((StringListBox)editBox).strings;
+            modifiedDocument = true;
+            compilersTab.modifiedDocument = true;
+         }
+         return true;
+      }
+   }
+
+   Label lblExcludedLibraries { this, position = { 8, 246 }, labeledWindow = excludedLibraries };
+   StringListBox excludedLibraries
+   {
+      this, text = $"Libraries to exclude", hotKey = altX;
+      position = { 148, 244 }, size = { 300, 22 }, anchor = { left = 148, top = 244, right = 8 };
+
+      bool NotifyModified(EditBox editBox)
+      {
+         if(loadedCompiler)
+         {
+            CompilerConfig compiler = loadedCompiler;
+            compiler.excludeLibs = ((StringListBox)editBox).strings;
             modifiedDocument = true;
             compilersTab.modifiedDocument = true;
          }
@@ -995,9 +1091,9 @@ class CompilerOptionsTab : CompilersSubTab
 
    void Load()
    {
-      if(loadedCompiler)
+      CompilerConfig compiler = loadedCompiler;
+      if(compiler)
       {
-         CompilerConfig compiler = loadedCompiler;
          bool disabled = compiler.readOnly;
          targetPlatform.currentRow = targetPlatform.FindRow(compiler.targetPlatform);
          numJobs = compiler.numJobs;
@@ -1008,7 +1104,10 @@ class CompilerOptionsTab : CompilersSubTab
          distccHosts.contents = compiler.distccHosts;
          prepDefs.strings = compiler.prepDirectives;
          excludedLibraries.strings = compiler.excludeLibs;
-         
+         eCcompilerFlags.strings = compiler.eCcompilerFlags;
+         compilerFlags.strings = compiler.compilerFlags;
+         linkerFlags.strings = compiler.linkerFlags;
+
          labelTargetPlatform.disabled = disabled;
          targetPlatform.disabled = disabled;
 
@@ -1051,8 +1150,9 @@ class ProjectOptionsTab : GlobalSettingsSubTab
       this, size = { 160, 21 }, position = { 8, 52 }, anchor = { left = 8, top = 52, right = 8 };
       text = $"Default Target Directory", hotKey = altT;
 
-      bool NotifyModified(PathBox editBox)
+      bool NotifyModified(PathBox pathBox)
       {
+         BasicValidatePathBoxPath(pathBox);
          modifiedDocument = true;
          return true;
       }
@@ -1064,15 +1164,16 @@ class ProjectOptionsTab : GlobalSettingsSubTab
       this, size = { 160, 21 }, position = { 8, 96 }, anchor = { left = 8, top = 96, right = 8 };
       text = $"Default Intermediate Objects Directory", hotKey = altI;
 
-      bool NotifyModified(PathBox editBox)
+      bool NotifyModified(PathBox pathBox)
       {
+         BasicValidatePathBoxPath(pathBox);
          modifiedDocument = true;
          return true;
       }
    };
 }
 
-// COMPILER TOFIX: if class GlobalSettingsSubTab is after class WorkspaceOptionsTab the OnPostCreate 
+// COMPILER TOFIX: if class GlobalSettingsSubTab is after class WorkspaceOptionsTab the OnPostCreate
 //                 of WorkspaceOptionsTab will *not* be called!
 class GlobalSettingsSubTab : Tab
 {
@@ -1115,7 +1216,7 @@ class WorkspaceOptionsTab : GlobalSettingsSubTab
          for(compiler : dialog.ideSettings.compilerConfigs)
          {
             row = defaultCompilerDropBox.AddString(compiler.name);
-            if(dialog.ideSettings.defaultCompiler && dialog.ideSettings.defaultCompiler[0] && 
+            if(dialog.ideSettings.defaultCompiler && dialog.ideSettings.defaultCompiler[0] &&
                   !strcmp(compiler.name, dialog.ideSettings.defaultCompiler))
                defaultCompilerDropBox.currentRow = row;
          }