X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fapp.cpp;h=4447fc3f6c7418018d6af211544a70b44a1e9df4;hb=9eeed0ce9066de4b2e36885d5ec7b66ac8f14aa8;hp=7ea2e74cf1447ac3eccb96576816d8d1bf26ca28;hpb=c9582dc1cba08b936b35f36f36c0fa018a203a53;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 7ea2e74..4447fc3 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -1450,7 +1450,8 @@ App::set_recent_file_window_size(etl::handle instance) // find the canvas synfig::Canvas::Handle canvas; try { - canvas = instance->get_canvas()->find_canvas(String(canvas_window_size, current, separator-current)); + String warnings; + canvas = instance->get_canvas()->find_canvas(String(canvas_window_size, current, separator-current), warnings); } catch(Exception::IDNotFound) { // can't find the canvas; skip to the next canvas or return @@ -2358,9 +2359,9 @@ App::open_as(std::string filename,std::string as) try { OneMoment one_moment; - String errors; + String errors, warnings; - etl::handle canvas(open_canvas_as(filename,as,errors)); + etl::handle canvas(open_canvas_as(filename,as,errors,warnings)); if(canvas && get_instance(canvas)) { get_instance(canvas)->find_canvas_view(canvas)->present(); @@ -2372,6 +2373,9 @@ App::open_as(std::string filename,std::string as) if(!canvas) throw (String)strprintf(_("Unable to load \"%s\":\n\n"),filename.c_str()) + errors; + if (warnings != "") + dialog_warning_blocking(_("Warnings"), strprintf("%s:\n\n%s", _("Warnings"), warnings.c_str())); + if (as.find(custom_filename_prefix.c_str()) != 0) add_recent_file(as);