更新目录打开
This commit is contained in:
parent
fa201dfc76
commit
254dc0b2cd
|
|
@ -2729,14 +2729,14 @@ type TEditer=class(TCustomcontrol) //
|
||||||
p := it.ScriptPath;
|
p := it.ScriptPath;
|
||||||
if FileExists("",p)then
|
if FileExists("",p)then
|
||||||
begin
|
begin
|
||||||
for i := length(p)downto 3 do
|
{for i := length(p)downto 3 do
|
||||||
begin
|
begin
|
||||||
if p[i]="\\" then
|
if p[i]="\\" then
|
||||||
begin
|
begin
|
||||||
p := p[1:i];
|
p := p[1:i];
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
end
|
end}
|
||||||
//_wapi.WinExec('cmd.exe /C start "" "'+p,1);
|
//_wapi.WinExec('cmd.exe /C start "" "'+p,1);
|
||||||
_wapi.openresourcemanager(p);
|
_wapi.openresourcemanager(p);
|
||||||
end
|
end
|
||||||
|
|
@ -2975,7 +2975,7 @@ type TEditer=class(TCustomcontrol) //
|
||||||
fl := FileList("",n);
|
fl := FileList("",n);
|
||||||
if not(length(fl)=1)then return false;
|
if not(length(fl)=1)then return false;
|
||||||
nn := fl[0,"FileName"];
|
nn := fl[0,"FileName"];
|
||||||
if(POS("d",fl[0,"Attr"]))then return false;
|
if(POS("D",fl[0,"Attr"]))then return false;
|
||||||
it := new TPageEditerItem(FPageEditer);
|
it := new TPageEditerItem(FPageEditer);
|
||||||
oit := GetCurrentEditer();
|
oit := GetCurrentEditer();
|
||||||
if oit then
|
if oit then
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -3787,18 +3787,34 @@ type tgtkapis = class(t_cairo_api) //gtk
|
||||||
begin
|
begin
|
||||||
if ifstring(p) then
|
if ifstring(p) then
|
||||||
begin
|
begin
|
||||||
|
if fileexists("","/usr/bin/nautilus") then
|
||||||
|
begin
|
||||||
|
tsl_gtk_exec_system(format('nautilus --select "%s" &',p));
|
||||||
|
return 1;//
|
||||||
|
end else
|
||||||
|
if fileexists("","/usr/bin/caja") then
|
||||||
|
begin
|
||||||
|
tsl_gtk_exec_system(format('caja --select "%s" &',p));
|
||||||
|
return 1;
|
||||||
|
end else
|
||||||
|
if fileexists("","/usr/bin/xdg-open") then
|
||||||
|
begin
|
||||||
|
cmd := format(%%
|
||||||
|
target_dir="%s"
|
||||||
|
if [ -d $target_dir ]; then
|
||||||
|
xdg-open $target_dir
|
||||||
|
else
|
||||||
|
xdg-open $(dirname "$target_dir")
|
||||||
|
fi
|
||||||
|
%%,p);
|
||||||
|
tsl_gtk_exec_system(cmd);
|
||||||
|
return 1;//
|
||||||
|
end else
|
||||||
if fileexists("","/usr/bin/zenity") then
|
if fileexists("","/usr/bin/zenity") then
|
||||||
begin
|
begin
|
||||||
tsl_gtk_exec_system(format('zenity --file-selection --filename="%s" --file-selection --multiple &',p));
|
tsl_gtk_exec_system(format('zenity --file-selection --filename="%s" --file-selection --multiple &',p));
|
||||||
return 1;//
|
return 1;//
|
||||||
end
|
end
|
||||||
if fileexists("","/usr/bin/caja") then
|
|
||||||
begin
|
|
||||||
tsl_gtk_exec_system(format('caja "%s" &',p));
|
|
||||||
return 1;
|
|
||||||
end
|
|
||||||
tsl_gtk_exec_system(format('nautilus "%s" &',p));
|
|
||||||
return 1;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function tsl_gtk_exec_system(cmd) ;
|
function tsl_gtk_exec_system(cmd) ;
|
||||||
|
|
|
||||||
|
|
@ -1333,7 +1333,6 @@ type idispatch=class(iunkown)
|
||||||
end
|
end
|
||||||
if not ptr then
|
if not ptr then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
fvtable._setvalue_("GetTypeInfoCount",makeinstance_com(thisfunction(GetTypeInfoCount)));
|
fvtable._setvalue_("GetTypeInfoCount",makeinstance_com(thisfunction(GetTypeInfoCount)));
|
||||||
fvtable._setvalue_("GetTypeInfo",makeinstance_com(thisfunction(GetTypeInfo)));
|
fvtable._setvalue_("GetTypeInfo",makeinstance_com(thisfunction(GetTypeInfo)));
|
||||||
fvtable._setvalue_("GetIDsOfNames",makeinstance_com(thisfunction(GetIDsOfNames)));
|
fvtable._setvalue_("GetIDsOfNames",makeinstance_com(thisfunction(GetIDsOfNames)));
|
||||||
|
|
@ -1344,8 +1343,8 @@ type idispatch=class(iunkown)
|
||||||
end
|
end
|
||||||
function GetTypeInfoCount(s:pointer;var pctinfo:integer):integer;stdcall;virtual;
|
function GetTypeInfoCount(s:pointer;var pctinfo:integer):integer;stdcall;virtual;
|
||||||
begin
|
begin
|
||||||
return E_NOTIMPL;
|
|
||||||
echo "\r\n>>>>>>idispatch:",functionname(1);
|
echo "\r\n>>>>>>idispatch:",functionname(1);
|
||||||
|
return E_NOTIMPL;
|
||||||
pctinfo := 0;
|
pctinfo := 0;
|
||||||
ns := fcom_mgr.method_names();
|
ns := fcom_mgr.method_names();
|
||||||
if ifarray(ns) and ns then
|
if ifarray(ns) and ns then
|
||||||
|
|
@ -1364,7 +1363,7 @@ type idispatch=class(iunkown)
|
||||||
end
|
end
|
||||||
function GetTypeInfo(s:pointer;iTInfo:integer;lcid:integer;var ppTInfo:pointer):integer;stdcall;virtual;
|
function GetTypeInfo(s:pointer;iTInfo:integer;lcid:integer;var ppTInfo:pointer):integer;stdcall;virtual;
|
||||||
begin
|
begin
|
||||||
//echo "\r\n>>>>>>idispatch:",functionname(1),iTInfo," ",lcid," ",ppTInfo;
|
echo "\r\n>>>>>>idispatch:",functionname(1),iTInfo," ",lcid," ",ppTInfo;
|
||||||
ppTInfo := 0;
|
ppTInfo := 0;
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
if not fcom_mgr.method_names() then return E_NOTIMPL;
|
if not fcom_mgr.method_names() then return E_NOTIMPL;
|
||||||
|
|
@ -1379,7 +1378,7 @@ type idispatch=class(iunkown)
|
||||||
end
|
end
|
||||||
function GetIDsOfNames(s:pointer;riid:pointer;rgszNames:pointer;cNames:integer;lcid:integer;var rgDispId:integer):integer;stdcall;virtual;
|
function GetIDsOfNames(s:pointer;riid:pointer;rgszNames:pointer;cNames:integer;lcid:integer;var rgDispId:integer):integer;stdcall;virtual;
|
||||||
begin
|
begin
|
||||||
//echo "\r\n>>>>>>idispatch:",functionname(1)," ",riid," ",lcid," ",cNames;
|
echo "\r\n>>>>>>idispatch:",functionname(1)," ",riid," ",lcid," ",cNames;
|
||||||
//return E_NOTIMPL;
|
//return E_NOTIMPL;
|
||||||
if cnames>1 then return E_INVALIDARG;
|
if cnames>1 then return E_INVALIDARG;
|
||||||
ostr := new tptrarray(rgszNames);
|
ostr := new tptrarray(rgszNames);
|
||||||
|
|
@ -1390,7 +1389,7 @@ type idispatch=class(iunkown)
|
||||||
function Invoke_(s:pointer;dispIdMember:integer;riid:pointer;lcid:integer;wFlags:short;pDispParams:pointer;
|
function Invoke_(s:pointer;dispIdMember:integer;riid:pointer;lcid:integer;wFlags:short;pDispParams:pointer;
|
||||||
pVarResult:pointer;pExcepInfo:pointer;var puArgErr:integer):integer;stdcall;virtual;
|
pVarResult:pointer;pExcepInfo:pointer;var puArgErr:integer):integer;stdcall;virtual;
|
||||||
begin
|
begin
|
||||||
//echo "\r\n>>>>>>idispatch:",functionname(1)," ",dispIdMember," ",wFlags," ",pVarResult," err:",pExcepInfo;
|
echo "\r\n>>>>>>idispatch:",functionname(1)," ",dispIdMember," ",wFlags," ",pVarResult," err:",pExcepInfo;
|
||||||
fname := get_func_id_str(dispIdMember);
|
fname := get_func_id_str(dispIdMember);
|
||||||
if wFlags=2 then
|
if wFlags=2 then
|
||||||
begin
|
begin
|
||||||
|
|
@ -2101,7 +2100,9 @@ begin
|
||||||
global g_func_handles;
|
global g_func_handles;
|
||||||
if not ifarray(g_func_handles) then g_func_handles := array();
|
if not ifarray(g_func_handles) then g_func_handles := array();
|
||||||
idx := inttostr( int64(f));
|
idx := inttostr( int64(f));
|
||||||
r := makeinstance(makeweakref(f));
|
if g_func_handles[idx] then return g_func_handles[idx];
|
||||||
|
//r := makeinstance(makeweakref(f));
|
||||||
|
r := makeinstance(f);
|
||||||
g_func_handles[idx] := r;
|
g_func_handles[idx] := r;
|
||||||
return r;
|
return r;
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ type twindowsapi = class()
|
||||||
function openresourcemanager(p); //打开资源管理器
|
function openresourcemanager(p); //打开资源管理器
|
||||||
begin
|
begin
|
||||||
if ifstring(p) then
|
if ifstring(p) then
|
||||||
return WinExec('cmd.exe /C start "" "'+p,1);
|
//return WinExec('cmd.exe /C start "" "'+p,1);
|
||||||
|
return WinExec(format('cmd.exe /C start explorer.exe /select, "%s"',p),1);
|
||||||
end
|
end
|
||||||
function getclipboardtext(clpd);
|
function getclipboardtext(clpd);
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
BIN
tsleditor.exe
BIN
tsleditor.exe
Binary file not shown.
BIN
tslvcltool.exe
BIN
tslvcltool.exe
Binary file not shown.
Loading…
Reference in New Issue