=== modified file 'debian/changelog' --- debian/changelog 2011-05-01 01:08:10 +0000 +++ debian/changelog 2011-05-08 00:33:18 +0000 @@ -1,3 +1,19 @@ +inkscape (0.48.1-2ubuntu4) natty; urgency=low + + * debian/patches/01_add_unity_quicklist_support.patch.dpatch: + - Rename to debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch + - Refresh header + * Make sure that translation domain is added to correct group in + Desktop entry file (LP: #726850): + - debian/rules: Removed broken patch from install rule + - debian/patches/ubuntu-02-add-translation-domain-to-desktop- + file.dpatch: New dpatch to replace the patch in debian/rules + * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: + - Rename to debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch + - Refresh header + + -- Alex Valavanis Sun, 08 May 2011 01:11:10 +0100 + inkscape (0.48.1-2ubuntu3) oneiric; urgency=low * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: Fix build failure with gcc 4.6 === modified file 'debian/patches/00list' --- debian/patches/00list 2011-05-01 01:08:10 +0000 +++ debian/patches/00list 2011-05-08 00:03:03 +0000 @@ -1,5 +1,6 @@ 01-libwpg0.2.dpatch 02-add-shebangs-and-fix-permissions 03-add-missing-mimetypes -01_add_unity_quicklist_support.patch -04-fix-gcc4.6-ftbfs.dpatch +ubuntu-01-add-unity-quicklist-support.dpatch +ubuntu-02-add-translation-domain-to-desktop-file.dpatch +ubuntu-03-fix-gcc4.6-ftbfs.dpatch === removed file 'debian/patches/01_add_unity_quicklist_support.patch.dpatch' --- debian/patches/01_add_unity_quicklist_support.patch.dpatch 2011-03-22 16:27:15 +0000 +++ debian/patches/01_add_unity_quicklist_support.patch.dpatch 1970-01-01 00:00:00 +0000 @@ -1,20 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -# Description: Add Unity static quicklist support to inkscape -# Forwarded: https://bugs.launchpad.net/inkscape/+bug/676886 -# Bug-Ubuntu: https://bugs.launchpad.net/bugs/676886 -# Author: Didier Roche - -@DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/inkscape.desktop.in inkscape-0.48.1/inkscape.desktop.in ---- inkscape-0.48.1~/inkscape.desktop.in 2010-07-13 05:48:40.000000000 +0200 -+++ inkscape-0.48.1/inkscape.desktop.in 2011-02-17 16:21:42.690388423 +0100 -@@ -12,3 +12,9 @@ - Terminal=false - StartupNotify=true - Icon=inkscape -+X-Ayatana-Desktop-Shortcuts=Drawing -+ -+[Drawing Shortcut Group] -+_Name=New Drawing -+Exec=inkscape -+TargetEnvironment=Unity === removed file 'debian/patches/04-fix-gcc4.6-ftbfs.dpatch' --- debian/patches/04-fix-gcc4.6-ftbfs.dpatch 2011-05-01 01:08:10 +0000 +++ debian/patches/04-fix-gcc4.6-ftbfs.dpatch 1970-01-01 00:00:00 +0000 @@ -1,4301 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## Description: Fix build failure with gcc 4.6 -## Author: theAdib -## Bug: https://bugs.launchpad.net/inkscape/+bug/765983 -## 04-fix-gcc4.6-ftbfs.dpatch by Alex Valavanis -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/2geom/utils.h inkscape-0.48.1/src/2geom/utils.h ---- inkscape-0.48.1~/src/2geom/utils.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/2geom/utils.h 2011-05-01 00:56:53.101250888 +0100 -@@ -33,6 +33,7 @@ - * - */ - -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am inkscape-0.48.1/src/Makefile.am ---- inkscape-0.48.1~/src/Makefile.am 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/Makefile.am 2011-05-01 00:56:19.591250878 +0100 -@@ -205,7 +205,7 @@ - - inkscape_SOURCES += main.cpp $(win32_sources) - inkscape_LDADD = $(all_libs) --inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) -+inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows) - - inkview_SOURCES += inkview.cpp $(win32_sources) - inkview_LDADD = $(all_libs) -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am.orig inkscape-0.48.1/src/Makefile.am.orig ---- inkscape-0.48.1~/src/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/Makefile.am.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,277 @@ -+## Process this file with automake to produce Makefile.in -+ -+# ################################################ -+# G L O B A L -+# ################################################ -+ -+# Should work in either automake1.7 or 1.8, but 1.6 doesn't -+# handle foo/libfoo_a_CPPFLAGS properly (if at all). -+# Update: We now avoid setting foo/libfoo_a_CPPFLAGS, -+# so perhaps 1.6 will work. -+AUTOMAKE_OPTIONS = 1.7 subdir-objects -+ -+# Executables compiled by "make" and installed by "make install" -+bin_PROGRAMS = inkscape inkview -+ -+# Libraries which should be compiled by "make" but not installed. -+# Use this only for libraries that are really standalone, rather than for -+# source tree subdirectories. -+#if WITH_INKBOARD -+#libpedro = pedro/libpedro.a -+#endif -+noinst_LIBRARIES = \ -+ libinkscape.a \ -+ dom/libdom.a \ -+ libcroco/libcroco.a \ -+ libavoid/libavoid.a \ -+ libgdl/libgdl.a \ -+ libcola/libcola.a \ -+ libvpsc/libvpsc.a \ -+ livarot/libvarot.a \ -+ 2geom/lib2geom.a \ -+ $(libpedro) \ -+ libinkversion.a -+ -+all_libs = \ -+ $(noinst_LIBRARIES) \ -+ $(INKSCAPE_LIBS) \ -+ $(GNOME_VFS_LIBS) \ -+ $(XFT_LIBS) \ -+ $(FREETYPE_LIBS) \ -+ $(kdeldadd) \ -+ $(win32ldflags) \ -+ $(CARBON_LDFLAGS) \ -+ $(PERL_LIBS) \ -+ $(PYTHON_LIBS) \ -+ $(INKBOARD_LIBS) \ -+ $(LIBWPG_LIBS) \ -+ $(IMAGEMAGICK_LIBS) -+ -+# Add sources common for Inkscape and Inkview to this variable. -+ink_common_sources = -+# Add Inkscape-only sources here. -+inkscape_SOURCES = -+# Add Inkview-only sources here. -+inkview_SOURCES = -+ -+INCLUDES = \ -+ $(PERL_CFLAGS) $(PYTHON_CFLAGS) \ -+ $(FREETYPE_CFLAGS) \ -+ $(GNOME_PRINT_CFLAGS) \ -+ $(GNOME_VFS_CFLAGS) \ -+ $(IMAGEMAGICK_CFLAGS) \ -+ $(INKBOARD_CFLAGS) \ -+ $(LIBWPG_CFLAGS) \ -+ $(XFT_CFLAGS) \ -+ $(LCMS_CFLAGS) \ -+ $(POPPLER_CFLAGS) \ -+ $(POPPLER_GLIB_CFLAGS) \ -+ -DPOTRACE=\"potrace\" \ -+ $(INKSCAPE_CFLAGS) \ -+ -I$(top_srcdir)/cxxtest \ -+ $(WIN32_CFLAGS) \ -+ -I$(srcdir)/bind/javainc \ -+ -I$(srcdir)/bind/javainc/linux \ -+ $(AM_CPPFLAGS) -+ -+CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl -+CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE) -+CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS) -+# Add test cases to this variable -+CXXTEST_TESTSUITES = -+ -+# ################################################ -+# -+# E X T R A -+# -+# ################################################ -+ -+if PLATFORM_WIN32 -+win32_sources = winmain.cpp registrytool.cpp registrytool.h -+win32ldflags = -lcomdlg32 -lmscms -+mwindows = -mwindows -+endif -+ -+if INKJAR -+inkjar_dir = inkjar -+inkjar_libs = inkjar/libinkjar.a -+endif -+ -+# Include all partial makefiles from subdirectories -+include Makefile_insert -+include application/Makefile_insert -+include bind/Makefile_insert -+include dialogs/Makefile_insert -+include display/Makefile_insert -+include dom/Makefile_insert -+include extension/Makefile_insert -+include extension/implementation/Makefile_insert -+include extension/internal/Makefile_insert -+include extension/script/Makefile_insert -+include filters/Makefile_insert -+include helper/Makefile_insert -+include io/Makefile_insert -+#include pedro/Makefile_insert -+#include jabber_whiteboard/Makefile_insert -+include libcroco/Makefile_insert -+include libgdl/Makefile_insert -+include libnr/Makefile_insert -+include libnrtype/Makefile_insert -+include libavoid/Makefile_insert -+include livarot/Makefile_insert -+include live_effects/Makefile_insert -+include live_effects/parameter/Makefile_insert -+include libvpsc/Makefile_insert -+include libcola/Makefile_insert -+include svg/Makefile_insert -+include widgets/Makefile_insert -+include debug/Makefile_insert -+include xml/Makefile_insert -+include ui/Makefile_insert -+include ui/cache/Makefile_insert -+include ui/dialog/Makefile_insert -+include ui/tool/Makefile_insert -+include ui/view/Makefile_insert -+include ui/widget/Makefile_insert -+include util/Makefile_insert -+include trace/Makefile_insert -+include 2geom/Makefile_insert -+ -+# Extra files not mentioned as sources to include in the source tarball -+EXTRA_DIST = \ -+ $(top_srcdir)/Doxyfile \ -+ sp-skeleton.cpp sp-skeleton.h \ -+ util/makefile.in \ -+ application/makefile.in \ -+ bind/makefile.in \ -+ debug/makefile.in \ -+ dialogs/makefile.in \ -+ display/makefile.in \ -+ dom/makefile.in \ -+ extension/implementation/makefile.in \ -+ extension/internal/makefile.in \ -+ extension/makefile.in \ -+ extension/script/makefile.in \ -+ filters/makefile.in \ -+ helper/makefile.in \ -+ io/makefile.in \ -+ io/crystalegg.xml \ -+ io/doc2html.xsl \ -+ pedro/makefile.in \ -+ jabber_whiteboard/makefile.in \ -+ libgdl/makefile.in \ -+ libcroco/makefile.in \ -+ libnr/makefile.in \ -+ libnrtype/makefile.in \ -+ libavoid/makefile.in \ -+ livarot/makefile.in \ -+ live_effects/makefile.in \ -+ live_effects/parameter/makefile.in \ -+ svg/makefile.in \ -+ trace/makefile.in \ -+ ui/makefile.in \ -+ ui/cache/makefile.in \ -+ ui/dialog/makefile.in \ -+ ui/view/makefile.in \ -+ ui/widget/makefile.in \ -+ util/makefile.in \ -+ widgets/makefile.in \ -+ xml/makefile.in \ -+ 2geom/makefile.in \ -+ extension/internal/win32.cpp \ -+ extension/internal/win32.h \ -+ extension/internal/emf-win32-inout.cpp \ -+ extension/internal/emf-win32-inout.h \ -+ extension/internal/emf-win32-print.cpp \ -+ extension/internal/emf-win32-print.h \ -+ helper/sp-marshal.list \ -+ show-preview.bmp \ -+ winconsole.cpp \ -+ $(jabber_whiteboard_SOURCES) \ -+ $(CXXTEST_TEMPLATE) -+ -+# Extra files to remove when doing "make distclean" -+DISTCLEANFILES = \ -+ helper/sp-marshal.cpp \ -+ helper/sp-marshal.h \ -+ inkscape-version.cpp -+ -+# ################################################ -+# B I N A R I E S -+# ################################################ -+ -+# this should speed up the build -+libinkscape_a_SOURCES = $(ink_common_sources) -+ -+inkscape_SOURCES += main.cpp $(win32_sources) -+inkscape_LDADD = $(all_libs) -+inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) -+ -+inkview_SOURCES += inkview.cpp $(win32_sources) -+inkview_LDADD = $(all_libs) -+inkview_LDFLAGS = $(mwindows) -+ -+# ################################################ -+# VERSION REPORTING -+# ################################################ -+ -+libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h -+ -+if USE_BZR_VERSION -+inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision -+endif -+ -+# If this is an BZR snapshot build, regenerate this file every time -+# someone updates the BZR working directory. -+inkscape-version.cpp: $(inkscape_version_deps) -+ VER_PREFIX="$(VERSION)";\ -+ VER_BZRREV=" r`bzr revno`"; \ -+ if test ! -z "`bzr status -S -V $(srcdir)`"; then \ -+ VER_CUSTOM=" custom"; \ -+ fi; \ -+ VERSION="$$VER_PREFIX$$VER_BZRREV$$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 -+ -+# ################################# -+# ## TESTING STUFF (make check) ### -+# ################################# -+ -+# List of all programs that should be built before testing. Note that this is -+# different from TESTS, because some tests can be scripts that don't -+# need to be built. There should be one test program per directory. -+# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items: -+# TESTS items can be scripts etc. -+check_PROGRAMS = cxxtests -+ -+# streamtest is unfinished and can't handle the relocations done during -+# "make distcheck". -+ -+# List of all tests to be run. -+TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests -+XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests -+ -+# including the the testsuites here ensures that they get distributed -+cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES) -+cxxtests_LDADD = $(all_libs) -+ -+cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE) -+ $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES) -+ -+# ################################################ -+# D I S T -+# ################################################ -+ -+dist-hook: -+ mkdir $(distdir)/pixmaps -+ cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps -+ -+distclean-local: -+ rm -f cxxtests.xml cxxtests.log -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/arc-context.h inkscape-0.48.1/src/arc-context.h ---- inkscape-0.48.1~/src/arc-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/arc-context.h 2011-05-01 00:56:19.591250878 +0100 -@@ -15,6 +15,7 @@ - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -+#include - #include - - #include <2geom/point.h> -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/box3d-context.h inkscape-0.48.1/src/box3d-context.h ---- inkscape-0.48.1~/src/box3d-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/box3d-context.h 2011-05-01 00:56:19.591250878 +0100 -@@ -15,6 +15,7 @@ - * Released under GNU GPL - */ - -+#include - #include - #include "event-context.h" - #include "proj_pt.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/conn-avoid-ref.h inkscape-0.48.1/src/conn-avoid-ref.h ---- inkscape-0.48.1~/src/conn-avoid-ref.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/conn-avoid-ref.h 2011-05-01 00:56:19.591250878 +0100 -@@ -14,6 +14,7 @@ - */ - - #include -+#include - #include - - struct SPDesktop; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connection-pool.h inkscape-0.48.1/src/connection-pool.h ---- inkscape-0.48.1~/src/connection-pool.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/connection-pool.h 2011-05-01 00:56:19.591250878 +0100 -@@ -3,6 +3,7 @@ - - #include - #include -+#include - #include - - namespace Inkscape -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connector-context.h inkscape-0.48.1/src/connector-context.h ---- inkscape-0.48.1~/src/connector-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/connector-context.h 2011-05-01 00:56:19.591250878 +0100 -@@ -12,6 +12,7 @@ - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -+#include - #include - #include - #include "event-context.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h inkscape-0.48.1/src/desktop.h ---- inkscape-0.48.1~/src/desktop.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/desktop.h 2011-05-01 00:56:19.591250878 +0100 -@@ -27,6 +27,7 @@ - - #include - #include -+#include - #include - - #include <2geom/matrix.h> -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h.orig inkscape-0.48.1/src/desktop.h.orig ---- inkscape-0.48.1~/src/desktop.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/desktop.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,379 @@ -+#ifndef SEEN_SP_DESKTOP_H -+#define SEEN_SP_DESKTOP_H -+ -+/** \file -+ * SPDesktop: an editable view. -+ * -+ * Author: -+ * Lauris Kaplinski -+ * Frank Felfe -+ * bulia byak -+ * Ralf Stephan -+ * John Bintz -+ * Johan Engelen -+ * -+ * Copyright (C) 2007 Johan Engelen -+ * Copyright (C) 2006 John Bintz -+ * Copyright (C) 1999-2005 authors -+ * Copyright (C) 2000-2001 Ximian, Inc. -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ * -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include -+#include -+#include -+ -+#include <2geom/matrix.h> -+#include <2geom/rect.h> -+ -+#include "ui/view/view.h" -+#include "ui/view/edit-widget-interface.h" -+ -+#include "display/rendermode.h" -+#include "display/snap-indicator.h" -+ -+class SPCSSAttr; -+struct SPCanvas; -+struct SPCanvasItem; -+struct SPCanvasGroup; -+struct SPEventContext; -+struct SPItem; -+struct SPNamedView; -+struct SPObject; -+struct SPStyle; -+ -+namespace Gtk -+{ -+ class Window; -+} -+ -+typedef int sp_verb_t; -+ -+ -+ -+namespace Inkscape { -+ class Application; -+ class MessageContext; -+ class Selection; -+ class ObjectHierarchy; -+ class LayerManager; -+ class EventLog; -+ namespace UI { -+ namespace Dialog { -+ class DialogManager; -+ } -+ } -+ namespace Whiteboard { -+ class SessionManager; -+ } -+ namespace Display { -+ class TemporaryItemList; -+ class TemporaryItem; -+ //class SnapIndicator; -+ } -+} -+ -+/** -+ * Editable view. -+ * -+ * @see \ref desktop-handles.h for desktop macros. -+ */ -+struct SPDesktop : public Inkscape::UI::View::View -+{ -+ Inkscape::UI::Dialog::DialogManager *_dlg_mgr; -+ SPNamedView *namedview; -+ SPCanvas *canvas; -+ /// current selection; will never generally be NULL -+ Inkscape::Selection *selection; -+ SPEventContext *event_context; -+ Inkscape::LayerManager *layer_manager; -+ Inkscape::EventLog *event_log; -+ -+ Inkscape::Display::TemporaryItemList *temporary_item_list; -+ Inkscape::Display::SnapIndicator *snapindicator; -+ -+ SPCanvasItem *acetate; -+ SPCanvasGroup *main; -+ SPCanvasGroup *gridgroup; -+ SPCanvasGroup *guides; -+ SPCanvasItem *drawing; -+ SPCanvasGroup *sketch; -+ SPCanvasGroup *controls; -+ SPCanvasGroup *tempgroup; ///< contains temporary canvas items -+ SPCanvasItem *table; ///< outside-of-page background -+ SPCanvasItem *page; ///< page background -+ SPCanvasItem *page_border; ///< page border -+ SPCSSAttr *current; ///< current style -+ bool _focusMode; ///< Whether we're focused working or general working -+ -+ GList *zooms_past; -+ GList *zooms_future; -+ bool _quick_zoom_enabled; ///< Signifies that currently we're in quick zoom mode -+ Geom::Rect _quick_zoom_stored_area; ///< The area of the screen before quick zoom -+ unsigned int dkey; -+ unsigned int number; -+ guint window_state; -+ unsigned int interaction_disabled_counter; -+ bool waiting_cursor; -+ -+ /// \todo fixme: This has to be implemented in different way */ -+ guint guides_active : 1; -+ -+ // storage for selected dragger used by GrDrag as it's -+ // created and deleted by tools -+ SPItem *gr_item; -+ guint gr_point_type; -+ guint gr_point_i; -+ bool gr_fill_or_stroke; -+ -+ -+ Inkscape::ObjectHierarchy *_layer_hierarchy; -+ gchar * _reconstruction_old_layer_id; -+ -+ sigc::signal _tool_changed; -+ sigc::signal _layer_changed_signal; -+ sigc::signal::accumulated _set_style_signal; -+ sigc::signal::accumulated _query_style_signal; -+ -+ /// Emitted when the zoom factor changes (not emitted when scrolling). -+ /// The parameter is the new zoom factor -+ sigc::signal signal_zoom_changed; -+ -+ sigc::connection connectDocumentReplaced (const sigc::slot & slot) -+ { -+ return _document_replaced_signal.connect (slot); -+ } -+ -+ sigc::connection connectEventContextChanged (const sigc::slot & slot) -+ { -+ return _event_context_changed_signal.connect (slot); -+ } -+ sigc::connection connectSetStyle (const sigc::slot & slot) -+ { -+ return _set_style_signal.connect (slot); -+ } -+ sigc::connection connectQueryStyle (const sigc::slot & slot) -+ { -+ return _query_style_signal.connect (slot); -+ } -+ // subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection -+ sigc::connection connectToolSubselectionChanged(const sigc::slot & slot) { -+ return _tool_subselection_changed.connect(slot); -+ } -+ void emitToolSubselectionChanged(gpointer data); -+ sigc::connection connectCurrentLayerChanged(const sigc::slot & slot) { -+ return _layer_changed_signal.connect(slot); -+ } -+ -+ // Whiteboard changes -+ -+#ifdef WITH_INKBOARD -+ Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() { -+ return _whiteboard_session_manager; -+ } -+ -+ Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager; -+#endif -+ -+ SPDesktop(); -+ void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget); -+ virtual ~SPDesktop(); -+ void destroy(); -+ -+ Inkscape::MessageContext *guidesMessageContext() const { -+ return _guides_message_context; -+ } -+ -+ Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom = true); -+ void remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem); -+ -+ void _setDisplayMode(Inkscape::RenderMode mode); -+ void setDisplayModeNormal() { -+ _setDisplayMode(Inkscape::RENDERMODE_NORMAL); -+ } -+ void setDisplayModeNoFilters() { -+ _setDisplayMode(Inkscape::RENDERMODE_NO_FILTERS); -+ } -+ void setDisplayModeOutline() { -+ _setDisplayMode(Inkscape::RENDERMODE_OUTLINE); -+ } -+// void setDisplayModePrintColorsPreview() { -+// _setDisplayMode(Inkscape::RENDERMODE_PRINT_COLORS_PREVIEW); -+// } -+ void displayModeToggle(); -+ Inkscape::RenderMode _display_mode; -+ Inkscape::RenderMode getMode() const { return _display_mode; } -+ -+ Inkscape::UI::Widget::Dock* getDock() { return _widget->getDock(); } -+ -+ void set_active (bool new_active); -+ SPObject *currentRoot() const; -+ SPObject *currentLayer() const; -+ void setCurrentLayer(SPObject *object); -+ void toggleLayerSolo(SPObject *object); -+ SPObject *layerForObject(SPObject *object); -+ bool isLayer(SPObject *object) const; -+ bool isWithinViewport(SPItem *item) const; -+ bool itemIsHidden(SPItem const *item) const; -+ -+ void activate_guides (bool activate); -+ void change_document (SPDocument *document); -+ -+ void set_event_context (GtkType type, const gchar *config); -+ void push_event_context (GtkType type, const gchar *config, unsigned int key); -+ -+ void set_coordinate_status (Geom::Point p); -+ SPItem *item_from_list_at_point_bottom (const GSList *list, Geom::Point const p) const; -+ SPItem *item_at_point (Geom::Point const p, bool into_groups, SPItem *upto = NULL) const; -+ SPItem *group_at_point (Geom::Point const p) const; -+ Geom::Point point() const; -+ -+ Geom::Rect get_display_area() const; -+ void set_display_area (double x0, double y0, double x1, double y1, double border, bool log = true); -+ void set_display_area(Geom::Rect const &a, Geom::Coord border, bool log = true); -+ void zoom_absolute (double cx, double cy, double zoom); -+ void zoom_relative (double cx, double cy, double zoom); -+ void zoom_absolute_keep_point (double cx, double cy, double px, double py, double zoom); -+ void zoom_relative_keep_point (double cx, double cy, double zoom); -+ void zoom_relative_keep_point (Geom::Point const &c, double const zoom) -+ { -+ zoom_relative_keep_point (c[Geom::X], c[Geom::Y], zoom); -+ } -+ -+ void zoom_page(); -+ void zoom_page_width(); -+ void zoom_drawing(); -+ void zoom_selection(); -+ void zoom_grab_focus(); -+ double current_zoom() const { return _d2w.descrim(); } -+ void prev_zoom(); -+ void next_zoom(); -+ void zoom_quick(bool enable = true); -+ /** \brief Returns whether the desktop is in quick zoom mode or not */ -+ bool quick_zoomed(void) { return _quick_zoom_enabled; } -+ -+ bool scroll_to_point (Geom::Point const &s_dt, gdouble autoscrollspeed = 0); -+ void scroll_world (double dx, double dy, bool is_scrolling = false); -+ void scroll_world (Geom::Point const scroll, bool is_scrolling = false) -+ { -+ scroll_world(scroll[Geom::X], scroll[Geom::Y], is_scrolling); -+ } -+ void scroll_world_in_svg_coords (double dx, double dy, bool is_scrolling = false); -+ -+ void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); -+ void setWindowPosition (Geom::Point p); -+ void setWindowSize (gint w, gint h); -+ void setWindowTransient (void* p, int transient_policy=1); -+ Gtk::Window* getToplevel(); -+ void presentWindow(); -+ bool warnDialog (gchar *text); -+ void toggleRulers(); -+ void toggleScrollbars(); -+ void layoutWidget(); -+ void destroyWidget(); -+ void setToolboxFocusTo (gchar const* label); -+ void setToolboxAdjustmentValue (gchar const* id, double val); -+ void setToolboxSelectOneValue (gchar const* id, gint val); -+ bool isToolboxButtonActive (gchar const *id); -+ void updateNow(); -+ void updateCanvasNow(); -+ -+ void enableInteraction(); -+ void disableInteraction(); -+ -+ void setWaitingCursor(); -+ void clearWaitingCursor(); -+ bool isWaitingCursor() const { return waiting_cursor; }; -+ -+ void toggleColorProfAdjust(); -+ -+ void toggleGrids(); -+ void toggleSnapGlobal(); -+ bool gridsEnabled() const { return grids_visible; }; -+ void showGrids(bool show, bool dirty_document = true); -+ -+ bool is_iconified(); -+ bool is_maximized(); -+ bool is_fullscreen(); -+ bool is_focusMode(); -+ -+ void iconify(); -+ void maximize(); -+ void fullscreen(); -+ void focusMode(bool mode = true); -+ -+ Geom::Matrix w2d() const; //transformation from window to desktop coordinates (used for zooming) -+ Geom::Point w2d(Geom::Point const &p) const; -+ Geom::Point d2w(Geom::Point const &p) const; -+ Geom::Matrix doc2dt() const; -+ Geom::Matrix dt2doc() const; -+ Geom::Point doc2dt(Geom::Point const &p) const; -+ Geom::Point dt2doc(Geom::Point const &p) const; -+ -+ virtual void setDocument (SPDocument* doc); -+ virtual bool shutdown(); -+ virtual void mouseover() {} -+ virtual void mouseout() {} -+ -+ virtual bool onDeleteUI (GdkEventAny*); -+ virtual bool onWindowStateEvent (GdkEventWindowState* event); -+ -+private: -+ Inkscape::UI::View::EditWidgetInterface *_widget; -+ Inkscape::Application *_inkscape; -+ Inkscape::MessageContext *_guides_message_context; -+ bool _active; -+ Geom::Matrix _w2d; -+ Geom::Matrix _d2w; -+ Geom::Matrix _doc2dt; -+ -+ bool grids_visible; /* don't set this variable directly, use the method below */ -+ void set_grids_visible(bool visible); -+ -+ void push_current_zoom (GList**); -+ -+ sigc::signal _document_replaced_signal; -+ sigc::signal _activate_signal; -+ sigc::signal _deactivate_signal; -+ sigc::signal _event_context_changed_signal; -+ sigc::signal _tool_subselection_changed; -+ -+ sigc::connection _activate_connection; -+ sigc::connection _deactivate_connection; -+ sigc::connection _sel_modified_connection; -+ sigc::connection _sel_changed_connection; -+ sigc::connection _reconstruction_start_connection; -+ sigc::connection _reconstruction_finish_connection; -+ sigc::connection _commit_connection; -+ sigc::connection _modified_connection; -+ -+ virtual void onPositionSet (double, double); -+ virtual void onResized (double, double); -+ virtual void onRedrawRequested(); -+ virtual void onStatusMessage (Inkscape::MessageType type, gchar const *message); -+ virtual void onDocumentURISet (gchar const* uri); -+ virtual void onDocumentResized (double, double); -+ -+ static void _onActivate (SPDesktop* dt); -+ static void _onDeactivate (SPDesktop* dt); -+ static void _onSelectionModified (Inkscape::Selection *selection, guint flags, SPDesktop *dt); -+}; -+ -+#endif // SEEN_SP_DESKTOP_H -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/dialogs/object-attributes.cpp inkscape-0.48.1/src/dialogs/object-attributes.cpp ---- inkscape-0.48.1~/src/dialogs/object-attributes.cpp 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/dialogs/object-attributes.cpp 2011-05-01 00:56:19.591250878 +0100 -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/display/canvas-temporary-item.h inkscape-0.48.1/src/display/canvas-temporary-item.h ---- inkscape-0.48.1~/src/display/canvas-temporary-item.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/display/canvas-temporary-item.h 2011-05-01 00:56:19.591250878 +0100 -@@ -14,6 +14,7 @@ - - #include "display/display-forward.h" - -+#include - #include - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig inkscape-0.48.1/src/display/canvas-temporary-item.h.orig ---- inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/display/canvas-temporary-item.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,57 @@ -+#ifndef INKSCAPE_CANVAS_TEMPORARY_ITEM_H -+#define INKSCAPE_CANVAS_TEMPORARY_ITEM_H -+ -+/** \file -+ * Provides a class to put a canvasitem temporarily on-canvas. -+ * -+ * Authors: -+ * Johan Engelen -+ * -+ * Copyright (C) Johan Engelen 2008 -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include "display/display-forward.h" -+ -+#include -+ -+namespace Inkscape { -+namespace Display { -+ -+class TemporaryItem { -+public: -+ TemporaryItem(SPCanvasItem *item, guint lifetime, bool destroy_on_deselect = false); -+ virtual ~TemporaryItem(); -+ -+ sigc::signal signal_timeout; -+ -+protected: -+ friend class TemporaryItemList; -+ -+ SPCanvasItem * canvasitem; /** The item we are holding on to */ -+ guint timeout_id; /** ID by which glib knows the timeout event */ -+ bool destroy_on_deselect; // only destroy when parent item is deselected, not when mouse leaves -+ -+ static gboolean _timeout(gpointer data); ///< callback for when lifetime expired -+ -+private: -+ TemporaryItem(const TemporaryItem&); -+ TemporaryItem& operator=(const TemporaryItem&); -+}; -+ -+} //namespace Display -+} //namespace Inkscape -+ -+#endif -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-private.h inkscape-0.48.1/src/document-private.h ---- inkscape-0.48.1~/src/document-private.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/document-private.h 2011-05-01 00:56:19.591250878 +0100 -@@ -14,6 +14,7 @@ - */ - - #include -+#include - #include - #include "xml/event-fns.h" - #include "sp-defs.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-private.h.orig inkscape-0.48.1/src/document-private.h.orig ---- inkscape-0.48.1~/src/document-private.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/document-private.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,79 @@ -+#ifndef __SP_DOCUMENT_PRIVATE_H__ -+#define __SP_DOCUMENT_PRIVATE_H__ -+ -+/* -+ * Seldom needed document data -+ * -+ * Authors: -+ * Lauris Kaplinski -+ * -+ * Copyright (C) 1999-2002 Lauris Kaplinski -+ * Copyright (C) 2001-2002 Ximian, Inc. -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include -+#include -+#include "xml/event-fns.h" -+#include "sp-defs.h" -+#include "sp-root.h" -+#include "document.h" -+ -+#include "composite-undo-stack-observer.h" -+ -+#include "event-log.h" -+ -+// XXX only for testing! -+#include "console-output-undo-observer.h" -+ -+#define SP_DOCUMENT_DEFS(d) ((SPObject *) SP_ROOT (SP_DOCUMENT_ROOT (d))->defs) -+ -+namespace Inkscape { -+namespace XML { -+class Event; -+} -+} -+ -+ -+struct SPDocumentPrivate { -+ typedef std::map IDChangedSignalMap; -+ typedef std::map ResourcesChangedSignalMap; -+ -+ GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */ -+ GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */ -+ -+ unsigned long serial; -+ -+ /** Dictionary of signals for id changes */ -+ IDChangedSignalMap id_changed_signals; -+ -+ /* Resources */ -+ /* It is GHashTable of GSLists */ -+ GHashTable *resources; -+ ResourcesChangedSignalMap resources_changed_signals; -+ -+ SPDocument::ModifiedSignal modified_signal; -+ SPDocument::URISetSignal uri_set_signal; -+ SPDocument::ResizedSignal resized_signal; -+ SPDocument::ReconstructionStart _reconstruction_start_signal; -+ SPDocument::ReconstructionFinish _reconstruction_finish_signal; -+ SPDocument::CommitSignal commit_signal; -+ -+ /* Undo/Redo state */ -+ bool sensitive: true; /* If we save actions to undo stack */ -+ Inkscape::XML::Event * partial; /* partial undo log when interrupted */ -+ int history_size; -+ GSList * undo; /* Undo stack of reprs */ -+ GSList * redo; /* Redo stack of reprs */ -+ -+ /* Undo listener */ -+ Inkscape::CompositeUndoStackObserver undoStackObservers; -+ -+ // XXX only for testing! -+ Inkscape::ConsoleOutputUndoObserver console_output_undo_observer; -+ -+ bool seeking; -+}; -+ -+#endif -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-subset.h inkscape-0.48.1/src/document-subset.h ---- inkscape-0.48.1~/src/document-subset.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/document-subset.h 2011-05-01 00:56:19.591250878 +0100 -@@ -10,6 +10,7 @@ - #ifndef SEEN_INKSCAPE_DOCUMENT_SUBSET_H - #define SEEN_INKSCAPE_DOCUMENT_SUBSET_H - -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document.h inkscape-0.48.1/src/document.h ---- inkscape-0.48.1~/src/document.h 2010-08-04 17:45:00.000000000 +0100 -+++ inkscape-0.48.1/src/document.h 2011-05-01 00:56:19.601250878 +0100 -@@ -17,6 +17,7 @@ - - #include - #include -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document.h.orig inkscape-0.48.1/src/document.h.orig ---- inkscape-0.48.1~/src/document.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/document.h.orig 2010-08-04 17:45:00.000000000 +0100 -@@ -0,0 +1,304 @@ -+#ifndef __SP_DOCUMENT_H__ -+#define __SP_DOCUMENT_H__ -+ -+/** \file -+ * SPDocument: Typed SVG document implementation -+ */ -+/* Authors: -+ * Lauris Kaplinski -+ * MenTaLguY -+ * -+ * Copyright (C) 2004-2005 MenTaLguY -+ * Copyright (C) 1999-2002 Lauris Kaplinski -+ * Copyright (C) 2000-2001 Ximian, Inc. -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include "libcroco/cr-cascade.h" -+#include <2geom/forward.h> -+ -+#include "gc-managed.h" -+#include "gc-finalized.h" -+#include "gc-anchored.h" -+#include -+#include "verbs.h" -+#include -+#include -+ -+namespace Avoid { -+class Router; -+} -+ -+struct NRRect; -+struct SPDesktop; -+struct SPItem; -+struct SPObject; -+struct SPGroup; -+ -+namespace Inkscape { -+ struct Application; -+ class Selection; -+ class UndoStackObserver; -+ class EventLog; -+ class ProfileManager; -+ namespace XML { -+ class Document; -+ class Node; -+ } -+} -+ -+class SP3DBox; -+class Persp3D; -+class Persp3DImpl; -+ -+namespace Proj { -+ class TransfMat3x4; -+} -+ -+class SPDocumentPrivate; -+ -+/// Typed SVG document implementation. -+struct SPDocument : public Inkscape::GC::Managed<>, -+ public Inkscape::GC::Finalized, -+ public Inkscape::GC::Anchored -+{ -+ typedef sigc::signal IDChangedSignal; -+ typedef sigc::signal ResourcesChangedSignal; -+ typedef sigc::signal ModifiedSignal; -+ typedef sigc::signal URISetSignal; -+ typedef sigc::signal ResizedSignal; -+ typedef sigc::signal ReconstructionStart; -+ typedef sigc::signal ReconstructionFinish; -+ typedef sigc::signal CommitSignal; -+ -+ SPDocument(); -+ virtual ~SPDocument(); -+ -+ unsigned int keepalive : 1; -+ unsigned int virgin : 1; ///< Has the document never been touched? -+ unsigned int modified_since_save : 1; -+ -+ Inkscape::XML::Document *rdoc; ///< Our Inkscape::XML::Document -+ Inkscape::XML::Node *rroot; ///< Root element of Inkscape::XML::Document -+ SPObject *root; ///< Our SPRoot -+ CRCascade *style_cascade; -+ -+ gchar *uri; ///< A filename (not a URI yet), or NULL -+ gchar *base; ///< To be used for resolving relative hrefs. -+ gchar *name; ///< basename(uri) or other human-readable label for the document. -+ -+ SPDocumentPrivate *priv; -+ -+ /// Last action key -+ Glib::ustring actionkey; -+ -+ /// Handler ID -+ guint modified_id; -+ -+ /// Connector rerouting handler ID -+ guint rerouting_handler_id; -+ -+ Inkscape::ProfileManager* profileManager; -+ -+ // Instance of the connector router -+ Avoid::Router *router; -+ -+ GSList *_collection_queue; -+ -+ bool oldSignalsConnected; -+ -+ void setCurrentPersp3D(Persp3D * const persp); -+ inline void setCurrentPersp3DImpl(Persp3DImpl * const persp_impl) { current_persp3d_impl = persp_impl; } -+ /* -+ * getCurrentPersp3D returns current_persp3d (if non-NULL) or the first -+ * perspective in the defs. If no perspective exists, returns NULL. -+ */ -+ Persp3D * getCurrentPersp3D(); -+ Persp3DImpl * getCurrentPersp3DImpl(); -+ void getPerspectivesInDefs(std::vector &list); -+ unsigned int numPerspectivesInDefs() { -+ std::vector list; -+ getPerspectivesInDefs(list); -+ return list.size(); -+ } -+ -+ //void initialize_current_persp3d(); -+ -+ sigc::connection connectModified(ModifiedSignal::slot_type slot); -+ sigc::connection connectURISet(URISetSignal::slot_type slot); -+ sigc::connection connectResized(ResizedSignal::slot_type slot); -+sigc::connection connectCommit(CommitSignal::slot_type slot); -+ -+ void bindObjectToId(gchar const *id, SPObject *object); -+ SPObject *getObjectById(gchar const *id); -+ sigc::connection connectIdChanged(const gchar *id, IDChangedSignal::slot_type slot); -+ -+ void bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object); -+ SPObject *getObjectByRepr(Inkscape::XML::Node *repr); -+ -+ Glib::ustring getLanguage(); -+ -+ void queueForOrphanCollection(SPObject *object); -+ void collectOrphans(); -+ -+ void _emitModified(); -+ -+ void addUndoObserver(Inkscape::UndoStackObserver& observer); -+ void removeUndoObserver(Inkscape::UndoStackObserver& observer); -+ -+ bool _updateDocument(); -+ -+ /// Are we currently in a transition between two "known good" states of the document? -+ bool isSeeking() const; -+ -+ bool isModifiedSinceSave() const { return modified_since_save; } -+ void setModifiedSinceSave(bool modified = true) { -+ modified_since_save = modified; -+ } -+ -+private: -+ SPDocument(SPDocument const &); // no copy -+ void operator=(SPDocument const &); // no assign -+ -+ Persp3D *current_persp3d; /**< Currently 'active' perspective (to which, e.g., newly created boxes are attached) */ -+ Persp3DImpl *current_persp3d_impl; -+ -+public: -+ sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot); -+ sigc::connection connectReconstructionFinish(ReconstructionFinish::slot_type slot); -+ void emitReconstructionStart(void); -+ void emitReconstructionFinish(void); -+ -+ unsigned long serial() const; -+ void reset_key(void *dummy); -+ sigc::connection _selection_changed_connection; -+ sigc::connection _desktop_activated_connection; -+ -+ void fitToRect(Geom::Rect const &rect, bool with_margins = false); -+}; -+ -+SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false); -+SPDocument *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive); -+ -+SPDocument *sp_document_ref(SPDocument *doc); -+SPDocument *sp_document_unref(SPDocument *doc); -+ -+ -+SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive); -+ -+/* -+ * Access methods -+ */ -+ -+#define sp_document_repr_doc(d) (d->rdoc) -+#define sp_document_repr_root(d) (d->rroot) -+#define sp_document_root(d) (d->root) -+#define SP_DOCUMENT_ROOT(d) (d->root) -+ -+gdouble sp_document_width(SPDocument *document); -+gdouble sp_document_height(SPDocument *document); -+Geom::Point sp_document_dimensions(SPDocument *document); -+ -+struct SPUnit; -+ -+void sp_document_set_width(SPDocument *document, gdouble width, const SPUnit *unit); -+void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit *unit); -+ -+#define SP_DOCUMENT_URI(d) (d->uri) -+#define SP_DOCUMENT_NAME(d) (d->name) -+#define SP_DOCUMENT_BASE(d) (d->base) -+ -+/* -+ * Dictionary -+ */ -+ -+/* -+ * Undo & redo -+ */ -+ -+void sp_document_set_undo_sensitive(SPDocument *document, bool sensitive); -+bool sp_document_get_undo_sensitive(SPDocument const *document); -+ -+void sp_document_clear_undo(SPDocument *document); -+void sp_document_clear_redo(SPDocument *document); -+ -+void sp_document_child_added(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); -+void sp_document_child_removed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); -+void sp_document_attr_changed(SPDocument *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval); -+void sp_document_content_changed(SPDocument *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent); -+void sp_document_order_changed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref); -+ -+/* Object modification root handler */ -+void sp_document_request_modified(SPDocument *doc); -+gint sp_document_ensure_up_to_date(SPDocument *doc); -+ -+/* Save all previous actions to stack, as one undo step */ -+void sp_document_done(SPDocument *document, unsigned int event_type, Glib::ustring event_description); -+void sp_document_maybe_done(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description); -+void sp_document_reset_key(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base); -+ -+/* Cancel (and revert) current unsaved actions */ -+void sp_document_cancel(SPDocument *document); -+ -+/* Undo and redo */ -+gboolean sp_document_undo(SPDocument *document); -+gboolean sp_document_redo(SPDocument *document); -+ -+/* Resource management */ -+gboolean sp_document_add_resource(SPDocument *document, const gchar *key, SPObject *object); -+gboolean sp_document_remove_resource(SPDocument *document, const gchar *key, SPObject *object); -+const GSList *sp_document_get_resource_list(SPDocument *document, const gchar *key); -+sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot); -+ -+ -+/* -+ * Ideas: How to overcome style invalidation nightmare -+ * -+ * 1. There is reference request dictionary, that contains -+ * objects (styles) needing certain id. Object::build checks -+ * final id against it, and invokes necesary methods -+ * -+ * 2. Removing referenced object is simply prohibited - -+ * needs analyse, how we can deal with situations, where -+ * we simply want to ungroup etc. - probably we need -+ * Repr::reparent method :( [Or was it ;)] -+ * -+ */ -+ -+/* -+ * Misc -+ */ -+ -+GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); -+GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); -+SPItem *sp_document_item_from_list_at_point_bottom(unsigned int dkey, SPGroup *group, const GSList *list, Geom::Point const p, bool take_insensitive = false); -+SPItem *sp_document_item_at_point (SPDocument *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL); -+GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector points); -+SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key, Geom::Point const p); -+ -+void sp_document_set_uri(SPDocument *document, gchar const *uri); -+void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *uri); -+ -+void sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height); -+ -+unsigned int vacuum_document(SPDocument *document); -+ -+ -+#endif -+ -+/* -+ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/draw-context.h inkscape-0.48.1/src/draw-context.h ---- inkscape-0.48.1~/src/draw-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/draw-context.h 2011-05-01 00:56:19.601250878 +0100 -@@ -14,6 +14,7 @@ - * Released under GNU GPL - */ - -+#include - #include - #include "event-context.h" - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/extension/timer.h inkscape-0.48.1/src/extension/timer.h ---- inkscape-0.48.1~/src/extension/timer.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/extension/timer.h 2011-05-01 00:56:19.601250878 +0100 -@@ -13,6 +13,7 @@ - #ifndef INKSCAPE_EXTENSION_TIMER_H__ - #define INKSCAPE_EXTENSION_TIMER_H__ - -+#include - #include - #include - #include "extension-forward.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/flood-context.h inkscape-0.48.1/src/flood-context.h ---- inkscape-0.48.1~/src/flood-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/flood-context.h 2011-05-01 00:56:19.601250878 +0100 -@@ -11,6 +11,7 @@ - * Released under GNU GPL - */ - -+#include - #include - #include - #include "event-context.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc-alloc.h inkscape-0.48.1/src/gc-alloc.h ---- inkscape-0.48.1~/src/gc-alloc.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/gc-alloc.h 2011-05-01 00:56:19.601250878 +0100 -@@ -16,6 +16,7 @@ - #define SEEN_INKSCAPE_GC_ALLOC_H - - #include -+#include - #include "gc-core.h" - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc-finalized.h inkscape-0.48.1/src/gc-finalized.h ---- inkscape-0.48.1~/src/gc-finalized.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/gc-finalized.h 2011-05-01 00:56:19.601250878 +0100 -@@ -17,6 +17,7 @@ - #define SEEN_INKSCAPE_GC_FINALIZED_H - - #include -+#include - #include "gc-core.h" - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc.cpp inkscape-0.48.1/src/gc.cpp ---- inkscape-0.48.1~/src/gc.cpp 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/gc.cpp 2011-05-01 00:56:19.601250878 +0100 -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - - namespace Inkscape { - namespace GC { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gradient-context.h inkscape-0.48.1/src/gradient-context.h ---- inkscape-0.48.1~/src/gradient-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/gradient-context.h 2011-05-01 00:56:19.601250878 +0100 -@@ -15,6 +15,7 @@ - * Released under GNU GPL - */ - -+#include - #include - #include "event-context.h" - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gradient-drag.h inkscape-0.48.1/src/gradient-drag.h ---- inkscape-0.48.1~/src/gradient-drag.h 2010-08-04 17:45:00.000000000 +0100 -+++ inkscape-0.48.1/src/gradient-drag.h 2011-05-01 00:56:19.601250878 +0100 -@@ -15,6 +15,7 @@ - */ - - #include -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/knot.h inkscape-0.48.1/src/knot.h ---- inkscape-0.48.1~/src/knot.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/knot.h 2011-05-01 00:56:19.601250878 +0100 -@@ -20,6 +20,7 @@ - #include "forward.h" - #include <2geom/point.h> - #include "knot-enums.h" -+#include - #include - - class SPKnot; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/knot.h.orig inkscape-0.48.1/src/knot.h.orig ---- inkscape-0.48.1~/src/knot.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/knot.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,192 @@ -+#ifndef __SP_KNOT_H__ -+#define __SP_KNOT_H__ -+ -+/** \file -+ * Declarations for SPKnot: Desktop-bound visual control object. -+ */ -+/* -+ * Authors: -+ * Lauris Kaplinski -+ * -+ * Copyright (C) 1999-2002 authors -+ * Copyright (C) 2001-2002 Ximian, Inc. -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include -+#include -+#include "display/display-forward.h" -+#include "forward.h" -+#include <2geom/point.h> -+#include "knot-enums.h" -+#include -+ -+class SPKnot; -+class SPKnotClass; -+ -+#define SP_TYPE_KNOT (sp_knot_get_type()) -+#define SP_KNOT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_KNOT, SPKnot)) -+#define SP_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_KNOT, SPKnotClass)) -+#define SP_IS_KNOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_KNOT)) -+#define SP_IS_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_KNOT)) -+ -+/** -+ * Desktop-bound visual control object. -+ * -+ * A knot is a draggable object, with callbacks to change something by -+ * dragging it, visuably represented by a canvas item (mostly square). -+ */ -+struct SPKnot : GObject { -+ SPDesktop *desktop; /**< Desktop we are on. */ -+ SPCanvasItem *item; /**< Our CanvasItem. */ -+ guint flags; -+ -+ guint size; /**< Always square. */ -+ Geom::Point pos; /**< Our desktop coordinates. */ -+ Geom::Point grabbed_rel_pos; /**< Grabbed relative position. */ -+ Geom::Point drag_origin; /**< Origin of drag. */ -+ GtkAnchorType anchor; /**< Anchor. */ -+ -+ SPKnotShapeType shape; /**< Shape type. */ -+ SPKnotModeType mode; -+ -+ guint32 fill[SP_KNOT_VISIBLE_STATES]; -+ guint32 stroke[SP_KNOT_VISIBLE_STATES]; -+ guchar *image[SP_KNOT_VISIBLE_STATES]; -+ -+ GdkCursor *cursor[SP_KNOT_VISIBLE_STATES]; -+ -+ GdkCursor *saved_cursor; -+ gpointer pixbuf; -+ -+ gchar *tip; -+ -+ gulong _event_handler_id; -+ -+ double pressure; /**< The tablet pen pressure when the knot is being dragged. */ -+ -+ // C++ signals -+ /** -+ sigc::signal _moved_signal; -+ sigc::signal _click_signal; -+ sigc::signal _ungrabbed_signal; -+ **/ -+ sigc::signal _moved_signal; -+ sigc::signal _click_signal; -+ sigc::signal _ungrabbed_signal; -+ -+ //TODO: all the members above should eventualle become private, accessible via setters/getters -+ inline void setSize (guint i) {size = i;} -+ inline void setShape (guint i) {shape = (SPKnotShapeType) i;} -+ inline void setAnchor (guint i) {anchor = (GtkAnchorType) i;} -+ inline void setMode (guint i) {mode = (SPKnotModeType) i;} -+ inline void setPixbuf (gpointer p) {pixbuf = p;} -+ inline void setFill (guint32 normal, guint32 mouseover, guint32 dragging) { -+ fill[SP_KNOT_STATE_NORMAL] = normal; -+ fill[SP_KNOT_STATE_MOUSEOVER] = mouseover; -+ fill[SP_KNOT_STATE_DRAGGING] = dragging; -+ } -+ inline void setStroke (guint32 normal, guint32 mouseover, guint32 dragging) { -+ stroke[SP_KNOT_STATE_NORMAL] = normal; -+ stroke[SP_KNOT_STATE_MOUSEOVER] = mouseover; -+ stroke[SP_KNOT_STATE_DRAGGING] = dragging; -+ } -+ inline void setImage (guchar* normal, guchar* mouseover, guchar* dragging) { -+ image[SP_KNOT_STATE_NORMAL] = normal; -+ image[SP_KNOT_STATE_MOUSEOVER] = mouseover; -+ image[SP_KNOT_STATE_DRAGGING] = dragging; -+ } -+ inline void setCursor (GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging) { -+ if (cursor[SP_KNOT_STATE_NORMAL]) { -+ gdk_cursor_unref(cursor[SP_KNOT_STATE_NORMAL]); -+ } -+ cursor[SP_KNOT_STATE_NORMAL] = normal; -+ if (normal) { -+ gdk_cursor_ref(normal); -+ } -+ -+ if (cursor[SP_KNOT_STATE_MOUSEOVER]) { -+ gdk_cursor_unref(cursor[SP_KNOT_STATE_MOUSEOVER]); -+ } -+ cursor[SP_KNOT_STATE_MOUSEOVER] = mouseover; -+ if (mouseover) { -+ gdk_cursor_ref(mouseover); -+ } -+ -+ if (cursor[SP_KNOT_STATE_DRAGGING]) { -+ gdk_cursor_unref(cursor[SP_KNOT_STATE_DRAGGING]); -+ } -+ cursor[SP_KNOT_STATE_DRAGGING] = dragging; -+ if (dragging) { -+ gdk_cursor_ref(dragging); -+ } -+ } -+ -+}; -+ -+/// The SPKnot vtable. -+struct SPKnotClass { -+ GObjectClass parent_class; -+ gint (* event) (SPKnot *knot, GdkEvent *event); -+ -+ /* -+ * These are unconditional. -+ */ -+ -+ void (* clicked) (SPKnot *knot, guint state); -+ void (* doubleclicked) (SPKnot *knot, guint state); -+ void (* grabbed) (SPKnot *knot, guint state); -+ void (* ungrabbed) (SPKnot *knot, guint state); -+ void (* moved) (SPKnot *knot, Geom::Point const &position, guint state); -+ void (* stamped) (SPKnot *know, guint state); -+ -+ /** Request knot to move to absolute position. */ -+ bool (* request) (SPKnot *knot, Geom::Point const &pos, guint state); -+ -+ /** Find complex distance from knot to point. */ -+ gdouble (* distance) (SPKnot *knot, Geom::Point const &pos, guint state); -+}; -+ -+GType sp_knot_get_type(); -+ -+SPKnot *sp_knot_new(SPDesktop *desktop, gchar const *tip = NULL); -+ -+#define SP_KNOT_IS_VISIBLE(k) ((k->flags & SP_KNOT_VISIBLE) != 0) -+#define SP_KNOT_IS_MOUSEOVER(k) ((k->flags & SP_KNOT_MOUSEOVER) != 0) -+#define SP_KNOT_IS_DRAGGING(k) ((k->flags & SP_KNOT_DRAGGING) != 0) -+#define SP_KNOT_IS_GRABBED(k) ((k->flags & SP_KNOT_GRABBED) != 0) -+ -+void sp_knot_show(SPKnot *knot); -+void sp_knot_hide(SPKnot *knot); -+ -+void sp_knot_set_flag(SPKnot *knot, guint flag, bool set); -+void sp_knot_update_ctrl(SPKnot *knot); -+ -+void sp_knot_request_position(SPKnot *knot, Geom::Point const &pos, guint state); -+gdouble sp_knot_distance(SPKnot *knot, Geom::Point const &p, guint state); -+ -+void sp_knot_start_dragging(SPKnot *knot, Geom::Point const &p, gint x, gint y, guint32 etime); -+ -+/** Moves knot and emits "moved" signal. */ -+void sp_knot_set_position(SPKnot *knot, Geom::Point const &p, guint state); -+ -+/** Moves knot without any signal. */ -+void sp_knot_moveto(SPKnot *knot, Geom::Point const &p); -+ -+void sp_knot_handler_request_position(GdkEvent *event, SPKnot *knot); -+Geom::Point sp_knot_position(SPKnot const *knot); -+ -+ -+#endif /* !__SP_KNOT_H__ */ -+ -+/* -+ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/libavoid/geomtypes.h inkscape-0.48.1/src/libavoid/geomtypes.h ---- inkscape-0.48.1~/src/libavoid/geomtypes.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/libavoid/geomtypes.h 2011-05-01 00:56:19.601250878 +0100 -@@ -29,6 +29,7 @@ - #ifndef AVOID_GEOMTYPES_H - #define AVOID_GEOMTYPES_H - -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/lpeobject-reference.h inkscape-0.48.1/src/live_effects/lpeobject-reference.h ---- inkscape-0.48.1~/src/live_effects/lpeobject-reference.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/live_effects/lpeobject-reference.h 2011-05-01 00:56:19.601250878 +0100 -@@ -11,6 +11,7 @@ - - #include - #include -+#include - #include - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path-reference.h inkscape-0.48.1/src/live_effects/parameter/path-reference.h ---- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h 2011-05-01 00:56:19.601250878 +0100 -@@ -11,6 +11,7 @@ - - #include - #include -+#include - #include - - class Path; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig ---- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,60 @@ -+#ifndef SEEN_LPE_PATH_REFERENCE_H -+#define SEEN_LPE_PATH_REFERENCE_H -+ -+/* -+ * The reference corresponding to href of LPE PathParam. -+ * -+ * Copyright (C) 2008 Johan Engelen -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information. -+ */ -+ -+#include -+#include -+#include -+ -+class Path; -+ -+namespace Inkscape { -+ -+namespace XML { -+ struct Node; -+} -+ -+namespace LivePathEffect { -+ -+ -+class PathReference : public Inkscape::URIReference { -+public: -+ PathReference(SPObject *owner) : URIReference(owner) {} -+ -+ SPItem *getObject() const { -+ return (SPItem *)URIReference::getObject(); -+ } -+ -+protected: -+ virtual bool _acceptObject(SPObject * const obj) const; -+ -+private: -+ PathReference(const PathReference&); -+ PathReference& operator=(const PathReference&); -+}; -+ -+} // namespace LivePathEffect -+ -+} // namespace Inkscape -+ -+ -+ -+#endif /* !SEEN_LPE_PATH_REFERENCE_H */ -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path.h inkscape-0.48.1/src/live_effects/parameter/path.h ---- inkscape-0.48.1~/src/live_effects/parameter/path.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/live_effects/parameter/path.h 2011-05-01 00:56:19.601250878 +0100 -@@ -16,6 +16,7 @@ - - #include "live_effects/parameter/parameter.h" - #include "live_effects/parameter/path-reference.h" -+#include - #include - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/message-stack.h inkscape-0.48.1/src/message-stack.h ---- inkscape-0.48.1~/src/message-stack.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/message-stack.h 2011-05-01 00:56:19.601250878 +0100 -@@ -14,6 +14,7 @@ - #ifndef SEEN_INKSCAPE_MESSAGE_STACK_H - #define SEEN_INKSCAPE_MESSAGE_STACK_H - -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/object-hierarchy.h inkscape-0.48.1/src/object-hierarchy.h ---- inkscape-0.48.1~/src/object-hierarchy.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/object-hierarchy.h 2011-05-01 00:56:19.601250878 +0100 -@@ -14,6 +14,7 @@ - - #include - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/persp3d-reference.h inkscape-0.48.1/src/persp3d-reference.h ---- inkscape-0.48.1~/src/persp3d-reference.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/persp3d-reference.h 2011-05-01 00:56:19.601250878 +0100 -@@ -11,6 +11,7 @@ - */ - - #include "uri-references.h" -+#include - #include - #include "persp3d.h" - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/rect-context.h inkscape-0.48.1/src/rect-context.h ---- inkscape-0.48.1~/src/rect-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/rect-context.h 2011-05-01 00:56:19.601250878 +0100 -@@ -14,6 +14,7 @@ - * Released under GNU GPL - */ - -+#include - #include - #include "event-context.h" - #include "libnr/nr-point.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selcue.h inkscape-0.48.1/src/selcue.h ---- inkscape-0.48.1~/src/selcue.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/selcue.h 2011-05-01 00:56:19.601250878 +0100 -@@ -14,6 +14,7 @@ - */ - - #include -+#include - #include - - class SPDesktop; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selection-describer.h inkscape-0.48.1/src/selection-describer.h ---- inkscape-0.48.1~/src/selection-describer.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/selection-describer.h 2011-05-01 00:56:19.601250878 +0100 -@@ -12,6 +12,7 @@ - #ifndef SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H - #define SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H - -+#include - #include - #include "message-context.h" - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selection.h inkscape-0.48.1/src/selection.h ---- inkscape-0.48.1~/src/selection.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/selection.h 2011-05-01 00:56:19.601250878 +0100 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - - //#include "libnr/nr-rect.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/seltrans.h inkscape-0.48.1/src/seltrans.h ---- inkscape-0.48.1~/src/seltrans.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/seltrans.h 2011-05-01 00:56:19.601250878 +0100 -@@ -15,6 +15,7 @@ - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -+#include - #include - #include <2geom/point.h> - #include <2geom/matrix.h> -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/seltrans.h.orig inkscape-0.48.1/src/seltrans.h.orig ---- inkscape-0.48.1~/src/seltrans.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/seltrans.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,196 @@ -+#ifndef __SELTRANS_H__ -+#define __SELTRANS_H__ -+ -+/* -+ * Helper object for transforming selected items -+ * -+ * Authors: -+ * Lauris Kaplinski -+ * Carl Hetherington -+ * Diederik van Lierop -+ * -+ * Copyright (C) 2006 Johan Engelen -+ * Copyright (C) 1999-2002 Lauris Kaplinski -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include -+#include <2geom/point.h> -+#include <2geom/matrix.h> -+#include <2geom/rect.h> -+#include "knot.h" -+#include "forward.h" -+#include "selcue.h" -+#include "message-context.h" -+#include -+#include "sp-item.h" -+ -+struct SPKnot; -+class SPDesktop; -+class SPCanvasItem; -+class SPSelTransHandle; -+ -+namespace Inkscape -+{ -+ -+Geom::Scale calcScaleFactors(Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew = false); -+ -+namespace XML -+{ -+ class Node; -+} -+ -+class SelTrans -+{ -+public: -+ SelTrans(SPDesktop *desktop); -+ ~SelTrans(); -+ -+ Inkscape::MessageContext &messageContext() { -+ return _message_context; -+ } -+ -+ void increaseState(); -+ void resetState(); -+ void setCenter(Geom::Point const &p); -+ void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles, bool translating); -+ void transform(Geom::Matrix const &rel_affine, Geom::Point const &norm); -+ void ungrab(); -+ void stamp(); -+ void moveTo(Geom::Point const &xy, guint state); -+ void stretch(SPSelTransHandle const &handle, Geom::Point &pt, guint state); -+ void scale(Geom::Point &pt, guint state); -+ void skew(SPSelTransHandle const &handle, Geom::Point &pt, guint state); -+ void rotate(Geom::Point &pt, guint state); -+ gboolean scaleRequest(Geom::Point &pt, guint state); -+ gboolean stretchRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state); -+ gboolean skewRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state); -+ gboolean rotateRequest(Geom::Point &pt, guint state); -+ gboolean centerRequest(Geom::Point &pt, guint state); -+ -+ gboolean handleRequest(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle); -+ void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle); -+ void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle); -+ void handleNewEvent(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle); -+ -+ enum Show -+ { -+ SHOW_CONTENT, -+ SHOW_OUTLINE -+ }; -+ -+ void setShow(Show s) { -+ _show = s; -+ } -+ bool isEmpty() { -+ return _empty; -+ } -+ bool isGrabbed() { -+ return _grabbed; -+ } -+ bool centerIsVisible() { -+ return ( _chandle && SP_KNOT_IS_VISIBLE (_chandle) ); -+ } -+ -+private: -+ void _updateHandles(); -+ void _updateVolatileState(); -+ void _selChanged(Inkscape::Selection *selection); -+ void _selModified(Inkscape::Selection *selection, guint flags); -+ void _showHandles(SPKnot *knot[], SPSelTransHandle const handle[], gint num, -+ gchar const *even_tip, gchar const *odd_tip); -+ Geom::Point _getGeomHandlePos(Geom::Point const &visual_handle_pos); -+ Geom::Point _calcAbsAffineDefault(Geom::Scale const default_scale); -+ Geom::Point _calcAbsAffineGeom(Geom::Scale const geom_scale); -+ void _keepClosestPointOnly(std::vector &points, const Geom::Point &reference); -+ void _display_snapsource(); -+ -+ enum State { -+ STATE_SCALE, //scale or stretch -+ STATE_ROTATE //rotate or skew -+ }; -+ -+ SPDesktop *_desktop; -+ -+ std::vector _items; -+ std::vector _items_const; -+ std::vector _items_affines; -+ std::vector _items_centers; -+ -+ std::vector _snap_points; -+ std::vector _bbox_points; // the bbox point of the selection as a whole, i.e. max. 4 corners plus optionally some midpoints -+ std::vector _bbox_points_for_translating; // the bbox points of each selected item, only to be used for translating -+ -+ Inkscape::SelCue _selcue; -+ -+ Inkscape::Selection *_selection; -+ State _state; -+ Show _show; -+ -+ bool _grabbed; -+ bool _show_handles; -+ bool _empty; -+ bool _changed; -+ -+ SPItem::BBoxType _snap_bbox_type; -+ -+ Geom::OptRect _bbox; -+ Geom::OptRect _approximate_bbox; -+ Geom::OptRect _geometric_bbox; -+ gdouble _strokewidth; -+ -+ Geom::Matrix _current_relative_affine; -+ Geom::Matrix _absolute_affine; -+ Geom::Matrix _relative_affine; -+ /* According to Merriam - Webster's online dictionary -+ * Affine: a transformation (as a translation, a rotation, or a uniform stretching) that carries straight -+ * lines into straight lines and parallel lines into parallel lines but may alter distance between points -+ * and angles between lines -+ */ -+ -+ Geom::Point _opposite; ///< opposite point to where a scale is taking place -+ Geom::Point _opposite_for_specpoints; -+ Geom::Point _opposite_for_bboxpoints; -+ Geom::Point _origin_for_specpoints; -+ Geom::Point _origin_for_bboxpoints; -+ -+ gdouble _handle_x; -+ gdouble _handle_y; -+ -+ boost::optional _center; -+ bool _center_is_set; ///< we've already set _center, no need to reread it from items -+ -+ SPKnot *_shandle[8]; -+ SPKnot *_rhandle[8]; -+ SPKnot *_chandle; -+ SPCanvasItem *_norm; -+ SPCanvasItem *_grip; -+ SPCanvasItem *_l[4]; -+ guint _sel_changed_id; -+ guint _sel_modified_id; -+ GSList *_stamp_cache; -+ -+ Geom::Point _origin; ///< position of origin for transforms -+ Geom::Point _point; ///< original position of the knot being used for the current transform -+ Geom::Point _point_geom; ///< original position of the knot being used for the current transform -+ Inkscape::MessageContext _message_context; -+ sigc::connection _sel_changed_connection; -+ sigc::connection _sel_modified_connection; -+}; -+ -+} -+ -+#endif -+ -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-conn-end-pair.h inkscape-0.48.1/src/sp-conn-end-pair.h ---- inkscape-0.48.1~/src/sp-conn-end-pair.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-conn-end-pair.h 2011-05-01 00:56:19.611250878 +0100 -@@ -15,6 +15,7 @@ - - #include "forward.h" - #include "libnr/nr-point.h" -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-conn-end.h inkscape-0.48.1/src/sp-conn-end.h ---- inkscape-0.48.1~/src/sp-conn-end.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-conn-end.h 2011-05-01 00:56:19.611250878 +0100 -@@ -2,6 +2,7 @@ - #define SEEN_SP_CONN_END - - #include -+#include - #include - - #include "sp-use-reference.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-gradient.h inkscape-0.48.1/src/sp-gradient.h ---- inkscape-0.48.1~/src/sp-gradient.h 2010-08-04 17:45:00.000000000 +0100 -+++ inkscape-0.48.1/src/sp-gradient.h 2011-05-01 00:56:19.611250878 +0100 -@@ -25,6 +25,7 @@ - #include "sp-gradient-units.h" - #include "sp-gradient-vector.h" - -+#include - #include - - struct SPGradientReference; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-object.h inkscape-0.48.1/src/sp-object.h ---- inkscape-0.48.1~/src/sp-object.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-object.h 2011-05-01 00:56:19.611250878 +0100 -@@ -56,6 +56,7 @@ - - - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-object.h.orig inkscape-0.48.1/src/sp-object.h.orig ---- inkscape-0.48.1~/src/sp-object.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/sp-object.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,587 @@ -+#ifndef SP_OBJECT_H_SEEN -+#define SP_OBJECT_H_SEEN -+ -+/** \file -+ * Abstract base class for all nodes -+ * -+ * Authors: -+ * Lauris Kaplinski -+ * -+ * Copyright (C) 1999-2002 authors -+ * Copyright (C) 2001-2002 Ximian, Inc. -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+/* SPObject flags */ -+ -+/* Async modification flags */ -+#define SP_OBJECT_MODIFIED_FLAG (1 << 0) -+#define SP_OBJECT_CHILD_MODIFIED_FLAG (1 << 1) -+#define SP_OBJECT_PARENT_MODIFIED_FLAG (1 << 2) -+#define SP_OBJECT_STYLE_MODIFIED_FLAG (1 << 3) -+#define SP_OBJECT_VIEWPORT_MODIFIED_FLAG (1 << 4) -+#define SP_OBJECT_USER_MODIFIED_FLAG_A (1 << 5) -+#define SP_OBJECT_USER_MODIFIED_FLAG_B (1 << 6) -+#define SP_OBJECT_USER_MODIFIED_FLAG_C (1 << 7) -+ -+/* Conveneience */ -+#define SP_OBJECT_FLAGS_ALL 0xff -+ -+/* Flags that mark object as modified */ -+/* Object, Child, Style, Viewport, User */ -+#define SP_OBJECT_MODIFIED_STATE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_PARENT_MODIFIED_FLAG)) -+ -+/* Flags that will propagate downstreams */ -+/* Parent, Style, Viewport, User */ -+#define SP_OBJECT_MODIFIED_CASCADE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG)) -+ -+/* Generic */ -+#define SP_OBJECT_IS_CLONED(o) (((SPObject *) (o))->cloned) -+ -+/* Write flags */ -+#define SP_OBJECT_WRITE_BUILD (1 << 0) -+#define SP_OBJECT_WRITE_EXT (1 << 1) -+#define SP_OBJECT_WRITE_ALL (1 << 2) -+ -+/* Convenience stuff */ -+#define SP_OBJECT_ID(o) (((SPObject *) (o))->getId()) -+#define SP_OBJECT_REPR(o) (((SPObject *) (o))->repr) -+#define SP_OBJECT_DOCUMENT(o) (((SPObject *) (o))->document) -+#define SP_OBJECT_PARENT(o) (((SPObject *) (o))->parent) -+#define SP_OBJECT_NEXT(o) (((SPObject *) (o))->next) -+#define SP_OBJECT_PREV(o) (sp_object_prev((SPObject *) (o))) -+#define SP_OBJECT_HREFCOUNT(o) (((SPObject *) (o))->hrefcount) -+#define SP_OBJECT_STYLE(o) (((SPObject *) (o))->style) -+ -+ -+#include -+#include -+#include -+#include -+ -+#include "forward.h" -+#include "version.h" -+#include "util/forward-pointer-iterator.h" -+ -+namespace Inkscape { -+namespace XML { -+class Node; -+class Document; -+} -+} -+ -+ -+typedef enum { -+ SP_NO_EXCEPTION, -+ SP_INDEX_SIZE_ERR, -+ SP_DOMSTRING_SIZE_ERR, -+ SP_HIERARCHY_REQUEST_ERR, -+ SP_WRONG_DOCUMENT_ERR, -+ SP_INVALID_CHARACTER_ERR, -+ SP_NO_DATA_ALLOWED_ERR, -+ SP_NO_MODIFICATION_ALLOWED_ERR, -+ SP_NOT_FOUND_ERR, -+ SP_NOT_SUPPORTED_ERR, -+ SP_INUSE_ATTRIBUTE_ERR, -+ SP_INVALID_STATE_ERR, -+ SP_SYNTAX_ERR, -+ SP_INVALID_MODIFICATION_ERR, -+ SP_NAMESPACE_ERR, -+ SP_INVALID_ACCESS_ERR -+} SPExceptionType; -+ -+class SPException; -+ -+/// An attempt to implement exceptions, unused? -+struct SPException { -+ SPExceptionType code; -+}; -+ -+#define SP_EXCEPTION_INIT(ex) {(ex)->code = SP_NO_EXCEPTION;} -+#define SP_EXCEPTION_IS_OK(ex) (!(ex) || ((ex)->code == SP_NO_EXCEPTION)) -+ -+class SPCtx; -+ -+/// Unused -+struct SPCtx { -+ unsigned int flags; -+}; -+ -+enum { -+ SP_XML_SPACE_DEFAULT, -+ SP_XML_SPACE_PRESERVE -+}; -+ -+class SPIXmlSpace; -+ -+/// Internal class consisting of two bits. -+struct SPIXmlSpace { -+ guint set : 1; -+ guint value : 1; -+}; -+ -+class SPObject; -+ -+/* -+ * Refcounting -+ * -+ * Owner is here for debug reasons, you can set it to NULL safely -+ * Ref should return object, NULL is error, unref return always NULL -+ */ -+ -+SPObject *sp_object_ref(SPObject *object, SPObject *owner=NULL); -+SPObject *sp_object_unref(SPObject *object, SPObject *owner=NULL); -+ -+SPObject *sp_object_href(SPObject *object, gpointer owner); -+SPObject *sp_object_hunref(SPObject *object, gpointer owner); -+ -+/// A refcounting tree node object. -+struct SPObject : public GObject { -+ enum CollectionPolicy { -+ COLLECT_WITH_PARENT, -+ ALWAYS_COLLECT -+ }; -+ -+ unsigned int cloned : 1; -+ unsigned int uflags : 8; -+ unsigned int mflags : 8; -+ SPIXmlSpace xml_space; -+ unsigned int hrefcount; /* number of xlink:href references */ -+ unsigned int _total_hrefcount; /* our hrefcount + total descendants */ -+ SPDocument *document; /* Document we are part of */ -+ SPObject *parent; /* Our parent (only one allowed) */ -+ SPObject *children; /* Our children */ -+ SPObject *_last_child; /* Remembered last child */ -+ SPObject *next; /* Next object in linked list */ -+ Inkscape::XML::Node *repr; /* Our xml representation */ -+ -+private: -+ gchar *id; /* Our very own unique id */ -+public: -+ -+ /** -+ * Returns the objects current ID string. -+ */ -+ gchar const* getId() const; -+ -+ /** @brief cleans up an SPObject, releasing its references and -+ * requesting that references to it be released -+ */ -+ void releaseReferences(); -+ -+ /** @brief connects to the release request signal -+ * -+ * @param slot the slot to connect -+ * -+ * @returns the sigc::connection formed -+ */ -+ sigc::connection connectRelease(sigc::slot slot) { -+ return _release_signal.connect(slot); -+ } -+ -+ /** -+ * Represents the style properties, whether from presentation attributes, the style -+ * attribute, or inherited. -+ * -+ * sp_object_private_set doesn't handle SP_ATTR_STYLE or any presentation attributes at the -+ * time of writing, so this is probably NULL for all SPObject's that aren't an SPItem. -+ * -+ * However, this gives rise to the bugs mentioned in sp_object_get_style_property. -+ * Note that some non-SPItem SPObject's, such as SPStop, do need styling information, -+ * and need to inherit properties even through other non-SPItem parents like \. -+ */ -+ SPStyle *style; -+ -+ /// Switch containing next() method. -+ struct ParentIteratorStrategy { -+ static SPObject const *next(SPObject const *object) { -+ return object->parent; -+ } -+ }; -+ /// Switch containing next() method. -+ struct SiblingIteratorStrategy { -+ static SPObject const *next(SPObject const *object) { -+ return object->next; -+ } -+ }; -+ -+ typedef Inkscape::Util::ForwardPointerIterator ParentIterator; -+ typedef Inkscape::Util::ForwardPointerIterator ConstParentIterator; -+ typedef Inkscape::Util::ForwardPointerIterator SiblingIterator; -+ typedef Inkscape::Util::ForwardPointerIterator ConstSiblingIterator; -+ -+ bool isSiblingOf(SPObject const *object) const { -+ g_return_val_if_fail(object != NULL, false); -+ return this->parent && this->parent == object->parent; -+ } -+ bool isAncestorOf(SPObject const *object) const; -+ -+ SPObject const *nearestCommonAncestor(SPObject const *object) const; -+ /* A non-const version can be similarly constructed if you want one. -+ * (Don't just cast away the constness, which would be ill-formed.) */ -+ -+ SPObject *getNext(); -+ SPObject *getPrev(); -+ -+ bool hasChildren() const { return ( children != NULL ); } -+ -+ SPObject *firstChild() { return children; } -+ SPObject const *firstChild() const { return children; } -+ SPObject *lastChild() { return _last_child; } -+ SPObject const *lastChild() const { return _last_child; } -+ -+ enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow }; -+ /** @brief Retrieves children as a GSList */ -+ GSList *childList(bool add_ref, Action action = ActionGeneral); -+ -+ SPObject *appendChildRepr(Inkscape::XML::Node *repr); -+ -+ /** @brief Gets the author-visible label for this object. */ -+ gchar const *label() const; -+ /** @brief Returns a default label for this object. */ -+ gchar const *defaultLabel() const; -+ /** @brief Sets the author-visible label for this object. -+ * -+ * Sets the author-visible label for the object. -+ * -+ * @param label the new label -+ */ -+ void setLabel(gchar const *label); -+ -+ /** Retrieves the title of this object */ -+ gchar *title() const; -+ /** Sets the title of this object */ -+ bool setTitle(gchar const *title, bool verbatim=false); -+ -+ /** Retrieves the description of this object */ -+ gchar *desc() const; -+ /** Sets the description of this object */ -+ bool setDesc(gchar const *desc, bool verbatim=false); -+ -+ /** @brief Set the policy under which this object will be -+ * orphan-collected. -+ * -+ * Orphan-collection is the process of deleting all objects which no longer have -+ * hyper-references pointing to them. The policy determines when this happens. Many objects -+ * should not be deleted simply because they are no longer referred to; other objects (like -+ * "intermediate" gradients) are more or less throw-away and should always be collected when no -+ * longer in use. -+ * -+ * Along these lines, there are currently two orphan-collection policies: -+ * -+ * COLLECT_WITH_PARENT - don't worry about the object's hrefcount; -+ * if its parent is collected, this object -+ * will be too -+ * -+ * COLLECT_ALWAYS - always collect the object as soon as its -+ * hrefcount reaches zero -+ * -+ * @returns the current collection policy in effect for this object -+ */ -+ CollectionPolicy collectionPolicy() const { return _collection_policy; } -+ -+ /** @brief Sets the orphan-collection policy in effect for this object. -+ * -+ * @see SPObject::collectionPolicy -+ * -+ * @param policy the new policy to adopt -+ */ -+ void setCollectionPolicy(CollectionPolicy policy) { -+ _collection_policy = policy; -+ } -+ -+ /** @brief Requests a later automatic call to collectOrphan(). -+ * -+ * This method requests that collectOrphan() be called during the document update cycle, -+ * deleting the object if it is no longer used. -+ * -+ * If the current collection policy is COLLECT_WITH_PARENT, this function has no effect. -+ * -+ * @see SPObject::collectOrphan -+ */ -+ void requestOrphanCollection(); -+ -+ /** @brief Unconditionally delete the object if it is not referenced. -+ * -+ * Unconditionally delete the object if there are no outstanding hyper-references to it. -+ * Observers are not notified of the object's deletion (at the SPObject level; XML tree -+ * notifications still fire). -+ * -+ * @see SPObject::deleteObject -+ */ -+ void collectOrphan() { -+ if ( _total_hrefcount == 0 ) { -+ deleteObject(false); -+ } -+ } -+ -+ /** @brief Check if object is referenced by any other object. -+ */ -+ bool isReferenced() { return ( _total_hrefcount > 0 ); } -+ -+ /** @brief Deletes an object. -+ * -+ * Detaches the object's repr, and optionally sends notification that the object has been -+ * deleted. -+ * -+ * @param propagate notify observers that the object has been deleted? -+ * -+ * @param propagate_descendants notify observers of children that they have been deleted? -+ */ -+ void deleteObject(bool propagate, bool propagate_descendants); -+ -+ /** @brief Deletes on object. -+ * -+ * @param propagate Notify observers of this object and its children that they have been -+ * deleted? -+ */ -+ void deleteObject(bool propagate=true) { -+ deleteObject(propagate, propagate); -+ } -+ -+ /** @brief Connects a slot to be called when an object is deleted. -+ * -+ * This connects a slot to an object's internal delete signal, which is invoked when the object -+ * is deleted -+ * -+ * The signal is mainly useful for e.g. knowing when to break hrefs or dissociate clones. -+ * -+ * @param slot the slot to connect -+ * -+ * @see SPObject::deleteObject -+ */ -+ sigc::connection connectDelete(sigc::slot slot) { -+ return _delete_signal.connect(slot); -+ } -+ -+ sigc::connection connectPositionChanged(sigc::slot slot) { -+ return _position_changed_signal.connect(slot); -+ } -+ -+ /** @brief Returns the object which supercedes this one (if any). -+ * -+ * This is mainly useful for ensuring we can correctly perform a series of moves or deletes, -+ * even if the objects in question have been replaced in the middle of the sequence. -+ */ -+ SPObject *successor() { return _successor; } -+ -+ /** @brief Indicates that another object supercedes this one. */ -+ void setSuccessor(SPObject *successor) { -+ g_assert(successor != NULL); -+ g_assert(_successor == NULL); -+ g_assert(successor->_successor == NULL); -+ sp_object_ref(successor, NULL); -+ _successor = successor; -+ } -+ -+ /* modifications; all three sets of methods should probably ultimately be protected, as they -+ * are not really part of its public interface. However, other parts of the code to -+ * occasionally use them at present. */ -+ -+ /* the no-argument version of updateRepr() is intended to be a bit more public, however -- it -+ * essentially just flushes any changes back to the backing store (the repr layer); maybe it -+ * should be called something else and made public at that point. */ -+ -+ /** @brief Updates the object's repr based on the object's state. -+ * -+ * This method updates the the repr attached to the object to reflect the object's current -+ * state; see the three-argument version for details. -+ * -+ * @param flags object write flags that apply to this update -+ * -+ * @return the updated repr -+ */ -+ Inkscape::XML::Node *updateRepr(unsigned int flags=SP_OBJECT_WRITE_EXT); -+ -+ /** @brief Updates the given repr based on the object's state. -+ * -+ * This method updates the given repr to reflect the object's current state. There are -+ * several flags that affect this: -+ * -+ * SP_OBJECT_WRITE_BUILD - create new reprs -+ * -+ * SP_OBJECT_WRITE_EXT - write elements and attributes -+ * which are not part of pure SVG -+ * (i.e. the Inkscape and Sodipodi -+ * namespaces) -+ * -+ * SP_OBJECT_WRITE_ALL - create all nodes and attributes, -+ * even those which might be redundant -+ * -+ * @param repr the repr to update -+ * @param flags object write flags that apply to this update -+ * -+ * @return the updated repr -+ */ -+ Inkscape::XML::Node *updateRepr(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags); -+ -+ /** @brief Queues an deferred update of this object's display. -+ * -+ * This method sets flags to indicate updates to be performed later, during the idle loop. -+ * -+ * There are several flags permitted here: -+ * -+ * SP_OBJECT_MODIFIED_FLAG - the object has been modified -+ * -+ * SP_OBJECT_CHILD_MODIFIED_FLAG - a child of the object has been -+ * modified -+ * -+ * SP_OBJECT_STYLE_MODIFIED_FLAG - the object's style has been -+ * modified -+ * -+ * There are also some subclass-specific modified flags which are hardly ever used. -+ * -+ * One of either MODIFIED or CHILD_MODIFIED is required. -+ * -+ * @param flags flags indicating what to update -+ */ -+ void requestDisplayUpdate(unsigned int flags); -+ -+ /** @brief Updates the object's display immediately -+ * -+ * This method is called during the idle loop by SPDocument in order to update the object's -+ * display. -+ * -+ * One additional flag is legal here: -+ * -+ * SP_OBJECT_PARENT_MODIFIED_FLAG - the parent has been -+ * modified -+ * -+ * @param ctx an SPCtx which accumulates various state -+ * during the recursive update -- beware! some -+ * subclasses try to cast this to an SPItemCtx * -+ * -+ * @param flags flags indicating what to update (in addition -+ * to any already set flags) -+ */ -+ void updateDisplay(SPCtx *ctx, unsigned int flags); -+ -+ /** @brief Requests that a modification notification signal -+ * be emitted later (e.g. during the idle loop) -+ * -+ * @param flags flags indicating what has been modified -+ */ -+ void requestModified(unsigned int flags); -+ -+ /** @brief Emits a modification notification signal -+ * -+ * @param flags indicating what has been modified -+ */ -+ void emitModified(unsigned int flags); -+ -+ /** @brief Connects to the modification notification signal -+ * -+ * @param slot the slot to connect -+ * -+ * @returns the connection formed thereby -+ */ -+ sigc::connection connectModified( -+ sigc::slot slot -+ ) { -+ return _modified_signal.connect(slot); -+ } -+ -+ void _sendDeleteSignalRecursive(); -+ void _updateTotalHRefCount(int increment); -+ -+ void _requireSVGVersion(unsigned major, unsigned minor) { -+ _requireSVGVersion(Inkscape::Version(major, minor)); -+ } -+ void _requireSVGVersion(Inkscape::Version version); -+ -+ sigc::signal _release_signal; -+ sigc::signal _delete_signal; -+ sigc::signal _position_changed_signal; -+ sigc::signal _modified_signal; -+ SPObject *_successor; -+ CollectionPolicy _collection_policy; -+ gchar *_label; -+ mutable gchar *_default_label; -+ -+private: -+ // Private member functions used in the definitions of setTitle(), -+ // setDesc(), title() and desc(). -+ bool setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool verbatim); -+ gchar * getTitleOrDesc(gchar const *svg_tagname) const; -+ SPObject * findFirstChild(gchar const *tagname) const; -+ GString * textualContent() const; -+ -+ friend class SPObjectImpl; -+}; -+ -+/// The SPObject vtable. -+struct SPObjectClass { -+ GObjectClass parent_class; -+ -+ void (* build) (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); -+ void (* release) (SPObject *object); -+ -+ /* Virtual handlers of repr signals */ -+ void (* child_added) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); -+ void (* remove_child) (SPObject *object, Inkscape::XML::Node *child); -+ -+ void (* order_changed) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *new_repr); -+ -+ void (* set) (SPObject *object, unsigned int key, gchar const *value); -+ -+ void (* read_content) (SPObject *object); -+ -+ /* Update handler */ -+ void (* update) (SPObject *object, SPCtx *ctx, unsigned int flags); -+ /* Modification handler */ -+ void (* modified) (SPObject *object, unsigned int flags); -+ -+ Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags); -+}; -+ -+ -+/* -+ * Attaching/detaching -+ */ -+ -+void sp_object_attach(SPObject *parent, SPObject *object, SPObject *prev); -+void sp_object_reorder(SPObject *object, SPObject *prev); -+void sp_object_detach(SPObject *parent, SPObject *object); -+ -+inline SPObject *sp_object_first_child(SPObject *parent) { -+ return parent->firstChild(); -+} -+SPObject *sp_object_get_child_by_repr(SPObject *object, Inkscape::XML::Node *repr); -+ -+void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned); -+ -+void sp_object_set(SPObject *object, unsigned int key, gchar const *value); -+ -+void sp_object_read_attr(SPObject *object, gchar const *key); -+ -+/* Public */ -+ -+gchar const *sp_object_tagName_get(SPObject const *object, SPException *ex); -+gchar const *sp_object_getAttribute(SPObject const *object, gchar const *key, SPException *ex); -+void sp_object_setAttribute(SPObject *object, gchar const *key, gchar const *value, SPException *ex); -+void sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *ex); -+ -+/* Style */ -+ -+gchar const *sp_object_get_style_property(SPObject const *object, -+ gchar const *key, gchar const *def); -+ -+int sp_object_compare_position(SPObject const *first, SPObject const *second); -+ -+SPObject *sp_object_prev(SPObject *child); -+ -+ -+#endif // SP_OBJECT_H_SEEN -+ -+ -+/* -+ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-offset.h inkscape-0.48.1/src/sp-offset.h ---- inkscape-0.48.1~/src/sp-offset.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-offset.h 2011-05-01 00:56:19.611250878 +0100 -@@ -16,6 +16,7 @@ - - #include "sp-shape.h" - -+#include - #include - - #define SP_TYPE_OFFSET (sp_offset_get_type ()) -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-pattern.h inkscape-0.48.1/src/sp-pattern.h ---- inkscape-0.48.1~/src/sp-pattern.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-pattern.h 2011-05-01 00:56:19.611250878 +0100 -@@ -32,6 +32,7 @@ - #include "sp-paint-server.h" - #include "uri-references.h" - -+#include - #include - - class SPPatternReference : public Inkscape::URIReference { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-pattern.h.orig inkscape-0.48.1/src/sp-pattern.h.orig ---- inkscape-0.48.1~/src/sp-pattern.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/sp-pattern.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,113 @@ -+#ifndef __SP_PATTERN_H__ -+#define __SP_PATTERN_H__ -+ -+/* -+ * SVG implementation -+ * -+ * Author: -+ * Lauris Kaplinski -+ * -+ * Copyright (C) 2002 Lauris Kaplinski -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include -+ -+#include "forward.h" -+ -+#define SP_TYPE_PATTERN (sp_pattern_get_type ()) -+#define SP_PATTERN(o) (GTK_CHECK_CAST ((o), SP_TYPE_PATTERN, SPPattern)) -+#define SP_PATTERN_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_PATTERN, SPPatternClass)) -+#define SP_IS_PATTERN(o) (GTK_CHECK_TYPE ((o), SP_TYPE_PATTERN)) -+#define SP_IS_PATTERN_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_PATTERN)) -+ -+GType sp_pattern_get_type (void); -+ -+class SPPatternClass; -+ -+#include -+#include -+#include "svg/svg-length.h" -+#include "sp-paint-server.h" -+#include "uri-references.h" -+ -+#include -+ -+class SPPatternReference : public Inkscape::URIReference { -+public: -+ SPPatternReference (SPObject *obj) : URIReference(obj) {} -+ SPPattern *getObject() const { -+ return (SPPattern *)URIReference::getObject(); -+ } -+ -+protected: -+ virtual bool _acceptObject(SPObject *obj) const { -+ return SP_IS_PATTERN (obj); -+ } -+}; -+ -+enum { -+ SP_PATTERN_UNITS_USERSPACEONUSE, -+ SP_PATTERN_UNITS_OBJECTBOUNDINGBOX -+}; -+ -+struct SPPattern : public SPPaintServer { -+ /* Reference (href) */ -+ gchar *href; -+ SPPatternReference *ref; -+ -+ /* patternUnits and patternContentUnits attribute */ -+ guint patternUnits : 1; -+ guint patternUnits_set : 1; -+ guint patternContentUnits : 1; -+ guint patternContentUnits_set : 1; -+ /* patternTransform attribute */ -+ Geom::Matrix patternTransform; -+ guint patternTransform_set : 1; -+ /* Tile rectangle */ -+ SVGLength x; -+ SVGLength y; -+ SVGLength width; -+ SVGLength height; -+ /* VieBox */ -+ NRRect viewBox; -+ guint viewBox_set : 1; -+ -+ sigc::connection modified_connection; -+}; -+ -+struct SPPatternClass { -+ SPPaintServerClass parent_class; -+}; -+ -+guint pattern_users (SPPattern *pattern); -+SPPattern *pattern_chain (SPPattern *pattern); -+SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property); -+void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool set); -+ -+const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move); -+ -+SPPattern *pattern_getroot (SPPattern *pat); -+ -+guint pattern_patternUnits (SPPattern *pat); -+guint pattern_patternContentUnits (SPPattern *pat); -+Geom::Matrix const &pattern_patternTransform(SPPattern const *pat); -+gdouble pattern_x (SPPattern *pat); -+gdouble pattern_y (SPPattern *pat); -+gdouble pattern_width (SPPattern *pat); -+gdouble pattern_height (SPPattern *pat); -+NRRect *pattern_viewBox (SPPattern *pat); -+ -+#endif //__SP_PATTERN_H__ -+ -+/* -+ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-shape.h inkscape-0.48.1/src/sp-shape.h ---- inkscape-0.48.1~/src/sp-shape.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-shape.h 2011-05-01 00:56:19.611250878 +0100 -@@ -19,6 +19,7 @@ - #include "sp-marker-loc.h" - #include <2geom/forward.h> - -+#include - #include - - #define SP_TYPE_SHAPE (sp_shape_get_type ()) -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-shape.h.orig inkscape-0.48.1/src/sp-shape.h.orig ---- inkscape-0.48.1~/src/sp-shape.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/sp-shape.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,71 @@ -+#ifndef __SP_SHAPE_H__ -+#define __SP_SHAPE_H__ -+ -+/* -+ * Base class for shapes, including element -+ * -+ * Author: -+ * Lauris Kaplinski -+ * -+ * Copyright (C) 1999-2002 Lauris Kaplinski -+ * Copyright (C) 2000-2001 Ximian, Inc. -+ * Copyright (C) 2008 Johan Engelen -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include "display/display-forward.h" -+#include "sp-lpe-item.h" -+#include "sp-marker-loc.h" -+#include <2geom/forward.h> -+ -+#include -+ -+#define SP_TYPE_SHAPE (sp_shape_get_type ()) -+#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape)) -+#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass)) -+#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE)) -+#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE)) -+ -+#define SP_SHAPE_WRITE_PATH (1 << 2) -+ -+struct SPDesktop; -+ -+struct SPShape : public SPLPEItem { -+ SPCurve *curve; -+ -+ SPObject *marker[SP_MARKER_LOC_QTY]; -+ sigc::connection release_connect [SP_MARKER_LOC_QTY]; -+ sigc::connection modified_connect [SP_MARKER_LOC_QTY]; -+}; -+ -+struct SPShapeClass { -+ SPLPEItemClass item_class; -+ -+ /* Build bpath from extra shape attributes */ -+ void (* set_shape) (SPShape *shape); -+}; -+ -+GType sp_shape_get_type (void); -+ -+void sp_shape_set_shape (SPShape *shape); -+ -+/* Return duplicate of curve or NULL */ -+SPCurve *sp_shape_get_curve (SPShape *shape); -+ -+// sets a curve, updates display -+void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner); -+ -+// same as sp_shape_set_curve, but without updating display -+void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner); -+ -+// markers API -+void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value); -+int sp_shape_has_markers (SPShape const *shape); -+int sp_shape_number_of_markers (SPShape* Shape, int type); -+ -+Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2); -+Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c); -+Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c); -+ -+#endif -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-switch.h inkscape-0.48.1/src/sp-switch.h ---- inkscape-0.48.1~/src/sp-switch.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-switch.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - - #include "sp-item-group.h" - -+#include - #include - - #define SP_TYPE_SWITCH (CSwitch::getType()) -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-text.h inkscape-0.48.1/src/sp-text.h ---- inkscape-0.48.1~/src/sp-text.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-text.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - */ - - #include -+#include - #include - #include "sp-item.h" - #include "sp-string.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-tref-reference.h inkscape-0.48.1/src/sp-tref-reference.h ---- inkscape-0.48.1~/src/sp-tref-reference.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-tref-reference.h 2011-05-01 00:56:19.611250878 +0100 -@@ -13,6 +13,7 @@ - - #include - #include -+#include - #include - - #include "util/share.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-tref-reference.h.orig inkscape-0.48.1/src/sp-tref-reference.h.orig ---- inkscape-0.48.1~/src/sp-tref-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/sp-tref-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,75 @@ -+#ifndef SEEN_SP_TREF_REFERENCE_H -+#define SEEN_SP_TREF_REFERENCE_H -+ -+/* -+ * The reference corresponding to href of element. -+ * -+ * This file was created based on sp-use-reference.h -+ * -+ * Copyright (C) 2007 Gail Banaszkiewicz -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information. -+ */ -+ -+#include -+#include -+#include -+ -+#include "util/share.h" -+#include "xml/node-observer.h" -+#include "xml/subtree.h" -+ -+ -+class SPTRefReference : public Inkscape::URIReference, -+ public Inkscape::XML::NodeObserver { -+public: -+ SPTRefReference(SPObject *owner) : URIReference(owner), subtreeObserved(NULL) { -+ updateObserver(); -+ } -+ -+ virtual ~SPTRefReference() { -+ if (subtreeObserved) { -+ subtreeObserved->removeObserver(*this); -+ delete subtreeObserved; -+ } -+ } -+ -+ SPItem *getObject() const { -+ return (SPItem *)URIReference::getObject(); -+ } -+ -+ void updateObserver(); -+ -+ ///////////////////////////////////////////////////////////////////// -+ // Node Observer Functions -+ // ----------------------- -+ virtual void notifyChildAdded(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev); -+ virtual void notifyChildRemoved(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev); -+ virtual void notifyChildOrderChanged(Inkscape::XML::Node &node, Inkscape::XML::Node &child, -+ Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev); -+ virtual void notifyContentChanged(Inkscape::XML::Node &node, -+ Inkscape::Util::ptr_shared old_content, -+ Inkscape::Util::ptr_shared new_content); -+ virtual void notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name, -+ Inkscape::Util::ptr_shared old_value, -+ Inkscape::Util::ptr_shared new_value); -+ ///////////////////////////////////////////////////////////////////// -+ -+protected: -+ virtual bool _acceptObject(SPObject * obj) const; -+ -+ Inkscape::XML::Subtree *subtreeObserved; -+}; -+ -+#endif /* !SEEN_SP_TREF_REFERENCE_H */ -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use-reference.h inkscape-0.48.1/src/sp-use-reference.h ---- inkscape-0.48.1~/src/sp-use-reference.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-use-reference.h 2011-05-01 00:56:19.611250878 +0100 -@@ -11,6 +11,7 @@ - - #include - #include -+#include - #include - - class Path; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use-reference.h.orig inkscape-0.48.1/src/sp-use-reference.h.orig ---- inkscape-0.48.1~/src/sp-use-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/sp-use-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,77 @@ -+#ifndef SEEN_SP_USE_REFERENCE_H -+#define SEEN_SP_USE_REFERENCE_H -+ -+/* -+ * The reference corresponding to href of element. -+ * -+ * Copyright (C) 2004 Bulia Byak -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information. -+ */ -+ -+#include -+#include -+#include -+ -+class Path; -+ -+namespace Inkscape { -+namespace XML { -+ struct Node; -+} -+} -+ -+ -+class SPUseReference : public Inkscape::URIReference { -+public: -+ SPUseReference(SPObject *owner) : URIReference(owner) {} -+ -+ SPItem *getObject() const { -+ return (SPItem *)URIReference::getObject(); -+ } -+ -+protected: -+ virtual bool _acceptObject(SPObject * const obj) const; -+ -+}; -+ -+ -+class SPUsePath : public SPUseReference { -+public: -+ Path *originalPath; -+ bool sourceDirty; -+ -+ SPObject *owner; -+ gchar *sourceHref; -+ Inkscape::XML::Node *sourceRepr; -+ SPObject *sourceObject; -+ -+ sigc::connection _modified_connection; -+ sigc::connection _delete_connection; -+ sigc::connection _changed_connection; -+ sigc::connection _transformed_connection; -+ -+ SPUsePath(SPObject* i_owner); -+ ~SPUsePath(void); -+ -+ void link(char* to); -+ void unlink(void); -+ void start_listening(SPObject* to); -+ void quit_listening(void); -+ void refresh_source(void); -+ -+ void (*user_unlink) (SPObject *user); -+}; -+ -+#endif /* !SEEN_SP_USE_REFERENCE_H */ -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use.h inkscape-0.48.1/src/sp-use.h ---- inkscape-0.48.1~/src/sp-use.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/sp-use.h 2011-05-01 00:56:19.611250878 +0100 -@@ -13,6 +13,7 @@ - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -+#include - #include - #include "svg/svg-length.h" - #include "sp-item.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/spiral-context.h inkscape-0.48.1/src/spiral-context.h ---- inkscape-0.48.1~/src/spiral-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/spiral-context.h 2011-05-01 00:56:19.611250878 +0100 -@@ -16,6 +16,7 @@ - */ - - #include -+#include - #include - #include "event-context.h" - #include "libnr/nr-point.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/star-context.h inkscape-0.48.1/src/star-context.h ---- inkscape-0.48.1~/src/star-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/star-context.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -+#include - #include - #include "event-context.h" - #include "libnr/nr-point.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/style.h inkscape-0.48.1/src/style.h ---- inkscape-0.48.1~/src/style.h 2010-08-04 17:45:00.000000000 +0100 -+++ inkscape-0.48.1/src/style.h 2011-05-01 00:56:19.611250878 +0100 -@@ -24,6 +24,7 @@ - #include "uri.h" - #include "sp-paint-server.h" - -+#include - #include - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/text-context.h inkscape-0.48.1/src/text-context.h ---- inkscape-0.48.1~/src/text-context.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/text-context.h 2011-05-01 00:56:19.611250878 +0100 -@@ -15,6 +15,7 @@ - */ - - /* #include */ -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h inkscape-0.48.1/src/ui/dialog/desktop-tracker.h ---- inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/dialog/desktop-tracker.h 2011-05-01 00:56:19.611250878 +0100 -@@ -11,6 +11,7 @@ - #ifndef SEEN_DIALOG_DESKTOP_TRACKER - #define SEEN_DIALOG_DESKTOP_TRACKER - -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/document-metadata.h inkscape-0.48.1/src/ui/dialog/document-metadata.h ---- inkscape-0.48.1~/src/ui/dialog/document-metadata.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/dialog/document-metadata.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - #define INKSCAPE_UI_DIALOG_DOCUMENT_METADATA_H - - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/document-properties.h inkscape-0.48.1/src/ui/dialog/document-properties.h ---- inkscape-0.48.1~/src/ui/dialog/document-properties.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/dialog/document-properties.h 2011-05-01 00:56:19.611250878 +0100 -@@ -15,6 +15,7 @@ - #define INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H - - #include -+#include - #include // - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h ---- inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h 2010-11-06 18:47:19.000000000 +0000 -+++ inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h 2011-05-01 00:56:19.611250878 +0100 -@@ -28,6 +28,7 @@ - #include - #include - #include "ui/widget/preferences-widget.h" -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/undo-history.cpp inkscape-0.48.1/src/ui/dialog/undo-history.cpp ---- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - - #include - #include -+#include - #include - - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig ---- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,348 @@ -+/** @file -+ * @brief Undo History dialog - implementation -+ */ -+/* Author: -+ * Gustav Broberg -+ * -+ * Copyright (C) 2006 Authors -+ * Released under GNU GPL. Read the file 'COPYING' for more information. -+ */ -+ -+#ifdef HAVE_CONFIG_H -+# include -+#endif -+ -+#include -+#include -+#include -+ -+ -+#include "document.h" -+#include "inkscape.h" -+#include "verbs.h" -+#include "desktop-handles.h" -+ -+#include "undo-history.h" -+ -+namespace Inkscape { -+namespace UI { -+namespace Dialog { -+ -+/* Rendering functions for custom cell renderers */ -+ -+void -+CellRendererSPIcon::render_vfunc(const Glib::RefPtr& window, -+ Gtk::Widget& widget, -+ const Gdk::Rectangle& background_area, -+ const Gdk::Rectangle& cell_area, -+ const Gdk::Rectangle& expose_area, -+ Gtk::CellRendererState flags) -+{ -+ // if this event type doesn't have an icon... -+ if ( !Inkscape::Verb::get(_property_event_type)->get_image() ) return; -+ -+ // if the icon isn't cached, render it to a pixbuf -+ if ( !_icon_cache[_property_event_type] ) { -+ -+ Glib::ustring image = Inkscape::Verb::get(_property_event_type)->get_image(); -+ Gtk::Widget* icon = sp_icon_get_icon(image, Inkscape::ICON_SIZE_MENU); -+ -+ if (icon) { -+ -+ // check icon type (inkscape, gtk, none) -+ if ( SP_IS_ICON(icon->gobj()) ) { -+ SPIcon* sp_icon = SP_ICON(icon->gobj()); -+ sp_icon_fetch_pixbuf(sp_icon); -+ _property_icon = Glib::wrap(sp_icon->pb, true); -+ } else if ( GTK_IS_IMAGE(icon->gobj()) ) { -+ _property_icon = Gtk::Invisible().render_icon(Gtk::StockID(image), -+ Gtk::ICON_SIZE_MENU); -+ } else { -+ delete icon; -+ return; -+ } -+ -+ delete icon; -+ property_pixbuf() = _icon_cache[_property_event_type] = _property_icon.get_value(); -+ } -+ -+ } else { -+ property_pixbuf() = _icon_cache[_property_event_type]; -+ } -+ -+ Gtk::CellRendererPixbuf::render_vfunc(window, widget, background_area, -+ cell_area, expose_area, flags); -+} -+ -+ -+void -+CellRendererInt::render_vfunc(const Glib::RefPtr& window, -+ Gtk::Widget& widget, -+ const Gdk::Rectangle& background_area, -+ const Gdk::Rectangle& cell_area, -+ const Gdk::Rectangle& expose_area, -+ Gtk::CellRendererState flags) -+{ -+ if( _filter(_property_number) ) { -+ std::ostringstream s; -+ s << _property_number << std::flush; -+ property_text() = s.str(); -+ Gtk::CellRendererText::render_vfunc(window, widget, background_area, -+ cell_area, expose_area, flags); -+ } -+} -+ -+const CellRendererInt::Filter& CellRendererInt::no_filter = CellRendererInt::NoFilter(); -+ -+UndoHistory& UndoHistory::getInstance() -+{ -+ return *new UndoHistory(); -+} -+ -+void -+UndoHistory::setDesktop(SPDesktop* desktop) -+{ -+ Panel::setDesktop(desktop); -+ -+ if (!desktop) return; -+ -+ _document = sp_desktop_document(desktop); -+ -+ _event_log = desktop->event_log; -+ -+ _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(); -+ -+ _event_list_store = _event_log->getEventListStore(); -+ _event_list_view.set_model(_event_list_store); -+ _event_list_selection = _event_list_view.get_selection(); -+ -+ _event_log->connectWithDialog(&_event_list_view, &_callback_connections); -+ _event_list_view.scroll_to_row(_event_list_store->get_path(_event_list_selection->get_selected())); -+ -+ _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(false); -+} -+ -+UndoHistory::UndoHistory() -+ : UI::Widget::Panel ("", "/dialogs/undo-history", SP_VERB_DIALOG_UNDO_HISTORY), -+ _document (sp_desktop_document(getDesktop())), -+ _event_log (getDesktop() ? getDesktop()->event_log : NULL), -+ _columns (_event_log ? &_event_log->getColumns() : NULL), -+ _event_list_selection (_event_list_view.get_selection()) -+{ -+ if ( !_document || !_event_log || !_columns ) return; -+ -+ set_size_request(300, 95); -+ -+ _getContents()->pack_start(_scrolled_window); -+ _scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); -+ -+ _event_list_store = _event_log->getEventListStore(); -+ -+ _event_list_view.set_model(_event_list_store); -+ _event_list_view.set_rules_hint(false); -+ _event_list_view.set_enable_search(false); -+ _event_list_view.set_headers_visible(false); -+ -+ CellRendererSPIcon* icon_renderer = Gtk::manage(new CellRendererSPIcon()); -+ icon_renderer->property_xpad() = 8; -+ icon_renderer->property_width() = 36; -+ int cols_count = _event_list_view.append_column("Icon", *icon_renderer); -+ -+ Gtk::TreeView::Column* icon_column = _event_list_view.get_column(cols_count-1); -+ icon_column->add_attribute(icon_renderer->property_event_type(), _columns->type); -+ -+ Gtk::CellRendererText* description_renderer = Gtk::manage(new Gtk::CellRendererText()); -+ -+ cols_count = _event_list_view.append_column("Description", *description_renderer); -+ Gtk::TreeView::Column* description_column = _event_list_view.get_column(cols_count-1); -+ description_column->add_attribute(description_renderer->property_text(), _columns->description); -+ description_column->set_resizable(); -+ -+ _event_list_view.set_expander_column( *_event_list_view.get_column(cols_count-1) ); -+ -+ CellRendererInt* children_renderer = Gtk::manage(new CellRendererInt(greater_than_1)); -+ children_renderer->property_weight() = 600; // =Pango::WEIGHT_SEMIBOLD (not defined in old versions of pangomm) -+ children_renderer->property_xalign() = 1.0; -+ children_renderer->property_xpad() = 20; -+ -+ cols_count = _event_list_view.append_column("Children", *children_renderer); -+ Gtk::TreeView::Column* children_column = _event_list_view.get_column(cols_count-1); -+ children_column->add_attribute(children_renderer->property_number(), _columns->child_count); -+ -+ _scrolled_window.add(_event_list_view); -+ -+ // connect EventLog callbacks -+ _callback_connections[EventLog::CALLB_SELECTION_CHANGE] = -+ _event_list_selection->signal_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onListSelectionChange)); -+ -+ _callback_connections[EventLog::CALLB_EXPAND] = -+ _event_list_view.signal_row_expanded().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onExpandEvent)); -+ -+ _callback_connections[EventLog::CALLB_COLLAPSE] = -+ _event_list_view.signal_row_collapsed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onCollapseEvent)); -+ -+ // connect with the EventLog -+ _event_log->connectWithDialog(&_event_list_view, &_callback_connections); -+ -+ show_all_children(); -+ -+ // scroll to the selected row -+ _event_list_view.set_cursor(_event_list_store->get_path(_event_log->getCurrEvent())); -+} -+ -+UndoHistory::~UndoHistory() -+{ -+} -+ -+void -+UndoHistory::_onListSelectionChange() -+{ -+ -+ EventLog::const_iterator selected = _event_list_selection->get_selected(); -+ -+ /* If no event is selected in the view, find the right one and select it. This happens whenever -+ * a branch we're currently in is collapsed. -+ */ -+ if (!selected) { -+ -+ EventLog::iterator curr_event = _event_log->getCurrEvent(); -+ -+ if (curr_event->parent()) { -+ -+ EventLog::iterator curr_event_parent = curr_event->parent(); -+ EventLog::iterator last = curr_event_parent->children().end(); -+ -+ _event_log->blockNotifications(); -+ for ( --last ; curr_event != last ; ++curr_event ) { -+ sp_document_redo(_document); -+ } -+ _event_log->blockNotifications(false); -+ -+ _event_log->setCurrEvent(curr_event); -+ _event_list_selection->select(curr_event_parent); -+ -+ } else { // this should not happen -+ _event_list_selection->select(curr_event); -+ } -+ -+ } else { -+ -+ EventLog::const_iterator last_selected = _event_log->getCurrEvent(); -+ -+ /* Selecting a collapsed parent event is equal to selecting the last child -+ * of that parent's branch. -+ */ -+ -+ if ( !selected->children().empty() && -+ !_event_list_view.row_expanded(_event_list_store->get_path(selected)) ) -+ { -+ selected = selected->children().end(); -+ --selected; -+ } -+ -+ // An event before the current one has been selected. Undo to the selected event. -+ if ( _event_list_store->get_path(selected) < -+ _event_list_store->get_path(last_selected) ) -+ { -+ _event_log->blockNotifications(); -+ -+ while ( selected != last_selected ) { -+ -+ sp_document_undo(_document); -+ -+ if ( last_selected->parent() && -+ last_selected == last_selected->parent()->children().begin() ) -+ { -+ last_selected = last_selected->parent(); -+ _event_log->setCurrEventParent((EventLog::iterator)NULL); -+ } else { -+ --last_selected; -+ if ( !last_selected->children().empty() ) { -+ _event_log->setCurrEventParent(last_selected); -+ last_selected = last_selected->children().end(); -+ --last_selected; -+ } -+ } -+ } -+ _event_log->blockNotifications(false); -+ _event_log->updateUndoVerbs(); -+ -+ } else { // An event after the current one has been selected. Redo to the selected event. -+ -+ _event_log->blockNotifications(); -+ -+ while ( selected != last_selected ) { -+ -+ sp_document_redo(_document); -+ -+ if ( !last_selected->children().empty() ) { -+ _event_log->setCurrEventParent(last_selected); -+ last_selected = last_selected->children().begin(); -+ } else { -+ ++last_selected; -+ if ( last_selected->parent() && -+ last_selected == last_selected->parent()->children().end() ) -+ { -+ last_selected = last_selected->parent(); -+ ++last_selected; -+ _event_log->setCurrEventParent((EventLog::iterator)NULL); -+ } -+ } -+ } -+ _event_log->blockNotifications(false); -+ -+ } -+ -+ _event_log->setCurrEvent(selected); -+ _event_log->updateUndoVerbs(); -+ } -+ -+} -+ -+void -+UndoHistory::_onExpandEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/) -+{ -+ if ( iter == _event_list_selection->get_selected() ) { -+ _event_list_selection->select(_event_log->getCurrEvent()); -+ } -+} -+ -+void -+UndoHistory::_onCollapseEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/) -+{ -+ // Collapsing a branch we're currently in is equal to stepping to the last event in that branch -+ if ( iter == _event_log->getCurrEvent() ) { -+ EventLog::const_iterator curr_event_parent = _event_log->getCurrEvent(); -+ EventLog::const_iterator curr_event = curr_event_parent->children().begin(); -+ EventLog::const_iterator last = curr_event_parent->children().end(); -+ -+ _event_log->blockNotifications(); -+ sp_document_redo(_document); -+ -+ for ( --last ; curr_event != last ; ++curr_event ) { -+ sp_document_redo(_document); -+ } -+ _event_log->blockNotifications(false); -+ -+ _event_log->setCurrEvent(curr_event); -+ _event_log->setCurrEventParent(curr_event_parent); -+ _event_list_selection->select(curr_event_parent); -+ } -+} -+ -+const CellRendererInt::Filter& UndoHistory::greater_than_1 = UndoHistory::GreaterThan(1); -+ -+} // namespace Dialog -+} // namespace UI -+} // namespace Inkscape -+ -+/* -+ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/control-point-selection.h inkscape-0.48.1/src/ui/tool/control-point-selection.h ---- inkscape-0.48.1~/src/ui/tool/control-point-selection.h 2010-08-04 17:45:00.000000000 +0100 -+++ inkscape-0.48.1/src/ui/tool/control-point-selection.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - - #include - #include -+#include - #include - #include <2geom/forward.h> - #include <2geom/point.h> -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/control-point.h inkscape-0.48.1/src/ui/tool/control-point.h ---- inkscape-0.48.1~/src/ui/tool/control-point.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/tool/control-point.h 2011-05-01 00:56:19.611250878 +0100 -@@ -12,6 +12,7 @@ - #define SEEN_UI_TOOL_CONTROL_POINT_H - - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/manipulator.h inkscape-0.48.1/src/ui/tool/manipulator.h ---- inkscape-0.48.1~/src/ui/tool/manipulator.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/tool/manipulator.h 2011-05-01 00:56:19.611250878 +0100 -@@ -13,6 +13,7 @@ - - #include - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h ---- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h 2010-11-06 18:47:19.000000000 +0000 -+++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h 2011-05-01 00:56:19.611250878 +0100 -@@ -11,6 +11,7 @@ - #ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H - #define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H - -+#include - #include - #include "display/display-forward.h" - #include "forward.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig ---- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig 2010-11-06 18:47:19.000000000 +0000 -@@ -0,0 +1,139 @@ -+/** @file -+ * Multi path manipulator - a tool component that edits multiple paths at once -+ */ -+/* Authors: -+ * Krzysztof KosiƄski -+ * -+ * Copyright (C) 2009 Authors -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H -+#define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H -+ -+#include -+#include "display/display-forward.h" -+#include "forward.h" -+#include "ui/tool/commit-events.h" -+#include "ui/tool/manipulator.h" -+#include "ui/tool/modifier-tracker.h" -+#include "ui/tool/node.h" -+#include "ui/tool/node-types.h" -+#include "ui/tool/shape-record.h" -+ -+struct SPCanvasGroup; -+ -+namespace Inkscape { -+namespace UI { -+ -+class PathManipulator; -+class MultiPathManipulator; -+struct PathSharedData; -+ -+/** -+ * Manipulator that manages multiple path manipulators active at the same time. -+ */ -+class MultiPathManipulator : public PointManipulator { -+public: -+ MultiPathManipulator(PathSharedData &data, sigc::connection &chg); -+ virtual ~MultiPathManipulator(); -+ virtual bool event(GdkEvent *event); -+ -+ bool empty() { return _mmap.empty(); } -+ unsigned size() { return _mmap.empty(); } -+ void setItems(std::set const &); -+ void clear() { _mmap.clear(); } -+ void cleanup(); -+ -+ void selectSubpaths(); -+ void shiftSelection(int dir); -+ void invertSelectionInSubpaths(); -+ -+ void setNodeType(NodeType t); -+ void setSegmentType(SegmentType t); -+ -+ void insertNodes(); -+ void duplicateNodes(); -+ void joinNodes(); -+ void breakNodes(); -+ void deleteNodes(bool keep_shape = true); -+ void joinSegments(); -+ void deleteSegments(); -+ void alignNodes(Geom::Dim2 d); -+ void distributeNodes(Geom::Dim2 d); -+ void reverseSubpaths(); -+ void move(Geom::Point const &delta); -+ -+ void showOutline(bool show); -+ void showHandles(bool show); -+ void showPathDirection(bool show); -+ void setLiveOutline(bool set); -+ void setLiveObjects(bool set); -+ void updateOutlineColors(); -+ -+ sigc::signal signal_coords_changed; /// Emitted whenever the coordinates -+ /// shown in the status bar need updating -+private: -+ typedef std::pair > MapPair; -+ typedef std::map > MapType; -+ -+ template -+ void invokeForAll(R (PathManipulator::*method)()) { -+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { -+ ((i->second.get())->*method)(); -+ } -+ } -+ template -+ void invokeForAll(R (PathManipulator::*method)(A), A a) { -+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { -+ ((i->second.get())->*method)(a); -+ } -+ } -+ template -+ void invokeForAll(R (PathManipulator::*method)(A const &), A const &a) { -+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { -+ ((i->second.get())->*method)(a); -+ } -+ } -+ template -+ void invokeForAll(R (PathManipulator::*method)(A,B), A a, B b) { -+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { -+ ((i->second.get())->*method)(a, b); -+ } -+ } -+ -+ void _commit(CommitEvent cps); -+ void _done(gchar const *); -+ void _doneWithCleanup(gchar const *); -+ guint32 _getOutlineColor(ShapeRole role); -+ -+ MapType _mmap; -+public: -+ PathSharedData const &_path_data; -+private: -+ sigc::connection &_changed; -+ ModifierTracker _tracker; -+ bool _show_handles; -+ bool _show_outline; -+ bool _show_path_direction; -+ bool _live_outline; -+ bool _live_objects; -+ -+ friend class PathManipulator; -+}; -+ -+} // namespace UI -+} // namespace Inkscape -+ -+#endif -+ -+/* -+ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/node-tool.h inkscape-0.48.1/src/ui/tool/node-tool.h ---- inkscape-0.48.1~/src/ui/tool/node-tool.h 2010-11-06 18:47:19.000000000 +0000 -+++ inkscape-0.48.1/src/ui/tool/node-tool.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - #include - #include "event-context.h" - #include "forward.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/node.h inkscape-0.48.1/src/ui/tool/node.h ---- inkscape-0.48.1~/src/ui/tool/node.h 2011-01-02 04:34:09.000000000 +0000 -+++ inkscape-0.48.1/src/ui/tool/node.h 2011-05-01 00:56:19.611250878 +0100 -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/view/view.h inkscape-0.48.1/src/ui/view/view.h ---- inkscape-0.48.1~/src/ui/view/view.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/view/view.h 2011-05-01 00:56:19.611250878 +0100 -@@ -15,6 +15,7 @@ - */ - - #include -+#include - #include - #include "message.h" - #include "gc-managed.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/color-picker.h inkscape-0.48.1/src/ui/widget/color-picker.h ---- inkscape-0.48.1~/src/ui/widget/color-picker.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/widget/color-picker.h 2011-05-01 00:56:19.611250878 +0100 -@@ -13,6 +13,7 @@ - #ifndef __COLOR_PICKER_H__ - #define __COLOR_PICKER_H__ - -+#include - #include - #include - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/page-sizer.h inkscape-0.48.1/src/ui/widget/page-sizer.h ---- inkscape-0.48.1~/src/ui/widget/page-sizer.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/widget/page-sizer.h 2011-05-01 00:56:19.611250878 +0100 -@@ -13,6 +13,7 @@ - #define INKSCAPE_UI_WIDGET_PAGE_SIZER__H - - #include -+#include - #include - - #include "helper/units.h" -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/preferences-widget.h inkscape-0.48.1/src/ui/widget/preferences-widget.h ---- inkscape-0.48.1~/src/ui/widget/preferences-widget.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/widget/preferences-widget.h 2011-05-01 00:56:19.611250878 +0100 -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/selected-style.h inkscape-0.48.1/src/ui/widget/selected-style.h ---- inkscape-0.48.1~/src/ui/widget/selected-style.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/widget/selected-style.h 2011-05-01 00:56:19.611250878 +0100 -@@ -23,6 +23,7 @@ - #include - #include - -+#include - #include - - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/style-subject.h inkscape-0.48.1/src/ui/widget/style-subject.h ---- inkscape-0.48.1~/src/ui/widget/style-subject.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/ui/widget/style-subject.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - #include "libnr/nr-rect.h" - #include <2geom/rect.h> - #include "sp-item.h" -+#include - #include - - class SPDesktop; -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/uri-references.h inkscape-0.48.1/src/uri-references.h ---- inkscape-0.48.1~/src/uri-references.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/uri-references.h 2011-05-01 00:56:19.611250878 +0100 -@@ -13,6 +13,7 @@ - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/uri-references.h.orig inkscape-0.48.1/src/uri-references.h.orig ---- inkscape-0.48.1~/src/uri-references.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/uri-references.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,152 @@ -+#ifndef __SP_URI_REFERENCES_H__ -+#define __SP_URI_REFERENCES_H__ -+ -+/* -+ * Helper methods for resolving URI References -+ * -+ * Authors: -+ * Lauris Kaplinski -+ * -+ * Copyright (C) 2001-2002 Lauris Kaplinski -+ * Copyright (C) 2001 Ximian, Inc. -+ * -+ * Released under GNU GPL, read the file 'COPYING' for more information -+ */ -+ -+#include -+#include -+ -+#include "bad-uri-exception.h" -+#include "forward.h" -+ -+namespace Inkscape { -+ -+/** -+ * A class encapsulating a reference to a particular URI; observers can -+ * be notified when the URI comes to reference a different SPObject. -+ * -+ * The URIReference increments and decrements the SPObject's hrefcount -+ * automatically. -+ * -+ * @see SPObject -+ * @see sp_object_href -+ * @see sp_object_hunref -+ */ -+class URIReference : public sigc::trackable { -+public: -+ /** -+ * Constructor. -+ * -+ * @param owner The object on whose behalf this URIReference -+ * is holding a reference to the target object. -+ */ -+ URIReference(SPObject *owner); -+ URIReference(SPDocument *owner_document); -+ -+ /** -+ * Destructor. Calls shutdown() if the reference has not been -+ * shut down yet. -+ */ -+ virtual ~URIReference(); -+ -+ /** -+ * Attaches to a URI, relative to the specified document. -+ * -+ * Throws a BadURIException if the URI is unsupported, -+ * or the fragment identifier is xpointer and malformed. -+ * -+ * @param rel_document document for relative URIs -+ * @param uri the URI to watch -+ */ -+ void attach(const URI &uri) throw(BadURIException); -+ -+ /** -+ * Detaches from the currently attached URI target, if any; -+ * the current referrent is signaled as NULL. -+ */ -+ void detach(); -+ -+ /** -+ * @brief Returns a pointer to the current referrent of the -+ * attached URI, or NULL. -+ * -+ * @return a pointer to the referenced SPObject or NULL -+ */ -+ SPObject *getObject() const { return _obj; } -+ -+ /** -+ * @brief Returns a pointer to the URIReference's owner -+ * -+ * @return a pointer to the URIReference's owner -+ */ -+ SPObject *getOwner() const { return _owner; } -+ -+ /** -+ * Accessor for the referrent change notification signal; -+ * this signal is emitted whenever the URIReference's -+ * referrent changes. -+ * -+ * Signal handlers take two parameters: the old and new -+ * referrents. -+ * -+ * @returns a signal -+ */ -+ sigc::signal changedSignal() { -+ return _changed_signal; -+ } -+ -+ /** -+ * Returns a pointer to a URI containing the currently attached -+ * URI, or NULL if no URI is currently attached. -+ * -+ * @returns the currently attached URI, or NULL -+ */ -+ const URI *getURI() const { -+ return _uri; -+ } -+ -+ /** -+ * Returns true if there is currently an attached URI -+ * -+ * @returns true if there is an attached URI -+ */ -+ bool isAttached() const { -+ return (bool)_uri; -+ } -+ -+ SPDocument *getOwnerDocument() { return _owner_document; } -+ SPObject *getOwnerObject() { return _owner; } -+ -+protected: -+ virtual bool _acceptObject(SPObject *obj) const { -+ (void)obj; -+ return true; -+ } -+ -+private: -+ SPObject *_owner; -+ SPDocument *_owner_document; -+ sigc::connection _connection; -+ sigc::connection _release_connection; -+ SPObject *_obj; -+ URI *_uri; -+ -+ sigc::signal _changed_signal; -+ -+ void _setObject(SPObject *object); -+ void _release(SPObject *object); -+ -+ void operator=(const URIReference &ref); -+ /* Private and definition-less to prevent accidental use. */ -+}; -+ -+} -+ -+/** -+ * Resolves an item referenced by a URI in CSS form contained in "url(...)" -+ */ -+SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri ); -+ -+SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri); -+ -+#endif -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/forward-pointer-iterator.h inkscape-0.48.1/src/util/forward-pointer-iterator.h ---- inkscape-0.48.1~/src/util/forward-pointer-iterator.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/util/forward-pointer-iterator.h 2011-05-01 00:56:19.611250878 +0100 -@@ -15,6 +15,7 @@ - #define SEEN_INKSCAPE_UTIL_FORWARD_POINTER_ITERATOR_H - - #include -+#include - #include "util/reference.h" - - namespace Inkscape { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/share.h inkscape-0.48.1/src/util/share.h ---- inkscape-0.48.1~/src/util/share.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/util/share.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - - #include "gc-core.h" - #include -+#include - - namespace Inkscape { - namespace Util { -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/unordered-containers.h inkscape-0.48.1/src/util/unordered-containers.h ---- inkscape-0.48.1~/src/util/unordered-containers.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/util/unordered-containers.h 2011-05-01 00:56:19.611250878 +0100 -@@ -41,6 +41,8 @@ - # define INK_UNORDERED_MAP __gnu_cxx::hash_map - # define INK_HASH __gnu_cxx::hash - -+#include -+ - namespace __gnu_cxx { - // hash function for pointers - // TR1 and Boost have this defined by default, __gnu_cxx doesn't -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/desktop-widget.h inkscape-0.48.1/src/widgets/desktop-widget.h ---- inkscape-0.48.1~/src/widgets/desktop-widget.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/widgets/desktop-widget.h 2011-05-01 00:56:19.611250878 +0100 -@@ -21,6 +21,7 @@ - #include "ui/view/view-widget.h" - #include "ui/view/edit-widget-interface.h" - -+#include - #include - - // forward declaration -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/desktop-widget.h.orig inkscape-0.48.1/src/widgets/desktop-widget.h.orig ---- inkscape-0.48.1~/src/widgets/desktop-widget.h.orig 1970-01-01 01:00:00.000000000 +0100 -+++ inkscape-0.48.1/src/widgets/desktop-widget.h.orig 2010-07-13 04:48:40.000000000 +0100 -@@ -0,0 +1,268 @@ -+#ifndef SEEN_SP_DESKTOP_WIDGET_H -+#define SEEN_SP_DESKTOP_WIDGET_H -+ -+/** \file -+ * SPDesktopWidget: handling Gtk events on a desktop. -+ * -+ * Authors: -+ * Jon A. Cruz (c) 2010 -+ * John Bintz (c) 2006 -+ * Ralf Stephan (c) 2005, distrib. under GPL2 -+ * ? -2004 -+ */ -+ -+#include -+#include -+ -+#include "display/display-forward.h" -+#include "libnr/nr-point.h" -+#include "forward.h" -+#include "message.h" -+#include "ui/view/view-widget.h" -+#include "ui/view/edit-widget-interface.h" -+ -+#include -+ -+// forward declaration -+typedef struct _EgeColorProfTracker EgeColorProfTracker; -+ -+ -+#define SP_TYPE_DESKTOP_WIDGET SPDesktopWidget::getType() -+#define SP_DESKTOP_WIDGET(o) (GTK_CHECK_CAST ((o), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidget)) -+#define SP_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidgetClass)) -+#define SP_IS_DESKTOP_WIDGET(o) (GTK_CHECK_TYPE ((o), SP_TYPE_DESKTOP_WIDGET)) -+#define SP_IS_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_DESKTOP_WIDGET)) -+ -+void sp_desktop_widget_destroy (SPDesktopWidget* dtw); -+ -+void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, gboolean show); -+void sp_desktop_widget_iconify(SPDesktopWidget *dtw); -+void sp_desktop_widget_maximize(SPDesktopWidget *dtw); -+void sp_desktop_widget_fullscreen(SPDesktopWidget *dtw); -+void sp_desktop_widget_update_zoom(SPDesktopWidget *dtw); -+void sp_desktop_widget_update_rulers (SPDesktopWidget *dtw); -+void sp_desktop_widget_update_hruler (SPDesktopWidget *dtw); -+void sp_desktop_widget_update_vruler (SPDesktopWidget *dtw); -+ -+/* Show/hide rulers & scrollbars */ -+void sp_desktop_widget_toggle_rulers (SPDesktopWidget *dtw); -+void sp_desktop_widget_toggle_scrollbars (SPDesktopWidget *dtw); -+void sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale); -+void sp_desktop_widget_toggle_color_prof_adj( SPDesktopWidget *dtw ); -+ -+void sp_dtw_desktop_activate (SPDesktopWidget *dtw); -+void sp_dtw_desktop_deactivate (SPDesktopWidget *dtw); -+ -+namespace Inkscape { namespace Widgets { class LayerSelector; } } -+ -+namespace Inkscape { namespace UI { namespace Widget { class SelectedStyle; } } } -+ -+namespace Inkscape { namespace UI { namespace Dialogs { class SwatchesPanel; } } } -+ -+/// A GtkEventBox on an SPDesktop. -+struct SPDesktopWidget { -+ SPViewWidget viewwidget; -+ -+ unsigned int update : 1; -+ -+ sigc::connection modified_connection; -+ -+ GtkTooltips *tt; -+ -+ SPDesktop *desktop; -+ -+ Gtk::Window *window; -+ -+ // The root vbox of the window layout. -+ GtkWidget *vbox; -+ -+ GtkWidget *hbox; -+ -+ GtkWidget *menubar, *statusbar; -+ -+ Inkscape::UI::Dialogs::SwatchesPanel *panels; -+ -+ GtkWidget *hscrollbar, *vscrollbar, *vscrollbar_box; -+ -+ /* Rulers */ -+ GtkWidget *hruler, *vruler; -+ GtkWidget *hruler_box, *vruler_box; // eventboxes for setting tooltips -+ -+ GtkWidget *sticky_zoom; -+ GtkWidget *cms_adjust; -+ GtkWidget *coord_status; -+ GtkWidget *coord_status_x; -+ GtkWidget *coord_status_y; -+ GtkWidget *select_status; -+ GtkWidget *select_status_eventbox; -+ GtkWidget *zoom_status; -+ gulong zoom_update; -+ -+ Inkscape::UI::Widget::Dock *dock; -+ -+ Inkscape::UI::Widget::SelectedStyle *selected_style; -+ -+ gint coord_status_id, select_status_id; -+ -+ unsigned int _interaction_disabled_counter; -+ -+ SPCanvas *canvas; -+ Geom::Point ruler_origin; -+ double dt2r; -+ -+ GtkAdjustment *hadj, *vadj; -+ -+ Inkscape::Widgets::LayerSelector *layer_selector; -+ -+ EgeColorProfTracker* _tracker; -+ -+ struct WidgetStub : public Inkscape::UI::View::EditWidgetInterface { -+ SPDesktopWidget *_dtw; -+ SPDesktop *_dt; -+ WidgetStub (SPDesktopWidget* dtw) : _dtw(dtw) {} -+ -+ virtual void setTitle (gchar const *uri) -+ { _dtw->updateTitle (uri); } -+ virtual Gtk::Window* getWindow() -+ { return _dtw->window; } -+ -+ virtual void layout() { -+ _dtw->layoutWidgets(); -+ } -+ -+ virtual void present() -+ { _dtw->presentWindow(); } -+ virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) -+ { _dtw->getWindowGeometry (x, y, w, h); } -+ virtual void setSize (gint w, gint h) -+ { _dtw->setWindowSize (w, h); } -+ virtual void setPosition (Geom::Point p) -+ { _dtw->setWindowPosition (p); } -+ virtual void setTransient (void* p, int transient_policy) -+ { _dtw->setWindowTransient (p, transient_policy); } -+ virtual Geom::Point getPointer() -+ { return _dtw->window_get_pointer(); } -+ virtual void setIconified() -+ { sp_desktop_widget_iconify (_dtw); } -+ virtual void setMaximized() -+ { sp_desktop_widget_maximize (_dtw); } -+ virtual void setFullscreen() -+ { sp_desktop_widget_fullscreen (_dtw); } -+ virtual bool shutdown() -+ { return _dtw->shutdown(); } -+ virtual void destroy() -+ { -+ if(_dtw->window != NULL) -+ delete _dtw->window; -+ _dtw->window = NULL; -+ } -+ -+ virtual void requestCanvasUpdate() -+ { _dtw->requestCanvasUpdate(); } -+ virtual void requestCanvasUpdateAndWait() -+ { _dtw->requestCanvasUpdateAndWait(); } -+ virtual void enableInteraction() -+ { _dtw->enableInteraction(); } -+ virtual void disableInteraction() -+ { _dtw->disableInteraction(); } -+ virtual void activateDesktop() -+ { sp_dtw_desktop_activate (_dtw); } -+ virtual void deactivateDesktop() -+ { sp_dtw_desktop_deactivate (_dtw); } -+ virtual void viewSetPosition (Geom::Point p) -+ { _dtw->viewSetPosition (p); } -+ virtual void updateRulers() -+ { sp_desktop_widget_update_rulers (_dtw); } -+ virtual void updateScrollbars (double scale) -+ { sp_desktop_widget_update_scrollbars (_dtw, scale); } -+ virtual void toggleRulers() -+ { sp_desktop_widget_toggle_rulers (_dtw); } -+ virtual void toggleScrollbars() -+ { sp_desktop_widget_toggle_scrollbars (_dtw); } -+ virtual void toggleColorProfAdjust() -+ { sp_desktop_widget_toggle_color_prof_adj(_dtw); } -+ virtual void updateZoom() -+ { sp_desktop_widget_update_zoom (_dtw); } -+ virtual void letZoomGrabFocus() -+ { _dtw->letZoomGrabFocus(); } -+ virtual void setToolboxFocusTo (const gchar * id) -+ { _dtw->setToolboxFocusTo (id); } -+ virtual void setToolboxAdjustmentValue (const gchar *id, double val) -+ { _dtw->setToolboxAdjustmentValue (id, val); } -+ virtual void setToolboxSelectOneValue (gchar const *id, int val) -+ { _dtw->setToolboxSelectOneValue (id, val); } -+ virtual bool isToolboxButtonActive (gchar const* id) -+ { return _dtw->isToolboxButtonActive (id); } -+ virtual void setCoordinateStatus (Geom::Point p) -+ { _dtw->setCoordinateStatus (p); } -+ virtual void setMessage (Inkscape::MessageType type, gchar const* msg) -+ { _dtw->setMessage (type, msg); } -+ virtual bool warnDialog (gchar* text) -+ { return _dtw->warnDialog (text); } -+ virtual Inkscape::UI::Widget::Dock* getDock () -+ { return _dtw->getDock(); } -+ }; -+ -+ WidgetStub *stub; -+ -+ void setMessage(Inkscape::MessageType type, gchar const *message); -+ Geom::Point window_get_pointer(); -+ bool shutdown(); -+ void viewSetPosition (Geom::Point p); -+ void letZoomGrabFocus(); -+ void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); -+ void setWindowPosition (Geom::Point p); -+ void setWindowSize (gint w, gint h); -+ void setWindowTransient (void *p, int transient_policy); -+ void presentWindow(); -+ bool warnDialog (gchar *text); -+ void setToolboxFocusTo (gchar const *); -+ void setToolboxAdjustmentValue (gchar const * id, double value); -+ void setToolboxSelectOneValue (gchar const * id, gint value); -+ bool isToolboxButtonActive (gchar const *id); -+ void setToolboxPosition(Glib::ustring const& id, GtkPositionType pos); -+ void setCoordinateStatus(Geom::Point p); -+ void requestCanvasUpdate(); -+ void requestCanvasUpdateAndWait(); -+ void enableInteraction(); -+ void disableInteraction(); -+ void updateTitle(gchar const *uri); -+ bool onFocusInEvent(GdkEventFocus*); -+ -+ Inkscape::UI::Widget::Dock* getDock(); -+ -+ static GtkType getType(); -+ static SPDesktopWidget* createInstance(SPNamedView *namedview); -+ -+ void updateNamedview(); -+ -+private: -+ GtkWidget *tool_toolbox; -+ GtkWidget *aux_toolbox; -+ GtkWidget *commands_toolbox,; -+ GtkWidget *snap_toolbox; -+ -+ static void init(SPDesktopWidget *widget); -+ void layoutWidgets(); -+ -+ void namedviewModified(SPObject *obj, guint flags); -+ -+}; -+ -+/// The SPDesktopWidget vtable -+struct SPDesktopWidgetClass { -+ SPViewWidgetClass parent_class; -+}; -+ -+#endif /* !SEEN_SP_DESKTOP_WIDGET_H */ -+ -+/* -+ 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 : -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/gradient-image.h inkscape-0.48.1/src/widgets/gradient-image.h ---- inkscape-0.48.1~/src/widgets/gradient-image.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/widgets/gradient-image.h 2011-05-01 00:56:19.611250878 +0100 -@@ -19,6 +19,7 @@ - - #include - -+#include - #include - - #define SP_TYPE_GRADIENT_IMAGE (sp_gradient_image_get_type ()) -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/gradient-vector.h inkscape-0.48.1/src/widgets/gradient-vector.h ---- inkscape-0.48.1~/src/widgets/gradient-vector.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/widgets/gradient-vector.h 2011-05-01 00:56:19.611250878 +0100 -@@ -17,6 +17,7 @@ - - #include - -+#include - #include - - #include -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/sp-attribute-widget.h inkscape-0.48.1/src/widgets/sp-attribute-widget.h ---- inkscape-0.48.1~/src/widgets/sp-attribute-widget.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/widgets/sp-attribute-widget.h 2011-05-01 00:56:19.611250878 +0100 -@@ -14,6 +14,7 @@ - #define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H - - #include -+#include - #include - - #define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ()) -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp inkscape-0.48.1/src/widgets/sp-color-notebook.cpp ---- inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/widgets/sp-color-notebook.cpp 2011-05-01 00:56:19.611250878 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - #include - #include - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/xml/helper-observer.h inkscape-0.48.1/src/xml/helper-observer.h ---- inkscape-0.48.1~/src/xml/helper-observer.h 2010-07-13 04:48:40.000000000 +0100 -+++ inkscape-0.48.1/src/xml/helper-observer.h 2011-05-01 00:56:19.611250878 +0100 -@@ -5,6 +5,7 @@ - #include "node.h" - #include "../sp-object.h" - //#include "../sp-object-repr.h" -+#include - #include - - namespace Inkscape { === added file 'debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch' --- debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch 1970-01-01 00:00:00 +0000 +++ debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch 2011-05-08 00:22:46 +0000 @@ -0,0 +1,22 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +# Description: Add Unity static quicklist support to inkscape +# Bug: https://launchpad.net/bugs/676886 +# Bug-Ubuntu: https://launchpad.net/bugs/676886 +# Author: Didier Roche +# Applied-Upstream: commit:10201 +# Last-Update: 2011-05-08 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/inkscape.desktop.in inkscape-0.48.1/inkscape.desktop.in +--- inkscape-0.48.1~/inkscape.desktop.in 2010-07-13 05:48:40.000000000 +0200 ++++ inkscape-0.48.1/inkscape.desktop.in 2011-02-17 16:21:42.690388423 +0100 +@@ -12,3 +12,9 @@ + Terminal=false + StartupNotify=true + Icon=inkscape ++X-Ayatana-Desktop-Shortcuts=Drawing ++ ++[Drawing Shortcut Group] ++_Name=New Drawing ++Exec=inkscape ++TargetEnvironment=Unity === added file 'debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch' --- debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch 1970-01-01 00:00:00 +0000 +++ debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch 2011-05-08 00:30:21 +0000 @@ -0,0 +1,25 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## From: Alex Valavanis +## Description: Add translation domain to Desktop Entry file +## This is an Ubuntu-specific fix to allow translations to be stripped +## from the Desktop entry file and read from language packs instead. +## This is needed to save space on installation media because Inkcape is in +## the "main" repository in Ubuntu. Most other distributions do not use this +## method, or recognise the X-Ubuntu-Gettext key, so there is no point in +## forwarding the patch upstream. +## Bug-Ubuntu: https://launchpad.net/bugs/726850 +## Forwarded: not-needed +## Last-Update: 2011-05-08 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' fix-726850~/inkscape.desktop.in fix-726850/inkscape.desktop.in +--- fix-726850~/inkscape.desktop.in 2011-05-08 00:33:13.722220290 +0100 ++++ fix-726850/inkscape.desktop.in 2011-05-08 00:34:01.752220306 +0100 +@@ -12,6 +12,7 @@ + Terminal=false + StartupNotify=true + Icon=inkscape ++X-Ubuntu-Gettext-Domain=inkscape + X-Ayatana-Desktop-Shortcuts=Drawing + + [Drawing Shortcut Group] === added file 'debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch' --- debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch 1970-01-01 00:00:00 +0000 +++ debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch 2011-05-08 00:18:34 +0000 @@ -0,0 +1,4302 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## Author: theAdib +## Author: Alex Valavanis +## Description: Fix build failure with gcc 4.6 +## Bug: https://launchpad.net/bugs/707205 +## Bug-Ubuntu: https://launchpad.net/bugs/707205 +## Bug-Debian: https://bugs.debian.org/625085 +## Applied-Upstream: commit:10196 +## Last-Update: 2011-05-08 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/2geom/utils.h inkscape-0.48.1/src/2geom/utils.h +--- inkscape-0.48.1~/src/2geom/utils.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/2geom/utils.h 2011-05-01 00:56:53.101250888 +0100 +@@ -33,6 +33,7 @@ + * + */ + ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am inkscape-0.48.1/src/Makefile.am +--- inkscape-0.48.1~/src/Makefile.am 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/Makefile.am 2011-05-01 00:56:19.591250878 +0100 +@@ -205,7 +205,7 @@ + + inkscape_SOURCES += main.cpp $(win32_sources) + inkscape_LDADD = $(all_libs) +-inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) ++inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows) + + inkview_SOURCES += inkview.cpp $(win32_sources) + inkview_LDADD = $(all_libs) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/Makefile.am.orig inkscape-0.48.1/src/Makefile.am.orig +--- inkscape-0.48.1~/src/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/Makefile.am.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,277 @@ ++## Process this file with automake to produce Makefile.in ++ ++# ################################################ ++# G L O B A L ++# ################################################ ++ ++# Should work in either automake1.7 or 1.8, but 1.6 doesn't ++# handle foo/libfoo_a_CPPFLAGS properly (if at all). ++# Update: We now avoid setting foo/libfoo_a_CPPFLAGS, ++# so perhaps 1.6 will work. ++AUTOMAKE_OPTIONS = 1.7 subdir-objects ++ ++# Executables compiled by "make" and installed by "make install" ++bin_PROGRAMS = inkscape inkview ++ ++# Libraries which should be compiled by "make" but not installed. ++# Use this only for libraries that are really standalone, rather than for ++# source tree subdirectories. ++#if WITH_INKBOARD ++#libpedro = pedro/libpedro.a ++#endif ++noinst_LIBRARIES = \ ++ libinkscape.a \ ++ dom/libdom.a \ ++ libcroco/libcroco.a \ ++ libavoid/libavoid.a \ ++ libgdl/libgdl.a \ ++ libcola/libcola.a \ ++ libvpsc/libvpsc.a \ ++ livarot/libvarot.a \ ++ 2geom/lib2geom.a \ ++ $(libpedro) \ ++ libinkversion.a ++ ++all_libs = \ ++ $(noinst_LIBRARIES) \ ++ $(INKSCAPE_LIBS) \ ++ $(GNOME_VFS_LIBS) \ ++ $(XFT_LIBS) \ ++ $(FREETYPE_LIBS) \ ++ $(kdeldadd) \ ++ $(win32ldflags) \ ++ $(CARBON_LDFLAGS) \ ++ $(PERL_LIBS) \ ++ $(PYTHON_LIBS) \ ++ $(INKBOARD_LIBS) \ ++ $(LIBWPG_LIBS) \ ++ $(IMAGEMAGICK_LIBS) ++ ++# Add sources common for Inkscape and Inkview to this variable. ++ink_common_sources = ++# Add Inkscape-only sources here. ++inkscape_SOURCES = ++# Add Inkview-only sources here. ++inkview_SOURCES = ++ ++INCLUDES = \ ++ $(PERL_CFLAGS) $(PYTHON_CFLAGS) \ ++ $(FREETYPE_CFLAGS) \ ++ $(GNOME_PRINT_CFLAGS) \ ++ $(GNOME_VFS_CFLAGS) \ ++ $(IMAGEMAGICK_CFLAGS) \ ++ $(INKBOARD_CFLAGS) \ ++ $(LIBWPG_CFLAGS) \ ++ $(XFT_CFLAGS) \ ++ $(LCMS_CFLAGS) \ ++ $(POPPLER_CFLAGS) \ ++ $(POPPLER_GLIB_CFLAGS) \ ++ -DPOTRACE=\"potrace\" \ ++ $(INKSCAPE_CFLAGS) \ ++ -I$(top_srcdir)/cxxtest \ ++ $(WIN32_CFLAGS) \ ++ -I$(srcdir)/bind/javainc \ ++ -I$(srcdir)/bind/javainc/linux \ ++ $(AM_CPPFLAGS) ++ ++CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl ++CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE) ++CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS) ++# Add test cases to this variable ++CXXTEST_TESTSUITES = ++ ++# ################################################ ++# ++# E X T R A ++# ++# ################################################ ++ ++if PLATFORM_WIN32 ++win32_sources = winmain.cpp registrytool.cpp registrytool.h ++win32ldflags = -lcomdlg32 -lmscms ++mwindows = -mwindows ++endif ++ ++if INKJAR ++inkjar_dir = inkjar ++inkjar_libs = inkjar/libinkjar.a ++endif ++ ++# Include all partial makefiles from subdirectories ++include Makefile_insert ++include application/Makefile_insert ++include bind/Makefile_insert ++include dialogs/Makefile_insert ++include display/Makefile_insert ++include dom/Makefile_insert ++include extension/Makefile_insert ++include extension/implementation/Makefile_insert ++include extension/internal/Makefile_insert ++include extension/script/Makefile_insert ++include filters/Makefile_insert ++include helper/Makefile_insert ++include io/Makefile_insert ++#include pedro/Makefile_insert ++#include jabber_whiteboard/Makefile_insert ++include libcroco/Makefile_insert ++include libgdl/Makefile_insert ++include libnr/Makefile_insert ++include libnrtype/Makefile_insert ++include libavoid/Makefile_insert ++include livarot/Makefile_insert ++include live_effects/Makefile_insert ++include live_effects/parameter/Makefile_insert ++include libvpsc/Makefile_insert ++include libcola/Makefile_insert ++include svg/Makefile_insert ++include widgets/Makefile_insert ++include debug/Makefile_insert ++include xml/Makefile_insert ++include ui/Makefile_insert ++include ui/cache/Makefile_insert ++include ui/dialog/Makefile_insert ++include ui/tool/Makefile_insert ++include ui/view/Makefile_insert ++include ui/widget/Makefile_insert ++include util/Makefile_insert ++include trace/Makefile_insert ++include 2geom/Makefile_insert ++ ++# Extra files not mentioned as sources to include in the source tarball ++EXTRA_DIST = \ ++ $(top_srcdir)/Doxyfile \ ++ sp-skeleton.cpp sp-skeleton.h \ ++ util/makefile.in \ ++ application/makefile.in \ ++ bind/makefile.in \ ++ debug/makefile.in \ ++ dialogs/makefile.in \ ++ display/makefile.in \ ++ dom/makefile.in \ ++ extension/implementation/makefile.in \ ++ extension/internal/makefile.in \ ++ extension/makefile.in \ ++ extension/script/makefile.in \ ++ filters/makefile.in \ ++ helper/makefile.in \ ++ io/makefile.in \ ++ io/crystalegg.xml \ ++ io/doc2html.xsl \ ++ pedro/makefile.in \ ++ jabber_whiteboard/makefile.in \ ++ libgdl/makefile.in \ ++ libcroco/makefile.in \ ++ libnr/makefile.in \ ++ libnrtype/makefile.in \ ++ libavoid/makefile.in \ ++ livarot/makefile.in \ ++ live_effects/makefile.in \ ++ live_effects/parameter/makefile.in \ ++ svg/makefile.in \ ++ trace/makefile.in \ ++ ui/makefile.in \ ++ ui/cache/makefile.in \ ++ ui/dialog/makefile.in \ ++ ui/view/makefile.in \ ++ ui/widget/makefile.in \ ++ util/makefile.in \ ++ widgets/makefile.in \ ++ xml/makefile.in \ ++ 2geom/makefile.in \ ++ extension/internal/win32.cpp \ ++ extension/internal/win32.h \ ++ extension/internal/emf-win32-inout.cpp \ ++ extension/internal/emf-win32-inout.h \ ++ extension/internal/emf-win32-print.cpp \ ++ extension/internal/emf-win32-print.h \ ++ helper/sp-marshal.list \ ++ show-preview.bmp \ ++ winconsole.cpp \ ++ $(jabber_whiteboard_SOURCES) \ ++ $(CXXTEST_TEMPLATE) ++ ++# Extra files to remove when doing "make distclean" ++DISTCLEANFILES = \ ++ helper/sp-marshal.cpp \ ++ helper/sp-marshal.h \ ++ inkscape-version.cpp ++ ++# ################################################ ++# B I N A R I E S ++# ################################################ ++ ++# this should speed up the build ++libinkscape_a_SOURCES = $(ink_common_sources) ++ ++inkscape_SOURCES += main.cpp $(win32_sources) ++inkscape_LDADD = $(all_libs) ++inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows) ++ ++inkview_SOURCES += inkview.cpp $(win32_sources) ++inkview_LDADD = $(all_libs) ++inkview_LDFLAGS = $(mwindows) ++ ++# ################################################ ++# VERSION REPORTING ++# ################################################ ++ ++libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h ++ ++if USE_BZR_VERSION ++inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision ++endif ++ ++# If this is an BZR snapshot build, regenerate this file every time ++# someone updates the BZR working directory. ++inkscape-version.cpp: $(inkscape_version_deps) ++ VER_PREFIX="$(VERSION)";\ ++ VER_BZRREV=" r`bzr revno`"; \ ++ if test ! -z "`bzr status -S -V $(srcdir)`"; then \ ++ VER_CUSTOM=" custom"; \ ++ fi; \ ++ VERSION="$$VER_PREFIX$$VER_BZRREV$$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 ++ ++# ################################# ++# ## TESTING STUFF (make check) ### ++# ################################# ++ ++# List of all programs that should be built before testing. Note that this is ++# different from TESTS, because some tests can be scripts that don't ++# need to be built. There should be one test program per directory. ++# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items: ++# TESTS items can be scripts etc. ++check_PROGRAMS = cxxtests ++ ++# streamtest is unfinished and can't handle the relocations done during ++# "make distcheck". ++ ++# List of all tests to be run. ++TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests ++XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests ++ ++# including the the testsuites here ensures that they get distributed ++cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES) ++cxxtests_LDADD = $(all_libs) ++ ++cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE) ++ $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES) ++ ++# ################################################ ++# D I S T ++# ################################################ ++ ++dist-hook: ++ mkdir $(distdir)/pixmaps ++ cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps ++ ++distclean-local: ++ rm -f cxxtests.xml cxxtests.log +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/arc-context.h inkscape-0.48.1/src/arc-context.h +--- inkscape-0.48.1~/src/arc-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/arc-context.h 2011-05-01 00:56:19.591250878 +0100 +@@ -15,6 +15,7 @@ + * Released under GNU GPL, read the file 'COPYING' for more information + */ + ++#include + #include + + #include <2geom/point.h> +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/box3d-context.h inkscape-0.48.1/src/box3d-context.h +--- inkscape-0.48.1~/src/box3d-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/box3d-context.h 2011-05-01 00:56:19.591250878 +0100 +@@ -15,6 +15,7 @@ + * Released under GNU GPL + */ + ++#include + #include + #include "event-context.h" + #include "proj_pt.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/conn-avoid-ref.h inkscape-0.48.1/src/conn-avoid-ref.h +--- inkscape-0.48.1~/src/conn-avoid-ref.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/conn-avoid-ref.h 2011-05-01 00:56:19.591250878 +0100 +@@ -14,6 +14,7 @@ + */ + + #include ++#include + #include + + struct SPDesktop; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connection-pool.h inkscape-0.48.1/src/connection-pool.h +--- inkscape-0.48.1~/src/connection-pool.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/connection-pool.h 2011-05-01 00:56:19.591250878 +0100 +@@ -3,6 +3,7 @@ + + #include + #include ++#include + #include + + namespace Inkscape +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/connector-context.h inkscape-0.48.1/src/connector-context.h +--- inkscape-0.48.1~/src/connector-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/connector-context.h 2011-05-01 00:56:19.591250878 +0100 +@@ -12,6 +12,7 @@ + * Released under GNU GPL, read the file 'COPYING' for more information + */ + ++#include + #include + #include + #include "event-context.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h inkscape-0.48.1/src/desktop.h +--- inkscape-0.48.1~/src/desktop.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/desktop.h 2011-05-01 00:56:19.591250878 +0100 +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + + #include <2geom/matrix.h> +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/desktop.h.orig inkscape-0.48.1/src/desktop.h.orig +--- inkscape-0.48.1~/src/desktop.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/desktop.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,379 @@ ++#ifndef SEEN_SP_DESKTOP_H ++#define SEEN_SP_DESKTOP_H ++ ++/** \file ++ * SPDesktop: an editable view. ++ * ++ * Author: ++ * Lauris Kaplinski ++ * Frank Felfe ++ * bulia byak ++ * Ralf Stephan ++ * John Bintz ++ * Johan Engelen ++ * ++ * Copyright (C) 2007 Johan Engelen ++ * Copyright (C) 2006 John Bintz ++ * Copyright (C) 1999-2005 authors ++ * Copyright (C) 2000-2001 Ximian, Inc. ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ * ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include ++#include ++#include ++ ++#include <2geom/matrix.h> ++#include <2geom/rect.h> ++ ++#include "ui/view/view.h" ++#include "ui/view/edit-widget-interface.h" ++ ++#include "display/rendermode.h" ++#include "display/snap-indicator.h" ++ ++class SPCSSAttr; ++struct SPCanvas; ++struct SPCanvasItem; ++struct SPCanvasGroup; ++struct SPEventContext; ++struct SPItem; ++struct SPNamedView; ++struct SPObject; ++struct SPStyle; ++ ++namespace Gtk ++{ ++ class Window; ++} ++ ++typedef int sp_verb_t; ++ ++ ++ ++namespace Inkscape { ++ class Application; ++ class MessageContext; ++ class Selection; ++ class ObjectHierarchy; ++ class LayerManager; ++ class EventLog; ++ namespace UI { ++ namespace Dialog { ++ class DialogManager; ++ } ++ } ++ namespace Whiteboard { ++ class SessionManager; ++ } ++ namespace Display { ++ class TemporaryItemList; ++ class TemporaryItem; ++ //class SnapIndicator; ++ } ++} ++ ++/** ++ * Editable view. ++ * ++ * @see \ref desktop-handles.h for desktop macros. ++ */ ++struct SPDesktop : public Inkscape::UI::View::View ++{ ++ Inkscape::UI::Dialog::DialogManager *_dlg_mgr; ++ SPNamedView *namedview; ++ SPCanvas *canvas; ++ /// current selection; will never generally be NULL ++ Inkscape::Selection *selection; ++ SPEventContext *event_context; ++ Inkscape::LayerManager *layer_manager; ++ Inkscape::EventLog *event_log; ++ ++ Inkscape::Display::TemporaryItemList *temporary_item_list; ++ Inkscape::Display::SnapIndicator *snapindicator; ++ ++ SPCanvasItem *acetate; ++ SPCanvasGroup *main; ++ SPCanvasGroup *gridgroup; ++ SPCanvasGroup *guides; ++ SPCanvasItem *drawing; ++ SPCanvasGroup *sketch; ++ SPCanvasGroup *controls; ++ SPCanvasGroup *tempgroup; ///< contains temporary canvas items ++ SPCanvasItem *table; ///< outside-of-page background ++ SPCanvasItem *page; ///< page background ++ SPCanvasItem *page_border; ///< page border ++ SPCSSAttr *current; ///< current style ++ bool _focusMode; ///< Whether we're focused working or general working ++ ++ GList *zooms_past; ++ GList *zooms_future; ++ bool _quick_zoom_enabled; ///< Signifies that currently we're in quick zoom mode ++ Geom::Rect _quick_zoom_stored_area; ///< The area of the screen before quick zoom ++ unsigned int dkey; ++ unsigned int number; ++ guint window_state; ++ unsigned int interaction_disabled_counter; ++ bool waiting_cursor; ++ ++ /// \todo fixme: This has to be implemented in different way */ ++ guint guides_active : 1; ++ ++ // storage for selected dragger used by GrDrag as it's ++ // created and deleted by tools ++ SPItem *gr_item; ++ guint gr_point_type; ++ guint gr_point_i; ++ bool gr_fill_or_stroke; ++ ++ ++ Inkscape::ObjectHierarchy *_layer_hierarchy; ++ gchar * _reconstruction_old_layer_id; ++ ++ sigc::signal _tool_changed; ++ sigc::signal _layer_changed_signal; ++ sigc::signal::accumulated _set_style_signal; ++ sigc::signal::accumulated _query_style_signal; ++ ++ /// Emitted when the zoom factor changes (not emitted when scrolling). ++ /// The parameter is the new zoom factor ++ sigc::signal signal_zoom_changed; ++ ++ sigc::connection connectDocumentReplaced (const sigc::slot & slot) ++ { ++ return _document_replaced_signal.connect (slot); ++ } ++ ++ sigc::connection connectEventContextChanged (const sigc::slot & slot) ++ { ++ return _event_context_changed_signal.connect (slot); ++ } ++ sigc::connection connectSetStyle (const sigc::slot & slot) ++ { ++ return _set_style_signal.connect (slot); ++ } ++ sigc::connection connectQueryStyle (const sigc::slot & slot) ++ { ++ return _query_style_signal.connect (slot); ++ } ++ // subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection ++ sigc::connection connectToolSubselectionChanged(const sigc::slot & slot) { ++ return _tool_subselection_changed.connect(slot); ++ } ++ void emitToolSubselectionChanged(gpointer data); ++ sigc::connection connectCurrentLayerChanged(const sigc::slot & slot) { ++ return _layer_changed_signal.connect(slot); ++ } ++ ++ // Whiteboard changes ++ ++#ifdef WITH_INKBOARD ++ Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() { ++ return _whiteboard_session_manager; ++ } ++ ++ Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager; ++#endif ++ ++ SPDesktop(); ++ void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget); ++ virtual ~SPDesktop(); ++ void destroy(); ++ ++ Inkscape::MessageContext *guidesMessageContext() const { ++ return _guides_message_context; ++ } ++ ++ Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom = true); ++ void remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem); ++ ++ void _setDisplayMode(Inkscape::RenderMode mode); ++ void setDisplayModeNormal() { ++ _setDisplayMode(Inkscape::RENDERMODE_NORMAL); ++ } ++ void setDisplayModeNoFilters() { ++ _setDisplayMode(Inkscape::RENDERMODE_NO_FILTERS); ++ } ++ void setDisplayModeOutline() { ++ _setDisplayMode(Inkscape::RENDERMODE_OUTLINE); ++ } ++// void setDisplayModePrintColorsPreview() { ++// _setDisplayMode(Inkscape::RENDERMODE_PRINT_COLORS_PREVIEW); ++// } ++ void displayModeToggle(); ++ Inkscape::RenderMode _display_mode; ++ Inkscape::RenderMode getMode() const { return _display_mode; } ++ ++ Inkscape::UI::Widget::Dock* getDock() { return _widget->getDock(); } ++ ++ void set_active (bool new_active); ++ SPObject *currentRoot() const; ++ SPObject *currentLayer() const; ++ void setCurrentLayer(SPObject *object); ++ void toggleLayerSolo(SPObject *object); ++ SPObject *layerForObject(SPObject *object); ++ bool isLayer(SPObject *object) const; ++ bool isWithinViewport(SPItem *item) const; ++ bool itemIsHidden(SPItem const *item) const; ++ ++ void activate_guides (bool activate); ++ void change_document (SPDocument *document); ++ ++ void set_event_context (GtkType type, const gchar *config); ++ void push_event_context (GtkType type, const gchar *config, unsigned int key); ++ ++ void set_coordinate_status (Geom::Point p); ++ SPItem *item_from_list_at_point_bottom (const GSList *list, Geom::Point const p) const; ++ SPItem *item_at_point (Geom::Point const p, bool into_groups, SPItem *upto = NULL) const; ++ SPItem *group_at_point (Geom::Point const p) const; ++ Geom::Point point() const; ++ ++ Geom::Rect get_display_area() const; ++ void set_display_area (double x0, double y0, double x1, double y1, double border, bool log = true); ++ void set_display_area(Geom::Rect const &a, Geom::Coord border, bool log = true); ++ void zoom_absolute (double cx, double cy, double zoom); ++ void zoom_relative (double cx, double cy, double zoom); ++ void zoom_absolute_keep_point (double cx, double cy, double px, double py, double zoom); ++ void zoom_relative_keep_point (double cx, double cy, double zoom); ++ void zoom_relative_keep_point (Geom::Point const &c, double const zoom) ++ { ++ zoom_relative_keep_point (c[Geom::X], c[Geom::Y], zoom); ++ } ++ ++ void zoom_page(); ++ void zoom_page_width(); ++ void zoom_drawing(); ++ void zoom_selection(); ++ void zoom_grab_focus(); ++ double current_zoom() const { return _d2w.descrim(); } ++ void prev_zoom(); ++ void next_zoom(); ++ void zoom_quick(bool enable = true); ++ /** \brief Returns whether the desktop is in quick zoom mode or not */ ++ bool quick_zoomed(void) { return _quick_zoom_enabled; } ++ ++ bool scroll_to_point (Geom::Point const &s_dt, gdouble autoscrollspeed = 0); ++ void scroll_world (double dx, double dy, bool is_scrolling = false); ++ void scroll_world (Geom::Point const scroll, bool is_scrolling = false) ++ { ++ scroll_world(scroll[Geom::X], scroll[Geom::Y], is_scrolling); ++ } ++ void scroll_world_in_svg_coords (double dx, double dy, bool is_scrolling = false); ++ ++ void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); ++ void setWindowPosition (Geom::Point p); ++ void setWindowSize (gint w, gint h); ++ void setWindowTransient (void* p, int transient_policy=1); ++ Gtk::Window* getToplevel(); ++ void presentWindow(); ++ bool warnDialog (gchar *text); ++ void toggleRulers(); ++ void toggleScrollbars(); ++ void layoutWidget(); ++ void destroyWidget(); ++ void setToolboxFocusTo (gchar const* label); ++ void setToolboxAdjustmentValue (gchar const* id, double val); ++ void setToolboxSelectOneValue (gchar const* id, gint val); ++ bool isToolboxButtonActive (gchar const *id); ++ void updateNow(); ++ void updateCanvasNow(); ++ ++ void enableInteraction(); ++ void disableInteraction(); ++ ++ void setWaitingCursor(); ++ void clearWaitingCursor(); ++ bool isWaitingCursor() const { return waiting_cursor; }; ++ ++ void toggleColorProfAdjust(); ++ ++ void toggleGrids(); ++ void toggleSnapGlobal(); ++ bool gridsEnabled() const { return grids_visible; }; ++ void showGrids(bool show, bool dirty_document = true); ++ ++ bool is_iconified(); ++ bool is_maximized(); ++ bool is_fullscreen(); ++ bool is_focusMode(); ++ ++ void iconify(); ++ void maximize(); ++ void fullscreen(); ++ void focusMode(bool mode = true); ++ ++ Geom::Matrix w2d() const; //transformation from window to desktop coordinates (used for zooming) ++ Geom::Point w2d(Geom::Point const &p) const; ++ Geom::Point d2w(Geom::Point const &p) const; ++ Geom::Matrix doc2dt() const; ++ Geom::Matrix dt2doc() const; ++ Geom::Point doc2dt(Geom::Point const &p) const; ++ Geom::Point dt2doc(Geom::Point const &p) const; ++ ++ virtual void setDocument (SPDocument* doc); ++ virtual bool shutdown(); ++ virtual void mouseover() {} ++ virtual void mouseout() {} ++ ++ virtual bool onDeleteUI (GdkEventAny*); ++ virtual bool onWindowStateEvent (GdkEventWindowState* event); ++ ++private: ++ Inkscape::UI::View::EditWidgetInterface *_widget; ++ Inkscape::Application *_inkscape; ++ Inkscape::MessageContext *_guides_message_context; ++ bool _active; ++ Geom::Matrix _w2d; ++ Geom::Matrix _d2w; ++ Geom::Matrix _doc2dt; ++ ++ bool grids_visible; /* don't set this variable directly, use the method below */ ++ void set_grids_visible(bool visible); ++ ++ void push_current_zoom (GList**); ++ ++ sigc::signal _document_replaced_signal; ++ sigc::signal _activate_signal; ++ sigc::signal _deactivate_signal; ++ sigc::signal _event_context_changed_signal; ++ sigc::signal _tool_subselection_changed; ++ ++ sigc::connection _activate_connection; ++ sigc::connection _deactivate_connection; ++ sigc::connection _sel_modified_connection; ++ sigc::connection _sel_changed_connection; ++ sigc::connection _reconstruction_start_connection; ++ sigc::connection _reconstruction_finish_connection; ++ sigc::connection _commit_connection; ++ sigc::connection _modified_connection; ++ ++ virtual void onPositionSet (double, double); ++ virtual void onResized (double, double); ++ virtual void onRedrawRequested(); ++ virtual void onStatusMessage (Inkscape::MessageType type, gchar const *message); ++ virtual void onDocumentURISet (gchar const* uri); ++ virtual void onDocumentResized (double, double); ++ ++ static void _onActivate (SPDesktop* dt); ++ static void _onDeactivate (SPDesktop* dt); ++ static void _onSelectionModified (Inkscape::Selection *selection, guint flags, SPDesktop *dt); ++}; ++ ++#endif // SEEN_SP_DESKTOP_H ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/dialogs/object-attributes.cpp inkscape-0.48.1/src/dialogs/object-attributes.cpp +--- inkscape-0.48.1~/src/dialogs/object-attributes.cpp 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/dialogs/object-attributes.cpp 2011-05-01 00:56:19.591250878 +0100 +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/display/canvas-temporary-item.h inkscape-0.48.1/src/display/canvas-temporary-item.h +--- inkscape-0.48.1~/src/display/canvas-temporary-item.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/display/canvas-temporary-item.h 2011-05-01 00:56:19.591250878 +0100 +@@ -14,6 +14,7 @@ + + #include "display/display-forward.h" + ++#include + #include + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig inkscape-0.48.1/src/display/canvas-temporary-item.h.orig +--- inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/display/canvas-temporary-item.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,57 @@ ++#ifndef INKSCAPE_CANVAS_TEMPORARY_ITEM_H ++#define INKSCAPE_CANVAS_TEMPORARY_ITEM_H ++ ++/** \file ++ * Provides a class to put a canvasitem temporarily on-canvas. ++ * ++ * Authors: ++ * Johan Engelen ++ * ++ * Copyright (C) Johan Engelen 2008 ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include "display/display-forward.h" ++ ++#include ++ ++namespace Inkscape { ++namespace Display { ++ ++class TemporaryItem { ++public: ++ TemporaryItem(SPCanvasItem *item, guint lifetime, bool destroy_on_deselect = false); ++ virtual ~TemporaryItem(); ++ ++ sigc::signal signal_timeout; ++ ++protected: ++ friend class TemporaryItemList; ++ ++ SPCanvasItem * canvasitem; /** The item we are holding on to */ ++ guint timeout_id; /** ID by which glib knows the timeout event */ ++ bool destroy_on_deselect; // only destroy when parent item is deselected, not when mouse leaves ++ ++ static gboolean _timeout(gpointer data); ///< callback for when lifetime expired ++ ++private: ++ TemporaryItem(const TemporaryItem&); ++ TemporaryItem& operator=(const TemporaryItem&); ++}; ++ ++} //namespace Display ++} //namespace Inkscape ++ ++#endif ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-private.h inkscape-0.48.1/src/document-private.h +--- inkscape-0.48.1~/src/document-private.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/document-private.h 2011-05-01 00:56:19.591250878 +0100 +@@ -14,6 +14,7 @@ + */ + + #include ++#include + #include + #include "xml/event-fns.h" + #include "sp-defs.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-private.h.orig inkscape-0.48.1/src/document-private.h.orig +--- inkscape-0.48.1~/src/document-private.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/document-private.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,79 @@ ++#ifndef __SP_DOCUMENT_PRIVATE_H__ ++#define __SP_DOCUMENT_PRIVATE_H__ ++ ++/* ++ * Seldom needed document data ++ * ++ * Authors: ++ * Lauris Kaplinski ++ * ++ * Copyright (C) 1999-2002 Lauris Kaplinski ++ * Copyright (C) 2001-2002 Ximian, Inc. ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include ++#include ++#include "xml/event-fns.h" ++#include "sp-defs.h" ++#include "sp-root.h" ++#include "document.h" ++ ++#include "composite-undo-stack-observer.h" ++ ++#include "event-log.h" ++ ++// XXX only for testing! ++#include "console-output-undo-observer.h" ++ ++#define SP_DOCUMENT_DEFS(d) ((SPObject *) SP_ROOT (SP_DOCUMENT_ROOT (d))->defs) ++ ++namespace Inkscape { ++namespace XML { ++class Event; ++} ++} ++ ++ ++struct SPDocumentPrivate { ++ typedef std::map IDChangedSignalMap; ++ typedef std::map ResourcesChangedSignalMap; ++ ++ GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */ ++ GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */ ++ ++ unsigned long serial; ++ ++ /** Dictionary of signals for id changes */ ++ IDChangedSignalMap id_changed_signals; ++ ++ /* Resources */ ++ /* It is GHashTable of GSLists */ ++ GHashTable *resources; ++ ResourcesChangedSignalMap resources_changed_signals; ++ ++ SPDocument::ModifiedSignal modified_signal; ++ SPDocument::URISetSignal uri_set_signal; ++ SPDocument::ResizedSignal resized_signal; ++ SPDocument::ReconstructionStart _reconstruction_start_signal; ++ SPDocument::ReconstructionFinish _reconstruction_finish_signal; ++ SPDocument::CommitSignal commit_signal; ++ ++ /* Undo/Redo state */ ++ bool sensitive: true; /* If we save actions to undo stack */ ++ Inkscape::XML::Event * partial; /* partial undo log when interrupted */ ++ int history_size; ++ GSList * undo; /* Undo stack of reprs */ ++ GSList * redo; /* Redo stack of reprs */ ++ ++ /* Undo listener */ ++ Inkscape::CompositeUndoStackObserver undoStackObservers; ++ ++ // XXX only for testing! ++ Inkscape::ConsoleOutputUndoObserver console_output_undo_observer; ++ ++ bool seeking; ++}; ++ ++#endif +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document-subset.h inkscape-0.48.1/src/document-subset.h +--- inkscape-0.48.1~/src/document-subset.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/document-subset.h 2011-05-01 00:56:19.591250878 +0100 +@@ -10,6 +10,7 @@ + #ifndef SEEN_INKSCAPE_DOCUMENT_SUBSET_H + #define SEEN_INKSCAPE_DOCUMENT_SUBSET_H + ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document.h inkscape-0.48.1/src/document.h +--- inkscape-0.48.1~/src/document.h 2010-08-04 17:45:00.000000000 +0100 ++++ inkscape-0.48.1/src/document.h 2011-05-01 00:56:19.601250878 +0100 +@@ -17,6 +17,7 @@ + + #include + #include ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/document.h.orig inkscape-0.48.1/src/document.h.orig +--- inkscape-0.48.1~/src/document.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/document.h.orig 2010-08-04 17:45:00.000000000 +0100 +@@ -0,0 +1,304 @@ ++#ifndef __SP_DOCUMENT_H__ ++#define __SP_DOCUMENT_H__ ++ ++/** \file ++ * SPDocument: Typed SVG document implementation ++ */ ++/* Authors: ++ * Lauris Kaplinski ++ * MenTaLguY ++ * ++ * Copyright (C) 2004-2005 MenTaLguY ++ * Copyright (C) 1999-2002 Lauris Kaplinski ++ * Copyright (C) 2000-2001 Ximian, Inc. ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "libcroco/cr-cascade.h" ++#include <2geom/forward.h> ++ ++#include "gc-managed.h" ++#include "gc-finalized.h" ++#include "gc-anchored.h" ++#include ++#include "verbs.h" ++#include ++#include ++ ++namespace Avoid { ++class Router; ++} ++ ++struct NRRect; ++struct SPDesktop; ++struct SPItem; ++struct SPObject; ++struct SPGroup; ++ ++namespace Inkscape { ++ struct Application; ++ class Selection; ++ class UndoStackObserver; ++ class EventLog; ++ class ProfileManager; ++ namespace XML { ++ class Document; ++ class Node; ++ } ++} ++ ++class SP3DBox; ++class Persp3D; ++class Persp3DImpl; ++ ++namespace Proj { ++ class TransfMat3x4; ++} ++ ++class SPDocumentPrivate; ++ ++/// Typed SVG document implementation. ++struct SPDocument : public Inkscape::GC::Managed<>, ++ public Inkscape::GC::Finalized, ++ public Inkscape::GC::Anchored ++{ ++ typedef sigc::signal IDChangedSignal; ++ typedef sigc::signal ResourcesChangedSignal; ++ typedef sigc::signal ModifiedSignal; ++ typedef sigc::signal URISetSignal; ++ typedef sigc::signal ResizedSignal; ++ typedef sigc::signal ReconstructionStart; ++ typedef sigc::signal ReconstructionFinish; ++ typedef sigc::signal CommitSignal; ++ ++ SPDocument(); ++ virtual ~SPDocument(); ++ ++ unsigned int keepalive : 1; ++ unsigned int virgin : 1; ///< Has the document never been touched? ++ unsigned int modified_since_save : 1; ++ ++ Inkscape::XML::Document *rdoc; ///< Our Inkscape::XML::Document ++ Inkscape::XML::Node *rroot; ///< Root element of Inkscape::XML::Document ++ SPObject *root; ///< Our SPRoot ++ CRCascade *style_cascade; ++ ++ gchar *uri; ///< A filename (not a URI yet), or NULL ++ gchar *base; ///< To be used for resolving relative hrefs. ++ gchar *name; ///< basename(uri) or other human-readable label for the document. ++ ++ SPDocumentPrivate *priv; ++ ++ /// Last action key ++ Glib::ustring actionkey; ++ ++ /// Handler ID ++ guint modified_id; ++ ++ /// Connector rerouting handler ID ++ guint rerouting_handler_id; ++ ++ Inkscape::ProfileManager* profileManager; ++ ++ // Instance of the connector router ++ Avoid::Router *router; ++ ++ GSList *_collection_queue; ++ ++ bool oldSignalsConnected; ++ ++ void setCurrentPersp3D(Persp3D * const persp); ++ inline void setCurrentPersp3DImpl(Persp3DImpl * const persp_impl) { current_persp3d_impl = persp_impl; } ++ /* ++ * getCurrentPersp3D returns current_persp3d (if non-NULL) or the first ++ * perspective in the defs. If no perspective exists, returns NULL. ++ */ ++ Persp3D * getCurrentPersp3D(); ++ Persp3DImpl * getCurrentPersp3DImpl(); ++ void getPerspectivesInDefs(std::vector &list); ++ unsigned int numPerspectivesInDefs() { ++ std::vector list; ++ getPerspectivesInDefs(list); ++ return list.size(); ++ } ++ ++ //void initialize_current_persp3d(); ++ ++ sigc::connection connectModified(ModifiedSignal::slot_type slot); ++ sigc::connection connectURISet(URISetSignal::slot_type slot); ++ sigc::connection connectResized(ResizedSignal::slot_type slot); ++sigc::connection connectCommit(CommitSignal::slot_type slot); ++ ++ void bindObjectToId(gchar const *id, SPObject *object); ++ SPObject *getObjectById(gchar const *id); ++ sigc::connection connectIdChanged(const gchar *id, IDChangedSignal::slot_type slot); ++ ++ void bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object); ++ SPObject *getObjectByRepr(Inkscape::XML::Node *repr); ++ ++ Glib::ustring getLanguage(); ++ ++ void queueForOrphanCollection(SPObject *object); ++ void collectOrphans(); ++ ++ void _emitModified(); ++ ++ void addUndoObserver(Inkscape::UndoStackObserver& observer); ++ void removeUndoObserver(Inkscape::UndoStackObserver& observer); ++ ++ bool _updateDocument(); ++ ++ /// Are we currently in a transition between two "known good" states of the document? ++ bool isSeeking() const; ++ ++ bool isModifiedSinceSave() const { return modified_since_save; } ++ void setModifiedSinceSave(bool modified = true) { ++ modified_since_save = modified; ++ } ++ ++private: ++ SPDocument(SPDocument const &); // no copy ++ void operator=(SPDocument const &); // no assign ++ ++ Persp3D *current_persp3d; /**< Currently 'active' perspective (to which, e.g., newly created boxes are attached) */ ++ Persp3DImpl *current_persp3d_impl; ++ ++public: ++ sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot); ++ sigc::connection connectReconstructionFinish(ReconstructionFinish::slot_type slot); ++ void emitReconstructionStart(void); ++ void emitReconstructionFinish(void); ++ ++ unsigned long serial() const; ++ void reset_key(void *dummy); ++ sigc::connection _selection_changed_connection; ++ sigc::connection _desktop_activated_connection; ++ ++ void fitToRect(Geom::Rect const &rect, bool with_margins = false); ++}; ++ ++SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false); ++SPDocument *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive); ++ ++SPDocument *sp_document_ref(SPDocument *doc); ++SPDocument *sp_document_unref(SPDocument *doc); ++ ++ ++SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive); ++ ++/* ++ * Access methods ++ */ ++ ++#define sp_document_repr_doc(d) (d->rdoc) ++#define sp_document_repr_root(d) (d->rroot) ++#define sp_document_root(d) (d->root) ++#define SP_DOCUMENT_ROOT(d) (d->root) ++ ++gdouble sp_document_width(SPDocument *document); ++gdouble sp_document_height(SPDocument *document); ++Geom::Point sp_document_dimensions(SPDocument *document); ++ ++struct SPUnit; ++ ++void sp_document_set_width(SPDocument *document, gdouble width, const SPUnit *unit); ++void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit *unit); ++ ++#define SP_DOCUMENT_URI(d) (d->uri) ++#define SP_DOCUMENT_NAME(d) (d->name) ++#define SP_DOCUMENT_BASE(d) (d->base) ++ ++/* ++ * Dictionary ++ */ ++ ++/* ++ * Undo & redo ++ */ ++ ++void sp_document_set_undo_sensitive(SPDocument *document, bool sensitive); ++bool sp_document_get_undo_sensitive(SPDocument const *document); ++ ++void sp_document_clear_undo(SPDocument *document); ++void sp_document_clear_redo(SPDocument *document); ++ ++void sp_document_child_added(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); ++void sp_document_child_removed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); ++void sp_document_attr_changed(SPDocument *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval); ++void sp_document_content_changed(SPDocument *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent); ++void sp_document_order_changed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref); ++ ++/* Object modification root handler */ ++void sp_document_request_modified(SPDocument *doc); ++gint sp_document_ensure_up_to_date(SPDocument *doc); ++ ++/* Save all previous actions to stack, as one undo step */ ++void sp_document_done(SPDocument *document, unsigned int event_type, Glib::ustring event_description); ++void sp_document_maybe_done(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description); ++void sp_document_reset_key(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base); ++ ++/* Cancel (and revert) current unsaved actions */ ++void sp_document_cancel(SPDocument *document); ++ ++/* Undo and redo */ ++gboolean sp_document_undo(SPDocument *document); ++gboolean sp_document_redo(SPDocument *document); ++ ++/* Resource management */ ++gboolean sp_document_add_resource(SPDocument *document, const gchar *key, SPObject *object); ++gboolean sp_document_remove_resource(SPDocument *document, const gchar *key, SPObject *object); ++const GSList *sp_document_get_resource_list(SPDocument *document, const gchar *key); ++sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot); ++ ++ ++/* ++ * Ideas: How to overcome style invalidation nightmare ++ * ++ * 1. There is reference request dictionary, that contains ++ * objects (styles) needing certain id. Object::build checks ++ * final id against it, and invokes necesary methods ++ * ++ * 2. Removing referenced object is simply prohibited - ++ * needs analyse, how we can deal with situations, where ++ * we simply want to ungroup etc. - probably we need ++ * Repr::reparent method :( [Or was it ;)] ++ * ++ */ ++ ++/* ++ * Misc ++ */ ++ ++GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); ++GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box); ++SPItem *sp_document_item_from_list_at_point_bottom(unsigned int dkey, SPGroup *group, const GSList *list, Geom::Point const p, bool take_insensitive = false); ++SPItem *sp_document_item_at_point (SPDocument *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL); ++GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector points); ++SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key, Geom::Point const p); ++ ++void sp_document_set_uri(SPDocument *document, gchar const *uri); ++void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *uri); ++ ++void sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height); ++ ++unsigned int vacuum_document(SPDocument *document); ++ ++ ++#endif ++ ++/* ++ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/draw-context.h inkscape-0.48.1/src/draw-context.h +--- inkscape-0.48.1~/src/draw-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/draw-context.h 2011-05-01 00:56:19.601250878 +0100 +@@ -14,6 +14,7 @@ + * Released under GNU GPL + */ + ++#include + #include + #include "event-context.h" + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/extension/timer.h inkscape-0.48.1/src/extension/timer.h +--- inkscape-0.48.1~/src/extension/timer.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/extension/timer.h 2011-05-01 00:56:19.601250878 +0100 +@@ -13,6 +13,7 @@ + #ifndef INKSCAPE_EXTENSION_TIMER_H__ + #define INKSCAPE_EXTENSION_TIMER_H__ + ++#include + #include + #include + #include "extension-forward.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/flood-context.h inkscape-0.48.1/src/flood-context.h +--- inkscape-0.48.1~/src/flood-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/flood-context.h 2011-05-01 00:56:19.601250878 +0100 +@@ -11,6 +11,7 @@ + * Released under GNU GPL + */ + ++#include + #include + #include + #include "event-context.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc-alloc.h inkscape-0.48.1/src/gc-alloc.h +--- inkscape-0.48.1~/src/gc-alloc.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/gc-alloc.h 2011-05-01 00:56:19.601250878 +0100 +@@ -16,6 +16,7 @@ + #define SEEN_INKSCAPE_GC_ALLOC_H + + #include ++#include + #include "gc-core.h" + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc-finalized.h inkscape-0.48.1/src/gc-finalized.h +--- inkscape-0.48.1~/src/gc-finalized.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/gc-finalized.h 2011-05-01 00:56:19.601250878 +0100 +@@ -17,6 +17,7 @@ + #define SEEN_INKSCAPE_GC_FINALIZED_H + + #include ++#include + #include "gc-core.h" + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gc.cpp inkscape-0.48.1/src/gc.cpp +--- inkscape-0.48.1~/src/gc.cpp 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/gc.cpp 2011-05-01 00:56:19.601250878 +0100 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + namespace Inkscape { + namespace GC { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gradient-context.h inkscape-0.48.1/src/gradient-context.h +--- inkscape-0.48.1~/src/gradient-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/gradient-context.h 2011-05-01 00:56:19.601250878 +0100 +@@ -15,6 +15,7 @@ + * Released under GNU GPL + */ + ++#include + #include + #include "event-context.h" + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/gradient-drag.h inkscape-0.48.1/src/gradient-drag.h +--- inkscape-0.48.1~/src/gradient-drag.h 2010-08-04 17:45:00.000000000 +0100 ++++ inkscape-0.48.1/src/gradient-drag.h 2011-05-01 00:56:19.601250878 +0100 +@@ -15,6 +15,7 @@ + */ + + #include ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/knot.h inkscape-0.48.1/src/knot.h +--- inkscape-0.48.1~/src/knot.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/knot.h 2011-05-01 00:56:19.601250878 +0100 +@@ -20,6 +20,7 @@ + #include "forward.h" + #include <2geom/point.h> + #include "knot-enums.h" ++#include + #include + + class SPKnot; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/knot.h.orig inkscape-0.48.1/src/knot.h.orig +--- inkscape-0.48.1~/src/knot.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/knot.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,192 @@ ++#ifndef __SP_KNOT_H__ ++#define __SP_KNOT_H__ ++ ++/** \file ++ * Declarations for SPKnot: Desktop-bound visual control object. ++ */ ++/* ++ * Authors: ++ * Lauris Kaplinski ++ * ++ * Copyright (C) 1999-2002 authors ++ * Copyright (C) 2001-2002 Ximian, Inc. ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include ++#include ++#include "display/display-forward.h" ++#include "forward.h" ++#include <2geom/point.h> ++#include "knot-enums.h" ++#include ++ ++class SPKnot; ++class SPKnotClass; ++ ++#define SP_TYPE_KNOT (sp_knot_get_type()) ++#define SP_KNOT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_KNOT, SPKnot)) ++#define SP_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_KNOT, SPKnotClass)) ++#define SP_IS_KNOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_KNOT)) ++#define SP_IS_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_KNOT)) ++ ++/** ++ * Desktop-bound visual control object. ++ * ++ * A knot is a draggable object, with callbacks to change something by ++ * dragging it, visuably represented by a canvas item (mostly square). ++ */ ++struct SPKnot : GObject { ++ SPDesktop *desktop; /**< Desktop we are on. */ ++ SPCanvasItem *item; /**< Our CanvasItem. */ ++ guint flags; ++ ++ guint size; /**< Always square. */ ++ Geom::Point pos; /**< Our desktop coordinates. */ ++ Geom::Point grabbed_rel_pos; /**< Grabbed relative position. */ ++ Geom::Point drag_origin; /**< Origin of drag. */ ++ GtkAnchorType anchor; /**< Anchor. */ ++ ++ SPKnotShapeType shape; /**< Shape type. */ ++ SPKnotModeType mode; ++ ++ guint32 fill[SP_KNOT_VISIBLE_STATES]; ++ guint32 stroke[SP_KNOT_VISIBLE_STATES]; ++ guchar *image[SP_KNOT_VISIBLE_STATES]; ++ ++ GdkCursor *cursor[SP_KNOT_VISIBLE_STATES]; ++ ++ GdkCursor *saved_cursor; ++ gpointer pixbuf; ++ ++ gchar *tip; ++ ++ gulong _event_handler_id; ++ ++ double pressure; /**< The tablet pen pressure when the knot is being dragged. */ ++ ++ // C++ signals ++ /** ++ sigc::signal _moved_signal; ++ sigc::signal _click_signal; ++ sigc::signal _ungrabbed_signal; ++ **/ ++ sigc::signal _moved_signal; ++ sigc::signal _click_signal; ++ sigc::signal _ungrabbed_signal; ++ ++ //TODO: all the members above should eventualle become private, accessible via setters/getters ++ inline void setSize (guint i) {size = i;} ++ inline void setShape (guint i) {shape = (SPKnotShapeType) i;} ++ inline void setAnchor (guint i) {anchor = (GtkAnchorType) i;} ++ inline void setMode (guint i) {mode = (SPKnotModeType) i;} ++ inline void setPixbuf (gpointer p) {pixbuf = p;} ++ inline void setFill (guint32 normal, guint32 mouseover, guint32 dragging) { ++ fill[SP_KNOT_STATE_NORMAL] = normal; ++ fill[SP_KNOT_STATE_MOUSEOVER] = mouseover; ++ fill[SP_KNOT_STATE_DRAGGING] = dragging; ++ } ++ inline void setStroke (guint32 normal, guint32 mouseover, guint32 dragging) { ++ stroke[SP_KNOT_STATE_NORMAL] = normal; ++ stroke[SP_KNOT_STATE_MOUSEOVER] = mouseover; ++ stroke[SP_KNOT_STATE_DRAGGING] = dragging; ++ } ++ inline void setImage (guchar* normal, guchar* mouseover, guchar* dragging) { ++ image[SP_KNOT_STATE_NORMAL] = normal; ++ image[SP_KNOT_STATE_MOUSEOVER] = mouseover; ++ image[SP_KNOT_STATE_DRAGGING] = dragging; ++ } ++ inline void setCursor (GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging) { ++ if (cursor[SP_KNOT_STATE_NORMAL]) { ++ gdk_cursor_unref(cursor[SP_KNOT_STATE_NORMAL]); ++ } ++ cursor[SP_KNOT_STATE_NORMAL] = normal; ++ if (normal) { ++ gdk_cursor_ref(normal); ++ } ++ ++ if (cursor[SP_KNOT_STATE_MOUSEOVER]) { ++ gdk_cursor_unref(cursor[SP_KNOT_STATE_MOUSEOVER]); ++ } ++ cursor[SP_KNOT_STATE_MOUSEOVER] = mouseover; ++ if (mouseover) { ++ gdk_cursor_ref(mouseover); ++ } ++ ++ if (cursor[SP_KNOT_STATE_DRAGGING]) { ++ gdk_cursor_unref(cursor[SP_KNOT_STATE_DRAGGING]); ++ } ++ cursor[SP_KNOT_STATE_DRAGGING] = dragging; ++ if (dragging) { ++ gdk_cursor_ref(dragging); ++ } ++ } ++ ++}; ++ ++/// The SPKnot vtable. ++struct SPKnotClass { ++ GObjectClass parent_class; ++ gint (* event) (SPKnot *knot, GdkEvent *event); ++ ++ /* ++ * These are unconditional. ++ */ ++ ++ void (* clicked) (SPKnot *knot, guint state); ++ void (* doubleclicked) (SPKnot *knot, guint state); ++ void (* grabbed) (SPKnot *knot, guint state); ++ void (* ungrabbed) (SPKnot *knot, guint state); ++ void (* moved) (SPKnot *knot, Geom::Point const &position, guint state); ++ void (* stamped) (SPKnot *know, guint state); ++ ++ /** Request knot to move to absolute position. */ ++ bool (* request) (SPKnot *knot, Geom::Point const &pos, guint state); ++ ++ /** Find complex distance from knot to point. */ ++ gdouble (* distance) (SPKnot *knot, Geom::Point const &pos, guint state); ++}; ++ ++GType sp_knot_get_type(); ++ ++SPKnot *sp_knot_new(SPDesktop *desktop, gchar const *tip = NULL); ++ ++#define SP_KNOT_IS_VISIBLE(k) ((k->flags & SP_KNOT_VISIBLE) != 0) ++#define SP_KNOT_IS_MOUSEOVER(k) ((k->flags & SP_KNOT_MOUSEOVER) != 0) ++#define SP_KNOT_IS_DRAGGING(k) ((k->flags & SP_KNOT_DRAGGING) != 0) ++#define SP_KNOT_IS_GRABBED(k) ((k->flags & SP_KNOT_GRABBED) != 0) ++ ++void sp_knot_show(SPKnot *knot); ++void sp_knot_hide(SPKnot *knot); ++ ++void sp_knot_set_flag(SPKnot *knot, guint flag, bool set); ++void sp_knot_update_ctrl(SPKnot *knot); ++ ++void sp_knot_request_position(SPKnot *knot, Geom::Point const &pos, guint state); ++gdouble sp_knot_distance(SPKnot *knot, Geom::Point const &p, guint state); ++ ++void sp_knot_start_dragging(SPKnot *knot, Geom::Point const &p, gint x, gint y, guint32 etime); ++ ++/** Moves knot and emits "moved" signal. */ ++void sp_knot_set_position(SPKnot *knot, Geom::Point const &p, guint state); ++ ++/** Moves knot without any signal. */ ++void sp_knot_moveto(SPKnot *knot, Geom::Point const &p); ++ ++void sp_knot_handler_request_position(GdkEvent *event, SPKnot *knot); ++Geom::Point sp_knot_position(SPKnot const *knot); ++ ++ ++#endif /* !__SP_KNOT_H__ */ ++ ++/* ++ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/libavoid/geomtypes.h inkscape-0.48.1/src/libavoid/geomtypes.h +--- inkscape-0.48.1~/src/libavoid/geomtypes.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/libavoid/geomtypes.h 2011-05-01 00:56:19.601250878 +0100 +@@ -29,6 +29,7 @@ + #ifndef AVOID_GEOMTYPES_H + #define AVOID_GEOMTYPES_H + ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/lpeobject-reference.h inkscape-0.48.1/src/live_effects/lpeobject-reference.h +--- inkscape-0.48.1~/src/live_effects/lpeobject-reference.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/live_effects/lpeobject-reference.h 2011-05-01 00:56:19.601250878 +0100 +@@ -11,6 +11,7 @@ + + #include + #include ++#include + #include + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path-reference.h inkscape-0.48.1/src/live_effects/parameter/path-reference.h +--- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h 2011-05-01 00:56:19.601250878 +0100 +@@ -11,6 +11,7 @@ + + #include + #include ++#include + #include + + class Path; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig +--- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,60 @@ ++#ifndef SEEN_LPE_PATH_REFERENCE_H ++#define SEEN_LPE_PATH_REFERENCE_H ++ ++/* ++ * The reference corresponding to href of LPE PathParam. ++ * ++ * Copyright (C) 2008 Johan Engelen ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information. ++ */ ++ ++#include ++#include ++#include ++ ++class Path; ++ ++namespace Inkscape { ++ ++namespace XML { ++ struct Node; ++} ++ ++namespace LivePathEffect { ++ ++ ++class PathReference : public Inkscape::URIReference { ++public: ++ PathReference(SPObject *owner) : URIReference(owner) {} ++ ++ SPItem *getObject() const { ++ return (SPItem *)URIReference::getObject(); ++ } ++ ++protected: ++ virtual bool _acceptObject(SPObject * const obj) const; ++ ++private: ++ PathReference(const PathReference&); ++ PathReference& operator=(const PathReference&); ++}; ++ ++} // namespace LivePathEffect ++ ++} // namespace Inkscape ++ ++ ++ ++#endif /* !SEEN_LPE_PATH_REFERENCE_H */ ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/live_effects/parameter/path.h inkscape-0.48.1/src/live_effects/parameter/path.h +--- inkscape-0.48.1~/src/live_effects/parameter/path.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/live_effects/parameter/path.h 2011-05-01 00:56:19.601250878 +0100 +@@ -16,6 +16,7 @@ + + #include "live_effects/parameter/parameter.h" + #include "live_effects/parameter/path-reference.h" ++#include + #include + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/message-stack.h inkscape-0.48.1/src/message-stack.h +--- inkscape-0.48.1~/src/message-stack.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/message-stack.h 2011-05-01 00:56:19.601250878 +0100 +@@ -14,6 +14,7 @@ + #ifndef SEEN_INKSCAPE_MESSAGE_STACK_H + #define SEEN_INKSCAPE_MESSAGE_STACK_H + ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/object-hierarchy.h inkscape-0.48.1/src/object-hierarchy.h +--- inkscape-0.48.1~/src/object-hierarchy.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/object-hierarchy.h 2011-05-01 00:56:19.601250878 +0100 +@@ -14,6 +14,7 @@ + + #include + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/persp3d-reference.h inkscape-0.48.1/src/persp3d-reference.h +--- inkscape-0.48.1~/src/persp3d-reference.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/persp3d-reference.h 2011-05-01 00:56:19.601250878 +0100 +@@ -11,6 +11,7 @@ + */ + + #include "uri-references.h" ++#include + #include + #include "persp3d.h" + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/rect-context.h inkscape-0.48.1/src/rect-context.h +--- inkscape-0.48.1~/src/rect-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/rect-context.h 2011-05-01 00:56:19.601250878 +0100 +@@ -14,6 +14,7 @@ + * Released under GNU GPL + */ + ++#include + #include + #include "event-context.h" + #include "libnr/nr-point.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selcue.h inkscape-0.48.1/src/selcue.h +--- inkscape-0.48.1~/src/selcue.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/selcue.h 2011-05-01 00:56:19.601250878 +0100 +@@ -14,6 +14,7 @@ + */ + + #include ++#include + #include + + class SPDesktop; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selection-describer.h inkscape-0.48.1/src/selection-describer.h +--- inkscape-0.48.1~/src/selection-describer.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/selection-describer.h 2011-05-01 00:56:19.601250878 +0100 +@@ -12,6 +12,7 @@ + #ifndef SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H + #define SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H + ++#include + #include + #include "message-context.h" + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/selection.h inkscape-0.48.1/src/selection.h +--- inkscape-0.48.1~/src/selection.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/selection.h 2011-05-01 00:56:19.601250878 +0100 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + + //#include "libnr/nr-rect.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/seltrans.h inkscape-0.48.1/src/seltrans.h +--- inkscape-0.48.1~/src/seltrans.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/seltrans.h 2011-05-01 00:56:19.601250878 +0100 +@@ -15,6 +15,7 @@ + * Released under GNU GPL, read the file 'COPYING' for more information + */ + ++#include + #include + #include <2geom/point.h> + #include <2geom/matrix.h> +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/seltrans.h.orig inkscape-0.48.1/src/seltrans.h.orig +--- inkscape-0.48.1~/src/seltrans.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/seltrans.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,196 @@ ++#ifndef __SELTRANS_H__ ++#define __SELTRANS_H__ ++ ++/* ++ * Helper object for transforming selected items ++ * ++ * Authors: ++ * Lauris Kaplinski ++ * Carl Hetherington ++ * Diederik van Lierop ++ * ++ * Copyright (C) 2006 Johan Engelen ++ * Copyright (C) 1999-2002 Lauris Kaplinski ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include ++#include <2geom/point.h> ++#include <2geom/matrix.h> ++#include <2geom/rect.h> ++#include "knot.h" ++#include "forward.h" ++#include "selcue.h" ++#include "message-context.h" ++#include ++#include "sp-item.h" ++ ++struct SPKnot; ++class SPDesktop; ++class SPCanvasItem; ++class SPSelTransHandle; ++ ++namespace Inkscape ++{ ++ ++Geom::Scale calcScaleFactors(Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew = false); ++ ++namespace XML ++{ ++ class Node; ++} ++ ++class SelTrans ++{ ++public: ++ SelTrans(SPDesktop *desktop); ++ ~SelTrans(); ++ ++ Inkscape::MessageContext &messageContext() { ++ return _message_context; ++ } ++ ++ void increaseState(); ++ void resetState(); ++ void setCenter(Geom::Point const &p); ++ void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles, bool translating); ++ void transform(Geom::Matrix const &rel_affine, Geom::Point const &norm); ++ void ungrab(); ++ void stamp(); ++ void moveTo(Geom::Point const &xy, guint state); ++ void stretch(SPSelTransHandle const &handle, Geom::Point &pt, guint state); ++ void scale(Geom::Point &pt, guint state); ++ void skew(SPSelTransHandle const &handle, Geom::Point &pt, guint state); ++ void rotate(Geom::Point &pt, guint state); ++ gboolean scaleRequest(Geom::Point &pt, guint state); ++ gboolean stretchRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state); ++ gboolean skewRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state); ++ gboolean rotateRequest(Geom::Point &pt, guint state); ++ gboolean centerRequest(Geom::Point &pt, guint state); ++ ++ gboolean handleRequest(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle); ++ void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle); ++ void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle); ++ void handleNewEvent(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle); ++ ++ enum Show ++ { ++ SHOW_CONTENT, ++ SHOW_OUTLINE ++ }; ++ ++ void setShow(Show s) { ++ _show = s; ++ } ++ bool isEmpty() { ++ return _empty; ++ } ++ bool isGrabbed() { ++ return _grabbed; ++ } ++ bool centerIsVisible() { ++ return ( _chandle && SP_KNOT_IS_VISIBLE (_chandle) ); ++ } ++ ++private: ++ void _updateHandles(); ++ void _updateVolatileState(); ++ void _selChanged(Inkscape::Selection *selection); ++ void _selModified(Inkscape::Selection *selection, guint flags); ++ void _showHandles(SPKnot *knot[], SPSelTransHandle const handle[], gint num, ++ gchar const *even_tip, gchar const *odd_tip); ++ Geom::Point _getGeomHandlePos(Geom::Point const &visual_handle_pos); ++ Geom::Point _calcAbsAffineDefault(Geom::Scale const default_scale); ++ Geom::Point _calcAbsAffineGeom(Geom::Scale const geom_scale); ++ void _keepClosestPointOnly(std::vector &points, const Geom::Point &reference); ++ void _display_snapsource(); ++ ++ enum State { ++ STATE_SCALE, //scale or stretch ++ STATE_ROTATE //rotate or skew ++ }; ++ ++ SPDesktop *_desktop; ++ ++ std::vector _items; ++ std::vector _items_const; ++ std::vector _items_affines; ++ std::vector _items_centers; ++ ++ std::vector _snap_points; ++ std::vector _bbox_points; // the bbox point of the selection as a whole, i.e. max. 4 corners plus optionally some midpoints ++ std::vector _bbox_points_for_translating; // the bbox points of each selected item, only to be used for translating ++ ++ Inkscape::SelCue _selcue; ++ ++ Inkscape::Selection *_selection; ++ State _state; ++ Show _show; ++ ++ bool _grabbed; ++ bool _show_handles; ++ bool _empty; ++ bool _changed; ++ ++ SPItem::BBoxType _snap_bbox_type; ++ ++ Geom::OptRect _bbox; ++ Geom::OptRect _approximate_bbox; ++ Geom::OptRect _geometric_bbox; ++ gdouble _strokewidth; ++ ++ Geom::Matrix _current_relative_affine; ++ Geom::Matrix _absolute_affine; ++ Geom::Matrix _relative_affine; ++ /* According to Merriam - Webster's online dictionary ++ * Affine: a transformation (as a translation, a rotation, or a uniform stretching) that carries straight ++ * lines into straight lines and parallel lines into parallel lines but may alter distance between points ++ * and angles between lines ++ */ ++ ++ Geom::Point _opposite; ///< opposite point to where a scale is taking place ++ Geom::Point _opposite_for_specpoints; ++ Geom::Point _opposite_for_bboxpoints; ++ Geom::Point _origin_for_specpoints; ++ Geom::Point _origin_for_bboxpoints; ++ ++ gdouble _handle_x; ++ gdouble _handle_y; ++ ++ boost::optional _center; ++ bool _center_is_set; ///< we've already set _center, no need to reread it from items ++ ++ SPKnot *_shandle[8]; ++ SPKnot *_rhandle[8]; ++ SPKnot *_chandle; ++ SPCanvasItem *_norm; ++ SPCanvasItem *_grip; ++ SPCanvasItem *_l[4]; ++ guint _sel_changed_id; ++ guint _sel_modified_id; ++ GSList *_stamp_cache; ++ ++ Geom::Point _origin; ///< position of origin for transforms ++ Geom::Point _point; ///< original position of the knot being used for the current transform ++ Geom::Point _point_geom; ///< original position of the knot being used for the current transform ++ Inkscape::MessageContext _message_context; ++ sigc::connection _sel_changed_connection; ++ sigc::connection _sel_modified_connection; ++}; ++ ++} ++ ++#endif ++ ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-conn-end-pair.h inkscape-0.48.1/src/sp-conn-end-pair.h +--- inkscape-0.48.1~/src/sp-conn-end-pair.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-conn-end-pair.h 2011-05-01 00:56:19.611250878 +0100 +@@ -15,6 +15,7 @@ + + #include "forward.h" + #include "libnr/nr-point.h" ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-conn-end.h inkscape-0.48.1/src/sp-conn-end.h +--- inkscape-0.48.1~/src/sp-conn-end.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-conn-end.h 2011-05-01 00:56:19.611250878 +0100 +@@ -2,6 +2,7 @@ + #define SEEN_SP_CONN_END + + #include ++#include + #include + + #include "sp-use-reference.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-gradient.h inkscape-0.48.1/src/sp-gradient.h +--- inkscape-0.48.1~/src/sp-gradient.h 2010-08-04 17:45:00.000000000 +0100 ++++ inkscape-0.48.1/src/sp-gradient.h 2011-05-01 00:56:19.611250878 +0100 +@@ -25,6 +25,7 @@ + #include "sp-gradient-units.h" + #include "sp-gradient-vector.h" + ++#include + #include + + struct SPGradientReference; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-object.h inkscape-0.48.1/src/sp-object.h +--- inkscape-0.48.1~/src/sp-object.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-object.h 2011-05-01 00:56:19.611250878 +0100 +@@ -56,6 +56,7 @@ + + + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-object.h.orig inkscape-0.48.1/src/sp-object.h.orig +--- inkscape-0.48.1~/src/sp-object.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/sp-object.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,587 @@ ++#ifndef SP_OBJECT_H_SEEN ++#define SP_OBJECT_H_SEEN ++ ++/** \file ++ * Abstract base class for all nodes ++ * ++ * Authors: ++ * Lauris Kaplinski ++ * ++ * Copyright (C) 1999-2002 authors ++ * Copyright (C) 2001-2002 Ximian, Inc. ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++/* SPObject flags */ ++ ++/* Async modification flags */ ++#define SP_OBJECT_MODIFIED_FLAG (1 << 0) ++#define SP_OBJECT_CHILD_MODIFIED_FLAG (1 << 1) ++#define SP_OBJECT_PARENT_MODIFIED_FLAG (1 << 2) ++#define SP_OBJECT_STYLE_MODIFIED_FLAG (1 << 3) ++#define SP_OBJECT_VIEWPORT_MODIFIED_FLAG (1 << 4) ++#define SP_OBJECT_USER_MODIFIED_FLAG_A (1 << 5) ++#define SP_OBJECT_USER_MODIFIED_FLAG_B (1 << 6) ++#define SP_OBJECT_USER_MODIFIED_FLAG_C (1 << 7) ++ ++/* Conveneience */ ++#define SP_OBJECT_FLAGS_ALL 0xff ++ ++/* Flags that mark object as modified */ ++/* Object, Child, Style, Viewport, User */ ++#define SP_OBJECT_MODIFIED_STATE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_PARENT_MODIFIED_FLAG)) ++ ++/* Flags that will propagate downstreams */ ++/* Parent, Style, Viewport, User */ ++#define SP_OBJECT_MODIFIED_CASCADE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG)) ++ ++/* Generic */ ++#define SP_OBJECT_IS_CLONED(o) (((SPObject *) (o))->cloned) ++ ++/* Write flags */ ++#define SP_OBJECT_WRITE_BUILD (1 << 0) ++#define SP_OBJECT_WRITE_EXT (1 << 1) ++#define SP_OBJECT_WRITE_ALL (1 << 2) ++ ++/* Convenience stuff */ ++#define SP_OBJECT_ID(o) (((SPObject *) (o))->getId()) ++#define SP_OBJECT_REPR(o) (((SPObject *) (o))->repr) ++#define SP_OBJECT_DOCUMENT(o) (((SPObject *) (o))->document) ++#define SP_OBJECT_PARENT(o) (((SPObject *) (o))->parent) ++#define SP_OBJECT_NEXT(o) (((SPObject *) (o))->next) ++#define SP_OBJECT_PREV(o) (sp_object_prev((SPObject *) (o))) ++#define SP_OBJECT_HREFCOUNT(o) (((SPObject *) (o))->hrefcount) ++#define SP_OBJECT_STYLE(o) (((SPObject *) (o))->style) ++ ++ ++#include ++#include ++#include ++#include ++ ++#include "forward.h" ++#include "version.h" ++#include "util/forward-pointer-iterator.h" ++ ++namespace Inkscape { ++namespace XML { ++class Node; ++class Document; ++} ++} ++ ++ ++typedef enum { ++ SP_NO_EXCEPTION, ++ SP_INDEX_SIZE_ERR, ++ SP_DOMSTRING_SIZE_ERR, ++ SP_HIERARCHY_REQUEST_ERR, ++ SP_WRONG_DOCUMENT_ERR, ++ SP_INVALID_CHARACTER_ERR, ++ SP_NO_DATA_ALLOWED_ERR, ++ SP_NO_MODIFICATION_ALLOWED_ERR, ++ SP_NOT_FOUND_ERR, ++ SP_NOT_SUPPORTED_ERR, ++ SP_INUSE_ATTRIBUTE_ERR, ++ SP_INVALID_STATE_ERR, ++ SP_SYNTAX_ERR, ++ SP_INVALID_MODIFICATION_ERR, ++ SP_NAMESPACE_ERR, ++ SP_INVALID_ACCESS_ERR ++} SPExceptionType; ++ ++class SPException; ++ ++/// An attempt to implement exceptions, unused? ++struct SPException { ++ SPExceptionType code; ++}; ++ ++#define SP_EXCEPTION_INIT(ex) {(ex)->code = SP_NO_EXCEPTION;} ++#define SP_EXCEPTION_IS_OK(ex) (!(ex) || ((ex)->code == SP_NO_EXCEPTION)) ++ ++class SPCtx; ++ ++/// Unused ++struct SPCtx { ++ unsigned int flags; ++}; ++ ++enum { ++ SP_XML_SPACE_DEFAULT, ++ SP_XML_SPACE_PRESERVE ++}; ++ ++class SPIXmlSpace; ++ ++/// Internal class consisting of two bits. ++struct SPIXmlSpace { ++ guint set : 1; ++ guint value : 1; ++}; ++ ++class SPObject; ++ ++/* ++ * Refcounting ++ * ++ * Owner is here for debug reasons, you can set it to NULL safely ++ * Ref should return object, NULL is error, unref return always NULL ++ */ ++ ++SPObject *sp_object_ref(SPObject *object, SPObject *owner=NULL); ++SPObject *sp_object_unref(SPObject *object, SPObject *owner=NULL); ++ ++SPObject *sp_object_href(SPObject *object, gpointer owner); ++SPObject *sp_object_hunref(SPObject *object, gpointer owner); ++ ++/// A refcounting tree node object. ++struct SPObject : public GObject { ++ enum CollectionPolicy { ++ COLLECT_WITH_PARENT, ++ ALWAYS_COLLECT ++ }; ++ ++ unsigned int cloned : 1; ++ unsigned int uflags : 8; ++ unsigned int mflags : 8; ++ SPIXmlSpace xml_space; ++ unsigned int hrefcount; /* number of xlink:href references */ ++ unsigned int _total_hrefcount; /* our hrefcount + total descendants */ ++ SPDocument *document; /* Document we are part of */ ++ SPObject *parent; /* Our parent (only one allowed) */ ++ SPObject *children; /* Our children */ ++ SPObject *_last_child; /* Remembered last child */ ++ SPObject *next; /* Next object in linked list */ ++ Inkscape::XML::Node *repr; /* Our xml representation */ ++ ++private: ++ gchar *id; /* Our very own unique id */ ++public: ++ ++ /** ++ * Returns the objects current ID string. ++ */ ++ gchar const* getId() const; ++ ++ /** @brief cleans up an SPObject, releasing its references and ++ * requesting that references to it be released ++ */ ++ void releaseReferences(); ++ ++ /** @brief connects to the release request signal ++ * ++ * @param slot the slot to connect ++ * ++ * @returns the sigc::connection formed ++ */ ++ sigc::connection connectRelease(sigc::slot slot) { ++ return _release_signal.connect(slot); ++ } ++ ++ /** ++ * Represents the style properties, whether from presentation attributes, the style ++ * attribute, or inherited. ++ * ++ * sp_object_private_set doesn't handle SP_ATTR_STYLE or any presentation attributes at the ++ * time of writing, so this is probably NULL for all SPObject's that aren't an SPItem. ++ * ++ * However, this gives rise to the bugs mentioned in sp_object_get_style_property. ++ * Note that some non-SPItem SPObject's, such as SPStop, do need styling information, ++ * and need to inherit properties even through other non-SPItem parents like \. ++ */ ++ SPStyle *style; ++ ++ /// Switch containing next() method. ++ struct ParentIteratorStrategy { ++ static SPObject const *next(SPObject const *object) { ++ return object->parent; ++ } ++ }; ++ /// Switch containing next() method. ++ struct SiblingIteratorStrategy { ++ static SPObject const *next(SPObject const *object) { ++ return object->next; ++ } ++ }; ++ ++ typedef Inkscape::Util::ForwardPointerIterator ParentIterator; ++ typedef Inkscape::Util::ForwardPointerIterator ConstParentIterator; ++ typedef Inkscape::Util::ForwardPointerIterator SiblingIterator; ++ typedef Inkscape::Util::ForwardPointerIterator ConstSiblingIterator; ++ ++ bool isSiblingOf(SPObject const *object) const { ++ g_return_val_if_fail(object != NULL, false); ++ return this->parent && this->parent == object->parent; ++ } ++ bool isAncestorOf(SPObject const *object) const; ++ ++ SPObject const *nearestCommonAncestor(SPObject const *object) const; ++ /* A non-const version can be similarly constructed if you want one. ++ * (Don't just cast away the constness, which would be ill-formed.) */ ++ ++ SPObject *getNext(); ++ SPObject *getPrev(); ++ ++ bool hasChildren() const { return ( children != NULL ); } ++ ++ SPObject *firstChild() { return children; } ++ SPObject const *firstChild() const { return children; } ++ SPObject *lastChild() { return _last_child; } ++ SPObject const *lastChild() const { return _last_child; } ++ ++ enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow }; ++ /** @brief Retrieves children as a GSList */ ++ GSList *childList(bool add_ref, Action action = ActionGeneral); ++ ++ SPObject *appendChildRepr(Inkscape::XML::Node *repr); ++ ++ /** @brief Gets the author-visible label for this object. */ ++ gchar const *label() const; ++ /** @brief Returns a default label for this object. */ ++ gchar const *defaultLabel() const; ++ /** @brief Sets the author-visible label for this object. ++ * ++ * Sets the author-visible label for the object. ++ * ++ * @param label the new label ++ */ ++ void setLabel(gchar const *label); ++ ++ /** Retrieves the title of this object */ ++ gchar *title() const; ++ /** Sets the title of this object */ ++ bool setTitle(gchar const *title, bool verbatim=false); ++ ++ /** Retrieves the description of this object */ ++ gchar *desc() const; ++ /** Sets the description of this object */ ++ bool setDesc(gchar const *desc, bool verbatim=false); ++ ++ /** @brief Set the policy under which this object will be ++ * orphan-collected. ++ * ++ * Orphan-collection is the process of deleting all objects which no longer have ++ * hyper-references pointing to them. The policy determines when this happens. Many objects ++ * should not be deleted simply because they are no longer referred to; other objects (like ++ * "intermediate" gradients) are more or less throw-away and should always be collected when no ++ * longer in use. ++ * ++ * Along these lines, there are currently two orphan-collection policies: ++ * ++ * COLLECT_WITH_PARENT - don't worry about the object's hrefcount; ++ * if its parent is collected, this object ++ * will be too ++ * ++ * COLLECT_ALWAYS - always collect the object as soon as its ++ * hrefcount reaches zero ++ * ++ * @returns the current collection policy in effect for this object ++ */ ++ CollectionPolicy collectionPolicy() const { return _collection_policy; } ++ ++ /** @brief Sets the orphan-collection policy in effect for this object. ++ * ++ * @see SPObject::collectionPolicy ++ * ++ * @param policy the new policy to adopt ++ */ ++ void setCollectionPolicy(CollectionPolicy policy) { ++ _collection_policy = policy; ++ } ++ ++ /** @brief Requests a later automatic call to collectOrphan(). ++ * ++ * This method requests that collectOrphan() be called during the document update cycle, ++ * deleting the object if it is no longer used. ++ * ++ * If the current collection policy is COLLECT_WITH_PARENT, this function has no effect. ++ * ++ * @see SPObject::collectOrphan ++ */ ++ void requestOrphanCollection(); ++ ++ /** @brief Unconditionally delete the object if it is not referenced. ++ * ++ * Unconditionally delete the object if there are no outstanding hyper-references to it. ++ * Observers are not notified of the object's deletion (at the SPObject level; XML tree ++ * notifications still fire). ++ * ++ * @see SPObject::deleteObject ++ */ ++ void collectOrphan() { ++ if ( _total_hrefcount == 0 ) { ++ deleteObject(false); ++ } ++ } ++ ++ /** @brief Check if object is referenced by any other object. ++ */ ++ bool isReferenced() { return ( _total_hrefcount > 0 ); } ++ ++ /** @brief Deletes an object. ++ * ++ * Detaches the object's repr, and optionally sends notification that the object has been ++ * deleted. ++ * ++ * @param propagate notify observers that the object has been deleted? ++ * ++ * @param propagate_descendants notify observers of children that they have been deleted? ++ */ ++ void deleteObject(bool propagate, bool propagate_descendants); ++ ++ /** @brief Deletes on object. ++ * ++ * @param propagate Notify observers of this object and its children that they have been ++ * deleted? ++ */ ++ void deleteObject(bool propagate=true) { ++ deleteObject(propagate, propagate); ++ } ++ ++ /** @brief Connects a slot to be called when an object is deleted. ++ * ++ * This connects a slot to an object's internal delete signal, which is invoked when the object ++ * is deleted ++ * ++ * The signal is mainly useful for e.g. knowing when to break hrefs or dissociate clones. ++ * ++ * @param slot the slot to connect ++ * ++ * @see SPObject::deleteObject ++ */ ++ sigc::connection connectDelete(sigc::slot slot) { ++ return _delete_signal.connect(slot); ++ } ++ ++ sigc::connection connectPositionChanged(sigc::slot slot) { ++ return _position_changed_signal.connect(slot); ++ } ++ ++ /** @brief Returns the object which supercedes this one (if any). ++ * ++ * This is mainly useful for ensuring we can correctly perform a series of moves or deletes, ++ * even if the objects in question have been replaced in the middle of the sequence. ++ */ ++ SPObject *successor() { return _successor; } ++ ++ /** @brief Indicates that another object supercedes this one. */ ++ void setSuccessor(SPObject *successor) { ++ g_assert(successor != NULL); ++ g_assert(_successor == NULL); ++ g_assert(successor->_successor == NULL); ++ sp_object_ref(successor, NULL); ++ _successor = successor; ++ } ++ ++ /* modifications; all three sets of methods should probably ultimately be protected, as they ++ * are not really part of its public interface. However, other parts of the code to ++ * occasionally use them at present. */ ++ ++ /* the no-argument version of updateRepr() is intended to be a bit more public, however -- it ++ * essentially just flushes any changes back to the backing store (the repr layer); maybe it ++ * should be called something else and made public at that point. */ ++ ++ /** @brief Updates the object's repr based on the object's state. ++ * ++ * This method updates the the repr attached to the object to reflect the object's current ++ * state; see the three-argument version for details. ++ * ++ * @param flags object write flags that apply to this update ++ * ++ * @return the updated repr ++ */ ++ Inkscape::XML::Node *updateRepr(unsigned int flags=SP_OBJECT_WRITE_EXT); ++ ++ /** @brief Updates the given repr based on the object's state. ++ * ++ * This method updates the given repr to reflect the object's current state. There are ++ * several flags that affect this: ++ * ++ * SP_OBJECT_WRITE_BUILD - create new reprs ++ * ++ * SP_OBJECT_WRITE_EXT - write elements and attributes ++ * which are not part of pure SVG ++ * (i.e. the Inkscape and Sodipodi ++ * namespaces) ++ * ++ * SP_OBJECT_WRITE_ALL - create all nodes and attributes, ++ * even those which might be redundant ++ * ++ * @param repr the repr to update ++ * @param flags object write flags that apply to this update ++ * ++ * @return the updated repr ++ */ ++ Inkscape::XML::Node *updateRepr(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags); ++ ++ /** @brief Queues an deferred update of this object's display. ++ * ++ * This method sets flags to indicate updates to be performed later, during the idle loop. ++ * ++ * There are several flags permitted here: ++ * ++ * SP_OBJECT_MODIFIED_FLAG - the object has been modified ++ * ++ * SP_OBJECT_CHILD_MODIFIED_FLAG - a child of the object has been ++ * modified ++ * ++ * SP_OBJECT_STYLE_MODIFIED_FLAG - the object's style has been ++ * modified ++ * ++ * There are also some subclass-specific modified flags which are hardly ever used. ++ * ++ * One of either MODIFIED or CHILD_MODIFIED is required. ++ * ++ * @param flags flags indicating what to update ++ */ ++ void requestDisplayUpdate(unsigned int flags); ++ ++ /** @brief Updates the object's display immediately ++ * ++ * This method is called during the idle loop by SPDocument in order to update the object's ++ * display. ++ * ++ * One additional flag is legal here: ++ * ++ * SP_OBJECT_PARENT_MODIFIED_FLAG - the parent has been ++ * modified ++ * ++ * @param ctx an SPCtx which accumulates various state ++ * during the recursive update -- beware! some ++ * subclasses try to cast this to an SPItemCtx * ++ * ++ * @param flags flags indicating what to update (in addition ++ * to any already set flags) ++ */ ++ void updateDisplay(SPCtx *ctx, unsigned int flags); ++ ++ /** @brief Requests that a modification notification signal ++ * be emitted later (e.g. during the idle loop) ++ * ++ * @param flags flags indicating what has been modified ++ */ ++ void requestModified(unsigned int flags); ++ ++ /** @brief Emits a modification notification signal ++ * ++ * @param flags indicating what has been modified ++ */ ++ void emitModified(unsigned int flags); ++ ++ /** @brief Connects to the modification notification signal ++ * ++ * @param slot the slot to connect ++ * ++ * @returns the connection formed thereby ++ */ ++ sigc::connection connectModified( ++ sigc::slot slot ++ ) { ++ return _modified_signal.connect(slot); ++ } ++ ++ void _sendDeleteSignalRecursive(); ++ void _updateTotalHRefCount(int increment); ++ ++ void _requireSVGVersion(unsigned major, unsigned minor) { ++ _requireSVGVersion(Inkscape::Version(major, minor)); ++ } ++ void _requireSVGVersion(Inkscape::Version version); ++ ++ sigc::signal _release_signal; ++ sigc::signal _delete_signal; ++ sigc::signal _position_changed_signal; ++ sigc::signal _modified_signal; ++ SPObject *_successor; ++ CollectionPolicy _collection_policy; ++ gchar *_label; ++ mutable gchar *_default_label; ++ ++private: ++ // Private member functions used in the definitions of setTitle(), ++ // setDesc(), title() and desc(). ++ bool setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool verbatim); ++ gchar * getTitleOrDesc(gchar const *svg_tagname) const; ++ SPObject * findFirstChild(gchar const *tagname) const; ++ GString * textualContent() const; ++ ++ friend class SPObjectImpl; ++}; ++ ++/// The SPObject vtable. ++struct SPObjectClass { ++ GObjectClass parent_class; ++ ++ void (* build) (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr); ++ void (* release) (SPObject *object); ++ ++ /* Virtual handlers of repr signals */ ++ void (* child_added) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref); ++ void (* remove_child) (SPObject *object, Inkscape::XML::Node *child); ++ ++ void (* order_changed) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *new_repr); ++ ++ void (* set) (SPObject *object, unsigned int key, gchar const *value); ++ ++ void (* read_content) (SPObject *object); ++ ++ /* Update handler */ ++ void (* update) (SPObject *object, SPCtx *ctx, unsigned int flags); ++ /* Modification handler */ ++ void (* modified) (SPObject *object, unsigned int flags); ++ ++ Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags); ++}; ++ ++ ++/* ++ * Attaching/detaching ++ */ ++ ++void sp_object_attach(SPObject *parent, SPObject *object, SPObject *prev); ++void sp_object_reorder(SPObject *object, SPObject *prev); ++void sp_object_detach(SPObject *parent, SPObject *object); ++ ++inline SPObject *sp_object_first_child(SPObject *parent) { ++ return parent->firstChild(); ++} ++SPObject *sp_object_get_child_by_repr(SPObject *object, Inkscape::XML::Node *repr); ++ ++void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned); ++ ++void sp_object_set(SPObject *object, unsigned int key, gchar const *value); ++ ++void sp_object_read_attr(SPObject *object, gchar const *key); ++ ++/* Public */ ++ ++gchar const *sp_object_tagName_get(SPObject const *object, SPException *ex); ++gchar const *sp_object_getAttribute(SPObject const *object, gchar const *key, SPException *ex); ++void sp_object_setAttribute(SPObject *object, gchar const *key, gchar const *value, SPException *ex); ++void sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *ex); ++ ++/* Style */ ++ ++gchar const *sp_object_get_style_property(SPObject const *object, ++ gchar const *key, gchar const *def); ++ ++int sp_object_compare_position(SPObject const *first, SPObject const *second); ++ ++SPObject *sp_object_prev(SPObject *child); ++ ++ ++#endif // SP_OBJECT_H_SEEN ++ ++ ++/* ++ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-offset.h inkscape-0.48.1/src/sp-offset.h +--- inkscape-0.48.1~/src/sp-offset.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-offset.h 2011-05-01 00:56:19.611250878 +0100 +@@ -16,6 +16,7 @@ + + #include "sp-shape.h" + ++#include + #include + + #define SP_TYPE_OFFSET (sp_offset_get_type ()) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-pattern.h inkscape-0.48.1/src/sp-pattern.h +--- inkscape-0.48.1~/src/sp-pattern.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-pattern.h 2011-05-01 00:56:19.611250878 +0100 +@@ -32,6 +32,7 @@ + #include "sp-paint-server.h" + #include "uri-references.h" + ++#include + #include + + class SPPatternReference : public Inkscape::URIReference { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-pattern.h.orig inkscape-0.48.1/src/sp-pattern.h.orig +--- inkscape-0.48.1~/src/sp-pattern.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/sp-pattern.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,113 @@ ++#ifndef __SP_PATTERN_H__ ++#define __SP_PATTERN_H__ ++ ++/* ++ * SVG implementation ++ * ++ * Author: ++ * Lauris Kaplinski ++ * ++ * Copyright (C) 2002 Lauris Kaplinski ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include ++ ++#include "forward.h" ++ ++#define SP_TYPE_PATTERN (sp_pattern_get_type ()) ++#define SP_PATTERN(o) (GTK_CHECK_CAST ((o), SP_TYPE_PATTERN, SPPattern)) ++#define SP_PATTERN_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_PATTERN, SPPatternClass)) ++#define SP_IS_PATTERN(o) (GTK_CHECK_TYPE ((o), SP_TYPE_PATTERN)) ++#define SP_IS_PATTERN_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_PATTERN)) ++ ++GType sp_pattern_get_type (void); ++ ++class SPPatternClass; ++ ++#include ++#include ++#include "svg/svg-length.h" ++#include "sp-paint-server.h" ++#include "uri-references.h" ++ ++#include ++ ++class SPPatternReference : public Inkscape::URIReference { ++public: ++ SPPatternReference (SPObject *obj) : URIReference(obj) {} ++ SPPattern *getObject() const { ++ return (SPPattern *)URIReference::getObject(); ++ } ++ ++protected: ++ virtual bool _acceptObject(SPObject *obj) const { ++ return SP_IS_PATTERN (obj); ++ } ++}; ++ ++enum { ++ SP_PATTERN_UNITS_USERSPACEONUSE, ++ SP_PATTERN_UNITS_OBJECTBOUNDINGBOX ++}; ++ ++struct SPPattern : public SPPaintServer { ++ /* Reference (href) */ ++ gchar *href; ++ SPPatternReference *ref; ++ ++ /* patternUnits and patternContentUnits attribute */ ++ guint patternUnits : 1; ++ guint patternUnits_set : 1; ++ guint patternContentUnits : 1; ++ guint patternContentUnits_set : 1; ++ /* patternTransform attribute */ ++ Geom::Matrix patternTransform; ++ guint patternTransform_set : 1; ++ /* Tile rectangle */ ++ SVGLength x; ++ SVGLength y; ++ SVGLength width; ++ SVGLength height; ++ /* VieBox */ ++ NRRect viewBox; ++ guint viewBox_set : 1; ++ ++ sigc::connection modified_connection; ++}; ++ ++struct SPPatternClass { ++ SPPaintServerClass parent_class; ++}; ++ ++guint pattern_users (SPPattern *pattern); ++SPPattern *pattern_chain (SPPattern *pattern); ++SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property); ++void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool set); ++ ++const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move); ++ ++SPPattern *pattern_getroot (SPPattern *pat); ++ ++guint pattern_patternUnits (SPPattern *pat); ++guint pattern_patternContentUnits (SPPattern *pat); ++Geom::Matrix const &pattern_patternTransform(SPPattern const *pat); ++gdouble pattern_x (SPPattern *pat); ++gdouble pattern_y (SPPattern *pat); ++gdouble pattern_width (SPPattern *pat); ++gdouble pattern_height (SPPattern *pat); ++NRRect *pattern_viewBox (SPPattern *pat); ++ ++#endif //__SP_PATTERN_H__ ++ ++/* ++ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-shape.h inkscape-0.48.1/src/sp-shape.h +--- inkscape-0.48.1~/src/sp-shape.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-shape.h 2011-05-01 00:56:19.611250878 +0100 +@@ -19,6 +19,7 @@ + #include "sp-marker-loc.h" + #include <2geom/forward.h> + ++#include + #include + + #define SP_TYPE_SHAPE (sp_shape_get_type ()) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-shape.h.orig inkscape-0.48.1/src/sp-shape.h.orig +--- inkscape-0.48.1~/src/sp-shape.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/sp-shape.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,71 @@ ++#ifndef __SP_SHAPE_H__ ++#define __SP_SHAPE_H__ ++ ++/* ++ * Base class for shapes, including element ++ * ++ * Author: ++ * Lauris Kaplinski ++ * ++ * Copyright (C) 1999-2002 Lauris Kaplinski ++ * Copyright (C) 2000-2001 Ximian, Inc. ++ * Copyright (C) 2008 Johan Engelen ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include "display/display-forward.h" ++#include "sp-lpe-item.h" ++#include "sp-marker-loc.h" ++#include <2geom/forward.h> ++ ++#include ++ ++#define SP_TYPE_SHAPE (sp_shape_get_type ()) ++#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape)) ++#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass)) ++#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE)) ++#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE)) ++ ++#define SP_SHAPE_WRITE_PATH (1 << 2) ++ ++struct SPDesktop; ++ ++struct SPShape : public SPLPEItem { ++ SPCurve *curve; ++ ++ SPObject *marker[SP_MARKER_LOC_QTY]; ++ sigc::connection release_connect [SP_MARKER_LOC_QTY]; ++ sigc::connection modified_connect [SP_MARKER_LOC_QTY]; ++}; ++ ++struct SPShapeClass { ++ SPLPEItemClass item_class; ++ ++ /* Build bpath from extra shape attributes */ ++ void (* set_shape) (SPShape *shape); ++}; ++ ++GType sp_shape_get_type (void); ++ ++void sp_shape_set_shape (SPShape *shape); ++ ++/* Return duplicate of curve or NULL */ ++SPCurve *sp_shape_get_curve (SPShape *shape); ++ ++// sets a curve, updates display ++void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner); ++ ++// same as sp_shape_set_curve, but without updating display ++void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner); ++ ++// markers API ++void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value); ++int sp_shape_has_markers (SPShape const *shape); ++int sp_shape_number_of_markers (SPShape* Shape, int type); ++ ++Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2); ++Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c); ++Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c); ++ ++#endif +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-switch.h inkscape-0.48.1/src/sp-switch.h +--- inkscape-0.48.1~/src/sp-switch.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-switch.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + + #include "sp-item-group.h" + ++#include + #include + + #define SP_TYPE_SWITCH (CSwitch::getType()) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-text.h inkscape-0.48.1/src/sp-text.h +--- inkscape-0.48.1~/src/sp-text.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-text.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + */ + + #include ++#include + #include + #include "sp-item.h" + #include "sp-string.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-tref-reference.h inkscape-0.48.1/src/sp-tref-reference.h +--- inkscape-0.48.1~/src/sp-tref-reference.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-tref-reference.h 2011-05-01 00:56:19.611250878 +0100 +@@ -13,6 +13,7 @@ + + #include + #include ++#include + #include + + #include "util/share.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-tref-reference.h.orig inkscape-0.48.1/src/sp-tref-reference.h.orig +--- inkscape-0.48.1~/src/sp-tref-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/sp-tref-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,75 @@ ++#ifndef SEEN_SP_TREF_REFERENCE_H ++#define SEEN_SP_TREF_REFERENCE_H ++ ++/* ++ * The reference corresponding to href of element. ++ * ++ * This file was created based on sp-use-reference.h ++ * ++ * Copyright (C) 2007 Gail Banaszkiewicz ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information. ++ */ ++ ++#include ++#include ++#include ++ ++#include "util/share.h" ++#include "xml/node-observer.h" ++#include "xml/subtree.h" ++ ++ ++class SPTRefReference : public Inkscape::URIReference, ++ public Inkscape::XML::NodeObserver { ++public: ++ SPTRefReference(SPObject *owner) : URIReference(owner), subtreeObserved(NULL) { ++ updateObserver(); ++ } ++ ++ virtual ~SPTRefReference() { ++ if (subtreeObserved) { ++ subtreeObserved->removeObserver(*this); ++ delete subtreeObserved; ++ } ++ } ++ ++ SPItem *getObject() const { ++ return (SPItem *)URIReference::getObject(); ++ } ++ ++ void updateObserver(); ++ ++ ///////////////////////////////////////////////////////////////////// ++ // Node Observer Functions ++ // ----------------------- ++ virtual void notifyChildAdded(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev); ++ virtual void notifyChildRemoved(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev); ++ virtual void notifyChildOrderChanged(Inkscape::XML::Node &node, Inkscape::XML::Node &child, ++ Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev); ++ virtual void notifyContentChanged(Inkscape::XML::Node &node, ++ Inkscape::Util::ptr_shared old_content, ++ Inkscape::Util::ptr_shared new_content); ++ virtual void notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name, ++ Inkscape::Util::ptr_shared old_value, ++ Inkscape::Util::ptr_shared new_value); ++ ///////////////////////////////////////////////////////////////////// ++ ++protected: ++ virtual bool _acceptObject(SPObject * obj) const; ++ ++ Inkscape::XML::Subtree *subtreeObserved; ++}; ++ ++#endif /* !SEEN_SP_TREF_REFERENCE_H */ ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use-reference.h inkscape-0.48.1/src/sp-use-reference.h +--- inkscape-0.48.1~/src/sp-use-reference.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-use-reference.h 2011-05-01 00:56:19.611250878 +0100 +@@ -11,6 +11,7 @@ + + #include + #include ++#include + #include + + class Path; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use-reference.h.orig inkscape-0.48.1/src/sp-use-reference.h.orig +--- inkscape-0.48.1~/src/sp-use-reference.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/sp-use-reference.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,77 @@ ++#ifndef SEEN_SP_USE_REFERENCE_H ++#define SEEN_SP_USE_REFERENCE_H ++ ++/* ++ * The reference corresponding to href of element. ++ * ++ * Copyright (C) 2004 Bulia Byak ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information. ++ */ ++ ++#include ++#include ++#include ++ ++class Path; ++ ++namespace Inkscape { ++namespace XML { ++ struct Node; ++} ++} ++ ++ ++class SPUseReference : public Inkscape::URIReference { ++public: ++ SPUseReference(SPObject *owner) : URIReference(owner) {} ++ ++ SPItem *getObject() const { ++ return (SPItem *)URIReference::getObject(); ++ } ++ ++protected: ++ virtual bool _acceptObject(SPObject * const obj) const; ++ ++}; ++ ++ ++class SPUsePath : public SPUseReference { ++public: ++ Path *originalPath; ++ bool sourceDirty; ++ ++ SPObject *owner; ++ gchar *sourceHref; ++ Inkscape::XML::Node *sourceRepr; ++ SPObject *sourceObject; ++ ++ sigc::connection _modified_connection; ++ sigc::connection _delete_connection; ++ sigc::connection _changed_connection; ++ sigc::connection _transformed_connection; ++ ++ SPUsePath(SPObject* i_owner); ++ ~SPUsePath(void); ++ ++ void link(char* to); ++ void unlink(void); ++ void start_listening(SPObject* to); ++ void quit_listening(void); ++ void refresh_source(void); ++ ++ void (*user_unlink) (SPObject *user); ++}; ++ ++#endif /* !SEEN_SP_USE_REFERENCE_H */ ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/sp-use.h inkscape-0.48.1/src/sp-use.h +--- inkscape-0.48.1~/src/sp-use.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/sp-use.h 2011-05-01 00:56:19.611250878 +0100 +@@ -13,6 +13,7 @@ + * Released under GNU GPL, read the file 'COPYING' for more information + */ + ++#include + #include + #include "svg/svg-length.h" + #include "sp-item.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/spiral-context.h inkscape-0.48.1/src/spiral-context.h +--- inkscape-0.48.1~/src/spiral-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/spiral-context.h 2011-05-01 00:56:19.611250878 +0100 +@@ -16,6 +16,7 @@ + */ + + #include ++#include + #include + #include "event-context.h" + #include "libnr/nr-point.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/star-context.h inkscape-0.48.1/src/star-context.h +--- inkscape-0.48.1~/src/star-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/star-context.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + * Released under GNU GPL, read the file 'COPYING' for more information + */ + ++#include + #include + #include "event-context.h" + #include "libnr/nr-point.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/style.h inkscape-0.48.1/src/style.h +--- inkscape-0.48.1~/src/style.h 2010-08-04 17:45:00.000000000 +0100 ++++ inkscape-0.48.1/src/style.h 2011-05-01 00:56:19.611250878 +0100 +@@ -24,6 +24,7 @@ + #include "uri.h" + #include "sp-paint-server.h" + ++#include + #include + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/text-context.h inkscape-0.48.1/src/text-context.h +--- inkscape-0.48.1~/src/text-context.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/text-context.h 2011-05-01 00:56:19.611250878 +0100 +@@ -15,6 +15,7 @@ + */ + + /* #include */ ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h inkscape-0.48.1/src/ui/dialog/desktop-tracker.h +--- inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/dialog/desktop-tracker.h 2011-05-01 00:56:19.611250878 +0100 +@@ -11,6 +11,7 @@ + #ifndef SEEN_DIALOG_DESKTOP_TRACKER + #define SEEN_DIALOG_DESKTOP_TRACKER + ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/document-metadata.h inkscape-0.48.1/src/ui/dialog/document-metadata.h +--- inkscape-0.48.1~/src/ui/dialog/document-metadata.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/dialog/document-metadata.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + #define INKSCAPE_UI_DIALOG_DOCUMENT_METADATA_H + + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/document-properties.h inkscape-0.48.1/src/ui/dialog/document-properties.h +--- inkscape-0.48.1~/src/ui/dialog/document-properties.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/dialog/document-properties.h 2011-05-01 00:56:19.611250878 +0100 +@@ -15,6 +15,7 @@ + #define INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H + + #include ++#include + #include // + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h +--- inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h 2010-11-06 18:47:19.000000000 +0000 ++++ inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h 2011-05-01 00:56:19.611250878 +0100 +@@ -28,6 +28,7 @@ + #include + #include + #include "ui/widget/preferences-widget.h" ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/undo-history.cpp inkscape-0.48.1/src/ui/dialog/undo-history.cpp +--- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + + #include + #include ++#include + #include + + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig +--- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,348 @@ ++/** @file ++ * @brief Undo History dialog - implementation ++ */ ++/* Author: ++ * Gustav Broberg ++ * ++ * Copyright (C) 2006 Authors ++ * Released under GNU GPL. Read the file 'COPYING' for more information. ++ */ ++ ++#ifdef HAVE_CONFIG_H ++# include ++#endif ++ ++#include ++#include ++#include ++ ++ ++#include "document.h" ++#include "inkscape.h" ++#include "verbs.h" ++#include "desktop-handles.h" ++ ++#include "undo-history.h" ++ ++namespace Inkscape { ++namespace UI { ++namespace Dialog { ++ ++/* Rendering functions for custom cell renderers */ ++ ++void ++CellRendererSPIcon::render_vfunc(const Glib::RefPtr& window, ++ Gtk::Widget& widget, ++ const Gdk::Rectangle& background_area, ++ const Gdk::Rectangle& cell_area, ++ const Gdk::Rectangle& expose_area, ++ Gtk::CellRendererState flags) ++{ ++ // if this event type doesn't have an icon... ++ if ( !Inkscape::Verb::get(_property_event_type)->get_image() ) return; ++ ++ // if the icon isn't cached, render it to a pixbuf ++ if ( !_icon_cache[_property_event_type] ) { ++ ++ Glib::ustring image = Inkscape::Verb::get(_property_event_type)->get_image(); ++ Gtk::Widget* icon = sp_icon_get_icon(image, Inkscape::ICON_SIZE_MENU); ++ ++ if (icon) { ++ ++ // check icon type (inkscape, gtk, none) ++ if ( SP_IS_ICON(icon->gobj()) ) { ++ SPIcon* sp_icon = SP_ICON(icon->gobj()); ++ sp_icon_fetch_pixbuf(sp_icon); ++ _property_icon = Glib::wrap(sp_icon->pb, true); ++ } else if ( GTK_IS_IMAGE(icon->gobj()) ) { ++ _property_icon = Gtk::Invisible().render_icon(Gtk::StockID(image), ++ Gtk::ICON_SIZE_MENU); ++ } else { ++ delete icon; ++ return; ++ } ++ ++ delete icon; ++ property_pixbuf() = _icon_cache[_property_event_type] = _property_icon.get_value(); ++ } ++ ++ } else { ++ property_pixbuf() = _icon_cache[_property_event_type]; ++ } ++ ++ Gtk::CellRendererPixbuf::render_vfunc(window, widget, background_area, ++ cell_area, expose_area, flags); ++} ++ ++ ++void ++CellRendererInt::render_vfunc(const Glib::RefPtr& window, ++ Gtk::Widget& widget, ++ const Gdk::Rectangle& background_area, ++ const Gdk::Rectangle& cell_area, ++ const Gdk::Rectangle& expose_area, ++ Gtk::CellRendererState flags) ++{ ++ if( _filter(_property_number) ) { ++ std::ostringstream s; ++ s << _property_number << std::flush; ++ property_text() = s.str(); ++ Gtk::CellRendererText::render_vfunc(window, widget, background_area, ++ cell_area, expose_area, flags); ++ } ++} ++ ++const CellRendererInt::Filter& CellRendererInt::no_filter = CellRendererInt::NoFilter(); ++ ++UndoHistory& UndoHistory::getInstance() ++{ ++ return *new UndoHistory(); ++} ++ ++void ++UndoHistory::setDesktop(SPDesktop* desktop) ++{ ++ Panel::setDesktop(desktop); ++ ++ if (!desktop) return; ++ ++ _document = sp_desktop_document(desktop); ++ ++ _event_log = desktop->event_log; ++ ++ _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(); ++ ++ _event_list_store = _event_log->getEventListStore(); ++ _event_list_view.set_model(_event_list_store); ++ _event_list_selection = _event_list_view.get_selection(); ++ ++ _event_log->connectWithDialog(&_event_list_view, &_callback_connections); ++ _event_list_view.scroll_to_row(_event_list_store->get_path(_event_list_selection->get_selected())); ++ ++ _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(false); ++} ++ ++UndoHistory::UndoHistory() ++ : UI::Widget::Panel ("", "/dialogs/undo-history", SP_VERB_DIALOG_UNDO_HISTORY), ++ _document (sp_desktop_document(getDesktop())), ++ _event_log (getDesktop() ? getDesktop()->event_log : NULL), ++ _columns (_event_log ? &_event_log->getColumns() : NULL), ++ _event_list_selection (_event_list_view.get_selection()) ++{ ++ if ( !_document || !_event_log || !_columns ) return; ++ ++ set_size_request(300, 95); ++ ++ _getContents()->pack_start(_scrolled_window); ++ _scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); ++ ++ _event_list_store = _event_log->getEventListStore(); ++ ++ _event_list_view.set_model(_event_list_store); ++ _event_list_view.set_rules_hint(false); ++ _event_list_view.set_enable_search(false); ++ _event_list_view.set_headers_visible(false); ++ ++ CellRendererSPIcon* icon_renderer = Gtk::manage(new CellRendererSPIcon()); ++ icon_renderer->property_xpad() = 8; ++ icon_renderer->property_width() = 36; ++ int cols_count = _event_list_view.append_column("Icon", *icon_renderer); ++ ++ Gtk::TreeView::Column* icon_column = _event_list_view.get_column(cols_count-1); ++ icon_column->add_attribute(icon_renderer->property_event_type(), _columns->type); ++ ++ Gtk::CellRendererText* description_renderer = Gtk::manage(new Gtk::CellRendererText()); ++ ++ cols_count = _event_list_view.append_column("Description", *description_renderer); ++ Gtk::TreeView::Column* description_column = _event_list_view.get_column(cols_count-1); ++ description_column->add_attribute(description_renderer->property_text(), _columns->description); ++ description_column->set_resizable(); ++ ++ _event_list_view.set_expander_column( *_event_list_view.get_column(cols_count-1) ); ++ ++ CellRendererInt* children_renderer = Gtk::manage(new CellRendererInt(greater_than_1)); ++ children_renderer->property_weight() = 600; // =Pango::WEIGHT_SEMIBOLD (not defined in old versions of pangomm) ++ children_renderer->property_xalign() = 1.0; ++ children_renderer->property_xpad() = 20; ++ ++ cols_count = _event_list_view.append_column("Children", *children_renderer); ++ Gtk::TreeView::Column* children_column = _event_list_view.get_column(cols_count-1); ++ children_column->add_attribute(children_renderer->property_number(), _columns->child_count); ++ ++ _scrolled_window.add(_event_list_view); ++ ++ // connect EventLog callbacks ++ _callback_connections[EventLog::CALLB_SELECTION_CHANGE] = ++ _event_list_selection->signal_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onListSelectionChange)); ++ ++ _callback_connections[EventLog::CALLB_EXPAND] = ++ _event_list_view.signal_row_expanded().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onExpandEvent)); ++ ++ _callback_connections[EventLog::CALLB_COLLAPSE] = ++ _event_list_view.signal_row_collapsed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onCollapseEvent)); ++ ++ // connect with the EventLog ++ _event_log->connectWithDialog(&_event_list_view, &_callback_connections); ++ ++ show_all_children(); ++ ++ // scroll to the selected row ++ _event_list_view.set_cursor(_event_list_store->get_path(_event_log->getCurrEvent())); ++} ++ ++UndoHistory::~UndoHistory() ++{ ++} ++ ++void ++UndoHistory::_onListSelectionChange() ++{ ++ ++ EventLog::const_iterator selected = _event_list_selection->get_selected(); ++ ++ /* If no event is selected in the view, find the right one and select it. This happens whenever ++ * a branch we're currently in is collapsed. ++ */ ++ if (!selected) { ++ ++ EventLog::iterator curr_event = _event_log->getCurrEvent(); ++ ++ if (curr_event->parent()) { ++ ++ EventLog::iterator curr_event_parent = curr_event->parent(); ++ EventLog::iterator last = curr_event_parent->children().end(); ++ ++ _event_log->blockNotifications(); ++ for ( --last ; curr_event != last ; ++curr_event ) { ++ sp_document_redo(_document); ++ } ++ _event_log->blockNotifications(false); ++ ++ _event_log->setCurrEvent(curr_event); ++ _event_list_selection->select(curr_event_parent); ++ ++ } else { // this should not happen ++ _event_list_selection->select(curr_event); ++ } ++ ++ } else { ++ ++ EventLog::const_iterator last_selected = _event_log->getCurrEvent(); ++ ++ /* Selecting a collapsed parent event is equal to selecting the last child ++ * of that parent's branch. ++ */ ++ ++ if ( !selected->children().empty() && ++ !_event_list_view.row_expanded(_event_list_store->get_path(selected)) ) ++ { ++ selected = selected->children().end(); ++ --selected; ++ } ++ ++ // An event before the current one has been selected. Undo to the selected event. ++ if ( _event_list_store->get_path(selected) < ++ _event_list_store->get_path(last_selected) ) ++ { ++ _event_log->blockNotifications(); ++ ++ while ( selected != last_selected ) { ++ ++ sp_document_undo(_document); ++ ++ if ( last_selected->parent() && ++ last_selected == last_selected->parent()->children().begin() ) ++ { ++ last_selected = last_selected->parent(); ++ _event_log->setCurrEventParent((EventLog::iterator)NULL); ++ } else { ++ --last_selected; ++ if ( !last_selected->children().empty() ) { ++ _event_log->setCurrEventParent(last_selected); ++ last_selected = last_selected->children().end(); ++ --last_selected; ++ } ++ } ++ } ++ _event_log->blockNotifications(false); ++ _event_log->updateUndoVerbs(); ++ ++ } else { // An event after the current one has been selected. Redo to the selected event. ++ ++ _event_log->blockNotifications(); ++ ++ while ( selected != last_selected ) { ++ ++ sp_document_redo(_document); ++ ++ if ( !last_selected->children().empty() ) { ++ _event_log->setCurrEventParent(last_selected); ++ last_selected = last_selected->children().begin(); ++ } else { ++ ++last_selected; ++ if ( last_selected->parent() && ++ last_selected == last_selected->parent()->children().end() ) ++ { ++ last_selected = last_selected->parent(); ++ ++last_selected; ++ _event_log->setCurrEventParent((EventLog::iterator)NULL); ++ } ++ } ++ } ++ _event_log->blockNotifications(false); ++ ++ } ++ ++ _event_log->setCurrEvent(selected); ++ _event_log->updateUndoVerbs(); ++ } ++ ++} ++ ++void ++UndoHistory::_onExpandEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/) ++{ ++ if ( iter == _event_list_selection->get_selected() ) { ++ _event_list_selection->select(_event_log->getCurrEvent()); ++ } ++} ++ ++void ++UndoHistory::_onCollapseEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/) ++{ ++ // Collapsing a branch we're currently in is equal to stepping to the last event in that branch ++ if ( iter == _event_log->getCurrEvent() ) { ++ EventLog::const_iterator curr_event_parent = _event_log->getCurrEvent(); ++ EventLog::const_iterator curr_event = curr_event_parent->children().begin(); ++ EventLog::const_iterator last = curr_event_parent->children().end(); ++ ++ _event_log->blockNotifications(); ++ sp_document_redo(_document); ++ ++ for ( --last ; curr_event != last ; ++curr_event ) { ++ sp_document_redo(_document); ++ } ++ _event_log->blockNotifications(false); ++ ++ _event_log->setCurrEvent(curr_event); ++ _event_log->setCurrEventParent(curr_event_parent); ++ _event_list_selection->select(curr_event_parent); ++ } ++} ++ ++const CellRendererInt::Filter& UndoHistory::greater_than_1 = UndoHistory::GreaterThan(1); ++ ++} // namespace Dialog ++} // namespace UI ++} // namespace Inkscape ++ ++/* ++ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/control-point-selection.h inkscape-0.48.1/src/ui/tool/control-point-selection.h +--- inkscape-0.48.1~/src/ui/tool/control-point-selection.h 2010-08-04 17:45:00.000000000 +0100 ++++ inkscape-0.48.1/src/ui/tool/control-point-selection.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + + #include + #include ++#include + #include + #include <2geom/forward.h> + #include <2geom/point.h> +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/control-point.h inkscape-0.48.1/src/ui/tool/control-point.h +--- inkscape-0.48.1~/src/ui/tool/control-point.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/tool/control-point.h 2011-05-01 00:56:19.611250878 +0100 +@@ -12,6 +12,7 @@ + #define SEEN_UI_TOOL_CONTROL_POINT_H + + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/manipulator.h inkscape-0.48.1/src/ui/tool/manipulator.h +--- inkscape-0.48.1~/src/ui/tool/manipulator.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/tool/manipulator.h 2011-05-01 00:56:19.611250878 +0100 +@@ -13,6 +13,7 @@ + + #include + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h +--- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h 2010-11-06 18:47:19.000000000 +0000 ++++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h 2011-05-01 00:56:19.611250878 +0100 +@@ -11,6 +11,7 @@ + #ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H + #define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H + ++#include + #include + #include "display/display-forward.h" + #include "forward.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig +--- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig 2010-11-06 18:47:19.000000000 +0000 +@@ -0,0 +1,139 @@ ++/** @file ++ * Multi path manipulator - a tool component that edits multiple paths at once ++ */ ++/* Authors: ++ * Krzysztof KosiƄski ++ * ++ * Copyright (C) 2009 Authors ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H ++#define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H ++ ++#include ++#include "display/display-forward.h" ++#include "forward.h" ++#include "ui/tool/commit-events.h" ++#include "ui/tool/manipulator.h" ++#include "ui/tool/modifier-tracker.h" ++#include "ui/tool/node.h" ++#include "ui/tool/node-types.h" ++#include "ui/tool/shape-record.h" ++ ++struct SPCanvasGroup; ++ ++namespace Inkscape { ++namespace UI { ++ ++class PathManipulator; ++class MultiPathManipulator; ++struct PathSharedData; ++ ++/** ++ * Manipulator that manages multiple path manipulators active at the same time. ++ */ ++class MultiPathManipulator : public PointManipulator { ++public: ++ MultiPathManipulator(PathSharedData &data, sigc::connection &chg); ++ virtual ~MultiPathManipulator(); ++ virtual bool event(GdkEvent *event); ++ ++ bool empty() { return _mmap.empty(); } ++ unsigned size() { return _mmap.empty(); } ++ void setItems(std::set const &); ++ void clear() { _mmap.clear(); } ++ void cleanup(); ++ ++ void selectSubpaths(); ++ void shiftSelection(int dir); ++ void invertSelectionInSubpaths(); ++ ++ void setNodeType(NodeType t); ++ void setSegmentType(SegmentType t); ++ ++ void insertNodes(); ++ void duplicateNodes(); ++ void joinNodes(); ++ void breakNodes(); ++ void deleteNodes(bool keep_shape = true); ++ void joinSegments(); ++ void deleteSegments(); ++ void alignNodes(Geom::Dim2 d); ++ void distributeNodes(Geom::Dim2 d); ++ void reverseSubpaths(); ++ void move(Geom::Point const &delta); ++ ++ void showOutline(bool show); ++ void showHandles(bool show); ++ void showPathDirection(bool show); ++ void setLiveOutline(bool set); ++ void setLiveObjects(bool set); ++ void updateOutlineColors(); ++ ++ sigc::signal signal_coords_changed; /// Emitted whenever the coordinates ++ /// shown in the status bar need updating ++private: ++ typedef std::pair > MapPair; ++ typedef std::map > MapType; ++ ++ template ++ void invokeForAll(R (PathManipulator::*method)()) { ++ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { ++ ((i->second.get())->*method)(); ++ } ++ } ++ template ++ void invokeForAll(R (PathManipulator::*method)(A), A a) { ++ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { ++ ((i->second.get())->*method)(a); ++ } ++ } ++ template ++ void invokeForAll(R (PathManipulator::*method)(A const &), A const &a) { ++ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { ++ ((i->second.get())->*method)(a); ++ } ++ } ++ template ++ void invokeForAll(R (PathManipulator::*method)(A,B), A a, B b) { ++ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { ++ ((i->second.get())->*method)(a, b); ++ } ++ } ++ ++ void _commit(CommitEvent cps); ++ void _done(gchar const *); ++ void _doneWithCleanup(gchar const *); ++ guint32 _getOutlineColor(ShapeRole role); ++ ++ MapType _mmap; ++public: ++ PathSharedData const &_path_data; ++private: ++ sigc::connection &_changed; ++ ModifierTracker _tracker; ++ bool _show_handles; ++ bool _show_outline; ++ bool _show_path_direction; ++ bool _live_outline; ++ bool _live_objects; ++ ++ friend class PathManipulator; ++}; ++ ++} // namespace UI ++} // namespace Inkscape ++ ++#endif ++ ++/* ++ 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 -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/node-tool.h inkscape-0.48.1/src/ui/tool/node-tool.h +--- inkscape-0.48.1~/src/ui/tool/node-tool.h 2010-11-06 18:47:19.000000000 +0000 ++++ inkscape-0.48.1/src/ui/tool/node-tool.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + #include + #include "event-context.h" + #include "forward.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/tool/node.h inkscape-0.48.1/src/ui/tool/node.h +--- inkscape-0.48.1~/src/ui/tool/node.h 2011-01-02 04:34:09.000000000 +0000 ++++ inkscape-0.48.1/src/ui/tool/node.h 2011-05-01 00:56:19.611250878 +0100 +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/view/view.h inkscape-0.48.1/src/ui/view/view.h +--- inkscape-0.48.1~/src/ui/view/view.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/view/view.h 2011-05-01 00:56:19.611250878 +0100 +@@ -15,6 +15,7 @@ + */ + + #include ++#include + #include + #include "message.h" + #include "gc-managed.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/color-picker.h inkscape-0.48.1/src/ui/widget/color-picker.h +--- inkscape-0.48.1~/src/ui/widget/color-picker.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/widget/color-picker.h 2011-05-01 00:56:19.611250878 +0100 +@@ -13,6 +13,7 @@ + #ifndef __COLOR_PICKER_H__ + #define __COLOR_PICKER_H__ + ++#include + #include + #include + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/page-sizer.h inkscape-0.48.1/src/ui/widget/page-sizer.h +--- inkscape-0.48.1~/src/ui/widget/page-sizer.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/widget/page-sizer.h 2011-05-01 00:56:19.611250878 +0100 +@@ -13,6 +13,7 @@ + #define INKSCAPE_UI_WIDGET_PAGE_SIZER__H + + #include ++#include + #include + + #include "helper/units.h" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/preferences-widget.h inkscape-0.48.1/src/ui/widget/preferences-widget.h +--- inkscape-0.48.1~/src/ui/widget/preferences-widget.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/widget/preferences-widget.h 2011-05-01 00:56:19.611250878 +0100 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/selected-style.h inkscape-0.48.1/src/ui/widget/selected-style.h +--- inkscape-0.48.1~/src/ui/widget/selected-style.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/widget/selected-style.h 2011-05-01 00:56:19.611250878 +0100 +@@ -23,6 +23,7 @@ + #include + #include + ++#include + #include + + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/ui/widget/style-subject.h inkscape-0.48.1/src/ui/widget/style-subject.h +--- inkscape-0.48.1~/src/ui/widget/style-subject.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/ui/widget/style-subject.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + #include "libnr/nr-rect.h" + #include <2geom/rect.h> + #include "sp-item.h" ++#include + #include + + class SPDesktop; +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/uri-references.h inkscape-0.48.1/src/uri-references.h +--- inkscape-0.48.1~/src/uri-references.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/uri-references.h 2011-05-01 00:56:19.611250878 +0100 +@@ -13,6 +13,7 @@ + * Released under GNU GPL, read the file 'COPYING' for more information + */ + ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/uri-references.h.orig inkscape-0.48.1/src/uri-references.h.orig +--- inkscape-0.48.1~/src/uri-references.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/uri-references.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,152 @@ ++#ifndef __SP_URI_REFERENCES_H__ ++#define __SP_URI_REFERENCES_H__ ++ ++/* ++ * Helper methods for resolving URI References ++ * ++ * Authors: ++ * Lauris Kaplinski ++ * ++ * Copyright (C) 2001-2002 Lauris Kaplinski ++ * Copyright (C) 2001 Ximian, Inc. ++ * ++ * Released under GNU GPL, read the file 'COPYING' for more information ++ */ ++ ++#include ++#include ++ ++#include "bad-uri-exception.h" ++#include "forward.h" ++ ++namespace Inkscape { ++ ++/** ++ * A class encapsulating a reference to a particular URI; observers can ++ * be notified when the URI comes to reference a different SPObject. ++ * ++ * The URIReference increments and decrements the SPObject's hrefcount ++ * automatically. ++ * ++ * @see SPObject ++ * @see sp_object_href ++ * @see sp_object_hunref ++ */ ++class URIReference : public sigc::trackable { ++public: ++ /** ++ * Constructor. ++ * ++ * @param owner The object on whose behalf this URIReference ++ * is holding a reference to the target object. ++ */ ++ URIReference(SPObject *owner); ++ URIReference(SPDocument *owner_document); ++ ++ /** ++ * Destructor. Calls shutdown() if the reference has not been ++ * shut down yet. ++ */ ++ virtual ~URIReference(); ++ ++ /** ++ * Attaches to a URI, relative to the specified document. ++ * ++ * Throws a BadURIException if the URI is unsupported, ++ * or the fragment identifier is xpointer and malformed. ++ * ++ * @param rel_document document for relative URIs ++ * @param uri the URI to watch ++ */ ++ void attach(const URI &uri) throw(BadURIException); ++ ++ /** ++ * Detaches from the currently attached URI target, if any; ++ * the current referrent is signaled as NULL. ++ */ ++ void detach(); ++ ++ /** ++ * @brief Returns a pointer to the current referrent of the ++ * attached URI, or NULL. ++ * ++ * @return a pointer to the referenced SPObject or NULL ++ */ ++ SPObject *getObject() const { return _obj; } ++ ++ /** ++ * @brief Returns a pointer to the URIReference's owner ++ * ++ * @return a pointer to the URIReference's owner ++ */ ++ SPObject *getOwner() const { return _owner; } ++ ++ /** ++ * Accessor for the referrent change notification signal; ++ * this signal is emitted whenever the URIReference's ++ * referrent changes. ++ * ++ * Signal handlers take two parameters: the old and new ++ * referrents. ++ * ++ * @returns a signal ++ */ ++ sigc::signal changedSignal() { ++ return _changed_signal; ++ } ++ ++ /** ++ * Returns a pointer to a URI containing the currently attached ++ * URI, or NULL if no URI is currently attached. ++ * ++ * @returns the currently attached URI, or NULL ++ */ ++ const URI *getURI() const { ++ return _uri; ++ } ++ ++ /** ++ * Returns true if there is currently an attached URI ++ * ++ * @returns true if there is an attached URI ++ */ ++ bool isAttached() const { ++ return (bool)_uri; ++ } ++ ++ SPDocument *getOwnerDocument() { return _owner_document; } ++ SPObject *getOwnerObject() { return _owner; } ++ ++protected: ++ virtual bool _acceptObject(SPObject *obj) const { ++ (void)obj; ++ return true; ++ } ++ ++private: ++ SPObject *_owner; ++ SPDocument *_owner_document; ++ sigc::connection _connection; ++ sigc::connection _release_connection; ++ SPObject *_obj; ++ URI *_uri; ++ ++ sigc::signal _changed_signal; ++ ++ void _setObject(SPObject *object); ++ void _release(SPObject *object); ++ ++ void operator=(const URIReference &ref); ++ /* Private and definition-less to prevent accidental use. */ ++}; ++ ++} ++ ++/** ++ * Resolves an item referenced by a URI in CSS form contained in "url(...)" ++ */ ++SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri ); ++ ++SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri); ++ ++#endif +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/forward-pointer-iterator.h inkscape-0.48.1/src/util/forward-pointer-iterator.h +--- inkscape-0.48.1~/src/util/forward-pointer-iterator.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/util/forward-pointer-iterator.h 2011-05-01 00:56:19.611250878 +0100 +@@ -15,6 +15,7 @@ + #define SEEN_INKSCAPE_UTIL_FORWARD_POINTER_ITERATOR_H + + #include ++#include + #include "util/reference.h" + + namespace Inkscape { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/share.h inkscape-0.48.1/src/util/share.h +--- inkscape-0.48.1~/src/util/share.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/util/share.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + + #include "gc-core.h" + #include ++#include + + namespace Inkscape { + namespace Util { +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/util/unordered-containers.h inkscape-0.48.1/src/util/unordered-containers.h +--- inkscape-0.48.1~/src/util/unordered-containers.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/util/unordered-containers.h 2011-05-01 00:56:19.611250878 +0100 +@@ -41,6 +41,8 @@ + # define INK_UNORDERED_MAP __gnu_cxx::hash_map + # define INK_HASH __gnu_cxx::hash + ++#include ++ + namespace __gnu_cxx { + // hash function for pointers + // TR1 and Boost have this defined by default, __gnu_cxx doesn't +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/desktop-widget.h inkscape-0.48.1/src/widgets/desktop-widget.h +--- inkscape-0.48.1~/src/widgets/desktop-widget.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/widgets/desktop-widget.h 2011-05-01 00:56:19.611250878 +0100 +@@ -21,6 +21,7 @@ + #include "ui/view/view-widget.h" + #include "ui/view/edit-widget-interface.h" + ++#include + #include + + // forward declaration +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/desktop-widget.h.orig inkscape-0.48.1/src/widgets/desktop-widget.h.orig +--- inkscape-0.48.1~/src/widgets/desktop-widget.h.orig 1970-01-01 01:00:00.000000000 +0100 ++++ inkscape-0.48.1/src/widgets/desktop-widget.h.orig 2010-07-13 04:48:40.000000000 +0100 +@@ -0,0 +1,268 @@ ++#ifndef SEEN_SP_DESKTOP_WIDGET_H ++#define SEEN_SP_DESKTOP_WIDGET_H ++ ++/** \file ++ * SPDesktopWidget: handling Gtk events on a desktop. ++ * ++ * Authors: ++ * Jon A. Cruz (c) 2010 ++ * John Bintz (c) 2006 ++ * Ralf Stephan (c) 2005, distrib. under GPL2 ++ * ? -2004 ++ */ ++ ++#include ++#include ++ ++#include "display/display-forward.h" ++#include "libnr/nr-point.h" ++#include "forward.h" ++#include "message.h" ++#include "ui/view/view-widget.h" ++#include "ui/view/edit-widget-interface.h" ++ ++#include ++ ++// forward declaration ++typedef struct _EgeColorProfTracker EgeColorProfTracker; ++ ++ ++#define SP_TYPE_DESKTOP_WIDGET SPDesktopWidget::getType() ++#define SP_DESKTOP_WIDGET(o) (GTK_CHECK_CAST ((o), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidget)) ++#define SP_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidgetClass)) ++#define SP_IS_DESKTOP_WIDGET(o) (GTK_CHECK_TYPE ((o), SP_TYPE_DESKTOP_WIDGET)) ++#define SP_IS_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_DESKTOP_WIDGET)) ++ ++void sp_desktop_widget_destroy (SPDesktopWidget* dtw); ++ ++void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, gboolean show); ++void sp_desktop_widget_iconify(SPDesktopWidget *dtw); ++void sp_desktop_widget_maximize(SPDesktopWidget *dtw); ++void sp_desktop_widget_fullscreen(SPDesktopWidget *dtw); ++void sp_desktop_widget_update_zoom(SPDesktopWidget *dtw); ++void sp_desktop_widget_update_rulers (SPDesktopWidget *dtw); ++void sp_desktop_widget_update_hruler (SPDesktopWidget *dtw); ++void sp_desktop_widget_update_vruler (SPDesktopWidget *dtw); ++ ++/* Show/hide rulers & scrollbars */ ++void sp_desktop_widget_toggle_rulers (SPDesktopWidget *dtw); ++void sp_desktop_widget_toggle_scrollbars (SPDesktopWidget *dtw); ++void sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale); ++void sp_desktop_widget_toggle_color_prof_adj( SPDesktopWidget *dtw ); ++ ++void sp_dtw_desktop_activate (SPDesktopWidget *dtw); ++void sp_dtw_desktop_deactivate (SPDesktopWidget *dtw); ++ ++namespace Inkscape { namespace Widgets { class LayerSelector; } } ++ ++namespace Inkscape { namespace UI { namespace Widget { class SelectedStyle; } } } ++ ++namespace Inkscape { namespace UI { namespace Dialogs { class SwatchesPanel; } } } ++ ++/// A GtkEventBox on an SPDesktop. ++struct SPDesktopWidget { ++ SPViewWidget viewwidget; ++ ++ unsigned int update : 1; ++ ++ sigc::connection modified_connection; ++ ++ GtkTooltips *tt; ++ ++ SPDesktop *desktop; ++ ++ Gtk::Window *window; ++ ++ // The root vbox of the window layout. ++ GtkWidget *vbox; ++ ++ GtkWidget *hbox; ++ ++ GtkWidget *menubar, *statusbar; ++ ++ Inkscape::UI::Dialogs::SwatchesPanel *panels; ++ ++ GtkWidget *hscrollbar, *vscrollbar, *vscrollbar_box; ++ ++ /* Rulers */ ++ GtkWidget *hruler, *vruler; ++ GtkWidget *hruler_box, *vruler_box; // eventboxes for setting tooltips ++ ++ GtkWidget *sticky_zoom; ++ GtkWidget *cms_adjust; ++ GtkWidget *coord_status; ++ GtkWidget *coord_status_x; ++ GtkWidget *coord_status_y; ++ GtkWidget *select_status; ++ GtkWidget *select_status_eventbox; ++ GtkWidget *zoom_status; ++ gulong zoom_update; ++ ++ Inkscape::UI::Widget::Dock *dock; ++ ++ Inkscape::UI::Widget::SelectedStyle *selected_style; ++ ++ gint coord_status_id, select_status_id; ++ ++ unsigned int _interaction_disabled_counter; ++ ++ SPCanvas *canvas; ++ Geom::Point ruler_origin; ++ double dt2r; ++ ++ GtkAdjustment *hadj, *vadj; ++ ++ Inkscape::Widgets::LayerSelector *layer_selector; ++ ++ EgeColorProfTracker* _tracker; ++ ++ struct WidgetStub : public Inkscape::UI::View::EditWidgetInterface { ++ SPDesktopWidget *_dtw; ++ SPDesktop *_dt; ++ WidgetStub (SPDesktopWidget* dtw) : _dtw(dtw) {} ++ ++ virtual void setTitle (gchar const *uri) ++ { _dtw->updateTitle (uri); } ++ virtual Gtk::Window* getWindow() ++ { return _dtw->window; } ++ ++ virtual void layout() { ++ _dtw->layoutWidgets(); ++ } ++ ++ virtual void present() ++ { _dtw->presentWindow(); } ++ virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) ++ { _dtw->getWindowGeometry (x, y, w, h); } ++ virtual void setSize (gint w, gint h) ++ { _dtw->setWindowSize (w, h); } ++ virtual void setPosition (Geom::Point p) ++ { _dtw->setWindowPosition (p); } ++ virtual void setTransient (void* p, int transient_policy) ++ { _dtw->setWindowTransient (p, transient_policy); } ++ virtual Geom::Point getPointer() ++ { return _dtw->window_get_pointer(); } ++ virtual void setIconified() ++ { sp_desktop_widget_iconify (_dtw); } ++ virtual void setMaximized() ++ { sp_desktop_widget_maximize (_dtw); } ++ virtual void setFullscreen() ++ { sp_desktop_widget_fullscreen (_dtw); } ++ virtual bool shutdown() ++ { return _dtw->shutdown(); } ++ virtual void destroy() ++ { ++ if(_dtw->window != NULL) ++ delete _dtw->window; ++ _dtw->window = NULL; ++ } ++ ++ virtual void requestCanvasUpdate() ++ { _dtw->requestCanvasUpdate(); } ++ virtual void requestCanvasUpdateAndWait() ++ { _dtw->requestCanvasUpdateAndWait(); } ++ virtual void enableInteraction() ++ { _dtw->enableInteraction(); } ++ virtual void disableInteraction() ++ { _dtw->disableInteraction(); } ++ virtual void activateDesktop() ++ { sp_dtw_desktop_activate (_dtw); } ++ virtual void deactivateDesktop() ++ { sp_dtw_desktop_deactivate (_dtw); } ++ virtual void viewSetPosition (Geom::Point p) ++ { _dtw->viewSetPosition (p); } ++ virtual void updateRulers() ++ { sp_desktop_widget_update_rulers (_dtw); } ++ virtual void updateScrollbars (double scale) ++ { sp_desktop_widget_update_scrollbars (_dtw, scale); } ++ virtual void toggleRulers() ++ { sp_desktop_widget_toggle_rulers (_dtw); } ++ virtual void toggleScrollbars() ++ { sp_desktop_widget_toggle_scrollbars (_dtw); } ++ virtual void toggleColorProfAdjust() ++ { sp_desktop_widget_toggle_color_prof_adj(_dtw); } ++ virtual void updateZoom() ++ { sp_desktop_widget_update_zoom (_dtw); } ++ virtual void letZoomGrabFocus() ++ { _dtw->letZoomGrabFocus(); } ++ virtual void setToolboxFocusTo (const gchar * id) ++ { _dtw->setToolboxFocusTo (id); } ++ virtual void setToolboxAdjustmentValue (const gchar *id, double val) ++ { _dtw->setToolboxAdjustmentValue (id, val); } ++ virtual void setToolboxSelectOneValue (gchar const *id, int val) ++ { _dtw->setToolboxSelectOneValue (id, val); } ++ virtual bool isToolboxButtonActive (gchar const* id) ++ { return _dtw->isToolboxButtonActive (id); } ++ virtual void setCoordinateStatus (Geom::Point p) ++ { _dtw->setCoordinateStatus (p); } ++ virtual void setMessage (Inkscape::MessageType type, gchar const* msg) ++ { _dtw->setMessage (type, msg); } ++ virtual bool warnDialog (gchar* text) ++ { return _dtw->warnDialog (text); } ++ virtual Inkscape::UI::Widget::Dock* getDock () ++ { return _dtw->getDock(); } ++ }; ++ ++ WidgetStub *stub; ++ ++ void setMessage(Inkscape::MessageType type, gchar const *message); ++ Geom::Point window_get_pointer(); ++ bool shutdown(); ++ void viewSetPosition (Geom::Point p); ++ void letZoomGrabFocus(); ++ void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); ++ void setWindowPosition (Geom::Point p); ++ void setWindowSize (gint w, gint h); ++ void setWindowTransient (void *p, int transient_policy); ++ void presentWindow(); ++ bool warnDialog (gchar *text); ++ void setToolboxFocusTo (gchar const *); ++ void setToolboxAdjustmentValue (gchar const * id, double value); ++ void setToolboxSelectOneValue (gchar const * id, gint value); ++ bool isToolboxButtonActive (gchar const *id); ++ void setToolboxPosition(Glib::ustring const& id, GtkPositionType pos); ++ void setCoordinateStatus(Geom::Point p); ++ void requestCanvasUpdate(); ++ void requestCanvasUpdateAndWait(); ++ void enableInteraction(); ++ void disableInteraction(); ++ void updateTitle(gchar const *uri); ++ bool onFocusInEvent(GdkEventFocus*); ++ ++ Inkscape::UI::Widget::Dock* getDock(); ++ ++ static GtkType getType(); ++ static SPDesktopWidget* createInstance(SPNamedView *namedview); ++ ++ void updateNamedview(); ++ ++private: ++ GtkWidget *tool_toolbox; ++ GtkWidget *aux_toolbox; ++ GtkWidget *commands_toolbox,; ++ GtkWidget *snap_toolbox; ++ ++ static void init(SPDesktopWidget *widget); ++ void layoutWidgets(); ++ ++ void namedviewModified(SPObject *obj, guint flags); ++ ++}; ++ ++/// The SPDesktopWidget vtable ++struct SPDesktopWidgetClass { ++ SPViewWidgetClass parent_class; ++}; ++ ++#endif /* !SEEN_SP_DESKTOP_WIDGET_H */ ++ ++/* ++ 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 : +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/gradient-image.h inkscape-0.48.1/src/widgets/gradient-image.h +--- inkscape-0.48.1~/src/widgets/gradient-image.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/widgets/gradient-image.h 2011-05-01 00:56:19.611250878 +0100 +@@ -19,6 +19,7 @@ + + #include + ++#include + #include + + #define SP_TYPE_GRADIENT_IMAGE (sp_gradient_image_get_type ()) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/gradient-vector.h inkscape-0.48.1/src/widgets/gradient-vector.h +--- inkscape-0.48.1~/src/widgets/gradient-vector.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/widgets/gradient-vector.h 2011-05-01 00:56:19.611250878 +0100 +@@ -17,6 +17,7 @@ + + #include + ++#include + #include + + #include +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/sp-attribute-widget.h inkscape-0.48.1/src/widgets/sp-attribute-widget.h +--- inkscape-0.48.1~/src/widgets/sp-attribute-widget.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/widgets/sp-attribute-widget.h 2011-05-01 00:56:19.611250878 +0100 +@@ -14,6 +14,7 @@ + #define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H + + #include ++#include + #include + + #define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ()) +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp inkscape-0.48.1/src/widgets/sp-color-notebook.cpp +--- inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/widgets/sp-color-notebook.cpp 2011-05-01 00:56:19.611250878 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' inkscape-0.48.1~/src/xml/helper-observer.h inkscape-0.48.1/src/xml/helper-observer.h +--- inkscape-0.48.1~/src/xml/helper-observer.h 2010-07-13 04:48:40.000000000 +0100 ++++ inkscape-0.48.1/src/xml/helper-observer.h 2011-05-01 00:56:19.611250878 +0100 +@@ -5,6 +5,7 @@ + #include "node.h" + #include "../sp-object.h" + //#include "../sp-object-repr.h" ++#include + #include + + namespace Inkscape { === modified file 'debian/rules' --- debian/rules 2011-02-20 12:07:30 +0000 +++ debian/rules 2011-05-07 23:49:08 +0000 @@ -100,12 +100,6 @@ install -D -o root -g root -m 644 $(CURDIR)/debian/inkscape.bash $(CURDIR)/debian/inkscape/etc/bash_completion.d/inkscape chmod a+x $(CURDIR)/debian/inkscape/usr/share/inkscape/extensions/xaml2svg/ - # Add translation domain to .desktop files - DOMAIN=$$(grep --max-count 1 '^GETTEXT_PACKAGE[[:space:]]*=' $(CURDIR)/po/Makefile | sed 's/^.*=[[:space:]]\([^[:space:]]\)/\1/'); \ - for d in $$(find debian/inkscape -type f -name "*.desktop" ); do \ - echo "Adding translation domain $$DOMAIN to $$d..."; \ - echo "X-Ubuntu-Gettext-Domain=$$DOMAIN" >> $$d; \ - done; # Build architecture-independent files here.