summaryrefslogtreecommitdiffstats
path: root/src/file.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-10-12 17:18:08 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-10-12 17:18:08 +0000
commitd997c6a08a0d1184e8a4aec708033d0f548802f8 (patch)
treee644b11bedb210813006dbfe4fb6a703bb642fae /src/file.cpp
parentmerge from trunk (r11761) (diff)
parentFix for compiling with pre gtkmm 2.24 libraries. (diff)
downloadinkscape-d997c6a08a0d1184e8a4aec708033d0f548802f8.tar.gz
inkscape-d997c6a08a0d1184e8a4aec708033d0f548802f8.zip
merge from trunk (r11787)
(bzr r11668.1.28)
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 778306d5d..a03c459da 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -235,12 +235,16 @@ bool sp_file_open(const Glib::ustring &uri,
}
SPDocument *doc = NULL;
+ bool cancelled = false;
try {
doc = Inkscape::Extension::open(key, uri.c_str());
} catch (Inkscape::Extension::Input::no_extension_found &e) {
doc = NULL;
} catch (Inkscape::Extension::Input::open_failed &e) {
doc = NULL;
+ } catch (Inkscape::Extension::Input::open_cancelled &e) {
+ doc = NULL;
+ cancelled = true;
}
if (desktop) {
@@ -287,7 +291,7 @@ bool sp_file_open(const Glib::ustring &uri,
}
return TRUE;
- } else {
+ } else if (!cancelled) {
gchar *safeUri = Inkscape::IO::sanitizeString(uri.c_str());
gchar *text = g_strdup_printf(_("Failed to load the requested file %s"), safeUri);
sp_ui_error_dialog(text);
@@ -295,6 +299,8 @@ bool sp_file_open(const Glib::ustring &uri,
g_free(safeUri);
return FALSE;
}
+
+ return FALSE;
}
/**