Changeset 56 for oup/current


Ignore:
Timestamp:
Dec 25, 2006, 7:36:41 PM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Code/OniDataClass.pas

    r51 r56  
    412412  end;
    413413  SetLength(Result, list.Count);
    414   fields := TStringList.Create;
    415   if sort in [stIDAsc, stNameAsc, stExtAsc] then
    416     for i := 0 to list.Count - 1 do
    417     begin
    418       getfields;
    419       Result[i] := id + '-' + name + '.' + extension;
    420     end
    421   else
    422     for i := list.Count - 1 downto 0 do
    423     begin
    424       getfields;
    425       Result[list.Count - i - 1] := id + '-' + name + '.' + extension;
    426     end;
     414  if Length(Result) > 0 then
     415  begin
     416    fields := TStringList.Create;
     417    if sort in [stIDAsc, stNameAsc, stExtAsc] then
     418      for i := 0 to list.Count - 1 do
     419      begin
     420        getfields;
     421        Result[i] := id + '-' + name + '.' + extension;
     422      end
     423    else
     424      for i := list.Count - 1 downto 0 do
     425      begin
     426        getfields;
     427        Result[list.Count - i - 1] := id + '-' + name + '.' + extension;
     428      end;
     429    fields.Free;
     430  end;
    427431  list.Free;
    428   fields.Free;
    429432end;
    430433
  • oup/current/Helper_LevelDB.pas

    r46 r56  
    7878  OniImage: TOniImage;
    7979  levelid:  LongWord;
     80  timeformat: TFormatSettings;
    8081const
    8182  steps: Byte = 3;
     
    99100  // FILE EXISTS CHECK FÜR DAT/RAW/SEP!!!
    100101  //
     102
     103  timeformat.LongTimeFormat := 'hh:nn:ss';
     104  timeformat.TimeSeparator := ':';
    101105
    102106  if not CreateDataConnection(Source, ODB_ADB) then
     
    295299  lbl_progress.Caption   := 'Files done: ' + IntToStr(progress.Max) + '/' +
    296300    IntToStr(progress.Max);
    297   lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime) + ')';
     301  lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')';
    298302
    299303  DoStep('FIN');
     
    339343  extlist:  TExtensionsMap;
    340344  fileinfo: TFileInfo;
     345  timeformat: TFormatSettings;
    341346const
    342347  steps: Byte = 4;
     
    542547  lbl_progress.Caption   := 'Files done: ' + IntToStr(progress.Max) + '/' +
    543548    IntToStr(progress.Max);
    544   lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime) + ')';
     549
     550  timeformat.LongTimeFormat := 'hh:nn:ss';
     551  timeformat.TimeSeparator := ':';
     552  lbl_estimation.Caption := 'FINISHED (duration: ' + TimeToStr(Time - absolutebegintime, timeformat) + ')';
    545553
    546554  DoStep('FIN');
  • oup/current/OniUnPacker.bdsproj

    r46 r56  
    176176                        <Language Name="ProjectLang">$00000000</Language>
    177177                        <Language Name="RootDir"></Language>
    178                 </Language> 
    179     <Excluded_Packages>
     178                </Language>  <Excluded_Packages>
    180179      <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages>
    181180    </Excluded_Packages>
  • oup/current/OniUnPacker.dpr

    r46 r56  
    2222
    2323{$R *.res}
     24{$R ExtraIcos.res}
    2425
    2526begin
  • oup/current/Settings.pas

    r53 r56  
    2222    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    2323    procedure FormShow(Sender: TObject);
    24     function RegisterExtension(ext: String; reg: Boolean): Integer;
     24    function RegisterExtension(ext: String; iconindex: Integer; reg: Boolean): Integer;
    2525  private
    2626  public
     
    6262
    6363
    64 function TForm_Settings.RegisterExtension(ext: String; reg: Boolean): Integer;
     64function TForm_Settings.RegisterExtension(ext: String; iconindex: Integer; reg: Boolean): Integer;
    6565var
    6666  ftr:     TFileTypeRegistration;
     
    7575      if not ftr.UnregisterExtension(ext) then
    7676        ShowMessage('Could not unregister ' + ext + '-files');
    77     if ftr.RegisterType(ext, 'ONI' + ext, 'ONI ' + ext + '-file', Application.EXEname + ',1') then
     77    if ftr.RegisterType(ext, 'ONI' + ext, 'ONI ' + ext + '-file', Application.EXEname, iconindex) then
    7878    begin
    7979      ftr.AddHandler('open', '"' + Application.EXEname + '" ' + MidStr(
     
    120120              temps+'". Reregister?'), PChar('Reregister?'),
    121121              MB_YESNO + MB_ICONQUESTION) = ID_YES then
    122           RegisterExtension('.dat', True);
     122          RegisterExtension('.dat', 2, True);
    123123    end else
    124       RegisterExtension('.dat', True);
     124      RegisterExtension('.dat', 2, True);
    125125  end else
    126     RegisterExtension('.dat', False);
     126    RegisterExtension('.dat', 2, False);
    127127
    128128  if check_reg_oldb.Checked then
     
    134134              temps+'". Reregister?'), PChar('Reregister?'),
    135135              MB_YESNO + MB_ICONQUESTION) = ID_YES then
    136           RegisterExtension('.oldb', True);
     136          RegisterExtension('.oldb', 1, True);
    137137    end else
    138       RegisterExtension('.oldb', True);
     138      RegisterExtension('.oldb', 1, True);
    139139  end else
    140     RegisterExtension('.oldb', False);
     140    RegisterExtension('.oldb', 1, False);
    141141
    142142  if check_reg_opf.Checked then
     
    148148              temps+'". Reregister?'), PChar('Reregister?'),
    149149              MB_YESNO + MB_ICONQUESTION) = ID_YES then
    150           RegisterExtension('.opf', True);
     150          RegisterExtension('.opf', 0, True);
    151151    end else
    152       RegisterExtension('.opf', True);
     152      RegisterExtension('.opf', 0, True);
    153153  end else
    154     RegisterExtension('.opf', False);
     154    RegisterExtension('.opf', 0, False);
    155155
    156156  Self.Close;
Note: See TracChangeset for help on using the changeset viewer.