var
n, pw: Integer;
s, fn: String;
+ b: Boolean;
begin
s := LowerCase((Sender as TMenuItem).Caption);
Delete(s, Pos('&', s), 1);
s := RecentFiles[n];
pw := Pos('.wad:\', LowerCase(s));
+ b := False;
if pw > 0 then
begin // Map name included
fn := Copy(s, 1, pw + 3);
Delete(s, 1, pw + 5);
if (FileExists(fn)) then
+ begin
OpenMap(fn, s);
+ b := True;
+ end;
end
else // Only wad name
if (FileExists(s)) then
+ begin
OpenMap(s, '');
+ b := True;
+ end;
+
+ if (not b) and (MessageBox(0, PChar(_lc[I_MSG_DEL_RECENT_PROMT]),
+ PChar(_lc[I_MSG_DEL_RECENT]), MB_ICONQUESTION or MB_YESNO) = idYes) then
+ begin
+ RecentFiles.Delete(n);
+ RefreshRecentMenu();
+ end;
end;
procedure TMainForm.aEditorOptionsExecute(Sender: TObject);
I_MSG_DEL_TEXTURE,
I_MSG_DEL_TEXTURE_PROMT,
I_MSG_DEL_TEXTURE_CANT,
+ I_MSG_DEL_RECENT,
+ I_MSG_DEL_RECENT_PROMT,
I_MSG_CLEAR_MAP,
I_MSG_CLEAR_MAP_PROMT,
I_MSG_DELETE_MAP,
'Удалить текстуру "%s" ?'),
('MSG DEL TEXTURE CANT', 'Can''t delete texture in use. Replace it on all panels with this texture.',
'Нельзя удалить используемую текстуру. Замените её на каждой панели с ней.'),
+ ('MSG DEL RECENT', 'File does not longer exist',
+ 'Этого файла больше нет'),
+ ('MSG DEL RECENT PROMT', 'Remove entry from recent list?',
+ 'Убрать запись из истории?'),
('MSG CLEAR MAP', 'New map',
'Новая карта'),
('MSG CLEAR MAP PROMT', 'Clear the entire map?',