DEADSOFTWARE

gui: replace MessageBox with Application.MessageBox (which i correctly works on osx)
[d2df-editor.git] / src / editor / f_packmap.pas
index fbfe4735001a57e21e74bfefbefb5bf5ccb47d80..a8ad07a7eecc8b9120c3e4d9d6f7512b71c793d9 100644 (file)
@@ -80,7 +80,7 @@ begin
   if filename = '' then
     g_GetResourceSection(OpenedMap, filename, us, un)
   else
-    filename := EditorDir + 'wads/' + filename;
+    filename := WadsDir + DirectorySeparator + filename;
   e_WriteLog('ProcessResource: "' + wad_to + '" "' + section_to + '" "' + filename + '" "' + section + '" "' + resource + '"', MSG_NOTIFY);
 
   if resource = '' then Exit;
@@ -99,8 +99,8 @@ begin
   end
   else
   begin
-    //MessageBox(0, PChar(Format(_lc[I_MSG_WAD_ERROR], [ExtractFileName(filename)])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
-    MessageBox(0, PChar(Format(_lc[I_MSG_RES_ERROR], [filename, section, resource])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
+    //Application.MessageBox(PChar(Format(_lc[I_MSG_WAD_ERROR], [ExtractFileName(filename)])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
+    Application.MessageBox(PChar(Format(_lc[I_MSG_RES_ERROR], [filename, section, resource])), PChar(_lc[I_MSG_ERROR]), MB_OK + MB_ICONERROR);
     Result := False
   end
 end;
@@ -314,7 +314,7 @@ end;
 
 procedure TPackMapForm.FormCreate(Sender: TObject);
 begin
-  SaveDialog.InitialDir := EditorDir;
+  SaveDialog.InitialDir := MapsDir;
 end;
 
 end.