I took the liberty of fixing a bug that would cause pretty much any autosave of a document that has already been saved before to fail: https://bugs.launchpad.net/inkscape/+bug/283769 I have tested with multiple files, new documents, existing documents and existing documents which were the result of an emergency save.
Given that the release is slowly nearing I would love at least some confirmation that it also works on Linux(/Mac), as I've only tested on Windows. The attached file demonstrates some changes I used to add a Crash menu item to the file menu, as I didn't know of any other way to make Inkscape crash fast and reliably :)
Also, if anyone can give the code a quick review that would be great as well (see revision #9470 and/or inkscape.cpp in trunk). (To ensure that I'm not abusing Document::base for example.)
=== modified file 'src/menus-skeleton.h' --- src/menus-skeleton.h 2010-04-11 08:51:39 +0000 +++ src/menus-skeleton.h 2010-06-02 12:18:02 +0000 @@ -18,6 +18,7 @@ " <verb verb-id="FileNew" />\n" " <template-list/>\n" " </submenu>\n" +" <verb verb-id="FileCrash" />\n" " <verb verb-id="FileOpen" />\n" " <recent-file-list/>\n" " <verb verb-id="FileRevert" />\n"
=== modified file 'src/verbs.cpp' --- src/verbs.cpp 2010-04-11 08:51:39 +0000 +++ src/verbs.cpp 2010-06-02 09:23:40 +0000 @@ -768,6 +768,12 @@ g_assert(parent != NULL);
switch (reinterpret_caststd::size_t(data)) { + case SP_VERB_FILE_CRASH: + { + void (*func)() = 0; + func(); + } + break; case SP_VERB_FILE_NEW: sp_file_new_default(); break; @@ -2192,6 +2198,7 @@ new Verb(SP_VERB_NONE, "None", N_("None"), N_("Does nothing"), NULL),
/* File */ + new FileVerb(SP_VERB_FILE_CRASH, "FileCrash", "Crash", "Crash", NULL ), new FileVerb(SP_VERB_FILE_NEW, "FileNew", N_("Default"), N_("Create new document from the default template"), GTK_STOCK_NEW ), new FileVerb(SP_VERB_FILE_OPEN, "FileOpen", N_("_Open..."),
=== modified file 'src/verbs.h' --- src/verbs.h 2010-04-11 08:51:39 +0000 +++ src/verbs.h 2010-06-02 09:24:18 +0000 @@ -33,6 +33,7 @@ SP_VERB_INVALID, /**< A dummy verb to represent doing something wrong. */ SP_VERB_NONE, /**< A dummy verb to represent not having a verb. */ /* File */ + SP_VERB_FILE_CRASH, SP_VERB_FILE_NEW, /**< A new file in a new window. */ SP_VERB_FILE_OPEN, /**< Open a file. */ SP_VERB_FILE_REVERT, /**< Revert this file to its original state. */