}
else
{
- if(canvas_interface()->import(filename, App::resize_imported_images))
+ String errors, warnings;
+ if(canvas_interface()->import(filename, errors, warnings, App::resize_imported_images))
success=true;
+ if (warnings != "")
+ App::dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str()));
}
continue;
{
// String filename(dirname(get_canvas()->get_file_name()));
String filename("*.*");
+ String errors, warnings;
if(App::dialog_open_file(_("Import Image"), filename, IMAGE_DIR_PREFERENCE))
- canvas_interface()->import(filename, App::resize_imported_images);
+ {
+ canvas_interface()->import(filename, errors, warnings, App::resize_imported_images);
+ if (warnings != "")
+ App::dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str()));
+ }
}
Smach::event_result
}
bool
-CanvasInterface::import(const synfig::String &filename, bool resize_image)
+CanvasInterface::import(const synfig::String &filename, synfig::String &errors, synfig::String &warnings, bool resize_image)
{
Action::PassiveGrouper group(get_instance().get(),_("Import Image"));
// If this is a SIF file, then we need to do things slightly differently
if(ext=="sif" || ext=="sifz")try
{
- String errors, warnings;
Canvas::Handle outside_canvas(synfig::open_canvas(filename, errors, warnings));
if(!outside_canvas)
throw String(_("Unable to open this composition")) + ":\n\n" + errors;
void set_rend_desc(const synfig::RendDesc &rend_desc);
- bool import(const synfig::String &filename, bool resize_image=false);
+ bool import(const synfig::String &filename, synfig::String &errors, synfig::String &warnings, bool resize_image=false);
void waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Waypoint waypoint);