--- oup/current/Main.pas 2007/02/22 00:37:39 112 +++ oup/current/Main.pas 2007/02/25 17:20:22 113 @@ -169,6 +169,7 @@ var i: Integer; toolform: TForm_ToolTemplate; begin + Result := True; if MDITab.MDIChildCount > 0 then begin for i := 0 to MDITab.MDIChildCount - 1 do @@ -179,7 +180,10 @@ begin if toolform.ConnectionID = ConManager.ConnectionByIndex[index].ConnectionID then begin if not toolform.Closeable then - ShowMessage('Can not close toolwindow: ' + toolform.Caption); + begin + ShowMessage('Can not close toolwindow: ' + toolform.Caption); + Result := False; + end; end; end; end; @@ -234,8 +238,6 @@ end; procedure TForm_Main.FormCreate(Sender: TObject); -var - RepMsg: TStatusMessages; begin Self.Caption := 'Oni Un/Packer ' + version; Self.FormResize(Self); @@ -440,7 +442,6 @@ var position: TTBDockPosition; mode: TTBItemDisplayMode; i: Integer; - isEnabled: Boolean; begin toolbar := TTBToolbar(Sender); if toolbar.Floating then @@ -673,7 +674,6 @@ end; procedure TForm_Main.menu_conns_itemClick(Sender: TObject); var name: String; - i: Integer; index: Integer; RepMsg: TStatusMessages; begin @@ -743,6 +743,8 @@ begin iconindex := -1; caption_end := IntToStr(tag) + ' '; + toolform := nil; + if window_context = 'binedit' then begin toolform := TForm_BinEdit.Create(Self);