summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2009-01-13 02:27:04 +0000
committertweenk <tweenk@users.sourceforge.net>2009-01-13 02:27:04 +0000
commita3648f82f9e66ecc2dd355e9d0c5b2f3e66b9b50 (patch)
tree9efdab733f1ae2b3580143a0e1c91a934a020712
parentLatest set of tango icons (by jEsuSdA 8) ) (diff)
downloadinkscape-a3648f82f9e66ecc2dd355e9d0c5b2f3e66b9b50.tar.gz
inkscape-a3648f82f9e66ecc2dd355e9d0c5b2f3e66b9b50.zip
Improved version reporting. Add SVN revision and custom status to
version string on Linux. (bzr r7123)
-rw-r--r--build.xml24
-rw-r--r--src/Makefile.am15
-rw-r--r--src/Makefile_insert35
-rw-r--r--src/debug/logger.cpp4
-rw-r--r--src/display/canvas-arena.cpp2
-rw-r--r--src/display/sp-canvas.cpp2
-rw-r--r--src/document.cpp4
-rw-r--r--src/extension/db.h1
-rw-r--r--src/extension/extension.h3
-rw-r--r--src/extension/implementation/xslt.cpp2
-rw-r--r--src/extension/internal/emf-win32-print.cpp4
-rw-r--r--src/extension/internal/javafx-out.cpp4
-rw-r--r--src/extension/internal/pov-out.cpp4
-rw-r--r--src/helper/unit-menu.cpp4
-rw-r--r--src/inkscape_version.h.mingw2
-rw-r--r--src/main.cpp6
-rw-r--r--src/preferences-skeleton.h8
-rw-r--r--src/sp-root.cpp4
-rw-r--r--src/trace/potrace/potracelib.cpp131
-rw-r--r--src/ui/dialog/Makefile_insert2
-rw-r--r--src/ui/dialog/aboutbox.cpp6
-rw-r--r--src/ui/dialog/print.cpp1
-rw-r--r--src/widgets/sp-xmlview-attr-list.cpp2
-rw-r--r--src/xml/node-observer.h4
24 files changed, 150 insertions, 124 deletions
diff --git a/build.xml b/build.xml
index f16c1486c..486b771d4 100644
--- a/build.xml
+++ b/build.xml
@@ -97,8 +97,10 @@
<copy file="${src}/helper/sp-marshal.cpp.mingw"
tofile="${src}/helper/sp-marshal.cpp"/>
- <makefile file="inkscape_version.h">
- #define INKSCAPE_VERSION "${version}, revision ${svn.revision}"
+ <makefile file="inkscape-version.cpp">
+ namespace Inkscape {
+ gchar const *version_string = "${version} r${svn.revision}"
+ }
</makefile>
<makefile file="config.h">
#ifndef _CONFIG_H_
@@ -183,22 +185,6 @@
</makefile>
</target>
-
-
- <!--
- ########################################################################
- ## T A R G E T : T O U C H A B O U T
- ########################################################################
- -->
- <target name="touchabout"
- description="update the modification time of aboutbox.cpp">
- <!-- not good <touch file="${src}/ui/dialog/aboutbox.cpp"/> -->
- <!-- better -->
- <delete file="${build}/obj/ui/dialog/aboutbox.o"/>
- <delete file="inkscape_version.h"/>
- </target>
-
-
<!--
########################################################################
## T A R G E T : C X X T E S T
@@ -899,7 +885,7 @@
<delete dir="${dist}"/>
<delete file="build.dep"/>
<delete file="config.h"/>
- <delete file="inkscape_version.h"/>
+ <delete file="inkscape-version.cpp"/>
<delete file="${src}/test-main.cpp"/>
<delete file="${src}/test-src.cpp"/>
diff --git a/src/Makefile.am b/src/Makefile.am
index 82a6f65a0..44b885ab0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -52,6 +52,12 @@ inkjar_dir = inkjar
inkjar_libs = inkjar/libinkjar.a
endif
+# Extra files to remove when doing "make distclean"
+DISTCLEANFILES = \
+ helper/sp-marshal.cpp \
+ helper/sp-marshal.h \
+ inkscape-version.cpp
+
inkscape_private_libs = \
libinkpre.a \
application/libinkapp.a \
@@ -93,7 +99,8 @@ inkscape_private_libs = \
io/libio.a \
$(inkjar_libs) \
libinkpost.a \
- debug/libinkdebug.a
+ debug/libinkdebug.a \
+ libinkversion.a
all_libs = \
$(inkscape_private_libs) \
@@ -161,12 +168,6 @@ bin_PROGRAMS = inkscape inkview
# Currently we use one library per source directory.
noinst_LIBRARIES = $(inkscape_private_libs)
-# Extra files to remove when doing "make distclean"
-DISTCLEANFILES = \
- helper/sp-marshal.cpp \
- helper/sp-marshal.h \
- inkscape_version.h
-
# Extra files not mentioned as sources to include in the source tarball
EXTRA_DIST = \
$(top_srcdir)/Doxyfile \
diff --git a/src/Makefile_insert b/src/Makefile_insert
index 6668600d3..6eba8897d 100644
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
@@ -289,17 +289,12 @@ libinkpost_a_SOURCES = \
# Additional dependencies
desktop.$(OBJEXT): helper/sp-marshal.h
-document.$(OBJEXT): helper/sp-marshal.h inkscape_version.h
-extension/internal/latex-pstricks.$(OBJEXT): inkscape_version.h
-extension/internal/ps.$(OBJEXT): inkscape_version.h
-inkscape.$(OBJEXT): helper/sp-marshal.h inkscape_version.h
+document.$(OBJEXT): helper/sp-marshal.h
+inkscape.$(OBJEXT): helper/sp-marshal.h
knot.$(OBJEXT): helper/sp-marshal.h
-main.$(OBJEXT): inkscape_version.h
selection.$(OBJEXT): helper/sp-marshal.h
sp-object.$(OBJEXT): helper/sp-marshal.h
-sp-root.$(OBJEXT): inkscape_version.h
view.$(OBJEXT): helper/sp-marshal.h
-help.$(OBJEXT): inkscape_version.h
# ################################################
@@ -316,8 +311,30 @@ inkscape_LDFLAGS = --export-dynamic $(kdeldflags)
inkview_SOURCES = inkview.cpp $(win32_sources)
inkview_LDADD = $(all_libs)
-inkscape_version.h: ../configure.ac
- echo '#define INKSCAPE_VERSION "$(VERSION)"' > inkscape_version.h
+libinkversion_a_SOURCES = inkscape-version.cpp
+
+# Hack: make inkscape-version.cpp a phony target.
+# Create the version file every time "make" is invoked. Overwrite it only
+# if it changes. Watch the backslashes!
+inkscape-version.cpp:
+ VER_PREFIX="$(VERSION)"; \
+ if test -x "$(srcdir)/.svn"; then \
+ VER_SVNREV=" r`svn info $(srcdir) | sed -n -e '/^Revision:/s/Revision: \(.*\)/\1/p'`"; \
+ if test ! -z "`svn status -q $(srcdir)`"; then \
+ VER_CUSTOM=" custom"; \
+ fi; \
+ fi; \
+ VERSION="$$VER_PREFIX$$VER_SVNREV$$VER_CUSTOM"; \
+ echo "namespace Inkscape { " \
+ "char const *version_string = \"$$VERSION\"; " \
+ "}" > inkscape-version.new.cpp; \
+ if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \
+ rm inkscape-version.new.cpp; \
+ else \
+ mv inkscape-version.new.cpp inkscape-version.cpp; \
+ fi; \
+ echo $$VERSION
+.PHONY: inkscape-version.cpp
# ######################
# ### CxxTest stuff ####
diff --git a/src/debug/logger.cpp b/src/debug/logger.cpp
index 2956e068e..f28d2750b 100644
--- a/src/debug/logger.cpp
+++ b/src/debug/logger.cpp
@@ -12,7 +12,7 @@
#include <fstream>
#include <vector>
#include <glib/gmessages.h>
-#include "inkscape_version.h"
+#include "inkscape-version.h"
#include "debug/logger.h"
#include "debug/simple-event.h"
#include "gc-alloc.h"
@@ -133,7 +133,7 @@ typedef SimpleEvent<Event::CORE> CoreEvent;
class SessionEvent : public CoreEvent {
public:
SessionEvent() : CoreEvent(Util::share_static_string("session")) {
- _addProperty("inkscape-version", INKSCAPE_VERSION);
+ _addProperty("inkscape-version", Inkscape::version_string);
}
};
diff --git a/src/display/canvas-arena.cpp b/src/display/canvas-arena.cpp
index 7e00a3804..733f9a513 100644
--- a/src/display/canvas-arena.cpp
+++ b/src/display/canvas-arena.cpp
@@ -17,7 +17,7 @@
#include <display/display-forward.h>
#include <display/sp-canvas-util.h>
-#include "../helper/sp-marshal.h"
+#include "helper/sp-marshal.h"
#include <display/nr-arena.h>
#include <display/nr-arena-group.h>
#include <display/canvas-arena.h>
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 419b726ca..e5ef2c80d 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -28,7 +28,7 @@
#include <gtkmm.h>
-#include "../helper/sp-marshal.h"
+#include "helper/sp-marshal.h"
#include <helper/recthull.h>
#include <display/sp-canvas.h>
#include "display-forward.h"
diff --git a/src/document.cpp b/src/document.cpp
index 733dadb69..5b27272c6 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -45,7 +45,7 @@
#include "xml/repr.h"
#include "helper/units.h"
#include "inkscape-private.h"
-#include "inkscape_version.h"
+#include "inkscape-version.h"
#include "sp-object-repr.h"
#include "sp-namedview.h"
#include "desktop.h"
@@ -291,7 +291,7 @@ sp_document_create(Inkscape::XML::Document *rdoc,
/* fixme: Not sure about this, but lets assume ::build updates */
rroot->setAttribute("sodipodi:version", SODIPODI_VERSION);
- rroot->setAttribute("inkscape:version", INKSCAPE_VERSION);
+ rroot->setAttribute("inkscape:version", Inkscape::version_string);
/* fixme: Again, I moved these here to allow version determining in ::build (Lauris) */
/* Quick hack 2 - get default image size into document */
diff --git a/src/extension/db.h b/src/extension/db.h
index 9505ac779..9d4fc77d3 100644
--- a/src/extension/db.h
+++ b/src/extension/db.h
@@ -17,6 +17,7 @@
#include <map>
#include <list>
+#include <cstring>
#include "extension/extension.h"
diff --git a/src/extension/extension.h b/src/extension/extension.h
index 0129f4d74..48ca86cf7 100644
--- a/src/extension/extension.h
+++ b/src/extension/extension.h
@@ -22,7 +22,6 @@
#include <gtkmm/table.h>
#include <glibmm/ustring.h>
#include "xml/repr.h"
-#include "document.h"
#include "extension/extension-forward.h"
/** The key that is used to identify that the I/O should be autodetected */
@@ -73,6 +72,8 @@
#define INKSCAPE_EXTENSION_NS_NC "extension"
#define INKSCAPE_EXTENSION_NS "extension:"
+struct SPDocument;
+
namespace Inkscape {
namespace Extension {
diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp
index 9540b08e5..c331cac60 100644
--- a/src/extension/implementation/xslt.cpp
+++ b/src/extension/implementation/xslt.cpp
@@ -22,6 +22,8 @@
#include "io/sys.h"
#include "file.h"
#include <unistd.h>
+#include <cstring>
+#include "document.h"
#include <libxml/parser.h>
#include <libxslt/transform.h>
diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp
index 1de9bbfe0..f69186c71 100644
--- a/src/extension/internal/emf-win32-print.cpp
+++ b/src/extension/internal/emf-win32-print.cpp
@@ -49,7 +49,7 @@
//#include "document.h"
#include "style.h"
//#include "sp-paint-server.h"
-#include "inkscape_version.h"
+#include "inkscape-version.h"
//#include "libnrtype/FontFactory.h"
//#include "libnrtype/font-instance.h"
@@ -172,7 +172,7 @@ PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc)
CHAR buff[1024];
ZeroMemory(buff, sizeof(buff));
- snprintf(buff, sizeof(buff)-1, "Inkscape %s (%s)", INKSCAPE_VERSION, __DATE__);
+ snprintf(buff, sizeof(buff)-1, "Inkscape %s (%s)", Inkscape::version_string, __DATE__);
INT len = strlen(buff);
CHAR *p1 = strrchr(ansi_uri, '\\');
CHAR *p2 = strrchr(ansi_uri, '/');
diff --git a/src/extension/internal/javafx-out.cpp b/src/extension/internal/javafx-out.cpp
index 69ee296e5..1c3ae9c2a 100644
--- a/src/extension/internal/javafx-out.cpp
+++ b/src/extension/internal/javafx-out.cpp
@@ -20,7 +20,7 @@
#endif
#include "javafx-out.h"
#include <inkscape.h>
-#include <inkscape_version.h>
+#include <inkscape-version.h>
#include <sp-path.h>
#include <sp-linear-gradient.h>
#include <sp-radial-gradient.h>
@@ -223,7 +223,7 @@ bool JavaFXOutput::doHeader()
out("### This JavaFX document was generated by Inkscape\n");
out("### http://www.inkscape.org\n");
out("### Created: %s", ctime(&tim));
- out("### Version: %s\n", INKSCAPE_VERSION);
+ out("### Version: %s\n", Inkscape::version_string);
out("#####################################################################\n");
out("### NOTES:\n");
out("### ============\n");
diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp
index 6b8a5ce07..7dd9dcf5e 100644
--- a/src/extension/internal/pov-out.cpp
+++ b/src/extension/internal/pov-out.cpp
@@ -22,7 +22,7 @@
#endif
#include "pov-out.h"
#include <inkscape.h>
-#include <inkscape_version.h>
+#include <inkscape-version.h>
#include <sp-path.h>
#include <style.h>
#include <display/curve.h>
@@ -201,7 +201,7 @@ bool PovOutput::doHeader()
out("### This PovRay document was generated by Inkscape\n");
out("### http://www.inkscape.org\n");
out("### Created: %s", ctime(&tim));
- out("### Version: %s\n", INKSCAPE_VERSION);
+ out("### Version: %s\n", Inkscape::version_string);
out("#####################################################################\n");
out("### NOTES:\n");
out("### ============\n");
diff --git a/src/helper/unit-menu.cpp b/src/helper/unit-menu.cpp
index 19139979e..66fee95de 100644
--- a/src/helper/unit-menu.cpp
+++ b/src/helper/unit-menu.cpp
@@ -21,9 +21,9 @@
#include <gtk/gtkhbox.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkmenuitem.h>
-#include "sp-marshal.h"
+#include "helper/sp-marshal.h"
#include "helper/units.h"
-#include "unit-menu.h"
+#include "helper/unit-menu.h"
#include "widgets/spw-utilities.h"
struct SPUnitSelector {
diff --git a/src/inkscape_version.h.mingw b/src/inkscape_version.h.mingw
index e9d6b778a..2d433f5ca 100644
--- a/src/inkscape_version.h.mingw
+++ b/src/inkscape_version.h.mingw
@@ -1 +1 @@
-#define INKSCAPE_VERSION "0.45+devel"
+#define INKSCAPE_VERSION "0.46+devel"
diff --git a/src/main.cpp b/src/main.cpp
index 89590a5f4..7bbe691d7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -69,7 +69,7 @@
#include "inkscape-private.h"
#include "inkscape-stock.h"
-#include "inkscape_version.h"
+#include "inkscape-version.h"
#include "sp-namedview.h"
#include "sp-guide.h"
@@ -951,7 +951,7 @@ int sp_main_shell(char const* command_name)
gsize sizeLeft = buffer_size - offset;
gchar *useme = command_line + offset;
- fprintf(stdout, "Inkscape %s interactive shell mode. Type 'quit' to quit.\n", INKSCAPE_VERSION);
+ fprintf(stdout, "Inkscape %s interactive shell mode. Type 'quit' to quit.\n", Inkscape::version_string);
fflush(stdout);
char* linedata = 0;
do {
@@ -1724,7 +1724,7 @@ sp_process_args(poptContext ctx)
break;
}
case SP_ARG_VERSION: {
- printf("Inkscape %s (%s)\n", INKSCAPE_VERSION, __DATE__);
+ printf("Inkscape %s (%s)\n", Inkscape::version_string, __DATE__);
exit(0);
break;
}
diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h
index 1d17613c6..9a40c6bb1 100644
--- a/src/preferences-skeleton.h
+++ b/src/preferences-skeleton.h
@@ -1,10 +1,14 @@
#ifndef SEEN_PREFERENCES_SKELETON_H
#define SEEN_PREFERENCES_SKELETON_H
-#include <inkscape_version.h>
+#include <inkscape-version.h>
+/* The root's "version" attribute describes the preferences file format version.
+ * It should only increase when a backwards-incompatible change is made,
+ * and special handling has to be added to the preferences class to update
+ * obsolete versions the user might have. */
static char const preferences_skeleton[] =
-"<inkscape version=\"" INKSCAPE_VERSION "\"\n"
+"<inkscape version=\"1\"\n"
" xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n"
" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\">\n"
" <group id=\"window\">\n"
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index 81d71044d..4b584e97b 100644
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
@@ -34,7 +34,7 @@
#include <libnr/nr-translate-scale-ops.h>
#include <xml/repr.h>
#include "svg/stringstream.h"
-#include "inkscape_version.h"
+#include "inkscape-version.h"
class SPDesktop;
@@ -589,7 +589,7 @@ sp_root_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML:
if (flags & SP_OBJECT_WRITE_EXT) {
repr->setAttribute("sodipodi:version", SODIPODI_VERSION);
- repr->setAttribute("inkscape:version", INKSCAPE_VERSION);
+ repr->setAttribute("inkscape:version", Inkscape::version_string);
}
repr->setAttribute("version", SVG_VERSION);
diff --git a/src/trace/potrace/potracelib.cpp b/src/trace/potrace/potracelib.cpp
index 36b3a5f94..c9e9a7125 100644
--- a/src/trace/potrace/potracelib.cpp
+++ b/src/trace/potrace/potracelib.cpp
@@ -4,9 +4,10 @@
#include <stdlib.h>
#include <string.h>
+#include <glib/gprintf.h>
#include "potracelib.h"
-#include <inkscape_version.h>
+#include "inkscape-version.h"
#include "curve.h"
#include "decompose.h"
#include "trace.h"
@@ -34,14 +35,14 @@ static const potrace_param_t param_default = {
/* Return a fresh copy of the set of default parameters, or NULL on
failure with errno set. */
potrace_param_t *potrace_param_default(void) {
- potrace_param_t *p;
-
- p = (potrace_param_t *) malloc(sizeof(potrace_param_t));
- if (!p) {
- return NULL;
- }
- memcpy(p, &param_default, sizeof(potrace_param_t));
- return p;
+ potrace_param_t *p;
+
+ p = (potrace_param_t *) malloc(sizeof(potrace_param_t));
+ if (!p) {
+ return NULL;
+ }
+ memcpy(p, &param_default, sizeof(potrace_param_t));
+ return p;
}
/* On success, returns a Potrace state st with st->status ==
@@ -50,65 +51,77 @@ potrace_param_t *potrace_param_default(void) {
state (with st->status == POTRACE_STATUS_INCOMPLETE). Complete or
incomplete Potrace state can be freed with potrace_state_free(). */
potrace_state_t *potrace_trace(const potrace_param_t *param, const potrace_bitmap_t *bm) {
- int r;
- path_t *plist = NULL;
- potrace_state_t *st;
- progress_t prog;
- progress_t subprog;
-
- /* prepare private progress bar state */
- prog.callback = param->progress.callback;
- prog.data = param->progress.data;
- prog.min = param->progress.min;
- prog.max = param->progress.max;
- prog.epsilon = param->progress.epsilon;
- prog.d_prev = param->progress.min;
-
- /* allocate state object */
- st = (potrace_state_t *)malloc(sizeof(potrace_state_t));
- if (!st) {
- return NULL;
- }
-
- progress_subrange_start(0.0, 0.1, &prog, &subprog);
-
- /* process the image */
- r = bm_to_pathlist(bm, &plist, param, &subprog);
- if (r) {
- free(st);
- return NULL;
- }
-
- st->status = POTRACE_STATUS_OK;
- st->plist = plist;
- st->priv = NULL; /* private state currently unused */
-
- progress_subrange_end(&prog, &subprog);
-
- progress_subrange_start(0.1, 1.0, &prog, &subprog);
-
- /* partial success. */
- r = process_path(plist, param, &subprog);
- if (r) {
- st->status = POTRACE_STATUS_INCOMPLETE;
- }
-
- progress_subrange_end(&prog, &subprog);
-
- return st;
+ int r;
+ path_t *plist = NULL;
+ potrace_state_t *st;
+ progress_t prog;
+ progress_t subprog;
+
+ /* prepare private progress bar state */
+ prog.callback = param->progress.callback;
+ prog.data = param->progress.data;
+ prog.min = param->progress.min;
+ prog.max = param->progress.max;
+ prog.epsilon = param->progress.epsilon;
+ prog.d_prev = param->progress.min;
+
+ /* allocate state object */
+ st = (potrace_state_t *)malloc(sizeof(potrace_state_t));
+ if (!st) {
+ return NULL;
+ }
+
+ progress_subrange_start(0.0, 0.1, &prog, &subprog);
+
+ /* process the image */
+ r = bm_to_pathlist(bm, &plist, param, &subprog);
+ if (r) {
+ free(st);
+ return NULL;
+ }
+
+ st->status = POTRACE_STATUS_OK;
+ st->plist = plist;
+ st->priv = NULL; /* private state currently unused */
+
+ progress_subrange_end(&prog, &subprog);
+
+ progress_subrange_start(0.1, 1.0, &prog, &subprog);
+
+ /* partial success. */
+ r = process_path(plist, param, &subprog);
+ if (r) {
+ st->status = POTRACE_STATUS_INCOMPLETE;
+ }
+
+ progress_subrange_end(&prog, &subprog);
+
+ return st;
}
/* free a Potrace state, without disturbing errno. */
void potrace_state_free(potrace_state_t *st) {
- pathlist_free(st->plist);
- free(st);
+ pathlist_free(st->plist);
+ free(st);
}
/* free a parameter list, without disturbing errno. */
void potrace_param_free(potrace_param_t *p) {
- free(p);
+ free(p);
}
char *potrace_version(void) {
- return "potracelib "INKSCAPE_VERSION"";
+ static char *ver = g_strdup_printf("potracelib %s", Inkscape::version_string);
+ return ver;
}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/ui/dialog/Makefile_insert b/src/ui/dialog/Makefile_insert
index 6c301ef40..190118946 100644
--- a/src/ui/dialog/Makefile_insert
+++ b/src/ui/dialog/Makefile_insert
@@ -67,5 +67,3 @@ ui_dialog_libuidialog_a_SOURCES = \
ui/dialog/undo-history.cpp \
ui/dialog/undo-history.h \
$(inkboard_dialogs)
-
-ui/dialog/aboutbox.$(OBJEXT): inkscape_version.h
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index 261a586b4..c418b5771 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -33,7 +33,7 @@
#include "text-editing.h"
#include "ui/dialog/aboutbox.h"
-#include "inkscape_version.h"
+#include "inkscape-version.h"
@@ -104,7 +104,7 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) {
Gtk::Label *label=new Gtk::Label();
gchar *label_text =
g_strdup_printf("<small><i>Inkscape %s, built %s</i></small>",
- INKSCAPE_VERSION, __DATE__);
+ Inkscape::version_string, __DATE__);
label->set_markup(label_text);
label->set_alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER);
g_free(label_text);
@@ -153,7 +153,7 @@ Gtk::Widget *build_splash_widget() {
SPObject *version = doc->getObjectById("version");
if ( version && SP_IS_TEXT(version) ) {
- sp_te_set_repr_text_multiline (SP_TEXT (version), INKSCAPE_VERSION);
+ sp_te_set_repr_text_multiline (SP_TEXT (version), Inkscape::version_string);
}
sp_document_ensure_up_to_date(doc);
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp
index b2094f540..bb2b5d68d 100644
--- a/src/ui/dialog/print.cpp
+++ b/src/ui/dialog/print.cpp
@@ -21,6 +21,7 @@
#include "extension/internal/cairo-render-context.h"
#include "extension/internal/cairo-renderer.h"
#include "ui/widget/rendering-options.h"
+#include "document.h"
#include "unit-constants.h"
#include "helper/png-write.h"
diff --git a/src/widgets/sp-xmlview-attr-list.cpp b/src/widgets/sp-xmlview-attr-list.cpp
index 9ee9fcdd0..008ad4970 100644
--- a/src/widgets/sp-xmlview-attr-list.cpp
+++ b/src/widgets/sp-xmlview-attr-list.cpp
@@ -16,7 +16,7 @@
#include <cstring>
#include <glibmm/i18n.h>
-#include "../helper/sp-marshal.h"
+#include "helper/sp-marshal.h"
#include "../xml/node-event-vector.h"
#include "sp-xmlview-attr-list.h"
diff --git a/src/xml/node-observer.h b/src/xml/node-observer.h
index fbbb04993..ca787c269 100644
--- a/src/xml/node-observer.h
+++ b/src/xml/node-observer.h
@@ -50,8 +50,10 @@ namespace XML {
* no dangling references.
*/
class NodeObserver {
-public:
+protected:
+ /* the constructor is protected to prevent instantiation */
NodeObserver() {}
+public:
virtual ~NodeObserver() {}
/**