|
|
@@ -19,7 +19,11 @@ public class Project
|
|
|
{
|
|
|
public const string LEVEL_EDITOR_TEST_NAME = "_level_editor_test";
|
|
|
|
|
|
- public delegate ImportResult ImporterDelegate(Project project, string destination_dir, SList<string> filenames, Import import_result);
|
|
|
+ public delegate ImportResult ImporterDelegate(ProjectStore project_store
|
|
|
+ , string destination_dir
|
|
|
+ , SList<string> filenames
|
|
|
+ , Import import_result
|
|
|
+ );
|
|
|
|
|
|
[Compact]
|
|
|
public struct ImporterData
|
|
|
@@ -518,8 +522,10 @@ public class Project
|
|
|
return Path.build_filename(prefix, resource_path);
|
|
|
}
|
|
|
|
|
|
- public static ImportResult import_all_extensions(Project project, string destination_dir, SList<string> filenames, Import import_result)
|
|
|
+ public static ImportResult import_all_extensions(ProjectStore project_store, string destination_dir, SList<string> filenames, Import import_result)
|
|
|
{
|
|
|
+ Project project = project_store._project;
|
|
|
+
|
|
|
Gee.ArrayList<string> paths = new Gee.ArrayList<string>();
|
|
|
foreach (var item in filenames)
|
|
|
paths.add(item);
|
|
|
@@ -559,7 +565,7 @@ public class Project
|
|
|
foreach (var item in importables)
|
|
|
importables_list.append(item);
|
|
|
|
|
|
- result = importer.delegate(project, destination_dir, importables_list, import_result);
|
|
|
+ result = importer.delegate(project_store, destination_dir, importables_list, import_result);
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
@@ -647,7 +653,7 @@ public class Project
|
|
|
return find_importer_for_extension(type) != null;
|
|
|
}
|
|
|
|
|
|
- public ImportResult import(string? destination_dir, Import import_result, Gtk.Window? parent_window = null)
|
|
|
+ public ImportResult import(string? destination_dir, Import import_result, ProjectStore project_store, Gtk.Window? parent_window = null)
|
|
|
{
|
|
|
Gtk.FileChooserDialog src = new Gtk.FileChooserDialog("Import..."
|
|
|
, parent_window
|
|
|
@@ -708,7 +714,7 @@ public class Project
|
|
|
if (importer == null)
|
|
|
importer = _all_extensions_importer_data.delegate;
|
|
|
|
|
|
- return importer(this, out_dir, filenames, import_result);
|
|
|
+ return importer(project_store, out_dir, filenames, import_result);
|
|
|
}
|
|
|
|
|
|
public void delete_tree(GLib.File file) throws Error
|