Changeset 15 for trunk


Ignore:
Timestamp:
Feb 27, 2018, 6:11:44 PM (7 years ago)
Author:
chronos
Message:
  • Added: Partial support for color theming.
  • Added: Allow to edit contact properties in the list of all.
Location:
trunk
Files:
1 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.pas

    r1 r15  
    6969begin
    7070  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     71  Core.ThemeManager1.UseTheme(Self);
    7172end;
    7273
  • trunk/Forms/UFormContact.lfm

    r9 r15  
    1717    Top = 8
    1818    Width = 744
    19     ActivePage = TabSheetGeneral
     19    ActivePage = TabSheetAll
    2020    Anchors = [akTop, akLeft, akRight, akBottom]
    21     TabIndex = 0
     21    TabIndex = 2
    2222    TabOrder = 0
    2323    object TabSheetGeneral: TTabSheet
     
    398398          end>
    399399        OwnerData = True
     400        PopupMenu = PopupMenu1
    400401        ReadOnly = True
    401402        RowSelect = True
     
    403404        ViewStyle = vsReport
    404405        OnData = ListView1Data
     406        OnDblClick = AEditFieldExecute
    405407      end
    406408    end
     
    426428    TabOrder = 2
    427429  end
     430  object ActionList1: TActionList
     431    Images = Core.ImageList1
     432    left = 317
     433    top = 157
     434    object AEditField: TAction
     435      Caption = 'Edit'
     436      OnExecute = AEditFieldExecute
     437    end
     438  end
     439  object PopupMenu1: TPopupMenu
     440    Images = Core.ImageList1
     441    left = 172
     442    top = 159
     443    object MenuItem1: TMenuItem
     444      Action = AEditField
     445    end
     446  end
    428447end
  • trunk/Forms/UFormContact.pas

    r9 r15  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, UContact;
     9  ComCtrls, ActnList, Menus, UContact;
    1010
    1111type
     
    1414
    1515  TFormContact = class(TForm)
     16    AEditField: TAction;
     17    ActionList1: TActionList;
    1618    ButtonCancel: TButton;
    1719    ButtonOk: TButton;
     
    6365    ListView1: TListView;
    6466    MemoNotes: TMemo;
     67    MenuItem1: TMenuItem;
    6568    PageControlContact: TPageControl;
     69    PopupMenu1: TPopupMenu;
    6670    TabSheetGeneral: TTabSheet;
    6771    TabSheetDetails: TTabSheet;
    6872    TabSheetAll: TTabSheet;
     73    procedure AEditFieldExecute(Sender: TObject);
    6974    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7075    procedure FormCreate(Sender: TObject);
     
    8994uses
    9095  UCore;
     96
     97resourcestring
     98  SFieldEdit = 'Field edit';
     99  SEditFieldValue = 'Edit field value';
    91100
    92101{ TFormContact }
     
    126135end;
    127136
     137procedure TFormContact.AEditFieldExecute(Sender: TObject);
     138begin
     139  if Assigned(ListView1.Selected) then begin
     140    Contact.Fields[TContactFieldIndex(ListView1.Selected.Index)] :=
     141      InputBox(SFieldEdit, SEditFieldValue, Contact.Fields[TContactFieldIndex(ListView1.Selected.Index)]);
     142  end;
     143end;
     144
    128145procedure TFormContact.FormCreate(Sender: TObject);
    129146begin
    130147  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     148  Core.ThemeManager1.UseTheme(Self);
    131149  Contact := nil;
    132150end;
  • trunk/Forms/UFormContacts.pas

    r14 r15  
    101101begin
    102102  Core.PersistentForm1.Load(Self);
     103  Core.ThemeManager1.UseTheme(Self);
    103104  ReloadList;
    104105  UpdateInterface;
  • trunk/Forms/UFormMain.lfm

    r14 r15  
    55  Width = 785
    66  Caption = 'vCard Studio'
    7   ClientHeight = 497
     7  ClientHeight = 506
    88  ClientWidth = 785
     9  DesignTimePPI = 120
    910  Menu = MainMenu1
    1011  OnClose = FormClose
     
    1213  OnCreate = FormCreate
    1314  OnShow = FormShow
    14   LCLVersion = '1.8.0.4'
     15  LCLVersion = '1.8.0.6'
    1516  object CoolBar1: TCoolBar
    1617    Left = 0
    17     Height = 32
     18    Height = 38
    1819    Top = 0
    1920    Width = 785
     
    3536      AnchorSideTop.Control = CoolBar1
    3637      Left = 24
    37       Height = 28
     38      Height = 22
    3839      Top = 5
    39       Width = 132
     40      Width = 105
    4041      Align = alNone
    4142      AutoSize = True
     
    5556      end
    5657      object ToolButton2: TToolButton
    57         Left = 30
     58        Left = 24
    5859        Top = 0
    5960        Action = Core.AFileOpen
     
    6263      end
    6364      object ToolButton3: TToolButton
    64         Left = 74
     65        Left = 59
    6566        Top = 0
    6667        Action = Core.AFileSave
    6768      end
    6869      object ToolButton4: TToolButton
    69         Left = 103
     70        Left = 82
    7071        Top = 0
    7172        Action = Core.AFileClose
     
    7677      AnchorSideTop.Control = CoolBar1
    7778      Left = 188
    78       Height = 28
     79      Height = 22
    7980      Top = 5
    80       Width = 30
     81      Width = 24
    8182      Align = alNone
    8283      AutoSize = True
     
    99100  object StatusBar1: TStatusBar
    100101    Left = 0
    101     Height = 30
    102     Top = 467
     102    Height = 28
     103    Top = 478
    103104    Width = 785
    104105    Panels = <   
  • trunk/Forms/UFormMain.pas

    r14 r15  
    9393begin
    9494  Core.Initialize;
     95  Core.ThemeManager1.UseTheme(Self);
    9596  Core.PersistentForm1.Load(Self);
    9697  FormContacts.ManualDock(Self, nil, alClient);
  • trunk/Forms/UFormSettings.lfm

    r1 r15  
    6363  end
    6464  object SpinEditDPI: TSpinEdit
    65     Left = 152
     65    Left = 160
    6666    Height = 28
    6767    Top = 144
     
    9797    Anchors = [akLeft, akRight, akBottom]
    9898  end
     99  object Label2: TLabel
     100    Left = 20
     101    Height = 20
     102    Top = 184
     103    Width = 48
     104    Caption = 'Theme:'
     105    ParentColor = False
     106  end
     107  object ComboBoxTheme: TComboBox
     108    Left = 160
     109    Height = 28
     110    Top = 184
     111    Width = 260
     112    ItemHeight = 20
     113    Style = csDropDownList
     114    TabOrder = 6
     115  end
    99116end
  • trunk/Forms/UFormSettings.pas

    r1 r15  
    2020    CheckBoxAutomaticDPI: TCheckBox;
    2121    ComboBoxLanguage: TComboBox;
     22    ComboBoxTheme: TComboBox;
    2223    Label1: TLabel;
     24    Label2: TLabel;
    2325    LabelDPI: TLabel;
    2426    SpinEditDPI: TSpinEdit;
     
    3941  FormSettings: TFormSettings;
    4042
     43
    4144implementation
    4245
     
    4447
    4548uses
    46   UCore;
     49  UCore, UTheme;
    4750
    4851{ TFormSettings }
     
    5356  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
    5457  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
     58
     59  Core.ThemeManager1.Themes.LoadToStrings(ComboBoxTheme.Items);
     60  ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.ThemeManager1.Theme);
     61  if ComboBoxTheme.ItemIndex = -1 then ComboBoxTheme.ItemIndex := 0;
    5562end;
    5663
     
    5865begin
    5966  if ComboBoxLanguage.ItemIndex <> -1 then
    60     Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     67    Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxTheme.ItemIndex]);
     68  if ComboBoxTheme.ItemIndex <> -1 then
     69    Core.ThemeManager1.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
    6170end;
    6271
     
    7483begin
    7584  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     85  Core.ThemeManager1.UseTheme(Self);
    7686end;
    7787
  • trunk/Install/win/vCard Studio.iss

    r6 r15  
    6969Root: HKCR; Subkey: "{#FileTypeName}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
    7070
     71#define FileTypeName "vCard file"
     72Root: HKCR; Subkey: ".vcard"; ValueType: string; ValueName: ""; ValueData: "{#FileTypeName}"; Flags: uninsdeletevalue
     73Root: HKCR; Subkey: "{#FileTypeName}"; ValueType: string; ValueName: ""; ValueData: "{#FileTypeName}"; Flags: uninsdeletekey
     74Root: HKCR; Subkey: "{#FileTypeName}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
     75Root: HKCR; Subkey: "{#FileTypeName}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
     76
    7177[Files]
    7278Source: "{#MyAppSubDir}\lib\x86_64-win64-Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
  • trunk/Languages/vCardStudio.cs.po

    r14 r15  
    1010"Content-Transfer-Encoding: 8bit\n"
    1111"Language: cs\n"
    12 "X-Generator: Poedit 2.0.4\n"
     12"X-Generator: Poedit 1.8.8\n"
    1313
    1414#: tcore.aabout.caption
     
    7878msgstr "  "
    7979
     80#: tformcontact.aeditfield.caption
     81msgid "Edit"
     82msgstr "Upravit"
     83
    8084#: tformcontact.buttoncancel.caption
    8185msgctxt "tformcontact.buttoncancel.caption"
     
    303307msgstr "Jazyk:"
    304308
     309#: tformsettings.label2.caption
     310msgid "Theme:"
     311msgstr "Téma:"
     312
    305313#: tformsettings.labeldpi.caption
    306314msgid "DPI:"
     
    357365msgstr "Verze"
    358366
     367#: uformcontact.seditfieldvalue
     368msgid "Edit field value"
     369msgstr "Upravit hodnotu položky"
     370
     371#: uformcontact.sfieldedit
     372msgid "Field edit"
     373msgstr "Upravit pole"
     374
    359375#: uformcontacts.sremovecontacts
    360376msgid "Remove contacts"
  • trunk/Languages/vCardStudio.po

    r14 r15  
    6868msgstr ""
    6969
     70#: tformcontact.aeditfield.caption
     71msgid "Edit"
     72msgstr ""
     73
    7074#: tformcontact.buttoncancel.caption
    7175msgctxt "tformcontact.buttoncancel.caption"
     
    291295msgstr ""
    292296
     297#: tformsettings.label2.caption
     298msgid "Theme:"
     299msgstr ""
     300
    293301#: tformsettings.labeldpi.caption
    294302msgid "DPI:"
     
    345353msgstr ""
    346354
     355#: uformcontact.seditfieldvalue
     356msgid "Edit field value"
     357msgstr ""
     358
     359#: uformcontact.sfieldedit
     360msgid "Field edit"
     361msgstr ""
     362
    347363#: uformcontacts.sremovecontacts
    348364msgid "Remove contacts"
  • trunk/Packages/Common/Common.lpk

    r1 r15  
    1111      <PathDelim Value="\"/>
    1212      <SearchPaths>
    13         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     13        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1414      </SearchPaths>
     15      <Parsing>
     16        <SyntaxOptions>
     17          <SyntaxMode Value="Delphi"/>
     18          <CStyleOperator Value="False"/>
     19          <AllowLabel Value="False"/>
     20          <CPPInline Value="False"/>
     21        </SyntaxOptions>
     22      </Parsing>
     23      <CodeGeneration>
     24        <Optimizations>
     25          <OptimizationLevel Value="0"/>
     26        </Optimizations>
     27      </CodeGeneration>
     28      <Linking>
     29        <Debugging>
     30          <GenerateDebugInfo Value="False"/>
     31        </Debugging>
     32      </Linking>
     33      <Other>
     34        <CompilerMessages>
     35          <IgnoredMessages idx5024="True"/>
     36        </CompilerMessages>
     37      </Other>
    1538    </CompilerOptions>
    1639    <Description Value="Various libraries"/>
    1740    <License Value="GNU/GPL"/>
    1841    <Version Minor="7"/>
    19     <Files Count="20">
     42    <Files Count="21">
    2043      <Item1>
    2144        <Filename Value="StopWatch.pas"/>
     
    106129        <UnitName Value="UScaleDPI"/>
    107130      </Item20>
     131      <Item21>
     132        <Filename Value="UTheme.pas"/>
     133        <HasRegisterProc Value="True"/>
     134        <UnitName Value="UTheme"/>
     135      </Item21>
    108136    </Files>
    109137    <i18n>
  • trunk/Packages/Common/Common.pas

    r1 r15  
    88
    99uses
    10   StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading, 
    11   UMemory, UResetableThread, UPool, ULastOpenedList, URegistry, 
    12   UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort, 
    13   UPersistentForm, UFindFile, UScaleDPI, LazarusPackageIntf;
     10  StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading,
     11  UMemory, UResetableThread, UPool, ULastOpenedList, URegistry,
     12  UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort,
     13  UPersistentForm, UFindFile, UScaleDPI, UTheme, LazarusPackageIntf;
    1414
    1515implementation
     
    2525  RegisterUnit('UFindFile', @UFindFile.Register);
    2626  RegisterUnit('UScaleDPI', @UScaleDPI.Register);
     27  RegisterUnit('UTheme', @UTheme.Register);
    2728end;
    2829
  • trunk/Packages/Common/UCommon.pas

    r1 r15  
    2828    unfDNSDomainName = 11);
    2929
     30  TFilterMethodMethod = function (FileName: string): Boolean of object;
    3031var
    3132  ExceptionHandler: TExceptionEvent;
     
    6364procedure OpenWebPage(URL: string);
    6465procedure OpenFileInShell(FileName: string);
    65 procedure ExecuteProgram(CommandLine: string);
     66procedure ExecuteProgram(Executable: string; Parameters: array of string);
    6667procedure FreeThenNil(var Obj);
    6768function RemoveQuotes(Text: string): string;
     
    7071function GetDirCount(Dir: string): Integer;
    7172function MergeArray(A, B: array of string): TArrayOfString;
     73function LoadFileToStr(const FileName: TFileName): AnsiString;
     74procedure SearchFiles(AList: TStrings; Dir: string;
     75  FilterMethod: TFilterMethodMethod);
    7276
    7377
     
    111115  Path := IncludeTrailingPathDelimiter(APath);
    112116
    113   Find := FindFirst(UTF8Decode(Path + AFileSpec), faAnyFile xor faDirectory, SearchRec);
     117  Find := FindFirst(Path + AFileSpec, faAnyFile xor faDirectory, SearchRec);
    114118  while Find = 0 do begin
    115     DeleteFile(Path + UTF8Encode(SearchRec.Name));
     119    DeleteFile(Path + SearchRec.Name);
    116120
    117121    Find := SysUtils.FindNext(SearchRec);
     
    428432end;
    429433
    430 procedure ExecuteProgram(CommandLine: string);
     434procedure ExecuteProgram(Executable: string; Parameters: array of string);
    431435var
    432436  Process: TProcess;
     437  I: Integer;
    433438begin
    434439  try
    435440    Process := TProcess.Create(nil);
    436     Process.CommandLine := CommandLine;
     441    Process.Executable := Executable;
     442    for I := 0 to Length(Parameters) - 1 do
     443      Process.Parameters.Add(Parameters[I]);
    437444    Process.Options := [poNoConsole];
    438445    Process.Execute;
     
    455462procedure OpenFileInShell(FileName: string);
    456463begin
    457   ExecuteProgram('cmd.exe /c start "' + FileName + '"');
     464  ExecuteProgram('cmd.exe', ['/c', 'start', FileName]);
    458465end;
    459466
     
    492499end;
    493500
     501function LoadFileToStr(const FileName: TFileName): AnsiString;
     502var
     503  FileStream: TFileStream;
     504  Read: Integer;
     505begin
     506  Result := '';
     507  FileStream := TFileStream.Create(FileName, fmOpenRead);
     508  try
     509    if FileStream.Size > 0 then begin
     510      SetLength(Result, FileStream.Size);
     511      Read := FileStream.Read(Pointer(Result)^, FileStream.Size);
     512      SetLength(Result, Read);
     513    end;
     514  finally
     515    FileStream.Free;
     516  end;
     517end;
     518
     519function DefaultSearchFilter(const FileName: string): Boolean;
     520begin
     521  Result := True;
     522end;
     523
     524procedure SearchFiles(AList: TStrings; Dir: string;
     525  FilterMethod: TFilterMethodMethod);
     526var
     527  SR: TSearchRec;
     528begin
     529  Dir := IncludeTrailingPathDelimiter(Dir);
     530  if FindFirst(Dir + '*', faAnyFile, SR) = 0 then
     531    try
     532      repeat
     533        if (SR.Name = '.') or (SR.Name = '..') or not FilterMethod(SR.Name) then Continue;
     534        AList.Add(Dir + SR.Name);
     535        if (SR.Attr and faDirectory) <> 0 then
     536          SearchFiles(AList, Dir + SR.Name, FilterMethod);
     537      until FindNext(SR) <> 0;
     538    finally
     539      FindClose(SR);
     540    end;
     541end;
    494542
    495543
  • trunk/Packages/Common/UListViewSort.pas

    r1 r15  
    8181    FOnChange: TNotifyEvent;
    8282    FStringGrid1: TStringGrid;
    83     procedure DoOnKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
    84     procedure DoOnResize(Sender: TObject);
     83    procedure GridDoOnKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
     84    procedure GridDoOnResize(Sender: TObject);
    8585  public
    8686    constructor Create(AOwner: TComponent); override;
     
    110110{ TListViewFilter }
    111111
    112 procedure TListViewFilter.DoOnKeyUp(Sender: TObject; var Key: Word;
     112procedure TListViewFilter.GridDoOnKeyUp(Sender: TObject; var Key: Word;
    113113  Shift: TShiftState);
    114114begin
     
    117117end;
    118118
    119 procedure TListViewFilter.DoOnResize(Sender: TObject);
     119procedure TListViewFilter.GridDoOnResize(Sender: TObject);
    120120begin
    121121  FStringGrid1.DefaultRowHeight := FStringGrid1.Height;
     
    135135  FStringGrid1.Options := [goFixedHorzLine, goFixedVertLine, goVertLine,
    136136    goHorzLine, goRangeSelect, goEditing, goAlwaysShowEditor, goSmoothScroll];
    137   FStringGrid1.OnKeyUp := DoOnKeyUp;
    138   FStringGrid1.OnResize := DoOnResize;
     137  FStringGrid1.OnKeyUp := GridDoOnKeyUp;
     138  FStringGrid1.OnResize := GridDoOnResize;
    139139end;
    140140
     
    144144begin
    145145  with FStringGrid1 do begin
     146    Options := Options - [goEditing, goAlwaysShowEditor];
    146147    //Columns.Clear;
    147148    while Columns.Count > ListView.Columns.Count do Columns.Delete(Columns.Count - 1);
     
    150151      Columns[I].Width := ListView.Columns[I].Width;
    151152    end;
     153    Options := Options + [goEditing, goAlwaysShowEditor];
    152154  end;
    153155end;
     
    197199  if AMsg.Msg = WM_NOTIFY then
    198200  begin
    199     Code := PHDNotify(vMsgNotify.NMHdr)^.Hdr.Code;
     201    Code := NMHDR(PHDNotify(vMsgNotify.NMHdr)^.Hdr).Code;
    200202    case Code of
    201203      HDN_ENDTRACKA, HDN_ENDTRACKW:
     
    353355  TP1: TPoint;
    354356  XBias, YBias: Integer;
    355   OldColor: TColor;
     357  PenColor: TColor;
     358  BrushColor: TColor;
    356359  BiasTop, BiasLeft: Integer;
    357360  Rect1: TRect;
     
    365368  Item.Left := 0;
    366369  GetCheckBias(XBias, YBias, BiasTop, BiasLeft, ListView);
    367   OldColor := ListView.Canvas.Pen.Color;
     370  PenColor := ListView.Canvas.Pen.Color;
     371  BrushColor := ListView.Canvas.Brush.Color;
    368372  //TP1 := Item.GetPosition;
    369373  lRect := Item.DisplayRect(drBounds); // Windows 7 workaround
     
    408412  end;
    409413  //ListView.Canvas.Brush.Color := ListView.Color;
    410   ListView.Canvas.Brush.Color := clWindow;
    411   ListView.Canvas.Pen.Color := OldColor;
     414  ListView.Canvas.Brush.Color := BrushColor;
     415  ListView.Canvas.Pen.Color := PenColor;
    412416end;
    413417
  • trunk/Packages/CoolTranslator/CoolTranslator.lpk

    r1 r15  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <Package Version="4">
    44    <PathDelim Value="\"/>
    55    <Name Value="CoolTranslator"/>
     6    <Type Value="RunAndDesignTime"/>
    67    <AddToProjectUsesSection Value="True"/>
    78    <Author Value="Chronos (robie@centrum.cz)"/>
    89    <CompilerOptions>
    9       <Version Value="10"/>
     10      <Version Value="11"/>
    1011      <PathDelim Value="\"/>
    1112      <SearchPaths>
    12         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     13        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1314      </SearchPaths>
     15      <Parsing>
     16        <SyntaxOptions>
     17          <SyntaxMode Value="Delphi"/>
     18          <CStyleOperator Value="False"/>
     19          <AllowLabel Value="False"/>
     20          <CPPInline Value="False"/>
     21        </SyntaxOptions>
     22      </Parsing>
     23      <CodeGeneration>
     24        <Optimizations>
     25          <OptimizationLevel Value="0"/>
     26        </Optimizations>
     27      </CodeGeneration>
     28      <Linking>
     29        <Debugging>
     30          <GenerateDebugInfo Value="False"/>
     31        </Debugging>
     32      </Linking>
    1433      <Other>
    15         <CompilerPath Value="$(CompPath)"/>
     34        <CompilerMessages>
     35          <IgnoredMessages idx5024="True"/>
     36        </CompilerMessages>
    1637      </Other>
    1738    </CompilerOptions>
     
    3859      <OutDir Value="Languages"/>
    3960    </i18n>
    40     <Type Value="RunAndDesignTime"/>
    4161    <RequiredPkgs Count="2">
    4262      <Item1>
  • trunk/Packages/TemplateGenerics/TemplateGenerics.lpk

    r1 r15  
    1 <?xml version="1.0"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    33  <Package Version="4">
    44    <PathDelim Value="\"/>
    55    <Name Value="TemplateGenerics"/>
     6    <Type Value="RunAndDesignTime"/>
    67    <AddToProjectUsesSection Value="True"/>
    78    <Author Value="Chronos (robie@centrum.cz)"/>
     
    1213        <IncludeFiles Value="Generic"/>
    1314        <OtherUnitFiles Value="Specialized;Generic;Additional"/>
    14         <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
     15        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1516      </SearchPaths>
     17      <Parsing>
     18        <SyntaxOptions>
     19          <SyntaxMode Value="Delphi"/>
     20          <CStyleOperator Value="False"/>
     21          <AllowLabel Value="False"/>
     22          <CPPInline Value="False"/>
     23        </SyntaxOptions>
     24      </Parsing>
    1625      <CodeGeneration>
    1726        <Optimizations>
     27          <OptimizationLevel Value="0"/>
    1828          <VariablesInRegisters Value="True"/>
    19           <OptimizationLevel Value="3"/>
    2029        </Optimizations>
    2130      </CodeGeneration>
     31      <Linking>
     32        <Debugging>
     33          <GenerateDebugInfo Value="False"/>
     34        </Debugging>
     35      </Linking>
    2236      <Other>
    2337        <CompilerMessages>
    24           <UseMsgFile Value="True"/>
     38          <IgnoredMessages idx5024="True"/>
    2539        </CompilerMessages>
    26         <CompilerPath Value="$(CompPath)"/>
    2740      </Other>
    2841    </CompilerOptions>
     
    4861      <Item5>
    4962        <Filename Value="Generic\GenericFileList.inc"/>
     63        <UnitName Value="GenericFileList"/>
    5064      </Item5>
    5165      <Item6>
     
    142156      </Item28>
    143157    </Files>
    144     <Type Value="RunAndDesignTime"/>
    145158    <RequiredPkgs Count="2">
    146159      <Item1>
  • trunk/UContact.pas

    r14 r15  
    435435  Charset: string;
    436436  Encoding: string;
     437  Language: string;
    437438  CommandItems: TStringList;
    438439begin
     
    465466          Encoding := CommandItems.Values['ENCODING'];
    466467          CommandItems.Delete(CommandItems.IndexOfName('ENCODING'));
     468        end
     469        else if CommandItems.IndexOfName('LANGUAGE') >= 0 then begin
     470          Language := CommandItems.Values['LANGUAGE'];
     471          CommandItems.Delete(CommandItems.IndexOfName('LANGUAGE'));
    467472        end;
    468473        Command := CommandItems.DelimitedText;
  • trunk/UCore.lfm

    r14 r15  
    33  OnDestroy = DataModuleDestroy
    44  OldCreateOrder = False
    5   Height = 758
    6   HorizontalOffset = 605
    7   VerticalOffset = 428
    8   Width = 1020
     5  Height = 703
     6  HorizontalOffset = 270
     7  VerticalOffset = 174
     8  Width = 1078
     9  PPI = 120
    910  object ImageList1: TImageList
    10     left = 200
    11     top = 289
     11    left = 250
     12    top = 361
    1213    Bitmap = {
    1314      4C690B0000001000000010000000000000000000000000000000000000000000
     
    368369  object ActionList1: TActionList
    369370    Images = ImageList1
    370     left = 425
    371     top = 291
     371    left = 531
     372    top = 364
    372373    object AExit: TAction
    373374      Caption = 'Exit'
     
    437438    MaxCount = 10
    438439    OnChange = LastOpenedList1Change
    439     left = 636
    440     top = 289
     440    left = 795
     441    top = 361
    441442  end
    442443  object OpenDialog1: TOpenDialog
    443     left = 650
    444     top = 403
     444    left = 813
     445    top = 504
    445446  end
    446447  object SaveDialog1: TSaveDialog
    447     left = 469
    448     top = 411
     448    left = 586
     449    top = 514
    449450  end
    450451  object ApplicationInfo1: TApplicationInfo
     
    459460    AppName = 'vCard Studio'
    460461    Description = 'vCard files management tool'
    461     ReleaseDate = 0
     462    ReleaseDate = 43158
    462463    RegistryKey = '\Software\Chronosoft\vCard Studio'
    463464    RegistryRoot = rrKeyCurrentUser
    464465    License = 'CC0'
    465     left = 239
    466     top = 411
     466    left = 299
     467    top = 514
    467468  end
    468469  object PersistentForm1: TPersistentForm
    469470    MinVisiblePart = 50
    470471    EntireVisible = False
    471     left = 650
    472     top = 90
     472    left = 813
     473    top = 113
    473474  end
    474475  object CoolTranslator1: TCoolTranslator
    475476    POFilesFolder = 'Languages'
    476     left = 299
    477     top = 90
     477    left = 374
     478    top = 113
    478479  end
    479480  object ScaleDPI1: TScaleDPI
    480481    AutoDetect = False
    481     left = 470
    482     top = 90
     482    left = 588
     483    top = 113
     484  end
     485  object ThemeManager1: TThemeManager
     486    left = 167
     487    top = 250
    483488  end
    484489end
  • trunk/UCore.pas

    r14 r15  
    88  Classes, SysUtils, FileUtil, Controls, ActnList, Forms, Dialogs,
    99  ULastOpenedList, UApplicationInfo, UPersistentForm, UScaleDPI, UCommon,
    10   UCoolTranslator, UDataFile, Menus, URegistry, Registry;
     10  UCoolTranslator, UDataFile, Menus, URegistry, UTheme, Registry;
    1111
    1212type
     
    4545    SaveDialog1: TSaveDialog;
    4646    ScaleDPI1: TScaleDPI;
     47    ThemeManager1: TThemeManager;
    4748    procedure AAboutExecute(Sender: TObject);
    4849    procedure AExitExecute(Sender: TObject);
     
    179180  try
    180181    FormSettings.LoadData;
    181     if FormSettings.ShowModal = mrOK then
     182    if FormSettings.ShowModal = mrOK then begin
    182183      FormSettings.SaveData;
     184      ThemeManager1.UseTheme(FormMain);
     185      ThemeManager1.UseTheme(FormContacts);
     186    end;
    183187  finally
    184188    FormSettings.Free;
     
    308312  NewContact: TContact;
    309313  I: Integer;
    310   CountNew: Integer;
    311   CountUpdated: Integer;
    312314begin
    313315  Result.Clear;
     
    368370      CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    369371      else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');
     372    if ValueExists('Theme') then
     373      ThemeManager1.Theme := ThemeManager1.Themes.FindByName(ReadStringWithDefault('Theme', 'System'))
     374      else ThemeManager1.Theme := ThemeManager1.Themes.FindByName('System');
    370375    FormMain.MenuItemToolbar.Checked := ReadBoolWithDefault('ToolBarVisible', True);
    371376    ReopenLastFileOnStart := ReadBoolWithDefault('ReopenLastFileOnStart', True);
     
    386391      WriteString('LanguageCode', CoolTranslator1.Language.Code)
    387392      else DeleteValue('LanguageCode');
     393    if Assigned(ThemeManager1.Theme) and (ThemeManager1.Theme.Name <> '') then
     394      WriteString('Theme', ThemeManager1.Theme.Name)
     395      else DeleteValue('Theme');
    388396    WriteBool('ToolBarVisible', FormMain.MenuItemToolbar.Checked);
    389397    WriteBool('ReopenLastFileOnStart', ReopenLastFileOnStart);
  • trunk/vCardStudio.lpi

    r6 r15  
    7070        </CompilerOptions>
    7171      </Item2>
     72      <SharedMatrixOptions Count="2">
     73        <Item1 ID="186308868222" Targets="Common,CoolTranslator,TemplateGenerics" Modes="Debug" Value="-g -gl -gh -CirotR -O1"/>
     74        <Item2 ID="035947176865" Targets="Common,CoolTranslator,TemplateGenerics" Modes="Release" Value="-CX -XX -O3"/>
     75      </SharedMatrixOptions>
    7276    </BuildModes>
    7377    <PublishOptions>
Note: See TracChangeset for help on using the changeset viewer.