Use the z printf length modifier when printing the value of size_t values, fixes...
[synfig.git] / synfig-studio / trunk / src / gtkmm / app.cpp
index 75af506..62780a6 100644 (file)
@@ -8,6 +8,7 @@
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **     Copyright (c) 2007, 2008 Chris Moore
 **     Copyright (c) 2008 Gerald Young
+**  Copyright (c) 2008 Carlos López
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -2338,8 +2339,9 @@ App::open_as(std::string filename,std::string as)
        try
        {
                OneMoment one_moment;
+               String errors;
 
-               etl::handle<synfig::Canvas> canvas(open_canvas_as(filename,as));
+               etl::handle<synfig::Canvas> canvas(open_canvas_as(filename,as,errors));
                if(canvas && get_instance(canvas))
                {
                        get_instance(canvas)->find_canvas_view(canvas)->present();
@@ -2349,7 +2351,7 @@ App::open_as(std::string filename,std::string as)
                else
                {
                        if(!canvas)
-                               throw (String)strprintf(_("Unable to open file \"%s\""),filename.c_str());
+                               throw (String)strprintf(_("Unable to load \"%s\":\n\n"),filename.c_str()) + errors;
 
                        if (as.find(custom_filename_prefix.c_str()) != 0)
                                add_recent_file(as);