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.
|
||||
*)
|
||||
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.
|
||||
|
@ -895,7 +895,7 @@ begin
|
|||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function shellOpen(const fname: string; wait: boolean = true): boolean;
|
||||
function shellOpen(fname: string; wait: boolean = true): boolean;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
result := ShellExecute(0, 'OPEN', PChar(fname), nil, nil, SW_SHOW) > 32;
|
||||
|
@ -904,6 +904,8 @@ begin
|
|||
try
|
||||
{$IFDEF LINUX}
|
||||
Executable := 'xdg-open';
|
||||
if (fname.length > 1) and (fname[1..2] = '//') then
|
||||
fname := fname[2..fname.length];
|
||||
{$ELSE}
|
||||
{$IFDEF DARWIN}
|
||||
Executable := 'open';
|
||||
|
|
|
@ -28,7 +28,7 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
|||
Align = alTop
|
||||
Columns = <
|
||||
item
|
||||
Width = 331
|
||||
Width = 333
|
||||
end>
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
|
@ -63,7 +63,6 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
|||
Top = 0
|
||||
Width = 335
|
||||
Align = alTop
|
||||
DefaultItemHeight = 16
|
||||
Images = imgList
|
||||
ReadOnly = True
|
||||
ScrollBars = ssAutoBoth
|
||||
|
@ -90,7 +89,7 @@ inherited CEMiniExplorerWidget: TCEMiniExplorerWidget
|
|||
AutoSort = False
|
||||
Columns = <
|
||||
item
|
||||
Width = 331
|
||||
Width = 333
|
||||
end>
|
||||
DragMode = dmAutomatic
|
||||
ReadOnly = True
|
||||
|
|
|
@ -541,7 +541,7 @@ begin
|
|||
if lstFav.Selected.Data.isNil then exit;
|
||||
fname := PString(lstFav.Selected.Data)^;
|
||||
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"',
|
||||
[shortenPath(fname, 25)])), nil, amcMisc, amkErr);
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue