Changeset 22


Ignore:
Timestamp:
Feb 12, 2012, 8:15:36 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Default language selection and remeber explicitly selected language.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/LazFuckIDE.cs.po

    r21 r22  
    200200#: tmainform.menuitemopenrecent.caption
    201201msgid "Open recent"
    202 msgstr ""
     202msgstr "Otevřít nedávnÃœ"
    203203
    204204#: tmainform.menuitemtarget.caption
     
    226226#: toptionsform.checkbox1.caption
    227227msgid "Reopend last opened project"
    228 msgstr ""
     228msgstr "Otevřít naposledy otevřenÃœ projekt"
    229229
    230230#: toptionsform.label1.caption
  • trunk/UMainForm.pas

    r21 r22  
    221221    OpenKey(Key, True);
    222222    OpenProjectOnStart := ReadBoolWithDefault('OpenProjectOnStart', True);
     223    BrainFuckInterpreter.CellSize := ReadIntegerWithDefault('CellSize', 256);
     224    BrainFuckInterpreter.MemorySize := ReadIntegerWithDefault('MemorySize', 30000);
     225    if ValueExists('LanguageCode') then
     226      CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
     227      else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');
    223228  finally
    224229    Free;
     
    235240    OpenKey(Key, True);
    236241    WriteBool('OpenProjectOnStart', OpenProjectOnStart);
     242    WriteInteger('CellSize', BrainFuckInterpreter.CellSize);
     243    WriteInteger('MemorySize', BrainFuckInterpreter.MemorySize);
     244    if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then
     245      WriteString('LanguageCode', CoolTranslator1.Language.Code)
     246      else DeleteValue('LanguageCode');
    237247  finally
    238248    Free;
     
    284294  BrainFuckInterpreter.OnChangeState := BrainFuckInterpreterChangeState;
    285295  BrainFuckCompiler := TBrainFuckCompiler.Create;
    286   CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('cs');
    287296  Compilers := TListObject.Create;
    288297  Compilers.Add(TBrainFuckCompilerDelphi.Create);
  • trunk/UOptionsForm.pas

    r21 r22  
    4747begin
    4848  MainForm.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
    49   ComboBoxLanguage.ItemIndex := MainForm.CoolTranslator1.Languages.IndexOf(MainForm.CoolTranslator1.Language);
     49  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(MainForm.CoolTranslator1.Language);
    5050  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    5151  CheckBox1.Checked := MainForm.OpenProjectOnStart;
Note: See TracChangeset for help on using the changeset viewer.