Changeset 50 for trunk


Ignore:
Timestamp:
Jul 13, 2012, 1:37:51 PM (12 years ago)
Author:
chronos
Message:
  • Added: Dialog for setting target options.
Location:
trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormTargets.lfm

    r42 r50  
    88  ClientWidth = 574
    99  OnShow = FormShow
    10   LCLVersion = '0.9.31'
     10  LCLVersion = '1.1'
    1111  object ListView1: TListView
    1212    Left = 8
  • trunk/Forms/UFormTargets.pas

    r42 r50  
    3131
    3232uses
    33   UFormMain, UTarget;
    34 
    35 resourcestring
    36   SCompilerOptions = 'Compiler options';
    37   SCompilerPath = 'Compiler path';
     33  UFormMain, UTarget, UFormTargetOptions;
    3834
    3935{ TFormCompilers }
     
    5753procedure TFormCompilers.ListView1DblClick(Sender: TObject);
    5854begin
    59   with TTarget(ListView1.Selected.Data) do
    60     CompilerPath := InputBox(SCompilerOptions, SCompilerPath,
    61       CompilerPath);
    62   ReloadList;
     55  FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data));
     56  if FormTargetOptions.ShowModal = mrOk then begin
     57    FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data));
     58    ReloadList;
     59  end;
    6360end;
    6461
  • trunk/Languages/LazFuckIDE.cs.po

    r48 r50  
    55"POT-Creation-Date: \n"
    66"PO-Revision-Date: \n"
    7 "Last-Translator: Chronos <robie@centrum.cz>\n"
     7"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
    88"Language-Team: \n"
    99"MIME-Version: 1.0\n"
     
    141141msgctxt "tformsourcecode.aclear.caption"
    142142msgid "Clear"
    143 msgstr ""
     143msgstr "Vyčistit"
    144144
    145145#: tformsourcecode.aclear.hint
    146146msgctxt "tformsourcecode.aclear.hint"
    147147msgid "Clear"
    148 msgstr ""
     148msgstr "Vyčistit"
    149149
    150150#: tformsourcecode.acopytoclipboard.caption
    151151msgctxt "tformsourcecode.acopytoclipboard.caption"
    152152msgid "Copy"
    153 msgstr ""
     153msgstr "Kopírovat"
    154154
    155155#: tformsourcecode.acopytoclipboard.hint
    156156msgctxt "tformsourcecode.acopytoclipboard.hint"
    157157msgid "Copy"
    158 msgstr ""
     158msgstr "Kopírovat"
    159159
    160160#: tformsourcecode.acuttoclipboard.caption
    161161msgctxt "tformsourcecode.acuttoclipboard.caption"
    162162msgid "Cut"
    163 msgstr ""
     163msgstr "Vyříznout"
    164164
    165165#: tformsourcecode.acuttoclipboard.hint
    166166msgctxt "tformsourcecode.acuttoclipboard.hint"
    167167msgid "Cut"
    168 msgstr ""
     168msgstr "Vyříznout"
    169169
    170170#: tformsourcecode.aformatsource.caption
     
    180180#: tformsourcecode.ageneratenumber.caption
    181181msgid "Generate number"
    182 msgstr ""
     182msgstr "Generopvat číslo"
    183183
    184184#: tformsourcecode.apastefromclipboard.caption
    185185msgctxt "tformsourcecode.apastefromclipboard.caption"
    186186msgid "Paste"
    187 msgstr ""
     187msgstr "VloÅŸit"
    188188
    189189#: tformsourcecode.apastefromclipboard.hint
    190190msgctxt "tformsourcecode.apastefromclipboard.hint"
    191191msgid "Paste"
    192 msgstr ""
     192msgstr "VloÅŸit"
    193193
    194194#: tformsourcecode.aselectall.caption
    195195msgctxt "tformsourcecode.aselectall.caption"
    196196msgid "Select all"
    197 msgstr ""
     197msgstr "Vybrat vÅ¡e"
    198198
    199199#: tformsourcecode.aselectall.hint
    200200msgctxt "tformsourcecode.aselectall.hint"
    201201msgid "Select all"
    202 msgstr ""
     202msgstr "Vybrat vÅ¡e"
    203203
    204204#: tformsourcecode.ashrinksource.caption
     
    226226msgid "Target code"
    227227msgstr "CílovÜ kód"
     228
     229#: tformtargetoptions.buttoncancel.caption
     230msgctxt "tformtargetoptions.buttoncancel.caption"
     231msgid "Cancel"
     232msgstr "ZruÅ¡it"
     233
     234#: tformtargetoptions.buttoncompiler.caption
     235msgctxt "tformtargetoptions.buttoncompiler.caption"
     236msgid "Select..."
     237msgstr "Vybrat..."
     238
     239#: tformtargetoptions.buttonexecute.caption
     240msgctxt "tformtargetoptions.buttonexecute.caption"
     241msgid "Select..."
     242msgstr "Vybrat..."
     243
     244#: tformtargetoptions.buttonok.caption
     245msgctxt "tformtargetoptions.buttonok.caption"
     246msgid "Ok"
     247msgstr "Ok"
     248
     249#: tformtargetoptions.caption
     250msgid "Target options"
     251msgstr "Nastavení cíle"
     252
     253#: tformtargetoptions.label1.caption
     254msgid "Compiler location:"
     255msgstr "Umístění překladače:"
     256
     257#: tformtargetoptions.label2.caption
     258msgid "Executor location:"
     259msgstr "Umístění spouÅ¡těče:"
    228260
    229261#: tinterpreterform.caption
     
    463495
    464496#: toptionsform.buttoncancel.caption
     497msgctxt "toptionsform.buttoncancel.caption"
    465498msgid "Cancel"
    466499msgstr "Zrušit"
    467500
    468501#: toptionsform.buttonok.caption
     502msgctxt "toptionsform.buttonok.caption"
    469503msgid "Ok"
    470504msgstr "Ok"
     
    573607msgstr "Generování čísla"
    574608
     609#: uformtargetoptions.scompileroptions
     610msgctxt "uformtargetoptions.scompileroptions"
     611msgid "Compiler options"
     612msgstr "Volby překladače"
     613
     614#: uformtargetoptions.scompilerpath
     615msgctxt "uformtargetoptions.scompilerpath"
     616msgid "Compiler path"
     617msgstr "Cesta překladače"
     618
     619#: uformtargetoptions.sselectdirectory
     620msgid "Select directory"
     621msgstr "Vyberte adresář"
     622
    575623#: uformtargets.scompileroptions
    576624msgctxt "uformtargets.scompileroptions"
  • trunk/Languages/LazFuckIDE.po

    r48 r50  
    217217msgstr ""
    218218
     219#: tformtargetoptions.buttoncancel.caption
     220msgctxt "TFORMTARGETOPTIONS.BUTTONCANCEL.CAPTION"
     221msgid "Cancel"
     222msgstr ""
     223
     224#: tformtargetoptions.buttoncompiler.caption
     225msgctxt "tformtargetoptions.buttoncompiler.caption"
     226msgid "Select..."
     227msgstr ""
     228
     229#: tformtargetoptions.buttonexecute.caption
     230msgctxt "TFORMTARGETOPTIONS.BUTTONEXECUTE.CAPTION"
     231msgid "Select..."
     232msgstr ""
     233
     234#: tformtargetoptions.buttonok.caption
     235msgctxt "TFORMTARGETOPTIONS.BUTTONOK.CAPTION"
     236msgid "Ok"
     237msgstr ""
     238
     239#: tformtargetoptions.caption
     240msgid "Target options"
     241msgstr ""
     242
     243#: tformtargetoptions.label1.caption
     244msgid "Compiler location:"
     245msgstr ""
     246
     247#: tformtargetoptions.label2.caption
     248msgid "Executor location:"
     249msgstr ""
     250
    219251#: tinterpreterform.caption
    220252msgctxt "tinterpreterform.caption"
     
    452484
    453485#: toptionsform.buttoncancel.caption
     486msgctxt "toptionsform.buttoncancel.caption"
    454487msgid "Cancel"
    455488msgstr ""
    456489
    457490#: toptionsform.buttonok.caption
     491msgctxt "toptionsform.buttonok.caption"
    458492msgid "Ok"
    459493msgstr ""
     
    562596msgstr ""
    563597
     598#: uformtargetoptions.scompileroptions
     599msgctxt "uformtargetoptions.scompileroptions"
     600msgid "Compiler options"
     601msgstr ""
     602
     603#: uformtargetoptions.scompilerpath
     604msgctxt "uformtargetoptions.scompilerpath"
     605msgid "Compiler path"
     606msgstr ""
     607
     608#: uformtargetoptions.sselectdirectory
     609msgid "Select directory"
     610msgstr ""
     611
    564612#: uformtargets.scompileroptions
    565613msgctxt "uformtargets.scompileroptions"
  • trunk/LazFuckIDE.lpi

    r48 r50  
    9090      </Item5>
    9191    </RequiredPackages>
    92     <Units Count="17">
     92    <Units Count="18">
    9393      <Unit0>
    9494        <Filename Value="LazFuckIDE.lpr"/>
     
    124124        <IsPartOfProject Value="True"/>
    125125        <ComponentName Value="FormCompilers"/>
     126        <HasResources Value="True"/>
    126127        <ResourceBaseClass Value="Form"/>
    127128        <UnitName Value="UFormTargets"/>
     
    203204        <UnitName Value="UFormTargetCode"/>
    204205      </Unit16>
     206      <Unit17>
     207        <Filename Value="Forms\UFormTargetOptions.pas"/>
     208        <IsPartOfProject Value="True"/>
     209        <ComponentName Value="FormTargetOptions"/>
     210        <ResourceBaseClass Value="Form"/>
     211        <UnitName Value="UFormTargetOptions"/>
     212      </Unit17>
    205213    </Units>
    206214  </ProjectOptions>
  • trunk/LazFuckIDE.lpr

    r46 r50  
    1313  UFormOptions, CoolTranslator, Common,
    1414  TemplateGenerics, UFormTargets, UFormOutput, UFormInput, UFormMemory,
    15   UFormMessages, UFormSourceCode, UFormTargetCode;
     15  UFormMessages, UFormSourceCode, UFormTargetCode, UFormTargetOptions;
    1616
    1717{$R *.res}
     
    3131  Application.CreateForm(TFormSourceCode, FormSourceCode);
    3232  Application.CreateForm(TFormTargetCode, FormTargetCode);
     33  Application.CreateForm(TFormTargetOptions, FormTargetOptions);
    3334  Application.Run;
    3435end.
  • trunk/Target/UTarget.pas

    r48 r50  
    257257    OpenKey(Key + '\Compiler', True);
    258258    for I := 0 to Count - 1 do
    259     with TTarget(Items[I]) do
    260       if ValueExists(Name) then CompilerPath := ReadString(Name);
     259      TTarget(Items[I]).LoadFromRegistry(Root, Key + '\Compiler');
    261260  finally
    262261    Free;
     
    274273    for I := 0 to Count - 1 do
    275274    with TTarget(Items[I]) do
    276       if CompilerPath <> '' then WriteString(Name, CompilerPath)
    277         else DeleteValue(Name);
     275      TTarget(Items[I]).SaveToRegistry(Root, Key + '\Compiler');
    278276  finally
    279277    Free;
     
    465463procedure TTarget.LoadFromRegistry(Root: HKEY; Key: string);
    466464begin
    467 
     465  with TRegistryEx.Create do
     466  try
     467    RootKey := Root;
     468    OpenKey(Key + '\' + Name, True);
     469    CompilerPath := ReadStringWithDefault('CompilerPath', CompilerPath);
     470    ExecutorPath := ReadStringWithDefault('ExecutorPath', ExecutorPath);
     471  finally
     472    Free;
     473  end;
    468474end;
    469475
    470476procedure TTarget.SaveToRegistry(Root: HKEY; Key: string);
    471477begin
    472 
     478  with TRegistryEx.Create do
     479  try
     480    RootKey := Root;
     481    OpenKey(Key + '\' + Name, True);
     482    if CompilerPath <> '' then WriteString('CompilerPath', CompilerPath)
     483      else DeleteValue('CompilerPath');
     484    if ExecutorPath <> '' then WriteString('ExecutorPath', ExecutorPath)
     485      else DeleteValue('ExecutorPath');
     486  finally
     487    Free;
     488  end;
    473489end;
    474490
Note: See TracChangeset for help on using the changeset viewer.