mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Display archive icon for installed plugins
This commit is contained in:
parent
90799fc893
commit
9b6d44ad5b
7 changed files with 58 additions and 43 deletions
|
|
@ -2,9 +2,9 @@ Compiling Double Commander
|
|||
|
||||
What you need?
|
||||
|
||||
At first must download FreePascal. I use FPC 2.0.2 (or higher).
|
||||
At first must download FreePascal. I use FPC 2.0.4 (or higher).
|
||||
|
||||
After this download Lazarus. I use Lazarus 0.9. (or higher).
|
||||
After this download Lazarus. I use Lazarus 0.9.22 (or higher).
|
||||
|
||||
For compiling Double Commander you must install in Lazarus two component packages
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<IconPath Value="./"/>
|
||||
<IconPath Value=".\"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="Double Commander"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
|
|
@ -53,8 +53,8 @@
|
|||
<Filename Value="doublecmd.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="doublecmd"/>
|
||||
<CursorPos X="1" Y="88"/>
|
||||
<TopLine Value="63"/>
|
||||
<CursorPos X="6" Y="19"/>
|
||||
<TopLine Value="56"/>
|
||||
<UsageCount Value="200"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
|
|
@ -86,9 +86,11 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="fmain.lrs"/>
|
||||
<UnitName Value="fMain"/>
|
||||
<CursorPos X="22" Y="2351"/>
|
||||
<TopLine Value="2346"/>
|
||||
<CursorPos X="9" Y="5"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="104"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="uwcxprototypes.pas"/>
|
||||
|
|
@ -207,11 +209,9 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="foptions.lrs"/>
|
||||
<UnitName Value="fOptions"/>
|
||||
<CursorPos X="16" Y="352"/>
|
||||
<TopLine Value="337"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<CursorPos X="25" Y="265"/>
|
||||
<TopLine Value="252"/>
|
||||
<UsageCount Value="29"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit14>
|
||||
<Unit15>
|
||||
<Filename Value="fFileOpDlg.pas"/>
|
||||
|
|
@ -330,8 +330,8 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<ResourceFilename Value="fpackdlg.lrs"/>
|
||||
<UnitName Value="fPackDlg"/>
|
||||
<CursorPos X="46" Y="159"/>
|
||||
<TopLine Value="149"/>
|
||||
<CursorPos X="4" Y="6"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="29"/>
|
||||
</Unit25>
|
||||
<Unit26>
|
||||
|
|
@ -390,19 +390,11 @@
|
|||
<UsageCount Value="29"/>
|
||||
</Unit30>
|
||||
</Units>
|
||||
<JumpHistory Count="3" HistoryIndex="2">
|
||||
<JumpHistory Count="1" HistoryIndex="0">
|
||||
<Position1>
|
||||
<Filename Value="foptions.pas"/>
|
||||
<Caret Line="271" Column="5" TopLine="214"/>
|
||||
<Filename Value="fmain.pas"/>
|
||||
<Caret Line="2482" Column="26" TopLine="1792"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="foptions.pas"/>
|
||||
<Caret Line="105" Column="1" TopLine="105"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="foptions.pas"/>
|
||||
<Caret Line="122" Column="8" TopLine="104"/>
|
||||
</Position3>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
|
|
|||
20
fmain.lfm
20
fmain.lfm
|
|
@ -1,10 +1,10 @@
|
|||
inherited frmMain: TfrmMain
|
||||
Left = 245
|
||||
Left = 257
|
||||
Height = 336
|
||||
Top = 170
|
||||
Top = 284
|
||||
Width = 525
|
||||
HorzScrollBar.Page = 524
|
||||
VertScrollBar.Page = 315
|
||||
VertScrollBar.Page = 309
|
||||
VertScrollBar.Range = 79
|
||||
ActiveControl = pnlNotebooks
|
||||
Caption = 'Double Commander'
|
||||
|
|
@ -71,7 +71,7 @@ inherited frmMain: TfrmMain
|
|||
end
|
||||
object pnlCommand: TPanel
|
||||
Height = 66
|
||||
Top = 250
|
||||
Top = 244
|
||||
Width = 525
|
||||
Align = alBottom
|
||||
Anchors = [akLeft, akRight]
|
||||
|
|
@ -81,9 +81,9 @@ inherited frmMain: TfrmMain
|
|||
TabOrder = 2
|
||||
object lblCommandPath: TLabel
|
||||
Left = 1
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 8
|
||||
Width = 23
|
||||
Width = 26
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Path'
|
||||
Color = clNone
|
||||
|
|
@ -198,7 +198,7 @@ inherited frmMain: TfrmMain
|
|||
end
|
||||
end
|
||||
object pnlNotebooks: TPanel
|
||||
Height = 181
|
||||
Height = 175
|
||||
Top = 69
|
||||
Width = 525
|
||||
Align = alClient
|
||||
|
|
@ -207,7 +207,7 @@ inherited frmMain: TfrmMain
|
|||
TabStop = True
|
||||
object nbLeft: TNotebook
|
||||
Left = 1
|
||||
Height = 179
|
||||
Height = 173
|
||||
Top = 1
|
||||
Width = 391
|
||||
Align = alLeft
|
||||
|
|
@ -216,14 +216,14 @@ inherited frmMain: TfrmMain
|
|||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 392
|
||||
Height = 179
|
||||
Height = 173
|
||||
Top = 1
|
||||
Width = 4
|
||||
ResizeStyle = rsLine
|
||||
end
|
||||
object nbRight: TNotebook
|
||||
Left = 396
|
||||
Height = 179
|
||||
Height = 173
|
||||
Top = 1
|
||||
Width = 128
|
||||
Align = alClient
|
||||
|
|
|
|||
BIN
pixmaps/farc.png
Normal file
BIN
pixmaps/farc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 498 B |
|
|
@ -50,7 +50,7 @@ const {Error codes returned to calling application}
|
|||
PK_CAPS_OPTIONS= 16; {Supports the options dialogbox}
|
||||
PK_CAPS_MEMPACK= 32; {Supports packing in memory}
|
||||
PK_CAPS_BY_CONTENT= 64; {Detect archive type by content}
|
||||
PK_CAPS_SEARCHTEXT= 128; {Allow searching for text in archives
|
||||
PK_CAPS_SEARCHTEXT= 128; {Allow searching for text in archives}
|
||||
{ created with this plugin}
|
||||
PK_CAPS_HIDE= 256; { Show as normal files (hide packer icon) }
|
||||
{ open with Ctrl+PgDn, not Enter }
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ begin
|
|||
fr.sNameNoExt:=Copy(sr.Name,1,length(sr.Name)-length(fr.sExt));
|
||||
fr.sName:=sr.Name;
|
||||
|
||||
fr.sTime:=DateTimeToStr(Trunc(fr.fTimeI));
|
||||
fr.sTime:=FormatDateTime('dd.mm.yyyy', Trunc(fr.fTimeI));
|
||||
fr.bIsLink:=FPS_ISLNK(fr.iMode);
|
||||
fr.sLinkTo:='';
|
||||
fr.iDirSize:=0;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
contributors:
|
||||
|
||||
Koblov Alexander (Alexx2000@mail.ru)
|
||||
Copyright (C) 2006-2007 Koblov Alexander (Alexx2000@mail.ru)
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
|
|
@ -51,6 +51,7 @@ type
|
|||
FiLinkIconID: Integer;
|
||||
FiUpDirIconID: Integer;
|
||||
FiDefaultIconID: Integer;
|
||||
FiArcIconID : Integer;
|
||||
{$IFDEF WIN32}
|
||||
SysImgList : Cardinal;
|
||||
{$ENDIF}
|
||||
|
|
@ -73,7 +74,7 @@ procedure LoadPixMapManager;
|
|||
|
||||
implementation
|
||||
uses
|
||||
uGlobsPaths, uOSUtils{$IFDEF WIN32}, ShellAPI, Windows{$ENDIF};
|
||||
uGlobsPaths, uOSUtils, uWCXhead, uGlobs{$IFDEF WIN32}, ShellAPI, Windows{$ENDIF};
|
||||
{ TPixMapManager }
|
||||
|
||||
{$IFDEF WIN32}
|
||||
|
|
@ -140,9 +141,11 @@ var
|
|||
sExt, sPixMap:String;
|
||||
iekv:integer;
|
||||
iPixMap:Integer;
|
||||
x:Integer;
|
||||
I : Integer;
|
||||
png:TPortableNetworkGraphic;
|
||||
|
||||
Plugins : TStringList;
|
||||
sCurrentPlugin : String;
|
||||
iCurPlugCaps : Integer;
|
||||
begin
|
||||
if FileExists(sFileName) then
|
||||
begin
|
||||
|
|
@ -174,14 +177,34 @@ begin
|
|||
FiLinkIconID:=CheckAddPixmap('flink.png');
|
||||
FiUpDirIconID:=CheckAddPixmap('fupdir.png');
|
||||
FiDefaultIconID:=CheckAddPixmap('fblank.png');
|
||||
FiArcIconID := CheckAddPixmap('farc.png');
|
||||
|
||||
(* Set archive icons *)
|
||||
|
||||
Plugins := TStringList.Create;
|
||||
gIni.ReadSectionRaw('PackerPlugins', Plugins);
|
||||
|
||||
for I:=0 to Plugins.Count - 1 do
|
||||
begin
|
||||
sCurrentPlugin := Plugins.ValueFromIndex[I];
|
||||
iCurPlugCaps := StrToInt(Copy(sCurrentPlugin, 1, Pos(',',sCurrentPlugin) - 1));
|
||||
if (iCurPlugCaps and PK_CAPS_HIDE) <> PK_CAPS_HIDE then
|
||||
begin
|
||||
if FExtList.IndexOf(Plugins.Names[I]) < 0 then
|
||||
FExtList.AddObject(Plugins.Names[I], TObject(FiArcIconID));
|
||||
end;
|
||||
end; //for
|
||||
Plugins.Free;
|
||||
|
||||
(* /Set archive icons *)
|
||||
|
||||
// now fill imagelist by FPixMap
|
||||
|
||||
for x:=0 to FPixmapName.Count-1 do
|
||||
for I := 0 to FPixmapName.Count - 1 do
|
||||
begin
|
||||
// writeln('Loading:',x,' ',FExtList[x],': ',gpPixmapPath+FPixmapName[x]);
|
||||
// writeln('Loading:',I,' ',FExtList[I],': ',gpPixmapPath+FPixmapName[I]);
|
||||
png:=TPortableNetworkGraphic.Create;
|
||||
png.LoadFromFile(gpPixmapPath+FPixmapName[x]);
|
||||
png.LoadFromFile(gpPixmapPath+FPixmapName[I]);
|
||||
png.Transparent:=True;
|
||||
// bmp.TransparentMode:=tmFixed;
|
||||
// writeln(bmp.Width,' ',bmp.Height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue