mirror of https://gitlab.com/basile.b/dexed.git
fix #130 - mini explorer, flash icon to open folder, plasma 5, smb preffix
This commit is contained in:
parent
1211e282ce
commit
4c6ed49e7d
|
@ -208,7 +208,7 @@ type
|
||||||
(**
|
(**
|
||||||
* Lets the shell open a file.
|
* Lets the shell open a file.
|
||||||
*)
|
*)
|
||||||
function shellOpen(const fname: string; wait: boolean = true): boolean;
|
function shellOpen(fname: string; wait: boolean = true): boolean;
|
||||||
|
|
||||||
(**
|
(**
|
||||||
* Returns true if anExeName can be spawn without its full path.
|
* Returns true if anExeName can be spawn without its full path.
|
||||||
|
@ -895,7 +895,7 @@ begin
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function shellOpen(const fname: string; wait: boolean = true): boolean;
|
function shellOpen(fname: string; wait: boolean = true): boolean;
|
||||||
begin
|
begin
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
result := ShellExecute(0, 'OPEN', PChar(fname), nil, nil, SW_SHOW) > 32;
|
result := ShellExecute(0, 'OPEN', PChar(fname), nil, nil, SW_SHOW) > 32;
|
||||||
|
@ -904,6 +904,8 @@ begin
|
||||||
try
|
try
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
Executable := 'xdg-open';
|
Executable := 'xdg-open';
|
||||||
|
if (fname.length > 1) and (fname[1..2] = '//') then
|
||||||
|
fname := fname[2..fname.length];
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF DARWIN}
|
{$IFDEF DARWIN}
|
||||||
Executable := 'open';
|
Executable := 'open';
|
||||||
|
|
|
@ -28,7 +28,7 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Width = 331
|
Width = 333
|
||||||
end>
|
end>
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
|
@ -63,7 +63,6 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 335
|
Width = 335
|
||||||
Align = alTop
|
Align = alTop
|
||||||
DefaultItemHeight = 16
|
|
||||||
Images = imgList
|
Images = imgList
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
|
@ -90,7 +89,7 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
||||||
AutoSort = False
|
AutoSort = False
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Width = 331
|
Width = 333
|
||||||
end>
|
end>
|
||||||
DragMode = dmAutomatic
|
DragMode = dmAutomatic
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
|
|
|
@ -541,7 +541,7 @@ begin
|
||||||
if lstFav.Selected.Data.isNil then exit;
|
if lstFav.Selected.Data.isNil then exit;
|
||||||
fname := PString(lstFav.Selected.Data)^;
|
fname := PString(lstFav.Selected.Data)^;
|
||||||
end;
|
end;
|
||||||
if fname.fileExists or fname.dirExists then if not shellOpen(fname) then
|
if (fname.fileExists or fname.dirExists) and not shellOpen(fname) then
|
||||||
getMessageDisplay.message((format('the shell failed to open "%s"',
|
getMessageDisplay.message((format('the shell failed to open "%s"',
|
||||||
[shortenPath(fname, 25)])), nil, amcMisc, amkErr);
|
[shortenPath(fname, 25)])), nil, amcMisc, amkErr);
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue