diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 8b31ba2670a95a78b86350fa20f3498e481b5b23..4309775675cd95924f7bb72ee6b2affc72059513 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
++docnum;
- Inkscape::XML::Node *repr = sp_document_repr_root(doc);
- // g_debug("Document %d: \"%s\" %s", docnum, doc ? doc->name : "(null)", doc ? (doc->isModifiedSinceSave() ? "(dirty)" : "(clean)") : "(null)");
+ Inkscape::XML::Node *repr = doc->getReprRoot();
+ // g_debug("Document %d: \"%s\" %s", docnum, doc ? doc->getName() : "(null)", doc ? (doc->isModifiedSinceSave() ? "(dirty)" : "(clean)") : "(null)");
if (doc->isModifiedSinceSave()) {
gchar *oldest_autosave = 0;
void inkscape_trackalt(guint trackvalue)
{
- inkscape->trackalt = trackvalue;
+ inkscape->trackalt = trackvalue;
}
@@ -553,6 +553,13 @@ inkscape_deactivate_desktop_private (Inkscape::Application */*inkscape*/, SPDesk
#define SP_INDENT 8
+static bool crashIsHappening = false;
+
+bool inkscapeIsCrashing()
+{
+ return crashIsHappening;
+}
+
static void
inkscape_crash_handler (int /*signum*/)
{
}
recursion = TRUE;
+ crashIsHappening = true;
+
EventTracker<SimpleEvent<Inkscape::Debug::Event::CORE> > tracker("crash");
tracker.set<SimpleEvent<> >("emergency-save");
++iter) {
SPDocument *doc = iter->first;
Inkscape::XML::Node *repr;
- repr = sp_document_repr_root (doc);
+ repr = doc->getReprRoot();
if (doc->isModifiedSinceSave()) {
const gchar *docname;
/* originally, the document name was retrieved from
* the sodipod:docname attribute */
- docname = doc->name;
+ docname = doc->getName();
if (docname) {
/* Removes an emergency save suffix if present: /(.*)\.[0-9_]*\.[0-9_]*\.[~\.]*$/\1/ */
const char* d0 = strrchr ((char*)docname, '.');
// Find a location
const char* locations[] = {
- doc->base,
+ doc->getBase(),
g_get_home_dir(),
g_get_tmp_dir(),
curdir,
savednames = g_slist_prepend (savednames, g_strdup (c));
fclose (file);
} else {
- failednames = g_slist_prepend (failednames, (doc->name) ? g_strdup (doc->name) : g_strdup (_("Untitled document")));
+ failednames = g_slist_prepend (failednames, (doc->getName()) ? g_strdup(doc->getName()) : g_strdup (_("Untitled document")));
}
count++;
}