=== modified file 'src/document.cpp' --- src/document.cpp 2012-10-11 17:54:14 +0000 +++ src/document.cpp 2013-01-15 07:48:02 +0000 @@ -84,6 +84,7 @@ gboolean sp_document_resource_list_free(gpointer key, gpointer value, gpointer data); static gint doc_count = 0; +static gint doc_mem_count = 0; static unsigned long next_serial = 0; @@ -480,17 +481,18 @@ base = NULL; name = g_strdup(uri); } + if (make_new) { + name = g_strdup_printf(_("New document %d"), ++doc_count); + } g_free(s); } else { + if (make_new) { + name = g_strdup_printf(_("Memory document %d"), ++doc_mem_count); + } + rdoc = sp_repr_document_new("svg:svg"); } - if (make_new) { - base = NULL; - uri = NULL; - name = g_strdup_printf(_("New document %d"), ++doc_count); - } - //# These should be set by now g_assert(name); @@ -514,7 +516,7 @@ // If xml file is not svg, return NULL without warning // TODO fixme: destroy document } else { - Glib::ustring name = Glib::ustring::compose( _("Memory document %1"), ++doc_count ); + Glib::ustring name = Glib::ustring::compose( _("Memory document %1"), ++doc_mem_count ); doc = createDoc(rdoc, NULL, NULL, name.c_str(), keepalive); } }