DidIt:=ModifyIDCMP(win,IDCMP_CLOSEWINDOW or IDCMP_GADGETUP or IDCMP_GADGETDOWN or IDCMP_VANILLAKEY or IDCMP_MOUSEMOVE or IDCMP_MOUSEBUTTONS or IDCMP_INTUITICKS);
if dispLayer<10 then TagsCHANGES[2].ti_Tag:=TAG_END else begin TagsCHANGES[2].ti_Tag:=GTLV_Top; TagsCHANGES[2].ti_Data:=dispLayer-8; TagsCHANGES[3].ti_Tag:=TAG_END end;
if (CurrentMethodFiles) and (opLayer=2) then if CopyEntry(MyString,MyXTP.Trasher,DoingString,FALSE,replace,win)<>0 then begin alreadyNotFound:=TRUE; goto AlternateFileFailed end;
if TrashEntry(MyString,DoingString,FALSE,TRUE,FALSE,win)<>0 then alreadyNotFound:=TRUE;
AlternateFileFailed:
if alreadyNotFound then begin
dummy:=GiveQuestion("XTrash 1.01 - "+DoingString,"Wie soll auf den aufgetretenen Fehler"+LF+"reagiert werden?","Nochmal versuchen|Löschort verlassen",win);
if dummy=0 then begin ExitTrashing:=1; goto CureAnError end;
GiveError("XTrash 1.01 - "+DoingString,"Weder auf die Datei"+LF+TrashNode^.pn_Path+LF+"als auf deren Piktogramm"+LF+"bzw. den Mülleimer"+LF+"konnte zugegriffen werden."+LF+"("+VariableString+")",win)
else
GiveError("XTrash 1.01 - "+DoingString,"Weder auf die Datei"+LF+TrashNode^.pn_Path+LF+"als auf deren Piktogramm"+LF+"konnte zugegriffen werden."+LF+"("+VariableString+")",win)
end;
goto FileFailed2
end
0: begin end
else goto FileFailed2
end;
if (TrashEntry(TrashNode^.pn_Path,DoingString,TRUE,FALSE,DidIt,win)=ERROR_OBJECT_NOT_FOUND) and (alreadyNotFound) then begin
GiveError("XTrash 1.01 - "+DoingString,"Weder auf die Datei"+LF+TrashNode^.pn_Path+LF+"als auf deren Piktogramm"+LF+"bzw. den Mülleimer"+LF+"konnte zugegriffen werden."+LF+"("+VariableString+")",win)
else
GiveError("XTrash 1.01 - "+DoingString,"Weder auf die Datei"+LF+TrashNode^.pn_Path+LF+"als auf deren Piktogramm"+LF+"konnte zugegriffen werden."+LF+"("+VariableString+")",win);
GiveError("XTrash 1.01 - "+DoingString,"Der Datenträger [im Laufwerk]"+LF+TrashNode^.pn_Path+LF+"konnte nicht formatiert werden."+LF+"(Ausgabefenster war nicht zu öffnen.)",win);
if MyXTP.FormatStack<0 then TagsCHANGES[5].ti_Tag:=TAG_END else begin TagsCHANGES[5]:=TagItem(NP_StackSize,MyXTP.FormatStack); TagsCHANGES[6].ti_Tag:=TAG_END end;
if (MyLock=0) and (copy(GeneralName,length(GeneralName),1)<>":") then begin GiveError("IconDrop - ["+GeneralName+"]","Das Piktogramm kann nicht gelesen werden.",NIL); goto SimplyOut end;
if (MyLock=0) and (copy(GeneralName,length(GeneralName),1)=":") then begin VariableString:=GeneralName; GeneralName:=""; dummy:=1 end else dummy:=NameFromLock(MyLock,VariableString,256);
if dummy=0 then begin GiveError ("IconDrop - ["+GeneralName+"]","Name des Piktogramms nicht feststellbar.",win); goto SimplyOut end;
if GeneralName<>"" then dummy:=long(AddPart(VariableString,GeneralName,256)) else dummy:=1;
if dummy=0 then begin
if VariableString[length(VariableString)]=":" then GeneralName:=VariableString else GeneralName:=FilePart(VariableString);
GiveError ("IconDrop - ["+GeneralName+"]","Name des Piktogramms zu lang.",win);
goto SimplyOut
end;
if VariableString[length(VariableString)]=":" then opLayer:=4 else begin
if GeneralName<>"" then opLayer:=1 else begin
MyDOB:=GetDiskObjectNew(VariableString);
if MyDOB=NIL then opLayer:=2 else begin
if MyDOB^.do_Type=WBGARBAGE then opLayer:=3 else opLayer:=2;
FreeDiskObject(MyDOB)
end
end
end;
if opLayer=2 then begin
new(MyFIB);
if Examine(MyLock,MyFIB)=DOSTRUE then
if (MyFIB^.fib_DirEntryType=ST_SOFTLINK) or (MyFIB^.fib_DirEntryType=ST_LINKDIR) then opLayer:=1;
dispose(MyFIB)
end;
CASE opLayer of
1: TrashNode:=p_PathNode(FileList^.lh_Head);
2: TrashNode:=p_PathNode(DirList^.lh_Head);
3: TrashNode:=p_PathNode(TrashList^.lh_Head);
4: TrashNode:=p_PathNode(DiskList^.lh_Head);
end;
WHILE p_PathNode(TrashNode^.pn_Node.ln_Succ)<>NIL DO BEGIN
if VariableString=TrashNode^.pn_Path then goto SimplyOut;
TrashNode:=p_PathNode(TrashNode^.pn_Node.ln_Succ)
END;
new(TrashNode);
TrashNode^.pn_Node.ln_Pri:=opLayer;
PrepareNode(TrashNode,VariableString);
CASE opLayer of
1: begin AddTail(FileList,p_Node(TrashNode)); FileNum:=FileNum+1 end
2: begin AddTail(DirList,p_Node(TrashNode)); DirNum:=DirNum+1 end
3: begin AddTail(TrashList,p_Node(TrashNode)); TrashNum:=TrashNum+1 end
4: begin AddTail(DiskList,p_Node(TrashNode)); DiskNum:=DiskNum+1 end
end;
SimplyOut:
END;
FUNCTION FindInnerThing(Source,Searcher:str):Boolean;
while NOT ((ChosenMenu=MENUNULL) or (ChosenMenu=$F8)) do begin
case ChosenMenu and $1f of
0: begin
case (ChosenMenu and $7e0) div 32 of
0: begin
WaitPointer(win);
GetRidOfForBeforeXTrash(win);
PreferencesXTrash;
GetBackForBeforeXTrash(win,CG);
if DiskNum<>0 then begin
if (DisplayOptions<>FindInnerThing(MyXTP.Formatter,"\o")) or (DisplayName<>FindInnerThing(MyXTP.Formatter,"\n")) then begin
ClearMenuStrip(win);
CloseWindow(win);
FreeGadgets(CG);
FreeMenus(MenuFields);
DidIt:=RemoveAppWindow(ApplicationWindow);
goto ReBuild
end;
if (ChangeASG[0]<>ChangeASG[1]) and (MyXTP.Coloured) then BackASG:=ChangeASG else begin SI:=GadgetDiskName^.SpecialInfo; BackASG:=SI^.Extension^.Pens end;
if DisplayName then begin
SI:=GadgetDiskName^.SpecialInfo;
SI^.Extension^.ActivePens:=BackASG
end;
if DisplayOptions then begin
SI:=GadgetFormatOptions^.SpecialInfo;
SI^.Extension^.ActivePens:=BackASG
end;
end;
NormalPointer(win);
end
1: begin
MyEndExit:=0;
EndExit:=0
end
else
end
end
else
end;
NItem:=ItemAddress(MenuFields,ChosenMenu);
ChosenMenu:=NItem^.nextselect;
end
end
else
end
end;
if SIGNALS=AppBit then begin
if ApplicationMessage=NIL then goto BACK;
if (ApplicationMessage^.am_Type=MTYPE_APPICON) or (ApplicationMessage^.am_Type=MTYPE_APPWINDOW) then begin
if ((OldFile=0) and (FileNum<>0) and (OldDir=0)) or ((OldDir=0) and (DirNum<>0) and (OldFile=0)) or ((OldTrash=0) and (TrashNum<>0)) or ((OldDisk=0) and (DiskNum<>0)) then begin
ReplyMsg(p_Message(ApplicationMessage));
ClearMenuStrip(win);
CloseWindow(win);
FreeGadgets(CG);
FreeMenus(MenuFields);
DidIt:=RemoveAppWindow(ApplicationWindow);
goto ReBuild
end else begin
ReplyMsg(p_Message(ApplicationMessage));
goto ReDisplay
end
end
end;
ReplyMsg(p_Message(ApplicationMessage));
end
UNTIL MyEndExit<>-1;
ClearMenuStrip(win);
CloseWindow(win);
FreeGadgets(CG);
FreeMenus(MenuFields);
DidIt:=RemoveAppWindow(ApplicationWindow);
FreeScreenDrawInfo(scr,DI);
FreeVisualInfo(VI);
UnLockPubScreen(NIL,scr);
if DiskNum<>0 then begin
SI:=GadgetDiskName^.SpecialInfo;
CurrentDiskName:=SI^.Buffer;
SI:=GadgetFormatOptions^.SpecialInfo;
CurrentFormatOptions:=SI^.Buffer;
end;
if MyEndExit=1 then XTrash;
for opLayer:=1 to 4 do begin
CASE opLayer of
1: TrashNode:=p_PathNode(FileList^.lh_Head);
2: TrashNode:=p_PathNode(DirList^.lh_Head);
3: TrashNode:=p_PathNode(TrashList^.lh_Head);
4: TrashNode:=p_PathNode(DiskList^.lh_Head);
end;
WHILE p_PathNode(TrashNode^.pn_Node.ln_Succ)<>NIL DO BEGIN