ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/Main.pas
(Generate patch)

Comparing oup/current/Main.pas (file contents):
Revision 109 by alloc, Wed Feb 21 03:12:33 2007 UTC vs.
Revision 129 by alloc, Wed Mar 28 01:12:22 2007 UTC

# Line 137 | Line 137 | var
137  
138   implementation
139  
140 + uses
141 +  LevelDB;
142 +
143   {$R *.dfm}
144  
145  
# Line 169 | Line 172 | var
172    i: Integer;
173    toolform: TForm_ToolTemplate;
174   begin
175 +  Result := True;
176    if MDITab.MDIChildCount > 0 then
177    begin
178      for i := 0 to MDITab.MDIChildCount - 1 do
# Line 179 | Line 183 | begin
183          if toolform.ConnectionID = ConManager.ConnectionByIndex[index].ConnectionID then
184          begin
185            if not toolform.Closeable then
186 <            ShowMessage('Can not close toolwindow: ' + toolform.Caption);
186 >          begin
187 >            ShowMessage('Can not close toolwindow: ' + toolform.Caption);
188 >            Result := False;
189 >          end;
190          end;
191        end;
192      end;
# Line 234 | Line 241 | end;
241  
242  
243   procedure TForm_Main.FormCreate(Sender: TObject);
237 var
238  RepMsg: TStatusMessages;
244   begin
245    Self.Caption := 'Oni Un/Packer ' + version;
246    Self.FormResize(Self);
# Line 254 | Line 259 | begin
259    begin
260      AppSettings.DatPath        := ExtractFilepath(Application.EXEname);
261      AppSettings.ExtractPath    := ExtractFilepath(Application.EXEname) + '\extract';
257    AppSettings.FilenumbersAsHex := False;
262      AppSettings.CharSet        := DEFAULT_CHARSET;
263      AppSettings.HideUnusedData := False;
264    end;
# Line 441 | Line 445 | var
445    position: TTBDockPosition;
446    mode: TTBItemDisplayMode;
447    i: Integer;
444  isEnabled: Boolean;
448   begin
449    toolbar := TTBToolbar(Sender);
450    if toolbar.Floating then
# Line 561 | Line 564 | end;
564  
565   procedure TForm_Main.menu_createlvlClick(Sender: TObject);
566   begin
567 <  ShowMessage('Not yet usable');
568 < {
567 > //  ShowMessage('Not yet usable');
568 >
569    opend.Filter     := 'OUP-Level-DB (*.oldb)|*.oldb';
570    saved.Filter     := 'Oni-Dat-Files|*.dat';
571    saved.DefaultExt := 'dat';
572    if opend.Execute then
573      if saved.Execute then
574        Form_LevelDB.CreateLevel(opend.FileName, saved.FileName);
575 < }
575 >
576   end;
577  
578  
# Line 674 | Line 677 | end;
677   procedure TForm_Main.menu_conns_itemClick(Sender: TObject);
678   var
679    name: String;
677  i: Integer;
680    index: Integer;
681    RepMsg: TStatusMessages;
682   begin
# Line 744 | Line 746 | begin
746    iconindex := -1;
747    caption_end := IntToStr(tag) + '       ';
748  
749 +  toolform := nil;
750 +
751    if window_context = 'binedit' then
752    begin
753      toolform         := TForm_BinEdit.Create(Self);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)