Merge lp:~valavanisalex/ubuntu/oneiric/inkscape/fix-726850 into lp:ubuntu/oneiric/inkscape

Proposed by Alex Valavanis
Status: Rejected
Rejected by: Martin Pitt
Proposed branch: lp:~valavanisalex/ubuntu/oneiric/inkscape/fix-726850
Merge into: lp:ubuntu/oneiric/inkscape
Diff against target: 8748 lines (+4368/-4329)
8 files modified
debian/changelog (+16/-0)
debian/patches/00list (+3/-2)
debian/patches/01_add_unity_quicklist_support.patch.dpatch (+0/-20)
debian/patches/04-fix-gcc4.6-ftbfs.dpatch (+0/-4301)
debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch (+22/-0)
debian/patches/ubuntu-02-add-translation-domain-to-desktop-file.dpatch (+25/-0)
debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch (+4302/-0)
debian/rules (+0/-6)
To merge this branch: bzr merge lp:~valavanisalex/ubuntu/oneiric/inkscape/fix-726850
Reviewer Review Type Date Requested Status
Martin Pitt Disapprove
Review via email: mp+60303@code.launchpad.net

Description of the change

This branch introduces two main changes:

1) A fix for bug #726850, to ensure that the translation domain is added to the correct group in inkscape.desktop

2) Reformatting of patches added in the Ubuntu fork: All patch names are no prefixed by "ubuntu-" to distinguish them from those maintained in Debian, and the DEP-3 headers have been refreshed and completed.

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Note that you should use "bzr mv" for renamings, otherwise you lose the bzr history of the patches, and changes are very hard to read. Also, 03-fix-gcc4.6-ftbfs.dpatch is not Ubuntu specific, that really ought to be fixed upstream as well.

So I'll merge this with using bzr mv instead, and hand-craft the changed headers back in. I won't rename the gcc patch.

review: Approve
Revision history for this message
Martin Pitt (pitti) wrote :

Also, I think a better fix would be to use dh_translations instead of hand-patching the domain. I'll do that as well.

Also, I noticed that all other patches were committed to upstream as well, so I don't think we should rename them to be ubuntu specific. Therefore there's nothing left in this MP to merge, I'll handle the dh_translations issue in the bug.

Thanks!

review: Disapprove

Unmerged revisions

54. By Alex Valavanis

* 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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-05-01 01:08:10 +0000
+++ debian/changelog 2011-05-08 10:26:27 +0000
@@ -1,3 +1,19 @@
1inkscape (0.48.1-2ubuntu4) natty; urgency=low
2
3 * debian/patches/01_add_unity_quicklist_support.patch.dpatch:
4 - Rename to debian/patches/ubuntu-01-add-unity-quicklist-support.dpatch
5 - Refresh header
6 * Make sure that translation domain is added to correct group in
7 Desktop entry file (LP: #726850):
8 - debian/rules: Removed broken patch from install rule
9 - debian/patches/ubuntu-02-add-translation-domain-to-desktop-
10 file.dpatch: New dpatch to replace the patch in debian/rules
11 * debian/patches/04-fix-gcc4.6-ftbfs.dpatch:
12 - Rename to debian/patches/ubuntu-03-fix-gcc4.6-ftbfs.dpatch
13 - Refresh header
14
15 -- Alex Valavanis <valavanisalex@gmail.com> Sun, 08 May 2011 01:11:10 +0100
16
1inkscape (0.48.1-2ubuntu3) oneiric; urgency=low17inkscape (0.48.1-2ubuntu3) oneiric; urgency=low
218
3 * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: Fix build failure with gcc 4.6 19 * debian/patches/04-fix-gcc4.6-ftbfs.dpatch: Fix build failure with gcc 4.6
420
=== modified file 'debian/patches/00list'
--- debian/patches/00list 2011-05-01 01:08:10 +0000
+++ debian/patches/00list 2011-05-08 10:26:27 +0000
@@ -1,5 +1,6 @@
101-libwpg0.2.dpatch101-libwpg0.2.dpatch
202-add-shebangs-and-fix-permissions202-add-shebangs-and-fix-permissions
303-add-missing-mimetypes303-add-missing-mimetypes
401_add_unity_quicklist_support.patch4ubuntu-01-add-unity-quicklist-support.dpatch
504-fix-gcc4.6-ftbfs.dpatch5ubuntu-02-add-translation-domain-to-desktop-file.dpatch
6ubuntu-03-fix-gcc4.6-ftbfs.dpatch
67
=== 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 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2# Description: Add Unity static quicklist support to inkscape
3# Forwarded: https://bugs.launchpad.net/inkscape/+bug/676886
4# Bug-Ubuntu: https://bugs.launchpad.net/bugs/676886
5# Author: Didier Roche <didrocks@ubuntu.com>
6
7@DPATCH@
8diff -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
9--- inkscape-0.48.1~/inkscape.desktop.in 2010-07-13 05:48:40.000000000 +0200
10+++ inkscape-0.48.1/inkscape.desktop.in 2011-02-17 16:21:42.690388423 +0100
11@@ -12,3 +12,9 @@
12 Terminal=false
13 StartupNotify=true
14 Icon=inkscape
15+X-Ayatana-Desktop-Shortcuts=Drawing
16+
17+[Drawing Shortcut Group]
18+_Name=New Drawing
19+Exec=inkscape
20+TargetEnvironment=Unity
210
=== 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 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## Description: Fix build failure with gcc 4.6
3## Author: theAdib <theadib@gmail.com>
4## Bug: https://bugs.launchpad.net/inkscape/+bug/765983
5## 04-fix-gcc4.6-ftbfs.dpatch by Alex Valavanis <valavanisalex@gmail.com>
6##
7## All lines beginning with `## DP:' are a description of the patch.
8## DP: No description.
9
10@DPATCH@
11diff -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
12--- inkscape-0.48.1~/src/2geom/utils.h 2010-07-13 04:48:40.000000000 +0100
13+++ inkscape-0.48.1/src/2geom/utils.h 2011-05-01 00:56:53.101250888 +0100
14@@ -33,6 +33,7 @@
15 *
16 */
17
18+#include <cstddef>
19 #include <cmath>
20 #include <vector>
21
22diff -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
23--- inkscape-0.48.1~/src/Makefile.am 2010-07-13 04:48:40.000000000 +0100
24+++ inkscape-0.48.1/src/Makefile.am 2011-05-01 00:56:19.591250878 +0100
25@@ -205,7 +205,7 @@
26
27 inkscape_SOURCES += main.cpp $(win32_sources)
28 inkscape_LDADD = $(all_libs)
29-inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows)
30+inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows)
31
32 inkview_SOURCES += inkview.cpp $(win32_sources)
33 inkview_LDADD = $(all_libs)
34diff -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
35--- inkscape-0.48.1~/src/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100
36+++ inkscape-0.48.1/src/Makefile.am.orig 2010-07-13 04:48:40.000000000 +0100
37@@ -0,0 +1,277 @@
38+## Process this file with automake to produce Makefile.in
39+
40+# ################################################
41+# G L O B A L
42+# ################################################
43+
44+# Should work in either automake1.7 or 1.8, but 1.6 doesn't
45+# handle foo/libfoo_a_CPPFLAGS properly (if at all).
46+# Update: We now avoid setting foo/libfoo_a_CPPFLAGS,
47+# so perhaps 1.6 will work.
48+AUTOMAKE_OPTIONS = 1.7 subdir-objects
49+
50+# Executables compiled by "make" and installed by "make install"
51+bin_PROGRAMS = inkscape inkview
52+
53+# Libraries which should be compiled by "make" but not installed.
54+# Use this only for libraries that are really standalone, rather than for
55+# source tree subdirectories.
56+#if WITH_INKBOARD
57+#libpedro = pedro/libpedro.a
58+#endif
59+noinst_LIBRARIES = \
60+ libinkscape.a \
61+ dom/libdom.a \
62+ libcroco/libcroco.a \
63+ libavoid/libavoid.a \
64+ libgdl/libgdl.a \
65+ libcola/libcola.a \
66+ libvpsc/libvpsc.a \
67+ livarot/libvarot.a \
68+ 2geom/lib2geom.a \
69+ $(libpedro) \
70+ libinkversion.a
71+
72+all_libs = \
73+ $(noinst_LIBRARIES) \
74+ $(INKSCAPE_LIBS) \
75+ $(GNOME_VFS_LIBS) \
76+ $(XFT_LIBS) \
77+ $(FREETYPE_LIBS) \
78+ $(kdeldadd) \
79+ $(win32ldflags) \
80+ $(CARBON_LDFLAGS) \
81+ $(PERL_LIBS) \
82+ $(PYTHON_LIBS) \
83+ $(INKBOARD_LIBS) \
84+ $(LIBWPG_LIBS) \
85+ $(IMAGEMAGICK_LIBS)
86+
87+# Add sources common for Inkscape and Inkview to this variable.
88+ink_common_sources =
89+# Add Inkscape-only sources here.
90+inkscape_SOURCES =
91+# Add Inkview-only sources here.
92+inkview_SOURCES =
93+
94+INCLUDES = \
95+ $(PERL_CFLAGS) $(PYTHON_CFLAGS) \
96+ $(FREETYPE_CFLAGS) \
97+ $(GNOME_PRINT_CFLAGS) \
98+ $(GNOME_VFS_CFLAGS) \
99+ $(IMAGEMAGICK_CFLAGS) \
100+ $(INKBOARD_CFLAGS) \
101+ $(LIBWPG_CFLAGS) \
102+ $(XFT_CFLAGS) \
103+ $(LCMS_CFLAGS) \
104+ $(POPPLER_CFLAGS) \
105+ $(POPPLER_GLIB_CFLAGS) \
106+ -DPOTRACE=\"potrace\" \
107+ $(INKSCAPE_CFLAGS) \
108+ -I$(top_srcdir)/cxxtest \
109+ $(WIN32_CFLAGS) \
110+ -I$(srcdir)/bind/javainc \
111+ -I$(srcdir)/bind/javainc/linux \
112+ $(AM_CPPFLAGS)
113+
114+CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
115+CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
116+CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS)
117+# Add test cases to this variable
118+CXXTEST_TESTSUITES =
119+
120+# ################################################
121+#
122+# E X T R A
123+#
124+# ################################################
125+
126+if PLATFORM_WIN32
127+win32_sources = winmain.cpp registrytool.cpp registrytool.h
128+win32ldflags = -lcomdlg32 -lmscms
129+mwindows = -mwindows
130+endif
131+
132+if INKJAR
133+inkjar_dir = inkjar
134+inkjar_libs = inkjar/libinkjar.a
135+endif
136+
137+# Include all partial makefiles from subdirectories
138+include Makefile_insert
139+include application/Makefile_insert
140+include bind/Makefile_insert
141+include dialogs/Makefile_insert
142+include display/Makefile_insert
143+include dom/Makefile_insert
144+include extension/Makefile_insert
145+include extension/implementation/Makefile_insert
146+include extension/internal/Makefile_insert
147+include extension/script/Makefile_insert
148+include filters/Makefile_insert
149+include helper/Makefile_insert
150+include io/Makefile_insert
151+#include pedro/Makefile_insert
152+#include jabber_whiteboard/Makefile_insert
153+include libcroco/Makefile_insert
154+include libgdl/Makefile_insert
155+include libnr/Makefile_insert
156+include libnrtype/Makefile_insert
157+include libavoid/Makefile_insert
158+include livarot/Makefile_insert
159+include live_effects/Makefile_insert
160+include live_effects/parameter/Makefile_insert
161+include libvpsc/Makefile_insert
162+include libcola/Makefile_insert
163+include svg/Makefile_insert
164+include widgets/Makefile_insert
165+include debug/Makefile_insert
166+include xml/Makefile_insert
167+include ui/Makefile_insert
168+include ui/cache/Makefile_insert
169+include ui/dialog/Makefile_insert
170+include ui/tool/Makefile_insert
171+include ui/view/Makefile_insert
172+include ui/widget/Makefile_insert
173+include util/Makefile_insert
174+include trace/Makefile_insert
175+include 2geom/Makefile_insert
176+
177+# Extra files not mentioned as sources to include in the source tarball
178+EXTRA_DIST = \
179+ $(top_srcdir)/Doxyfile \
180+ sp-skeleton.cpp sp-skeleton.h \
181+ util/makefile.in \
182+ application/makefile.in \
183+ bind/makefile.in \
184+ debug/makefile.in \
185+ dialogs/makefile.in \
186+ display/makefile.in \
187+ dom/makefile.in \
188+ extension/implementation/makefile.in \
189+ extension/internal/makefile.in \
190+ extension/makefile.in \
191+ extension/script/makefile.in \
192+ filters/makefile.in \
193+ helper/makefile.in \
194+ io/makefile.in \
195+ io/crystalegg.xml \
196+ io/doc2html.xsl \
197+ pedro/makefile.in \
198+ jabber_whiteboard/makefile.in \
199+ libgdl/makefile.in \
200+ libcroco/makefile.in \
201+ libnr/makefile.in \
202+ libnrtype/makefile.in \
203+ libavoid/makefile.in \
204+ livarot/makefile.in \
205+ live_effects/makefile.in \
206+ live_effects/parameter/makefile.in \
207+ svg/makefile.in \
208+ trace/makefile.in \
209+ ui/makefile.in \
210+ ui/cache/makefile.in \
211+ ui/dialog/makefile.in \
212+ ui/view/makefile.in \
213+ ui/widget/makefile.in \
214+ util/makefile.in \
215+ widgets/makefile.in \
216+ xml/makefile.in \
217+ 2geom/makefile.in \
218+ extension/internal/win32.cpp \
219+ extension/internal/win32.h \
220+ extension/internal/emf-win32-inout.cpp \
221+ extension/internal/emf-win32-inout.h \
222+ extension/internal/emf-win32-print.cpp \
223+ extension/internal/emf-win32-print.h \
224+ helper/sp-marshal.list \
225+ show-preview.bmp \
226+ winconsole.cpp \
227+ $(jabber_whiteboard_SOURCES) \
228+ $(CXXTEST_TEMPLATE)
229+
230+# Extra files to remove when doing "make distclean"
231+DISTCLEANFILES = \
232+ helper/sp-marshal.cpp \
233+ helper/sp-marshal.h \
234+ inkscape-version.cpp
235+
236+# ################################################
237+# B I N A R I E S
238+# ################################################
239+
240+# this should speed up the build
241+libinkscape_a_SOURCES = $(ink_common_sources)
242+
243+inkscape_SOURCES += main.cpp $(win32_sources)
244+inkscape_LDADD = $(all_libs)
245+inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows)
246+
247+inkview_SOURCES += inkview.cpp $(win32_sources)
248+inkview_LDADD = $(all_libs)
249+inkview_LDFLAGS = $(mwindows)
250+
251+# ################################################
252+# VERSION REPORTING
253+# ################################################
254+
255+libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h
256+
257+if USE_BZR_VERSION
258+inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision
259+endif
260+
261+# If this is an BZR snapshot build, regenerate this file every time
262+# someone updates the BZR working directory.
263+inkscape-version.cpp: $(inkscape_version_deps)
264+ VER_PREFIX="$(VERSION)";\
265+ VER_BZRREV=" r`bzr revno`"; \
266+ if test ! -z "`bzr status -S -V $(srcdir)`"; then \
267+ VER_CUSTOM=" custom"; \
268+ fi; \
269+ VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \
270+ echo "namespace Inkscape { " \
271+ "char const *version_string = \"$$VERSION\"; " \
272+ "}" > inkscape-version.new.cpp; \
273+ if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \
274+ rm inkscape-version.new.cpp; \
275+ else \
276+ mv inkscape-version.new.cpp inkscape-version.cpp; \
277+ fi; \
278+ echo $$VERSION
279+
280+# #################################
281+# ## TESTING STUFF (make check) ###
282+# #################################
283+
284+# List of all programs that should be built before testing. Note that this is
285+# different from TESTS, because some tests can be scripts that don't
286+# need to be built. There should be one test program per directory.
287+# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items:
288+# TESTS items can be scripts etc.
289+check_PROGRAMS = cxxtests
290+
291+# streamtest is unfinished and can't handle the relocations done during
292+# "make distcheck".
293+
294+# List of all tests to be run.
295+TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests
296+XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests
297+
298+# including the the testsuites here ensures that they get distributed
299+cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES)
300+cxxtests_LDADD = $(all_libs)
301+
302+cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE)
303+ $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES)
304+
305+# ################################################
306+# D I S T
307+# ################################################
308+
309+dist-hook:
310+ mkdir $(distdir)/pixmaps
311+ cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps
312+
313+distclean-local:
314+ rm -f cxxtests.xml cxxtests.log
315diff -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
316--- inkscape-0.48.1~/src/arc-context.h 2010-07-13 04:48:40.000000000 +0100
317+++ inkscape-0.48.1/src/arc-context.h 2011-05-01 00:56:19.591250878 +0100
318@@ -15,6 +15,7 @@
319 * Released under GNU GPL, read the file 'COPYING' for more information
320 */
321
322+#include <stddef.h>
323 #include <sigc++/connection.h>
324
325 #include <2geom/point.h>
326diff -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
327--- inkscape-0.48.1~/src/box3d-context.h 2010-07-13 04:48:40.000000000 +0100
328+++ inkscape-0.48.1/src/box3d-context.h 2011-05-01 00:56:19.591250878 +0100
329@@ -15,6 +15,7 @@
330 * Released under GNU GPL
331 */
332
333+#include <stddef.h>
334 #include <sigc++/sigc++.h>
335 #include "event-context.h"
336 #include "proj_pt.h"
337diff -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
338--- inkscape-0.48.1~/src/conn-avoid-ref.h 2010-07-13 04:48:40.000000000 +0100
339+++ inkscape-0.48.1/src/conn-avoid-ref.h 2011-05-01 00:56:19.591250878 +0100
340@@ -14,6 +14,7 @@
341 */
342
343 #include <glib/gslist.h>
344+#include <stddef.h>
345 #include <sigc++/connection.h>
346
347 struct SPDesktop;
348diff -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
349--- inkscape-0.48.1~/src/connection-pool.h 2010-07-13 04:48:40.000000000 +0100
350+++ inkscape-0.48.1/src/connection-pool.h 2011-05-01 00:56:19.591250878 +0100
351@@ -3,6 +3,7 @@
352
353 #include <glib-object.h>
354 #include <gtkmm.h>
355+#include <stddef.h>
356 #include <sigc++/sigc++.h>
357
358 namespace Inkscape
359diff -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
360--- inkscape-0.48.1~/src/connector-context.h 2010-07-13 04:48:40.000000000 +0100
361+++ inkscape-0.48.1/src/connector-context.h 2011-05-01 00:56:19.591250878 +0100
362@@ -12,6 +12,7 @@
363 * Released under GNU GPL, read the file 'COPYING' for more information
364 */
365
366+#include <stddef.h>
367 #include <sigc++/sigc++.h>
368 #include <sigc++/connection.h>
369 #include "event-context.h"
370diff -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
371--- inkscape-0.48.1~/src/desktop.h 2010-07-13 04:48:40.000000000 +0100
372+++ inkscape-0.48.1/src/desktop.h 2011-05-01 00:56:19.591250878 +0100
373@@ -27,6 +27,7 @@
374
375 #include <gdk/gdkevents.h>
376 #include <gtk/gtktypeutils.h>
377+#include <stddef.h>
378 #include <sigc++/sigc++.h>
379
380 #include <2geom/matrix.h>
381diff -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
382--- inkscape-0.48.1~/src/desktop.h.orig 1970-01-01 01:00:00.000000000 +0100
383+++ inkscape-0.48.1/src/desktop.h.orig 2010-07-13 04:48:40.000000000 +0100
384@@ -0,0 +1,379 @@
385+#ifndef SEEN_SP_DESKTOP_H
386+#define SEEN_SP_DESKTOP_H
387+
388+/** \file
389+ * SPDesktop: an editable view.
390+ *
391+ * Author:
392+ * Lauris Kaplinski <lauris@kaplinski.com>
393+ * Frank Felfe <innerspace@iname.com>
394+ * bulia byak <buliabyak@users.sf.net>
395+ * Ralf Stephan <ralf@ark.in-berlin.de>
396+ * John Bintz <jcoswell@coswellproductions.org>
397+ * Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
398+ *
399+ * Copyright (C) 2007 Johan Engelen
400+ * Copyright (C) 2006 John Bintz
401+ * Copyright (C) 1999-2005 authors
402+ * Copyright (C) 2000-2001 Ximian, Inc.
403+ *
404+ * Released under GNU GPL, read the file 'COPYING' for more information
405+ *
406+ */
407+
408+#ifdef HAVE_CONFIG_H
409+#include "config.h"
410+#endif
411+
412+#include <gdk/gdkevents.h>
413+#include <gtk/gtktypeutils.h>
414+#include <sigc++/sigc++.h>
415+
416+#include <2geom/matrix.h>
417+#include <2geom/rect.h>
418+
419+#include "ui/view/view.h"
420+#include "ui/view/edit-widget-interface.h"
421+
422+#include "display/rendermode.h"
423+#include "display/snap-indicator.h"
424+
425+class SPCSSAttr;
426+struct SPCanvas;
427+struct SPCanvasItem;
428+struct SPCanvasGroup;
429+struct SPEventContext;
430+struct SPItem;
431+struct SPNamedView;
432+struct SPObject;
433+struct SPStyle;
434+
435+namespace Gtk
436+{
437+ class Window;
438+}
439+
440+typedef int sp_verb_t;
441+
442+
443+
444+namespace Inkscape {
445+ class Application;
446+ class MessageContext;
447+ class Selection;
448+ class ObjectHierarchy;
449+ class LayerManager;
450+ class EventLog;
451+ namespace UI {
452+ namespace Dialog {
453+ class DialogManager;
454+ }
455+ }
456+ namespace Whiteboard {
457+ class SessionManager;
458+ }
459+ namespace Display {
460+ class TemporaryItemList;
461+ class TemporaryItem;
462+ //class SnapIndicator;
463+ }
464+}
465+
466+/**
467+ * Editable view.
468+ *
469+ * @see \ref desktop-handles.h for desktop macros.
470+ */
471+struct SPDesktop : public Inkscape::UI::View::View
472+{
473+ Inkscape::UI::Dialog::DialogManager *_dlg_mgr;
474+ SPNamedView *namedview;
475+ SPCanvas *canvas;
476+ /// current selection; will never generally be NULL
477+ Inkscape::Selection *selection;
478+ SPEventContext *event_context;
479+ Inkscape::LayerManager *layer_manager;
480+ Inkscape::EventLog *event_log;
481+
482+ Inkscape::Display::TemporaryItemList *temporary_item_list;
483+ Inkscape::Display::SnapIndicator *snapindicator;
484+
485+ SPCanvasItem *acetate;
486+ SPCanvasGroup *main;
487+ SPCanvasGroup *gridgroup;
488+ SPCanvasGroup *guides;
489+ SPCanvasItem *drawing;
490+ SPCanvasGroup *sketch;
491+ SPCanvasGroup *controls;
492+ SPCanvasGroup *tempgroup; ///< contains temporary canvas items
493+ SPCanvasItem *table; ///< outside-of-page background
494+ SPCanvasItem *page; ///< page background
495+ SPCanvasItem *page_border; ///< page border
496+ SPCSSAttr *current; ///< current style
497+ bool _focusMode; ///< Whether we're focused working or general working
498+
499+ GList *zooms_past;
500+ GList *zooms_future;
501+ bool _quick_zoom_enabled; ///< Signifies that currently we're in quick zoom mode
502+ Geom::Rect _quick_zoom_stored_area; ///< The area of the screen before quick zoom
503+ unsigned int dkey;
504+ unsigned int number;
505+ guint window_state;
506+ unsigned int interaction_disabled_counter;
507+ bool waiting_cursor;
508+
509+ /// \todo fixme: This has to be implemented in different way */
510+ guint guides_active : 1;
511+
512+ // storage for selected dragger used by GrDrag as it's
513+ // created and deleted by tools
514+ SPItem *gr_item;
515+ guint gr_point_type;
516+ guint gr_point_i;
517+ bool gr_fill_or_stroke;
518+
519+
520+ Inkscape::ObjectHierarchy *_layer_hierarchy;
521+ gchar * _reconstruction_old_layer_id;
522+
523+ sigc::signal<void, sp_verb_t> _tool_changed;
524+ sigc::signal<void, SPObject *> _layer_changed_signal;
525+ sigc::signal<bool, const SPCSSAttr *>::accumulated<StopOnTrue> _set_style_signal;
526+ sigc::signal<int, SPStyle *, int>::accumulated<StopOnNonZero> _query_style_signal;
527+
528+ /// Emitted when the zoom factor changes (not emitted when scrolling).
529+ /// The parameter is the new zoom factor
530+ sigc::signal<void, double> signal_zoom_changed;
531+
532+ sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot)
533+ {
534+ return _document_replaced_signal.connect (slot);
535+ }
536+
537+ sigc::connection connectEventContextChanged (const sigc::slot<void,SPDesktop*,SPEventContext*> & slot)
538+ {
539+ return _event_context_changed_signal.connect (slot);
540+ }
541+ sigc::connection connectSetStyle (const sigc::slot<bool, const SPCSSAttr *> & slot)
542+ {
543+ return _set_style_signal.connect (slot);
544+ }
545+ sigc::connection connectQueryStyle (const sigc::slot<int, SPStyle *, int> & slot)
546+ {
547+ return _query_style_signal.connect (slot);
548+ }
549+ // subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection
550+ sigc::connection connectToolSubselectionChanged(const sigc::slot<void, gpointer> & slot) {
551+ return _tool_subselection_changed.connect(slot);
552+ }
553+ void emitToolSubselectionChanged(gpointer data);
554+ sigc::connection connectCurrentLayerChanged(const sigc::slot<void, SPObject *> & slot) {
555+ return _layer_changed_signal.connect(slot);
556+ }
557+
558+ // Whiteboard changes
559+
560+#ifdef WITH_INKBOARD
561+ Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() {
562+ return _whiteboard_session_manager;
563+ }
564+
565+ Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager;
566+#endif
567+
568+ SPDesktop();
569+ void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget);
570+ virtual ~SPDesktop();
571+ void destroy();
572+
573+ Inkscape::MessageContext *guidesMessageContext() const {
574+ return _guides_message_context;
575+ }
576+
577+ Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom = true);
578+ void remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem);
579+
580+ void _setDisplayMode(Inkscape::RenderMode mode);
581+ void setDisplayModeNormal() {
582+ _setDisplayMode(Inkscape::RENDERMODE_NORMAL);
583+ }
584+ void setDisplayModeNoFilters() {
585+ _setDisplayMode(Inkscape::RENDERMODE_NO_FILTERS);
586+ }
587+ void setDisplayModeOutline() {
588+ _setDisplayMode(Inkscape::RENDERMODE_OUTLINE);
589+ }
590+// void setDisplayModePrintColorsPreview() {
591+// _setDisplayMode(Inkscape::RENDERMODE_PRINT_COLORS_PREVIEW);
592+// }
593+ void displayModeToggle();
594+ Inkscape::RenderMode _display_mode;
595+ Inkscape::RenderMode getMode() const { return _display_mode; }
596+
597+ Inkscape::UI::Widget::Dock* getDock() { return _widget->getDock(); }
598+
599+ void set_active (bool new_active);
600+ SPObject *currentRoot() const;
601+ SPObject *currentLayer() const;
602+ void setCurrentLayer(SPObject *object);
603+ void toggleLayerSolo(SPObject *object);
604+ SPObject *layerForObject(SPObject *object);
605+ bool isLayer(SPObject *object) const;
606+ bool isWithinViewport(SPItem *item) const;
607+ bool itemIsHidden(SPItem const *item) const;
608+
609+ void activate_guides (bool activate);
610+ void change_document (SPDocument *document);
611+
612+ void set_event_context (GtkType type, const gchar *config);
613+ void push_event_context (GtkType type, const gchar *config, unsigned int key);
614+
615+ void set_coordinate_status (Geom::Point p);
616+ SPItem *item_from_list_at_point_bottom (const GSList *list, Geom::Point const p) const;
617+ SPItem *item_at_point (Geom::Point const p, bool into_groups, SPItem *upto = NULL) const;
618+ SPItem *group_at_point (Geom::Point const p) const;
619+ Geom::Point point() const;
620+
621+ Geom::Rect get_display_area() const;
622+ void set_display_area (double x0, double y0, double x1, double y1, double border, bool log = true);
623+ void set_display_area(Geom::Rect const &a, Geom::Coord border, bool log = true);
624+ void zoom_absolute (double cx, double cy, double zoom);
625+ void zoom_relative (double cx, double cy, double zoom);
626+ void zoom_absolute_keep_point (double cx, double cy, double px, double py, double zoom);
627+ void zoom_relative_keep_point (double cx, double cy, double zoom);
628+ void zoom_relative_keep_point (Geom::Point const &c, double const zoom)
629+ {
630+ zoom_relative_keep_point (c[Geom::X], c[Geom::Y], zoom);
631+ }
632+
633+ void zoom_page();
634+ void zoom_page_width();
635+ void zoom_drawing();
636+ void zoom_selection();
637+ void zoom_grab_focus();
638+ double current_zoom() const { return _d2w.descrim(); }
639+ void prev_zoom();
640+ void next_zoom();
641+ void zoom_quick(bool enable = true);
642+ /** \brief Returns whether the desktop is in quick zoom mode or not */
643+ bool quick_zoomed(void) { return _quick_zoom_enabled; }
644+
645+ bool scroll_to_point (Geom::Point const &s_dt, gdouble autoscrollspeed = 0);
646+ void scroll_world (double dx, double dy, bool is_scrolling = false);
647+ void scroll_world (Geom::Point const scroll, bool is_scrolling = false)
648+ {
649+ scroll_world(scroll[Geom::X], scroll[Geom::Y], is_scrolling);
650+ }
651+ void scroll_world_in_svg_coords (double dx, double dy, bool is_scrolling = false);
652+
653+ void getWindowGeometry (gint &x, gint &y, gint &w, gint &h);
654+ void setWindowPosition (Geom::Point p);
655+ void setWindowSize (gint w, gint h);
656+ void setWindowTransient (void* p, int transient_policy=1);
657+ Gtk::Window* getToplevel();
658+ void presentWindow();
659+ bool warnDialog (gchar *text);
660+ void toggleRulers();
661+ void toggleScrollbars();
662+ void layoutWidget();
663+ void destroyWidget();
664+ void setToolboxFocusTo (gchar const* label);
665+ void setToolboxAdjustmentValue (gchar const* id, double val);
666+ void setToolboxSelectOneValue (gchar const* id, gint val);
667+ bool isToolboxButtonActive (gchar const *id);
668+ void updateNow();
669+ void updateCanvasNow();
670+
671+ void enableInteraction();
672+ void disableInteraction();
673+
674+ void setWaitingCursor();
675+ void clearWaitingCursor();
676+ bool isWaitingCursor() const { return waiting_cursor; };
677+
678+ void toggleColorProfAdjust();
679+
680+ void toggleGrids();
681+ void toggleSnapGlobal();
682+ bool gridsEnabled() const { return grids_visible; };
683+ void showGrids(bool show, bool dirty_document = true);
684+
685+ bool is_iconified();
686+ bool is_maximized();
687+ bool is_fullscreen();
688+ bool is_focusMode();
689+
690+ void iconify();
691+ void maximize();
692+ void fullscreen();
693+ void focusMode(bool mode = true);
694+
695+ Geom::Matrix w2d() const; //transformation from window to desktop coordinates (used for zooming)
696+ Geom::Point w2d(Geom::Point const &p) const;
697+ Geom::Point d2w(Geom::Point const &p) const;
698+ Geom::Matrix doc2dt() const;
699+ Geom::Matrix dt2doc() const;
700+ Geom::Point doc2dt(Geom::Point const &p) const;
701+ Geom::Point dt2doc(Geom::Point const &p) const;
702+
703+ virtual void setDocument (SPDocument* doc);
704+ virtual bool shutdown();
705+ virtual void mouseover() {}
706+ virtual void mouseout() {}
707+
708+ virtual bool onDeleteUI (GdkEventAny*);
709+ virtual bool onWindowStateEvent (GdkEventWindowState* event);
710+
711+private:
712+ Inkscape::UI::View::EditWidgetInterface *_widget;
713+ Inkscape::Application *_inkscape;
714+ Inkscape::MessageContext *_guides_message_context;
715+ bool _active;
716+ Geom::Matrix _w2d;
717+ Geom::Matrix _d2w;
718+ Geom::Matrix _doc2dt;
719+
720+ bool grids_visible; /* don't set this variable directly, use the method below */
721+ void set_grids_visible(bool visible);
722+
723+ void push_current_zoom (GList**);
724+
725+ sigc::signal<void,SPDesktop*,SPDocument*> _document_replaced_signal;
726+ sigc::signal<void> _activate_signal;
727+ sigc::signal<void> _deactivate_signal;
728+ sigc::signal<void,SPDesktop*,SPEventContext*> _event_context_changed_signal;
729+ sigc::signal<void, gpointer> _tool_subselection_changed;
730+
731+ sigc::connection _activate_connection;
732+ sigc::connection _deactivate_connection;
733+ sigc::connection _sel_modified_connection;
734+ sigc::connection _sel_changed_connection;
735+ sigc::connection _reconstruction_start_connection;
736+ sigc::connection _reconstruction_finish_connection;
737+ sigc::connection _commit_connection;
738+ sigc::connection _modified_connection;
739+
740+ virtual void onPositionSet (double, double);
741+ virtual void onResized (double, double);
742+ virtual void onRedrawRequested();
743+ virtual void onStatusMessage (Inkscape::MessageType type, gchar const *message);
744+ virtual void onDocumentURISet (gchar const* uri);
745+ virtual void onDocumentResized (double, double);
746+
747+ static void _onActivate (SPDesktop* dt);
748+ static void _onDeactivate (SPDesktop* dt);
749+ static void _onSelectionModified (Inkscape::Selection *selection, guint flags, SPDesktop *dt);
750+};
751+
752+#endif // SEEN_SP_DESKTOP_H
753+
754+/*
755+ Local Variables:
756+ mode:c++
757+ c-file-style:"stroustrup"
758+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
759+ indent-tabs-mode:nil
760+ fill-column:99
761+ End:
762+*/
763+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
764diff -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
765--- inkscape-0.48.1~/src/dialogs/object-attributes.cpp 2010-07-13 04:48:40.000000000 +0100
766+++ inkscape-0.48.1/src/dialogs/object-attributes.cpp 2011-05-01 00:56:19.591250878 +0100
767@@ -13,6 +13,7 @@
768 #include <glibmm/i18n.h>
769 #include <string>
770 #include <cstring>
771+#include <stddef.h>
772 #include <sigc++/connection.h>
773 #include <sigc++/functors/ptr_fun.h>
774 #include <sigc++/adaptors/bind.h>
775diff -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
776--- inkscape-0.48.1~/src/display/canvas-temporary-item.h 2010-07-13 04:48:40.000000000 +0100
777+++ inkscape-0.48.1/src/display/canvas-temporary-item.h 2011-05-01 00:56:19.591250878 +0100
778@@ -14,6 +14,7 @@
779
780 #include "display/display-forward.h"
781
782+#include <stddef.h>
783 #include <sigc++/sigc++.h>
784
785 namespace Inkscape {
786diff -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
787--- inkscape-0.48.1~/src/display/canvas-temporary-item.h.orig 1970-01-01 01:00:00.000000000 +0100
788+++ inkscape-0.48.1/src/display/canvas-temporary-item.h.orig 2010-07-13 04:48:40.000000000 +0100
789@@ -0,0 +1,57 @@
790+#ifndef INKSCAPE_CANVAS_TEMPORARY_ITEM_H
791+#define INKSCAPE_CANVAS_TEMPORARY_ITEM_H
792+
793+/** \file
794+ * Provides a class to put a canvasitem temporarily on-canvas.
795+ *
796+ * Authors:
797+ * Johan Engelen
798+ *
799+ * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
800+ *
801+ * Released under GNU GPL, read the file 'COPYING' for more information
802+ */
803+
804+#include "display/display-forward.h"
805+
806+#include <sigc++/sigc++.h>
807+
808+namespace Inkscape {
809+namespace Display {
810+
811+class TemporaryItem {
812+public:
813+ TemporaryItem(SPCanvasItem *item, guint lifetime, bool destroy_on_deselect = false);
814+ virtual ~TemporaryItem();
815+
816+ sigc::signal<void, TemporaryItem *> signal_timeout;
817+
818+protected:
819+ friend class TemporaryItemList;
820+
821+ SPCanvasItem * canvasitem; /** The item we are holding on to */
822+ guint timeout_id; /** ID by which glib knows the timeout event */
823+ bool destroy_on_deselect; // only destroy when parent item is deselected, not when mouse leaves
824+
825+ static gboolean _timeout(gpointer data); ///< callback for when lifetime expired
826+
827+private:
828+ TemporaryItem(const TemporaryItem&);
829+ TemporaryItem& operator=(const TemporaryItem&);
830+};
831+
832+} //namespace Display
833+} //namespace Inkscape
834+
835+#endif
836+
837+/*
838+ Local Variables:
839+ mode:c++
840+ c-file-style:"stroustrup"
841+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
842+ indent-tabs-mode:nil
843+ fill-column:99
844+ End:
845+*/
846+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
847diff -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
848--- inkscape-0.48.1~/src/document-private.h 2010-07-13 04:48:40.000000000 +0100
849+++ inkscape-0.48.1/src/document-private.h 2011-05-01 00:56:19.591250878 +0100
850@@ -14,6 +14,7 @@
851 */
852
853 #include <map>
854+#include <stddef.h>
855 #include <sigc++/sigc++.h>
856 #include "xml/event-fns.h"
857 #include "sp-defs.h"
858diff -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
859--- inkscape-0.48.1~/src/document-private.h.orig 1970-01-01 01:00:00.000000000 +0100
860+++ inkscape-0.48.1/src/document-private.h.orig 2010-07-13 04:48:40.000000000 +0100
861@@ -0,0 +1,79 @@
862+#ifndef __SP_DOCUMENT_PRIVATE_H__
863+#define __SP_DOCUMENT_PRIVATE_H__
864+
865+/*
866+ * Seldom needed document data
867+ *
868+ * Authors:
869+ * Lauris Kaplinski <lauris@kaplinski.com>
870+ *
871+ * Copyright (C) 1999-2002 Lauris Kaplinski
872+ * Copyright (C) 2001-2002 Ximian, Inc.
873+ *
874+ * Released under GNU GPL, read the file 'COPYING' for more information
875+ */
876+
877+#include <map>
878+#include <sigc++/sigc++.h>
879+#include "xml/event-fns.h"
880+#include "sp-defs.h"
881+#include "sp-root.h"
882+#include "document.h"
883+
884+#include "composite-undo-stack-observer.h"
885+
886+#include "event-log.h"
887+
888+// XXX only for testing!
889+#include "console-output-undo-observer.h"
890+
891+#define SP_DOCUMENT_DEFS(d) ((SPObject *) SP_ROOT (SP_DOCUMENT_ROOT (d))->defs)
892+
893+namespace Inkscape {
894+namespace XML {
895+class Event;
896+}
897+}
898+
899+
900+struct SPDocumentPrivate {
901+ typedef std::map<GQuark, SPDocument::IDChangedSignal> IDChangedSignalMap;
902+ typedef std::map<GQuark, SPDocument::ResourcesChangedSignal> ResourcesChangedSignalMap;
903+
904+ GHashTable *iddef; /**< Dictionary of id -> SPObject mappings */
905+ GHashTable *reprdef; /**< Dictionary of Inkscape::XML::Node -> SPObject mappings */
906+
907+ unsigned long serial;
908+
909+ /** Dictionary of signals for id changes */
910+ IDChangedSignalMap id_changed_signals;
911+
912+ /* Resources */
913+ /* It is GHashTable of GSLists */
914+ GHashTable *resources;
915+ ResourcesChangedSignalMap resources_changed_signals;
916+
917+ SPDocument::ModifiedSignal modified_signal;
918+ SPDocument::URISetSignal uri_set_signal;
919+ SPDocument::ResizedSignal resized_signal;
920+ SPDocument::ReconstructionStart _reconstruction_start_signal;
921+ SPDocument::ReconstructionFinish _reconstruction_finish_signal;
922+ SPDocument::CommitSignal commit_signal;
923+
924+ /* Undo/Redo state */
925+ bool sensitive: true; /* If we save actions to undo stack */
926+ Inkscape::XML::Event * partial; /* partial undo log when interrupted */
927+ int history_size;
928+ GSList * undo; /* Undo stack of reprs */
929+ GSList * redo; /* Redo stack of reprs */
930+
931+ /* Undo listener */
932+ Inkscape::CompositeUndoStackObserver undoStackObservers;
933+
934+ // XXX only for testing!
935+ Inkscape::ConsoleOutputUndoObserver console_output_undo_observer;
936+
937+ bool seeking;
938+};
939+
940+#endif
941diff -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
942--- inkscape-0.48.1~/src/document-subset.h 2010-07-13 04:48:40.000000000 +0100
943+++ inkscape-0.48.1/src/document-subset.h 2011-05-01 00:56:19.591250878 +0100
944@@ -10,6 +10,7 @@
945 #ifndef SEEN_INKSCAPE_DOCUMENT_SUBSET_H
946 #define SEEN_INKSCAPE_DOCUMENT_SUBSET_H
947
948+#include <stddef.h>
949 #include <sigc++/connection.h>
950 #include <sigc++/functors/slot.h>
951
952diff -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
953--- inkscape-0.48.1~/src/document.h 2010-08-04 17:45:00.000000000 +0100
954+++ inkscape-0.48.1/src/document.h 2011-05-01 00:56:19.601250878 +0100
955@@ -17,6 +17,7 @@
956
957 #include <glib-object.h>
958 #include <gtk/gtksignal.h>
959+#include <stddef.h>
960 #include <sigc++/sigc++.h>
961 #include <sigc++/class_slot.h>
962
963diff -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
964--- inkscape-0.48.1~/src/document.h.orig 1970-01-01 01:00:00.000000000 +0100
965+++ inkscape-0.48.1/src/document.h.orig 2010-08-04 17:45:00.000000000 +0100
966@@ -0,0 +1,304 @@
967+#ifndef __SP_DOCUMENT_H__
968+#define __SP_DOCUMENT_H__
969+
970+/** \file
971+ * SPDocument: Typed SVG document implementation
972+ */
973+/* Authors:
974+ * Lauris Kaplinski <lauris@kaplinski.com>
975+ * MenTaLguY <mental@rydia.net>
976+ *
977+ * Copyright (C) 2004-2005 MenTaLguY
978+ * Copyright (C) 1999-2002 Lauris Kaplinski
979+ * Copyright (C) 2000-2001 Ximian, Inc.
980+ *
981+ * Released under GNU GPL, read the file 'COPYING' for more information
982+ */
983+
984+#include <glib-object.h>
985+#include <gtk/gtksignal.h>
986+#include <sigc++/sigc++.h>
987+#include <sigc++/class_slot.h>
988+
989+#include "libcroco/cr-cascade.h"
990+#include <2geom/forward.h>
991+
992+#include "gc-managed.h"
993+#include "gc-finalized.h"
994+#include "gc-anchored.h"
995+#include <glibmm/ustring.h>
996+#include "verbs.h"
997+#include <vector>
998+#include <set>
999+
1000+namespace Avoid {
1001+class Router;
1002+}
1003+
1004+struct NRRect;
1005+struct SPDesktop;
1006+struct SPItem;
1007+struct SPObject;
1008+struct SPGroup;
1009+
1010+namespace Inkscape {
1011+ struct Application;
1012+ class Selection;
1013+ class UndoStackObserver;
1014+ class EventLog;
1015+ class ProfileManager;
1016+ namespace XML {
1017+ class Document;
1018+ class Node;
1019+ }
1020+}
1021+
1022+class SP3DBox;
1023+class Persp3D;
1024+class Persp3DImpl;
1025+
1026+namespace Proj {
1027+ class TransfMat3x4;
1028+}
1029+
1030+class SPDocumentPrivate;
1031+
1032+/// Typed SVG document implementation.
1033+struct SPDocument : public Inkscape::GC::Managed<>,
1034+ public Inkscape::GC::Finalized,
1035+ public Inkscape::GC::Anchored
1036+{
1037+ typedef sigc::signal<void, SPObject *> IDChangedSignal;
1038+ typedef sigc::signal<void> ResourcesChangedSignal;
1039+ typedef sigc::signal<void, guint> ModifiedSignal;
1040+ typedef sigc::signal<void, gchar const *> URISetSignal;
1041+ typedef sigc::signal<void, double, double> ResizedSignal;
1042+ typedef sigc::signal<void> ReconstructionStart;
1043+ typedef sigc::signal<void> ReconstructionFinish;
1044+ typedef sigc::signal<void> CommitSignal;
1045+
1046+ SPDocument();
1047+ virtual ~SPDocument();
1048+
1049+ unsigned int keepalive : 1;
1050+ unsigned int virgin : 1; ///< Has the document never been touched?
1051+ unsigned int modified_since_save : 1;
1052+
1053+ Inkscape::XML::Document *rdoc; ///< Our Inkscape::XML::Document
1054+ Inkscape::XML::Node *rroot; ///< Root element of Inkscape::XML::Document
1055+ SPObject *root; ///< Our SPRoot
1056+ CRCascade *style_cascade;
1057+
1058+ gchar *uri; ///< A filename (not a URI yet), or NULL
1059+ gchar *base; ///< To be used for resolving relative hrefs.
1060+ gchar *name; ///< basename(uri) or other human-readable label for the document.
1061+
1062+ SPDocumentPrivate *priv;
1063+
1064+ /// Last action key
1065+ Glib::ustring actionkey;
1066+
1067+ /// Handler ID
1068+ guint modified_id;
1069+
1070+ /// Connector rerouting handler ID
1071+ guint rerouting_handler_id;
1072+
1073+ Inkscape::ProfileManager* profileManager;
1074+
1075+ // Instance of the connector router
1076+ Avoid::Router *router;
1077+
1078+ GSList *_collection_queue;
1079+
1080+ bool oldSignalsConnected;
1081+
1082+ void setCurrentPersp3D(Persp3D * const persp);
1083+ inline void setCurrentPersp3DImpl(Persp3DImpl * const persp_impl) { current_persp3d_impl = persp_impl; }
1084+ /*
1085+ * getCurrentPersp3D returns current_persp3d (if non-NULL) or the first
1086+ * perspective in the defs. If no perspective exists, returns NULL.
1087+ */
1088+ Persp3D * getCurrentPersp3D();
1089+ Persp3DImpl * getCurrentPersp3DImpl();
1090+ void getPerspectivesInDefs(std::vector<Persp3D*> &list);
1091+ unsigned int numPerspectivesInDefs() {
1092+ std::vector<Persp3D*> list;
1093+ getPerspectivesInDefs(list);
1094+ return list.size();
1095+ }
1096+
1097+ //void initialize_current_persp3d();
1098+
1099+ sigc::connection connectModified(ModifiedSignal::slot_type slot);
1100+ sigc::connection connectURISet(URISetSignal::slot_type slot);
1101+ sigc::connection connectResized(ResizedSignal::slot_type slot);
1102+sigc::connection connectCommit(CommitSignal::slot_type slot);
1103+
1104+ void bindObjectToId(gchar const *id, SPObject *object);
1105+ SPObject *getObjectById(gchar const *id);
1106+ sigc::connection connectIdChanged(const gchar *id, IDChangedSignal::slot_type slot);
1107+
1108+ void bindObjectToRepr(Inkscape::XML::Node *repr, SPObject *object);
1109+ SPObject *getObjectByRepr(Inkscape::XML::Node *repr);
1110+
1111+ Glib::ustring getLanguage();
1112+
1113+ void queueForOrphanCollection(SPObject *object);
1114+ void collectOrphans();
1115+
1116+ void _emitModified();
1117+
1118+ void addUndoObserver(Inkscape::UndoStackObserver& observer);
1119+ void removeUndoObserver(Inkscape::UndoStackObserver& observer);
1120+
1121+ bool _updateDocument();
1122+
1123+ /// Are we currently in a transition between two "known good" states of the document?
1124+ bool isSeeking() const;
1125+
1126+ bool isModifiedSinceSave() const { return modified_since_save; }
1127+ void setModifiedSinceSave(bool modified = true) {
1128+ modified_since_save = modified;
1129+ }
1130+
1131+private:
1132+ SPDocument(SPDocument const &); // no copy
1133+ void operator=(SPDocument const &); // no assign
1134+
1135+ Persp3D *current_persp3d; /**< Currently 'active' perspective (to which, e.g., newly created boxes are attached) */
1136+ Persp3DImpl *current_persp3d_impl;
1137+
1138+public:
1139+ sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot);
1140+ sigc::connection connectReconstructionFinish(ReconstructionFinish::slot_type slot);
1141+ void emitReconstructionStart(void);
1142+ void emitReconstructionFinish(void);
1143+
1144+ unsigned long serial() const;
1145+ void reset_key(void *dummy);
1146+ sigc::connection _selection_changed_connection;
1147+ sigc::connection _desktop_activated_connection;
1148+
1149+ void fitToRect(Geom::Rect const &rect, bool with_margins = false);
1150+};
1151+
1152+SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false);
1153+SPDocument *sp_document_new_from_mem(const gchar *buffer, gint length, unsigned int keepalive);
1154+
1155+SPDocument *sp_document_ref(SPDocument *doc);
1156+SPDocument *sp_document_unref(SPDocument *doc);
1157+
1158+
1159+SPDocument *sp_document_create(Inkscape::XML::Document *rdoc, gchar const *uri, gchar const *base, gchar const *name, unsigned int keepalive);
1160+
1161+/*
1162+ * Access methods
1163+ */
1164+
1165+#define sp_document_repr_doc(d) (d->rdoc)
1166+#define sp_document_repr_root(d) (d->rroot)
1167+#define sp_document_root(d) (d->root)
1168+#define SP_DOCUMENT_ROOT(d) (d->root)
1169+
1170+gdouble sp_document_width(SPDocument *document);
1171+gdouble sp_document_height(SPDocument *document);
1172+Geom::Point sp_document_dimensions(SPDocument *document);
1173+
1174+struct SPUnit;
1175+
1176+void sp_document_set_width(SPDocument *document, gdouble width, const SPUnit *unit);
1177+void sp_document_set_height(SPDocument *document, gdouble height, const SPUnit *unit);
1178+
1179+#define SP_DOCUMENT_URI(d) (d->uri)
1180+#define SP_DOCUMENT_NAME(d) (d->name)
1181+#define SP_DOCUMENT_BASE(d) (d->base)
1182+
1183+/*
1184+ * Dictionary
1185+ */
1186+
1187+/*
1188+ * Undo & redo
1189+ */
1190+
1191+void sp_document_set_undo_sensitive(SPDocument *document, bool sensitive);
1192+bool sp_document_get_undo_sensitive(SPDocument const *document);
1193+
1194+void sp_document_clear_undo(SPDocument *document);
1195+void sp_document_clear_redo(SPDocument *document);
1196+
1197+void sp_document_child_added(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
1198+void sp_document_child_removed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
1199+void sp_document_attr_changed(SPDocument *doc, SPObject *object, const gchar *key, const gchar *oldval, const gchar *newval);
1200+void sp_document_content_changed(SPDocument *doc, SPObject *object, const gchar *oldcontent, const gchar *newcontent);
1201+void sp_document_order_changed(SPDocument *doc, SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *oldref, Inkscape::XML::Node *newref);
1202+
1203+/* Object modification root handler */
1204+void sp_document_request_modified(SPDocument *doc);
1205+gint sp_document_ensure_up_to_date(SPDocument *doc);
1206+
1207+/* Save all previous actions to stack, as one undo step */
1208+void sp_document_done(SPDocument *document, unsigned int event_type, Glib::ustring event_description);
1209+void sp_document_maybe_done(SPDocument *document, const gchar *keyconst, unsigned int event_type, Glib::ustring event_description);
1210+void sp_document_reset_key(Inkscape::Application *inkscape, SPDesktop *desktop, GtkObject *base);
1211+
1212+/* Cancel (and revert) current unsaved actions */
1213+void sp_document_cancel(SPDocument *document);
1214+
1215+/* Undo and redo */
1216+gboolean sp_document_undo(SPDocument *document);
1217+gboolean sp_document_redo(SPDocument *document);
1218+
1219+/* Resource management */
1220+gboolean sp_document_add_resource(SPDocument *document, const gchar *key, SPObject *object);
1221+gboolean sp_document_remove_resource(SPDocument *document, const gchar *key, SPObject *object);
1222+const GSList *sp_document_get_resource_list(SPDocument *document, const gchar *key);
1223+sigc::connection sp_document_resources_changed_connect(SPDocument *document, const gchar *key, SPDocument::ResourcesChangedSignal::slot_type slot);
1224+
1225+
1226+/*
1227+ * Ideas: How to overcome style invalidation nightmare
1228+ *
1229+ * 1. There is reference request dictionary, that contains
1230+ * objects (styles) needing certain id. Object::build checks
1231+ * final id against it, and invokes necesary methods
1232+ *
1233+ * 2. Removing referenced object is simply prohibited -
1234+ * needs analyse, how we can deal with situations, where
1235+ * we simply want to ungroup etc. - probably we need
1236+ * Repr::reparent method :( [Or was it ;)]
1237+ *
1238+ */
1239+
1240+/*
1241+ * Misc
1242+ */
1243+
1244+GSList *sp_document_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box);
1245+GSList *sp_document_partial_items_in_box(SPDocument *document, unsigned int dkey, Geom::Rect const &box);
1246+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);
1247+SPItem *sp_document_item_at_point (SPDocument *document, unsigned int key, Geom::Point const p, gboolean into_groups, SPItem *upto = NULL);
1248+GSList *sp_document_items_at_points(SPDocument *document, unsigned const key, std::vector<Geom::Point> points);
1249+SPItem *sp_document_group_at_point (SPDocument *document, unsigned int key, Geom::Point const p);
1250+
1251+void sp_document_set_uri(SPDocument *document, gchar const *uri);
1252+void sp_document_change_uri_and_hrefs(SPDocument *document, gchar const *uri);
1253+
1254+void sp_document_resized_signal_emit(SPDocument *doc, gdouble width, gdouble height);
1255+
1256+unsigned int vacuum_document(SPDocument *document);
1257+
1258+
1259+#endif
1260+
1261+/*
1262+ Local Variables:
1263+ mode:c++
1264+ c-file-style:"stroustrup"
1265+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
1266+ indent-tabs-mode:nil
1267+ fill-column:99
1268+ End:
1269+*/
1270+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
1271diff -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
1272--- inkscape-0.48.1~/src/draw-context.h 2010-07-13 04:48:40.000000000 +0100
1273+++ inkscape-0.48.1/src/draw-context.h 2011-05-01 00:56:19.601250878 +0100
1274@@ -14,6 +14,7 @@
1275 * Released under GNU GPL
1276 */
1277
1278+#include <stddef.h>
1279 #include <sigc++/sigc++.h>
1280 #include "event-context.h"
1281 #include <forward.h>
1282diff -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
1283--- inkscape-0.48.1~/src/extension/timer.h 2010-07-13 04:48:40.000000000 +0100
1284+++ inkscape-0.48.1/src/extension/timer.h 2011-05-01 00:56:19.601250878 +0100
1285@@ -13,6 +13,7 @@
1286 #ifndef INKSCAPE_EXTENSION_TIMER_H__
1287 #define INKSCAPE_EXTENSION_TIMER_H__
1288
1289+#include <stddef.h>
1290 #include <sigc++/sigc++.h>
1291 #include <glibmm/timeval.h>
1292 #include "extension-forward.h"
1293diff -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
1294--- inkscape-0.48.1~/src/flood-context.h 2010-07-13 04:48:40.000000000 +0100
1295+++ inkscape-0.48.1/src/flood-context.h 2011-05-01 00:56:19.601250878 +0100
1296@@ -11,6 +11,7 @@
1297 * Released under GNU GPL
1298 */
1299
1300+#include <stddef.h>
1301 #include <sigc++/sigc++.h>
1302 #include <gtk/gtk.h>
1303 #include "event-context.h"
1304diff -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
1305--- inkscape-0.48.1~/src/gc-alloc.h 2010-07-13 04:48:40.000000000 +0100
1306+++ inkscape-0.48.1/src/gc-alloc.h 2011-05-01 00:56:19.601250878 +0100
1307@@ -16,6 +16,7 @@
1308 #define SEEN_INKSCAPE_GC_ALLOC_H
1309
1310 #include <limits>
1311+#include <cstddef>
1312 #include "gc-core.h"
1313
1314 namespace Inkscape {
1315diff -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
1316--- inkscape-0.48.1~/src/gc-finalized.h 2010-07-13 04:48:40.000000000 +0100
1317+++ inkscape-0.48.1/src/gc-finalized.h 2011-05-01 00:56:19.601250878 +0100
1318@@ -17,6 +17,7 @@
1319 #define SEEN_INKSCAPE_GC_FINALIZED_H
1320
1321 #include <new>
1322+#include <cstddef>
1323 #include "gc-core.h"
1324
1325 namespace Inkscape {
1326diff -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
1327--- inkscape-0.48.1~/src/gc.cpp 2010-07-13 04:48:40.000000000 +0100
1328+++ inkscape-0.48.1/src/gc.cpp 2011-05-01 00:56:19.601250878 +0100
1329@@ -16,6 +16,7 @@
1330 #include <glib/gmessages.h>
1331 #include <sigc++/functors/ptr_fun.h>
1332 #include <glibmm/main.h>
1333+#include <cstddef>
1334
1335 namespace Inkscape {
1336 namespace GC {
1337diff -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
1338--- inkscape-0.48.1~/src/gradient-context.h 2010-07-13 04:48:40.000000000 +0100
1339+++ inkscape-0.48.1/src/gradient-context.h 2011-05-01 00:56:19.601250878 +0100
1340@@ -15,6 +15,7 @@
1341 * Released under GNU GPL
1342 */
1343
1344+#include <stddef.h>
1345 #include <sigc++/sigc++.h>
1346 #include "event-context.h"
1347
1348diff -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
1349--- inkscape-0.48.1~/src/gradient-drag.h 2010-08-04 17:45:00.000000000 +0100
1350+++ inkscape-0.48.1/src/gradient-drag.h 2011-05-01 00:56:19.601250878 +0100
1351@@ -15,6 +15,7 @@
1352 */
1353
1354 #include <glib/gslist.h>
1355+#include <stddef.h>
1356 #include <sigc++/sigc++.h>
1357 #include <vector>
1358
1359diff -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
1360--- inkscape-0.48.1~/src/knot.h 2010-07-13 04:48:40.000000000 +0100
1361+++ inkscape-0.48.1/src/knot.h 2011-05-01 00:56:19.601250878 +0100
1362@@ -20,6 +20,7 @@
1363 #include "forward.h"
1364 #include <2geom/point.h>
1365 #include "knot-enums.h"
1366+#include <stddef.h>
1367 #include <sigc++/sigc++.h>
1368
1369 class SPKnot;
1370diff -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
1371--- inkscape-0.48.1~/src/knot.h.orig 1970-01-01 01:00:00.000000000 +0100
1372+++ inkscape-0.48.1/src/knot.h.orig 2010-07-13 04:48:40.000000000 +0100
1373@@ -0,0 +1,192 @@
1374+#ifndef __SP_KNOT_H__
1375+#define __SP_KNOT_H__
1376+
1377+/** \file
1378+ * Declarations for SPKnot: Desktop-bound visual control object.
1379+ */
1380+/*
1381+ * Authors:
1382+ * Lauris Kaplinski <lauris@kaplinski.com>
1383+ *
1384+ * Copyright (C) 1999-2002 authors
1385+ * Copyright (C) 2001-2002 Ximian, Inc.
1386+ *
1387+ * Released under GNU GPL, read the file 'COPYING' for more information
1388+ */
1389+
1390+#include <gdk/gdk.h>
1391+#include <gtk/gtkenums.h>
1392+#include "display/display-forward.h"
1393+#include "forward.h"
1394+#include <2geom/point.h>
1395+#include "knot-enums.h"
1396+#include <sigc++/sigc++.h>
1397+
1398+class SPKnot;
1399+class SPKnotClass;
1400+
1401+#define SP_TYPE_KNOT (sp_knot_get_type())
1402+#define SP_KNOT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_KNOT, SPKnot))
1403+#define SP_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_KNOT, SPKnotClass))
1404+#define SP_IS_KNOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_KNOT))
1405+#define SP_IS_KNOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_KNOT))
1406+
1407+/**
1408+ * Desktop-bound visual control object.
1409+ *
1410+ * A knot is a draggable object, with callbacks to change something by
1411+ * dragging it, visuably represented by a canvas item (mostly square).
1412+ */
1413+struct SPKnot : GObject {
1414+ SPDesktop *desktop; /**< Desktop we are on. */
1415+ SPCanvasItem *item; /**< Our CanvasItem. */
1416+ guint flags;
1417+
1418+ guint size; /**< Always square. */
1419+ Geom::Point pos; /**< Our desktop coordinates. */
1420+ Geom::Point grabbed_rel_pos; /**< Grabbed relative position. */
1421+ Geom::Point drag_origin; /**< Origin of drag. */
1422+ GtkAnchorType anchor; /**< Anchor. */
1423+
1424+ SPKnotShapeType shape; /**< Shape type. */
1425+ SPKnotModeType mode;
1426+
1427+ guint32 fill[SP_KNOT_VISIBLE_STATES];
1428+ guint32 stroke[SP_KNOT_VISIBLE_STATES];
1429+ guchar *image[SP_KNOT_VISIBLE_STATES];
1430+
1431+ GdkCursor *cursor[SP_KNOT_VISIBLE_STATES];
1432+
1433+ GdkCursor *saved_cursor;
1434+ gpointer pixbuf;
1435+
1436+ gchar *tip;
1437+
1438+ gulong _event_handler_id;
1439+
1440+ double pressure; /**< The tablet pen pressure when the knot is being dragged. */
1441+
1442+ // C++ signals
1443+ /**
1444+ sigc::signal<void, Geom::Point const &, Geom::Point const &, guint> _moved_signal;
1445+ sigc::signal<void, guint> _click_signal;
1446+ sigc::signal<Geom::Point> _ungrabbed_signal;
1447+ **/
1448+ sigc::signal<void, SPKnot *, Geom::Point const &, guint> _moved_signal;
1449+ sigc::signal<void, SPKnot *, guint> _click_signal;
1450+ sigc::signal<void, SPKnot *> _ungrabbed_signal;
1451+
1452+ //TODO: all the members above should eventualle become private, accessible via setters/getters
1453+ inline void setSize (guint i) {size = i;}
1454+ inline void setShape (guint i) {shape = (SPKnotShapeType) i;}
1455+ inline void setAnchor (guint i) {anchor = (GtkAnchorType) i;}
1456+ inline void setMode (guint i) {mode = (SPKnotModeType) i;}
1457+ inline void setPixbuf (gpointer p) {pixbuf = p;}
1458+ inline void setFill (guint32 normal, guint32 mouseover, guint32 dragging) {
1459+ fill[SP_KNOT_STATE_NORMAL] = normal;
1460+ fill[SP_KNOT_STATE_MOUSEOVER] = mouseover;
1461+ fill[SP_KNOT_STATE_DRAGGING] = dragging;
1462+ }
1463+ inline void setStroke (guint32 normal, guint32 mouseover, guint32 dragging) {
1464+ stroke[SP_KNOT_STATE_NORMAL] = normal;
1465+ stroke[SP_KNOT_STATE_MOUSEOVER] = mouseover;
1466+ stroke[SP_KNOT_STATE_DRAGGING] = dragging;
1467+ }
1468+ inline void setImage (guchar* normal, guchar* mouseover, guchar* dragging) {
1469+ image[SP_KNOT_STATE_NORMAL] = normal;
1470+ image[SP_KNOT_STATE_MOUSEOVER] = mouseover;
1471+ image[SP_KNOT_STATE_DRAGGING] = dragging;
1472+ }
1473+ inline void setCursor (GdkCursor* normal, GdkCursor* mouseover, GdkCursor* dragging) {
1474+ if (cursor[SP_KNOT_STATE_NORMAL]) {
1475+ gdk_cursor_unref(cursor[SP_KNOT_STATE_NORMAL]);
1476+ }
1477+ cursor[SP_KNOT_STATE_NORMAL] = normal;
1478+ if (normal) {
1479+ gdk_cursor_ref(normal);
1480+ }
1481+
1482+ if (cursor[SP_KNOT_STATE_MOUSEOVER]) {
1483+ gdk_cursor_unref(cursor[SP_KNOT_STATE_MOUSEOVER]);
1484+ }
1485+ cursor[SP_KNOT_STATE_MOUSEOVER] = mouseover;
1486+ if (mouseover) {
1487+ gdk_cursor_ref(mouseover);
1488+ }
1489+
1490+ if (cursor[SP_KNOT_STATE_DRAGGING]) {
1491+ gdk_cursor_unref(cursor[SP_KNOT_STATE_DRAGGING]);
1492+ }
1493+ cursor[SP_KNOT_STATE_DRAGGING] = dragging;
1494+ if (dragging) {
1495+ gdk_cursor_ref(dragging);
1496+ }
1497+ }
1498+
1499+};
1500+
1501+/// The SPKnot vtable.
1502+struct SPKnotClass {
1503+ GObjectClass parent_class;
1504+ gint (* event) (SPKnot *knot, GdkEvent *event);
1505+
1506+ /*
1507+ * These are unconditional.
1508+ */
1509+
1510+ void (* clicked) (SPKnot *knot, guint state);
1511+ void (* doubleclicked) (SPKnot *knot, guint state);
1512+ void (* grabbed) (SPKnot *knot, guint state);
1513+ void (* ungrabbed) (SPKnot *knot, guint state);
1514+ void (* moved) (SPKnot *knot, Geom::Point const &position, guint state);
1515+ void (* stamped) (SPKnot *know, guint state);
1516+
1517+ /** Request knot to move to absolute position. */
1518+ bool (* request) (SPKnot *knot, Geom::Point const &pos, guint state);
1519+
1520+ /** Find complex distance from knot to point. */
1521+ gdouble (* distance) (SPKnot *knot, Geom::Point const &pos, guint state);
1522+};
1523+
1524+GType sp_knot_get_type();
1525+
1526+SPKnot *sp_knot_new(SPDesktop *desktop, gchar const *tip = NULL);
1527+
1528+#define SP_KNOT_IS_VISIBLE(k) ((k->flags & SP_KNOT_VISIBLE) != 0)
1529+#define SP_KNOT_IS_MOUSEOVER(k) ((k->flags & SP_KNOT_MOUSEOVER) != 0)
1530+#define SP_KNOT_IS_DRAGGING(k) ((k->flags & SP_KNOT_DRAGGING) != 0)
1531+#define SP_KNOT_IS_GRABBED(k) ((k->flags & SP_KNOT_GRABBED) != 0)
1532+
1533+void sp_knot_show(SPKnot *knot);
1534+void sp_knot_hide(SPKnot *knot);
1535+
1536+void sp_knot_set_flag(SPKnot *knot, guint flag, bool set);
1537+void sp_knot_update_ctrl(SPKnot *knot);
1538+
1539+void sp_knot_request_position(SPKnot *knot, Geom::Point const &pos, guint state);
1540+gdouble sp_knot_distance(SPKnot *knot, Geom::Point const &p, guint state);
1541+
1542+void sp_knot_start_dragging(SPKnot *knot, Geom::Point const &p, gint x, gint y, guint32 etime);
1543+
1544+/** Moves knot and emits "moved" signal. */
1545+void sp_knot_set_position(SPKnot *knot, Geom::Point const &p, guint state);
1546+
1547+/** Moves knot without any signal. */
1548+void sp_knot_moveto(SPKnot *knot, Geom::Point const &p);
1549+
1550+void sp_knot_handler_request_position(GdkEvent *event, SPKnot *knot);
1551+Geom::Point sp_knot_position(SPKnot const *knot);
1552+
1553+
1554+#endif /* !__SP_KNOT_H__ */
1555+
1556+/*
1557+ Local Variables:
1558+ mode:c++
1559+ c-file-style:"stroustrup"
1560+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
1561+ indent-tabs-mode:nil
1562+ fill-column:99
1563+ End:
1564+*/
1565+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
1566diff -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
1567--- inkscape-0.48.1~/src/libavoid/geomtypes.h 2010-07-13 04:48:40.000000000 +0100
1568+++ inkscape-0.48.1/src/libavoid/geomtypes.h 2011-05-01 00:56:19.601250878 +0100
1569@@ -29,6 +29,7 @@
1570 #ifndef AVOID_GEOMTYPES_H
1571 #define AVOID_GEOMTYPES_H
1572
1573+#include <cstddef>
1574 #include <vector>
1575 #include <utility>
1576
1577diff -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
1578--- inkscape-0.48.1~/src/live_effects/lpeobject-reference.h 2010-07-13 04:48:40.000000000 +0100
1579+++ inkscape-0.48.1/src/live_effects/lpeobject-reference.h 2011-05-01 00:56:19.601250878 +0100
1580@@ -11,6 +11,7 @@
1581
1582 #include <forward.h>
1583 #include <uri-references.h>
1584+#include <stddef.h>
1585 #include <sigc++/sigc++.h>
1586
1587 namespace Inkscape {
1588diff -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
1589--- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h 2010-07-13 04:48:40.000000000 +0100
1590+++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h 2011-05-01 00:56:19.601250878 +0100
1591@@ -11,6 +11,7 @@
1592
1593 #include <forward.h>
1594 #include <uri-references.h>
1595+#include <stddef.h>
1596 #include <sigc++/sigc++.h>
1597
1598 class Path;
1599diff -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
1600--- inkscape-0.48.1~/src/live_effects/parameter/path-reference.h.orig 1970-01-01 01:00:00.000000000 +0100
1601+++ inkscape-0.48.1/src/live_effects/parameter/path-reference.h.orig 2010-07-13 04:48:40.000000000 +0100
1602@@ -0,0 +1,60 @@
1603+#ifndef SEEN_LPE_PATH_REFERENCE_H
1604+#define SEEN_LPE_PATH_REFERENCE_H
1605+
1606+/*
1607+ * The reference corresponding to href of LPE PathParam.
1608+ *
1609+ * Copyright (C) 2008 Johan Engelen
1610+ *
1611+ * Released under GNU GPL, read the file 'COPYING' for more information.
1612+ */
1613+
1614+#include <forward.h>
1615+#include <uri-references.h>
1616+#include <sigc++/sigc++.h>
1617+
1618+class Path;
1619+
1620+namespace Inkscape {
1621+
1622+namespace XML {
1623+ struct Node;
1624+}
1625+
1626+namespace LivePathEffect {
1627+
1628+
1629+class PathReference : public Inkscape::URIReference {
1630+public:
1631+ PathReference(SPObject *owner) : URIReference(owner) {}
1632+
1633+ SPItem *getObject() const {
1634+ return (SPItem *)URIReference::getObject();
1635+ }
1636+
1637+protected:
1638+ virtual bool _acceptObject(SPObject * const obj) const;
1639+
1640+private:
1641+ PathReference(const PathReference&);
1642+ PathReference& operator=(const PathReference&);
1643+};
1644+
1645+} // namespace LivePathEffect
1646+
1647+} // namespace Inkscape
1648+
1649+
1650+
1651+#endif /* !SEEN_LPE_PATH_REFERENCE_H */
1652+
1653+/*
1654+ Local Variables:
1655+ mode:c++
1656+ c-file-style:"stroustrup"
1657+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
1658+ indent-tabs-mode:nil
1659+ fill-column:99
1660+ End:
1661+*/
1662+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
1663diff -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
1664--- inkscape-0.48.1~/src/live_effects/parameter/path.h 2010-07-13 04:48:40.000000000 +0100
1665+++ inkscape-0.48.1/src/live_effects/parameter/path.h 2011-05-01 00:56:19.601250878 +0100
1666@@ -16,6 +16,7 @@
1667
1668 #include "live_effects/parameter/parameter.h"
1669 #include "live_effects/parameter/path-reference.h"
1670+#include <stddef.h>
1671 #include <sigc++/sigc++.h>
1672
1673 namespace Inkscape {
1674diff -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
1675--- inkscape-0.48.1~/src/message-stack.h 2010-07-13 04:48:40.000000000 +0100
1676+++ inkscape-0.48.1/src/message-stack.h 2011-05-01 00:56:19.601250878 +0100
1677@@ -14,6 +14,7 @@
1678 #ifndef SEEN_INKSCAPE_MESSAGE_STACK_H
1679 #define SEEN_INKSCAPE_MESSAGE_STACK_H
1680
1681+#include <stddef.h>
1682 #include <sigc++/sigc++.h>
1683 #include <glib.h>
1684 #include <stdarg.h>
1685diff -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
1686--- inkscape-0.48.1~/src/object-hierarchy.h 2010-07-13 04:48:40.000000000 +0100
1687+++ inkscape-0.48.1/src/object-hierarchy.h 2011-05-01 00:56:19.601250878 +0100
1688@@ -14,6 +14,7 @@
1689
1690 #include <exception>
1691 #include <list>
1692+#include <stddef.h>
1693 #include <sigc++/connection.h>
1694 #include <sigc++/signal.h>
1695 #include <glib/gmessages.h>
1696diff -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
1697--- inkscape-0.48.1~/src/persp3d-reference.h 2010-07-13 04:48:40.000000000 +0100
1698+++ inkscape-0.48.1/src/persp3d-reference.h 2011-05-01 00:56:19.601250878 +0100
1699@@ -11,6 +11,7 @@
1700 */
1701
1702 #include "uri-references.h"
1703+#include <stddef.h>
1704 #include <sigc++/sigc++.h>
1705 #include "persp3d.h"
1706
1707diff -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
1708--- inkscape-0.48.1~/src/rect-context.h 2010-07-13 04:48:40.000000000 +0100
1709+++ inkscape-0.48.1/src/rect-context.h 2011-05-01 00:56:19.601250878 +0100
1710@@ -14,6 +14,7 @@
1711 * Released under GNU GPL
1712 */
1713
1714+#include <stddef.h>
1715 #include <sigc++/sigc++.h>
1716 #include "event-context.h"
1717 #include "libnr/nr-point.h"
1718diff -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
1719--- inkscape-0.48.1~/src/selcue.h 2010-07-13 04:48:40.000000000 +0100
1720+++ inkscape-0.48.1/src/selcue.h 2011-05-01 00:56:19.601250878 +0100
1721@@ -14,6 +14,7 @@
1722 */
1723
1724 #include <list>
1725+#include <stddef.h>
1726 #include <sigc++/sigc++.h>
1727
1728 class SPDesktop;
1729diff -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
1730--- inkscape-0.48.1~/src/selection-describer.h 2010-07-13 04:48:40.000000000 +0100
1731+++ inkscape-0.48.1/src/selection-describer.h 2011-05-01 00:56:19.601250878 +0100
1732@@ -12,6 +12,7 @@
1733 #ifndef SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H
1734 #define SEEN_INKSCAPE_SELECTION_DESCRIPTION_HANDLER_H
1735
1736+#include <stddef.h>
1737 #include <sigc++/sigc++.h>
1738 #include "message-context.h"
1739
1740diff -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
1741--- inkscape-0.48.1~/src/selection.h 2010-07-13 04:48:40.000000000 +0100
1742+++ inkscape-0.48.1/src/selection.h 2011-05-01 00:56:19.601250878 +0100
1743@@ -19,6 +19,7 @@
1744 #include <vector>
1745 #include <map>
1746 #include <list>
1747+#include <stddef.h>
1748 #include <sigc++/sigc++.h>
1749
1750 //#include "libnr/nr-rect.h"
1751diff -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
1752--- inkscape-0.48.1~/src/seltrans.h 2010-07-13 04:48:40.000000000 +0100
1753+++ inkscape-0.48.1/src/seltrans.h 2011-05-01 00:56:19.601250878 +0100
1754@@ -15,6 +15,7 @@
1755 * Released under GNU GPL, read the file 'COPYING' for more information
1756 */
1757
1758+#include <stddef.h>
1759 #include <sigc++/sigc++.h>
1760 #include <2geom/point.h>
1761 #include <2geom/matrix.h>
1762diff -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
1763--- inkscape-0.48.1~/src/seltrans.h.orig 1970-01-01 01:00:00.000000000 +0100
1764+++ inkscape-0.48.1/src/seltrans.h.orig 2010-07-13 04:48:40.000000000 +0100
1765@@ -0,0 +1,196 @@
1766+#ifndef __SELTRANS_H__
1767+#define __SELTRANS_H__
1768+
1769+/*
1770+ * Helper object for transforming selected items
1771+ *
1772+ * Authors:
1773+ * Lauris Kaplinski <lauris@kaplinski.com>
1774+ * Carl Hetherington <inkscape@carlh.net>
1775+ * Diederik van Lierop <mail@diedenrezi.nl>
1776+ *
1777+ * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
1778+ * Copyright (C) 1999-2002 Lauris Kaplinski
1779+ *
1780+ * Released under GNU GPL, read the file 'COPYING' for more information
1781+ */
1782+
1783+#include <sigc++/sigc++.h>
1784+#include <2geom/point.h>
1785+#include <2geom/matrix.h>
1786+#include <2geom/rect.h>
1787+#include "knot.h"
1788+#include "forward.h"
1789+#include "selcue.h"
1790+#include "message-context.h"
1791+#include <vector>
1792+#include "sp-item.h"
1793+
1794+struct SPKnot;
1795+class SPDesktop;
1796+class SPCanvasItem;
1797+class SPSelTransHandle;
1798+
1799+namespace Inkscape
1800+{
1801+
1802+Geom::Scale calcScaleFactors(Geom::Point const &initial_point, Geom::Point const &new_point, Geom::Point const &origin, bool const skew = false);
1803+
1804+namespace XML
1805+{
1806+ class Node;
1807+}
1808+
1809+class SelTrans
1810+{
1811+public:
1812+ SelTrans(SPDesktop *desktop);
1813+ ~SelTrans();
1814+
1815+ Inkscape::MessageContext &messageContext() {
1816+ return _message_context;
1817+ }
1818+
1819+ void increaseState();
1820+ void resetState();
1821+ void setCenter(Geom::Point const &p);
1822+ void grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles, bool translating);
1823+ void transform(Geom::Matrix const &rel_affine, Geom::Point const &norm);
1824+ void ungrab();
1825+ void stamp();
1826+ void moveTo(Geom::Point const &xy, guint state);
1827+ void stretch(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
1828+ void scale(Geom::Point &pt, guint state);
1829+ void skew(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
1830+ void rotate(Geom::Point &pt, guint state);
1831+ gboolean scaleRequest(Geom::Point &pt, guint state);
1832+ gboolean stretchRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
1833+ gboolean skewRequest(SPSelTransHandle const &handle, Geom::Point &pt, guint state);
1834+ gboolean rotateRequest(Geom::Point &pt, guint state);
1835+ gboolean centerRequest(Geom::Point &pt, guint state);
1836+
1837+ gboolean handleRequest(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle);
1838+ void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle);
1839+ void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle);
1840+ void handleNewEvent(SPKnot *knot, Geom::Point *position, guint state, SPSelTransHandle const &handle);
1841+
1842+ enum Show
1843+ {
1844+ SHOW_CONTENT,
1845+ SHOW_OUTLINE
1846+ };
1847+
1848+ void setShow(Show s) {
1849+ _show = s;
1850+ }
1851+ bool isEmpty() {
1852+ return _empty;
1853+ }
1854+ bool isGrabbed() {
1855+ return _grabbed;
1856+ }
1857+ bool centerIsVisible() {
1858+ return ( _chandle && SP_KNOT_IS_VISIBLE (_chandle) );
1859+ }
1860+
1861+private:
1862+ void _updateHandles();
1863+ void _updateVolatileState();
1864+ void _selChanged(Inkscape::Selection *selection);
1865+ void _selModified(Inkscape::Selection *selection, guint flags);
1866+ void _showHandles(SPKnot *knot[], SPSelTransHandle const handle[], gint num,
1867+ gchar const *even_tip, gchar const *odd_tip);
1868+ Geom::Point _getGeomHandlePos(Geom::Point const &visual_handle_pos);
1869+ Geom::Point _calcAbsAffineDefault(Geom::Scale const default_scale);
1870+ Geom::Point _calcAbsAffineGeom(Geom::Scale const geom_scale);
1871+ void _keepClosestPointOnly(std::vector<Inkscape::SnapCandidatePoint> &points, const Geom::Point &reference);
1872+ void _display_snapsource();
1873+
1874+ enum State {
1875+ STATE_SCALE, //scale or stretch
1876+ STATE_ROTATE //rotate or skew
1877+ };
1878+
1879+ SPDesktop *_desktop;
1880+
1881+ std::vector<SPItem *> _items;
1882+ std::vector<SPItem const *> _items_const;
1883+ std::vector<Geom::Matrix> _items_affines;
1884+ std::vector<Geom::Point> _items_centers;
1885+
1886+ std::vector<Inkscape::SnapCandidatePoint> _snap_points;
1887+ std::vector<Inkscape::SnapCandidatePoint> _bbox_points; // the bbox point of the selection as a whole, i.e. max. 4 corners plus optionally some midpoints
1888+ std::vector<Inkscape::SnapCandidatePoint> _bbox_points_for_translating; // the bbox points of each selected item, only to be used for translating
1889+
1890+ Inkscape::SelCue _selcue;
1891+
1892+ Inkscape::Selection *_selection;
1893+ State _state;
1894+ Show _show;
1895+
1896+ bool _grabbed;
1897+ bool _show_handles;
1898+ bool _empty;
1899+ bool _changed;
1900+
1901+ SPItem::BBoxType _snap_bbox_type;
1902+
1903+ Geom::OptRect _bbox;
1904+ Geom::OptRect _approximate_bbox;
1905+ Geom::OptRect _geometric_bbox;
1906+ gdouble _strokewidth;
1907+
1908+ Geom::Matrix _current_relative_affine;
1909+ Geom::Matrix _absolute_affine;
1910+ Geom::Matrix _relative_affine;
1911+ /* According to Merriam - Webster's online dictionary
1912+ * Affine: a transformation (as a translation, a rotation, or a uniform stretching) that carries straight
1913+ * lines into straight lines and parallel lines into parallel lines but may alter distance between points
1914+ * and angles between lines <affine geometry>
1915+ */
1916+
1917+ Geom::Point _opposite; ///< opposite point to where a scale is taking place
1918+ Geom::Point _opposite_for_specpoints;
1919+ Geom::Point _opposite_for_bboxpoints;
1920+ Geom::Point _origin_for_specpoints;
1921+ Geom::Point _origin_for_bboxpoints;
1922+
1923+ gdouble _handle_x;
1924+ gdouble _handle_y;
1925+
1926+ boost::optional<Geom::Point> _center;
1927+ bool _center_is_set; ///< we've already set _center, no need to reread it from items
1928+
1929+ SPKnot *_shandle[8];
1930+ SPKnot *_rhandle[8];
1931+ SPKnot *_chandle;
1932+ SPCanvasItem *_norm;
1933+ SPCanvasItem *_grip;
1934+ SPCanvasItem *_l[4];
1935+ guint _sel_changed_id;
1936+ guint _sel_modified_id;
1937+ GSList *_stamp_cache;
1938+
1939+ Geom::Point _origin; ///< position of origin for transforms
1940+ Geom::Point _point; ///< original position of the knot being used for the current transform
1941+ Geom::Point _point_geom; ///< original position of the knot being used for the current transform
1942+ Inkscape::MessageContext _message_context;
1943+ sigc::connection _sel_changed_connection;
1944+ sigc::connection _sel_modified_connection;
1945+};
1946+
1947+}
1948+
1949+#endif
1950+
1951+
1952+/*
1953+ Local Variables:
1954+ mode:c++
1955+ c-file-style:"stroustrup"
1956+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
1957+ indent-tabs-mode:nil
1958+ fill-column:99
1959+ End:
1960+*/
1961+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
1962diff -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
1963--- inkscape-0.48.1~/src/sp-conn-end-pair.h 2010-07-13 04:48:40.000000000 +0100
1964+++ inkscape-0.48.1/src/sp-conn-end-pair.h 2011-05-01 00:56:19.611250878 +0100
1965@@ -15,6 +15,7 @@
1966
1967 #include "forward.h"
1968 #include "libnr/nr-point.h"
1969+#include <stddef.h>
1970 #include <sigc++/connection.h>
1971 #include <sigc++/functors/slot.h>
1972 #include <sigc++/signal.h>
1973diff -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
1974--- inkscape-0.48.1~/src/sp-conn-end.h 2010-07-13 04:48:40.000000000 +0100
1975+++ inkscape-0.48.1/src/sp-conn-end.h 2011-05-01 00:56:19.611250878 +0100
1976@@ -2,6 +2,7 @@
1977 #define SEEN_SP_CONN_END
1978
1979 #include <glib/gtypes.h>
1980+#include <stddef.h>
1981 #include <sigc++/connection.h>
1982
1983 #include "sp-use-reference.h"
1984diff -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
1985--- inkscape-0.48.1~/src/sp-gradient.h 2010-08-04 17:45:00.000000000 +0100
1986+++ inkscape-0.48.1/src/sp-gradient.h 2011-05-01 00:56:19.611250878 +0100
1987@@ -25,6 +25,7 @@
1988 #include "sp-gradient-units.h"
1989 #include "sp-gradient-vector.h"
1990
1991+#include <stddef.h>
1992 #include <sigc++/connection.h>
1993
1994 struct SPGradientReference;
1995diff -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
1996--- inkscape-0.48.1~/src/sp-object.h 2010-07-13 04:48:40.000000000 +0100
1997+++ inkscape-0.48.1/src/sp-object.h 2011-05-01 00:56:19.611250878 +0100
1998@@ -56,6 +56,7 @@
1999
2000
2001 #include <glib-object.h>
2002+#include <stddef.h>
2003 #include <sigc++/connection.h>
2004 #include <sigc++/functors/slot.h>
2005 #include <sigc++/signal.h>
2006diff -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
2007--- inkscape-0.48.1~/src/sp-object.h.orig 1970-01-01 01:00:00.000000000 +0100
2008+++ inkscape-0.48.1/src/sp-object.h.orig 2010-07-13 04:48:40.000000000 +0100
2009@@ -0,0 +1,587 @@
2010+#ifndef SP_OBJECT_H_SEEN
2011+#define SP_OBJECT_H_SEEN
2012+
2013+/** \file
2014+ * Abstract base class for all nodes
2015+ *
2016+ * Authors:
2017+ * Lauris Kaplinski <lauris@kaplinski.com>
2018+ *
2019+ * Copyright (C) 1999-2002 authors
2020+ * Copyright (C) 2001-2002 Ximian, Inc.
2021+ *
2022+ * Released under GNU GPL, read the file 'COPYING' for more information
2023+ */
2024+
2025+/* SPObject flags */
2026+
2027+/* Async modification flags */
2028+#define SP_OBJECT_MODIFIED_FLAG (1 << 0)
2029+#define SP_OBJECT_CHILD_MODIFIED_FLAG (1 << 1)
2030+#define SP_OBJECT_PARENT_MODIFIED_FLAG (1 << 2)
2031+#define SP_OBJECT_STYLE_MODIFIED_FLAG (1 << 3)
2032+#define SP_OBJECT_VIEWPORT_MODIFIED_FLAG (1 << 4)
2033+#define SP_OBJECT_USER_MODIFIED_FLAG_A (1 << 5)
2034+#define SP_OBJECT_USER_MODIFIED_FLAG_B (1 << 6)
2035+#define SP_OBJECT_USER_MODIFIED_FLAG_C (1 << 7)
2036+
2037+/* Conveneience */
2038+#define SP_OBJECT_FLAGS_ALL 0xff
2039+
2040+/* Flags that mark object as modified */
2041+/* Object, Child, Style, Viewport, User */
2042+#define SP_OBJECT_MODIFIED_STATE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_PARENT_MODIFIED_FLAG))
2043+
2044+/* Flags that will propagate downstreams */
2045+/* Parent, Style, Viewport, User */
2046+#define SP_OBJECT_MODIFIED_CASCADE (SP_OBJECT_FLAGS_ALL & ~(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))
2047+
2048+/* Generic */
2049+#define SP_OBJECT_IS_CLONED(o) (((SPObject *) (o))->cloned)
2050+
2051+/* Write flags */
2052+#define SP_OBJECT_WRITE_BUILD (1 << 0)
2053+#define SP_OBJECT_WRITE_EXT (1 << 1)
2054+#define SP_OBJECT_WRITE_ALL (1 << 2)
2055+
2056+/* Convenience stuff */
2057+#define SP_OBJECT_ID(o) (((SPObject *) (o))->getId())
2058+#define SP_OBJECT_REPR(o) (((SPObject *) (o))->repr)
2059+#define SP_OBJECT_DOCUMENT(o) (((SPObject *) (o))->document)
2060+#define SP_OBJECT_PARENT(o) (((SPObject *) (o))->parent)
2061+#define SP_OBJECT_NEXT(o) (((SPObject *) (o))->next)
2062+#define SP_OBJECT_PREV(o) (sp_object_prev((SPObject *) (o)))
2063+#define SP_OBJECT_HREFCOUNT(o) (((SPObject *) (o))->hrefcount)
2064+#define SP_OBJECT_STYLE(o) (((SPObject *) (o))->style)
2065+
2066+
2067+#include <glib-object.h>
2068+#include <sigc++/connection.h>
2069+#include <sigc++/functors/slot.h>
2070+#include <sigc++/signal.h>
2071+
2072+#include "forward.h"
2073+#include "version.h"
2074+#include "util/forward-pointer-iterator.h"
2075+
2076+namespace Inkscape {
2077+namespace XML {
2078+class Node;
2079+class Document;
2080+}
2081+}
2082+
2083+
2084+typedef enum {
2085+ SP_NO_EXCEPTION,
2086+ SP_INDEX_SIZE_ERR,
2087+ SP_DOMSTRING_SIZE_ERR,
2088+ SP_HIERARCHY_REQUEST_ERR,
2089+ SP_WRONG_DOCUMENT_ERR,
2090+ SP_INVALID_CHARACTER_ERR,
2091+ SP_NO_DATA_ALLOWED_ERR,
2092+ SP_NO_MODIFICATION_ALLOWED_ERR,
2093+ SP_NOT_FOUND_ERR,
2094+ SP_NOT_SUPPORTED_ERR,
2095+ SP_INUSE_ATTRIBUTE_ERR,
2096+ SP_INVALID_STATE_ERR,
2097+ SP_SYNTAX_ERR,
2098+ SP_INVALID_MODIFICATION_ERR,
2099+ SP_NAMESPACE_ERR,
2100+ SP_INVALID_ACCESS_ERR
2101+} SPExceptionType;
2102+
2103+class SPException;
2104+
2105+/// An attempt to implement exceptions, unused?
2106+struct SPException {
2107+ SPExceptionType code;
2108+};
2109+
2110+#define SP_EXCEPTION_INIT(ex) {(ex)->code = SP_NO_EXCEPTION;}
2111+#define SP_EXCEPTION_IS_OK(ex) (!(ex) || ((ex)->code == SP_NO_EXCEPTION))
2112+
2113+class SPCtx;
2114+
2115+/// Unused
2116+struct SPCtx {
2117+ unsigned int flags;
2118+};
2119+
2120+enum {
2121+ SP_XML_SPACE_DEFAULT,
2122+ SP_XML_SPACE_PRESERVE
2123+};
2124+
2125+class SPIXmlSpace;
2126+
2127+/// Internal class consisting of two bits.
2128+struct SPIXmlSpace {
2129+ guint set : 1;
2130+ guint value : 1;
2131+};
2132+
2133+class SPObject;
2134+
2135+/*
2136+ * Refcounting
2137+ *
2138+ * Owner is here for debug reasons, you can set it to NULL safely
2139+ * Ref should return object, NULL is error, unref return always NULL
2140+ */
2141+
2142+SPObject *sp_object_ref(SPObject *object, SPObject *owner=NULL);
2143+SPObject *sp_object_unref(SPObject *object, SPObject *owner=NULL);
2144+
2145+SPObject *sp_object_href(SPObject *object, gpointer owner);
2146+SPObject *sp_object_hunref(SPObject *object, gpointer owner);
2147+
2148+/// A refcounting tree node object.
2149+struct SPObject : public GObject {
2150+ enum CollectionPolicy {
2151+ COLLECT_WITH_PARENT,
2152+ ALWAYS_COLLECT
2153+ };
2154+
2155+ unsigned int cloned : 1;
2156+ unsigned int uflags : 8;
2157+ unsigned int mflags : 8;
2158+ SPIXmlSpace xml_space;
2159+ unsigned int hrefcount; /* number of xlink:href references */
2160+ unsigned int _total_hrefcount; /* our hrefcount + total descendants */
2161+ SPDocument *document; /* Document we are part of */
2162+ SPObject *parent; /* Our parent (only one allowed) */
2163+ SPObject *children; /* Our children */
2164+ SPObject *_last_child; /* Remembered last child */
2165+ SPObject *next; /* Next object in linked list */
2166+ Inkscape::XML::Node *repr; /* Our xml representation */
2167+
2168+private:
2169+ gchar *id; /* Our very own unique id */
2170+public:
2171+
2172+ /**
2173+ * Returns the objects current ID string.
2174+ */
2175+ gchar const* getId() const;
2176+
2177+ /** @brief cleans up an SPObject, releasing its references and
2178+ * requesting that references to it be released
2179+ */
2180+ void releaseReferences();
2181+
2182+ /** @brief connects to the release request signal
2183+ *
2184+ * @param slot the slot to connect
2185+ *
2186+ * @returns the sigc::connection formed
2187+ */
2188+ sigc::connection connectRelease(sigc::slot<void, SPObject *> slot) {
2189+ return _release_signal.connect(slot);
2190+ }
2191+
2192+ /**
2193+ * Represents the style properties, whether from presentation attributes, the <tt>style</tt>
2194+ * attribute, or inherited.
2195+ *
2196+ * sp_object_private_set doesn't handle SP_ATTR_STYLE or any presentation attributes at the
2197+ * time of writing, so this is probably NULL for all SPObject's that aren't an SPItem.
2198+ *
2199+ * However, this gives rise to the bugs mentioned in sp_object_get_style_property.
2200+ * Note that some non-SPItem SPObject's, such as SPStop, do need styling information,
2201+ * and need to inherit properties even through other non-SPItem parents like \<defs\>.
2202+ */
2203+ SPStyle *style;
2204+
2205+ /// Switch containing next() method.
2206+ struct ParentIteratorStrategy {
2207+ static SPObject const *next(SPObject const *object) {
2208+ return object->parent;
2209+ }
2210+ };
2211+ /// Switch containing next() method.
2212+ struct SiblingIteratorStrategy {
2213+ static SPObject const *next(SPObject const *object) {
2214+ return object->next;
2215+ }
2216+ };
2217+
2218+ typedef Inkscape::Util::ForwardPointerIterator<SPObject, ParentIteratorStrategy> ParentIterator;
2219+ typedef Inkscape::Util::ForwardPointerIterator<SPObject const, ParentIteratorStrategy> ConstParentIterator;
2220+ typedef Inkscape::Util::ForwardPointerIterator<SPObject, SiblingIteratorStrategy> SiblingIterator;
2221+ typedef Inkscape::Util::ForwardPointerIterator<SPObject const, SiblingIteratorStrategy> ConstSiblingIterator;
2222+
2223+ bool isSiblingOf(SPObject const *object) const {
2224+ g_return_val_if_fail(object != NULL, false);
2225+ return this->parent && this->parent == object->parent;
2226+ }
2227+ bool isAncestorOf(SPObject const *object) const;
2228+
2229+ SPObject const *nearestCommonAncestor(SPObject const *object) const;
2230+ /* A non-const version can be similarly constructed if you want one.
2231+ * (Don't just cast away the constness, which would be ill-formed.) */
2232+
2233+ SPObject *getNext();
2234+ SPObject *getPrev();
2235+
2236+ bool hasChildren() const { return ( children != NULL ); }
2237+
2238+ SPObject *firstChild() { return children; }
2239+ SPObject const *firstChild() const { return children; }
2240+ SPObject *lastChild() { return _last_child; }
2241+ SPObject const *lastChild() const { return _last_child; }
2242+
2243+ enum Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow };
2244+ /** @brief Retrieves children as a GSList */
2245+ GSList *childList(bool add_ref, Action action = ActionGeneral);
2246+
2247+ SPObject *appendChildRepr(Inkscape::XML::Node *repr);
2248+
2249+ /** @brief Gets the author-visible label for this object. */
2250+ gchar const *label() const;
2251+ /** @brief Returns a default label for this object. */
2252+ gchar const *defaultLabel() const;
2253+ /** @brief Sets the author-visible label for this object.
2254+ *
2255+ * Sets the author-visible label for the object.
2256+ *
2257+ * @param label the new label
2258+ */
2259+ void setLabel(gchar const *label);
2260+
2261+ /** Retrieves the title of this object */
2262+ gchar *title() const;
2263+ /** Sets the title of this object */
2264+ bool setTitle(gchar const *title, bool verbatim=false);
2265+
2266+ /** Retrieves the description of this object */
2267+ gchar *desc() const;
2268+ /** Sets the description of this object */
2269+ bool setDesc(gchar const *desc, bool verbatim=false);
2270+
2271+ /** @brief Set the policy under which this object will be
2272+ * orphan-collected.
2273+ *
2274+ * Orphan-collection is the process of deleting all objects which no longer have
2275+ * hyper-references pointing to them. The policy determines when this happens. Many objects
2276+ * should not be deleted simply because they are no longer referred to; other objects (like
2277+ * "intermediate" gradients) are more or less throw-away and should always be collected when no
2278+ * longer in use.
2279+ *
2280+ * Along these lines, there are currently two orphan-collection policies:
2281+ *
2282+ * COLLECT_WITH_PARENT - don't worry about the object's hrefcount;
2283+ * if its parent is collected, this object
2284+ * will be too
2285+ *
2286+ * COLLECT_ALWAYS - always collect the object as soon as its
2287+ * hrefcount reaches zero
2288+ *
2289+ * @returns the current collection policy in effect for this object
2290+ */
2291+ CollectionPolicy collectionPolicy() const { return _collection_policy; }
2292+
2293+ /** @brief Sets the orphan-collection policy in effect for this object.
2294+ *
2295+ * @see SPObject::collectionPolicy
2296+ *
2297+ * @param policy the new policy to adopt
2298+ */
2299+ void setCollectionPolicy(CollectionPolicy policy) {
2300+ _collection_policy = policy;
2301+ }
2302+
2303+ /** @brief Requests a later automatic call to collectOrphan().
2304+ *
2305+ * This method requests that collectOrphan() be called during the document update cycle,
2306+ * deleting the object if it is no longer used.
2307+ *
2308+ * If the current collection policy is COLLECT_WITH_PARENT, this function has no effect.
2309+ *
2310+ * @see SPObject::collectOrphan
2311+ */
2312+ void requestOrphanCollection();
2313+
2314+ /** @brief Unconditionally delete the object if it is not referenced.
2315+ *
2316+ * Unconditionally delete the object if there are no outstanding hyper-references to it.
2317+ * Observers are not notified of the object's deletion (at the SPObject level; XML tree
2318+ * notifications still fire).
2319+ *
2320+ * @see SPObject::deleteObject
2321+ */
2322+ void collectOrphan() {
2323+ if ( _total_hrefcount == 0 ) {
2324+ deleteObject(false);
2325+ }
2326+ }
2327+
2328+ /** @brief Check if object is referenced by any other object.
2329+ */
2330+ bool isReferenced() { return ( _total_hrefcount > 0 ); }
2331+
2332+ /** @brief Deletes an object.
2333+ *
2334+ * Detaches the object's repr, and optionally sends notification that the object has been
2335+ * deleted.
2336+ *
2337+ * @param propagate notify observers that the object has been deleted?
2338+ *
2339+ * @param propagate_descendants notify observers of children that they have been deleted?
2340+ */
2341+ void deleteObject(bool propagate, bool propagate_descendants);
2342+
2343+ /** @brief Deletes on object.
2344+ *
2345+ * @param propagate Notify observers of this object and its children that they have been
2346+ * deleted?
2347+ */
2348+ void deleteObject(bool propagate=true) {
2349+ deleteObject(propagate, propagate);
2350+ }
2351+
2352+ /** @brief Connects a slot to be called when an object is deleted.
2353+ *
2354+ * This connects a slot to an object's internal delete signal, which is invoked when the object
2355+ * is deleted
2356+ *
2357+ * The signal is mainly useful for e.g. knowing when to break hrefs or dissociate clones.
2358+ *
2359+ * @param slot the slot to connect
2360+ *
2361+ * @see SPObject::deleteObject
2362+ */
2363+ sigc::connection connectDelete(sigc::slot<void, SPObject *> slot) {
2364+ return _delete_signal.connect(slot);
2365+ }
2366+
2367+ sigc::connection connectPositionChanged(sigc::slot<void, SPObject *> slot) {
2368+ return _position_changed_signal.connect(slot);
2369+ }
2370+
2371+ /** @brief Returns the object which supercedes this one (if any).
2372+ *
2373+ * This is mainly useful for ensuring we can correctly perform a series of moves or deletes,
2374+ * even if the objects in question have been replaced in the middle of the sequence.
2375+ */
2376+ SPObject *successor() { return _successor; }
2377+
2378+ /** @brief Indicates that another object supercedes this one. */
2379+ void setSuccessor(SPObject *successor) {
2380+ g_assert(successor != NULL);
2381+ g_assert(_successor == NULL);
2382+ g_assert(successor->_successor == NULL);
2383+ sp_object_ref(successor, NULL);
2384+ _successor = successor;
2385+ }
2386+
2387+ /* modifications; all three sets of methods should probably ultimately be protected, as they
2388+ * are not really part of its public interface. However, other parts of the code to
2389+ * occasionally use them at present. */
2390+
2391+ /* the no-argument version of updateRepr() is intended to be a bit more public, however -- it
2392+ * essentially just flushes any changes back to the backing store (the repr layer); maybe it
2393+ * should be called something else and made public at that point. */
2394+
2395+ /** @brief Updates the object's repr based on the object's state.
2396+ *
2397+ * This method updates the the repr attached to the object to reflect the object's current
2398+ * state; see the three-argument version for details.
2399+ *
2400+ * @param flags object write flags that apply to this update
2401+ *
2402+ * @return the updated repr
2403+ */
2404+ Inkscape::XML::Node *updateRepr(unsigned int flags=SP_OBJECT_WRITE_EXT);
2405+
2406+ /** @brief Updates the given repr based on the object's state.
2407+ *
2408+ * This method updates the given repr to reflect the object's current state. There are
2409+ * several flags that affect this:
2410+ *
2411+ * SP_OBJECT_WRITE_BUILD - create new reprs
2412+ *
2413+ * SP_OBJECT_WRITE_EXT - write elements and attributes
2414+ * which are not part of pure SVG
2415+ * (i.e. the Inkscape and Sodipodi
2416+ * namespaces)
2417+ *
2418+ * SP_OBJECT_WRITE_ALL - create all nodes and attributes,
2419+ * even those which might be redundant
2420+ *
2421+ * @param repr the repr to update
2422+ * @param flags object write flags that apply to this update
2423+ *
2424+ * @return the updated repr
2425+ */
2426+ Inkscape::XML::Node *updateRepr(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags);
2427+
2428+ /** @brief Queues an deferred update of this object's display.
2429+ *
2430+ * This method sets flags to indicate updates to be performed later, during the idle loop.
2431+ *
2432+ * There are several flags permitted here:
2433+ *
2434+ * SP_OBJECT_MODIFIED_FLAG - the object has been modified
2435+ *
2436+ * SP_OBJECT_CHILD_MODIFIED_FLAG - a child of the object has been
2437+ * modified
2438+ *
2439+ * SP_OBJECT_STYLE_MODIFIED_FLAG - the object's style has been
2440+ * modified
2441+ *
2442+ * There are also some subclass-specific modified flags which are hardly ever used.
2443+ *
2444+ * One of either MODIFIED or CHILD_MODIFIED is required.
2445+ *
2446+ * @param flags flags indicating what to update
2447+ */
2448+ void requestDisplayUpdate(unsigned int flags);
2449+
2450+ /** @brief Updates the object's display immediately
2451+ *
2452+ * This method is called during the idle loop by SPDocument in order to update the object's
2453+ * display.
2454+ *
2455+ * One additional flag is legal here:
2456+ *
2457+ * SP_OBJECT_PARENT_MODIFIED_FLAG - the parent has been
2458+ * modified
2459+ *
2460+ * @param ctx an SPCtx which accumulates various state
2461+ * during the recursive update -- beware! some
2462+ * subclasses try to cast this to an SPItemCtx *
2463+ *
2464+ * @param flags flags indicating what to update (in addition
2465+ * to any already set flags)
2466+ */
2467+ void updateDisplay(SPCtx *ctx, unsigned int flags);
2468+
2469+ /** @brief Requests that a modification notification signal
2470+ * be emitted later (e.g. during the idle loop)
2471+ *
2472+ * @param flags flags indicating what has been modified
2473+ */
2474+ void requestModified(unsigned int flags);
2475+
2476+ /** @brief Emits a modification notification signal
2477+ *
2478+ * @param flags indicating what has been modified
2479+ */
2480+ void emitModified(unsigned int flags);
2481+
2482+ /** @brief Connects to the modification notification signal
2483+ *
2484+ * @param slot the slot to connect
2485+ *
2486+ * @returns the connection formed thereby
2487+ */
2488+ sigc::connection connectModified(
2489+ sigc::slot<void, SPObject *, unsigned int> slot
2490+ ) {
2491+ return _modified_signal.connect(slot);
2492+ }
2493+
2494+ void _sendDeleteSignalRecursive();
2495+ void _updateTotalHRefCount(int increment);
2496+
2497+ void _requireSVGVersion(unsigned major, unsigned minor) {
2498+ _requireSVGVersion(Inkscape::Version(major, minor));
2499+ }
2500+ void _requireSVGVersion(Inkscape::Version version);
2501+
2502+ sigc::signal<void, SPObject *> _release_signal;
2503+ sigc::signal<void, SPObject *> _delete_signal;
2504+ sigc::signal<void, SPObject *> _position_changed_signal;
2505+ sigc::signal<void, SPObject *, unsigned int> _modified_signal;
2506+ SPObject *_successor;
2507+ CollectionPolicy _collection_policy;
2508+ gchar *_label;
2509+ mutable gchar *_default_label;
2510+
2511+private:
2512+ // Private member functions used in the definitions of setTitle(),
2513+ // setDesc(), title() and desc().
2514+ bool setTitleOrDesc(gchar const *value, gchar const *svg_tagname, bool verbatim);
2515+ gchar * getTitleOrDesc(gchar const *svg_tagname) const;
2516+ SPObject * findFirstChild(gchar const *tagname) const;
2517+ GString * textualContent() const;
2518+
2519+ friend class SPObjectImpl;
2520+};
2521+
2522+/// The SPObject vtable.
2523+struct SPObjectClass {
2524+ GObjectClass parent_class;
2525+
2526+ void (* build) (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
2527+ void (* release) (SPObject *object);
2528+
2529+ /* Virtual handlers of repr signals */
2530+ void (* child_added) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *ref);
2531+ void (* remove_child) (SPObject *object, Inkscape::XML::Node *child);
2532+
2533+ void (* order_changed) (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old, Inkscape::XML::Node *new_repr);
2534+
2535+ void (* set) (SPObject *object, unsigned int key, gchar const *value);
2536+
2537+ void (* read_content) (SPObject *object);
2538+
2539+ /* Update handler */
2540+ void (* update) (SPObject *object, SPCtx *ctx, unsigned int flags);
2541+ /* Modification handler */
2542+ void (* modified) (SPObject *object, unsigned int flags);
2543+
2544+ Inkscape::XML::Node * (* write) (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags);
2545+};
2546+
2547+
2548+/*
2549+ * Attaching/detaching
2550+ */
2551+
2552+void sp_object_attach(SPObject *parent, SPObject *object, SPObject *prev);
2553+void sp_object_reorder(SPObject *object, SPObject *prev);
2554+void sp_object_detach(SPObject *parent, SPObject *object);
2555+
2556+inline SPObject *sp_object_first_child(SPObject *parent) {
2557+ return parent->firstChild();
2558+}
2559+SPObject *sp_object_get_child_by_repr(SPObject *object, Inkscape::XML::Node *repr);
2560+
2561+void sp_object_invoke_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned);
2562+
2563+void sp_object_set(SPObject *object, unsigned int key, gchar const *value);
2564+
2565+void sp_object_read_attr(SPObject *object, gchar const *key);
2566+
2567+/* Public */
2568+
2569+gchar const *sp_object_tagName_get(SPObject const *object, SPException *ex);
2570+gchar const *sp_object_getAttribute(SPObject const *object, gchar const *key, SPException *ex);
2571+void sp_object_setAttribute(SPObject *object, gchar const *key, gchar const *value, SPException *ex);
2572+void sp_object_removeAttribute(SPObject *object, gchar const *key, SPException *ex);
2573+
2574+/* Style */
2575+
2576+gchar const *sp_object_get_style_property(SPObject const *object,
2577+ gchar const *key, gchar const *def);
2578+
2579+int sp_object_compare_position(SPObject const *first, SPObject const *second);
2580+
2581+SPObject *sp_object_prev(SPObject *child);
2582+
2583+
2584+#endif // SP_OBJECT_H_SEEN
2585+
2586+
2587+/*
2588+ Local Variables:
2589+ mode:c++
2590+ c-file-style:"stroustrup"
2591+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
2592+ indent-tabs-mode:nil
2593+ fill-column:99
2594+ End:
2595+*/
2596+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
2597diff -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
2598--- inkscape-0.48.1~/src/sp-offset.h 2010-07-13 04:48:40.000000000 +0100
2599+++ inkscape-0.48.1/src/sp-offset.h 2011-05-01 00:56:19.611250878 +0100
2600@@ -16,6 +16,7 @@
2601
2602 #include "sp-shape.h"
2603
2604+#include <stddef.h>
2605 #include <sigc++/sigc++.h>
2606
2607 #define SP_TYPE_OFFSET (sp_offset_get_type ())
2608diff -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
2609--- inkscape-0.48.1~/src/sp-pattern.h 2010-07-13 04:48:40.000000000 +0100
2610+++ inkscape-0.48.1/src/sp-pattern.h 2011-05-01 00:56:19.611250878 +0100
2611@@ -32,6 +32,7 @@
2612 #include "sp-paint-server.h"
2613 #include "uri-references.h"
2614
2615+#include <stddef.h>
2616 #include <sigc++/connection.h>
2617
2618 class SPPatternReference : public Inkscape::URIReference {
2619diff -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
2620--- inkscape-0.48.1~/src/sp-pattern.h.orig 1970-01-01 01:00:00.000000000 +0100
2621+++ inkscape-0.48.1/src/sp-pattern.h.orig 2010-07-13 04:48:40.000000000 +0100
2622@@ -0,0 +1,113 @@
2623+#ifndef __SP_PATTERN_H__
2624+#define __SP_PATTERN_H__
2625+
2626+/*
2627+ * SVG <pattern> implementation
2628+ *
2629+ * Author:
2630+ * Lauris Kaplinski <lauris@kaplinski.com>
2631+ *
2632+ * Copyright (C) 2002 Lauris Kaplinski
2633+ *
2634+ * Released under GNU GPL, read the file 'COPYING' for more information
2635+ */
2636+
2637+#include <gtk/gtktypeutils.h>
2638+
2639+#include "forward.h"
2640+
2641+#define SP_TYPE_PATTERN (sp_pattern_get_type ())
2642+#define SP_PATTERN(o) (GTK_CHECK_CAST ((o), SP_TYPE_PATTERN, SPPattern))
2643+#define SP_PATTERN_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_PATTERN, SPPatternClass))
2644+#define SP_IS_PATTERN(o) (GTK_CHECK_TYPE ((o), SP_TYPE_PATTERN))
2645+#define SP_IS_PATTERN_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_PATTERN))
2646+
2647+GType sp_pattern_get_type (void);
2648+
2649+class SPPatternClass;
2650+
2651+#include <libnr/nr-rect.h>
2652+#include <libnr/nr-matrix.h>
2653+#include "svg/svg-length.h"
2654+#include "sp-paint-server.h"
2655+#include "uri-references.h"
2656+
2657+#include <sigc++/connection.h>
2658+
2659+class SPPatternReference : public Inkscape::URIReference {
2660+public:
2661+ SPPatternReference (SPObject *obj) : URIReference(obj) {}
2662+ SPPattern *getObject() const {
2663+ return (SPPattern *)URIReference::getObject();
2664+ }
2665+
2666+protected:
2667+ virtual bool _acceptObject(SPObject *obj) const {
2668+ return SP_IS_PATTERN (obj);
2669+ }
2670+};
2671+
2672+enum {
2673+ SP_PATTERN_UNITS_USERSPACEONUSE,
2674+ SP_PATTERN_UNITS_OBJECTBOUNDINGBOX
2675+};
2676+
2677+struct SPPattern : public SPPaintServer {
2678+ /* Reference (href) */
2679+ gchar *href;
2680+ SPPatternReference *ref;
2681+
2682+ /* patternUnits and patternContentUnits attribute */
2683+ guint patternUnits : 1;
2684+ guint patternUnits_set : 1;
2685+ guint patternContentUnits : 1;
2686+ guint patternContentUnits_set : 1;
2687+ /* patternTransform attribute */
2688+ Geom::Matrix patternTransform;
2689+ guint patternTransform_set : 1;
2690+ /* Tile rectangle */
2691+ SVGLength x;
2692+ SVGLength y;
2693+ SVGLength width;
2694+ SVGLength height;
2695+ /* VieBox */
2696+ NRRect viewBox;
2697+ guint viewBox_set : 1;
2698+
2699+ sigc::connection modified_connection;
2700+};
2701+
2702+struct SPPatternClass {
2703+ SPPaintServerClass parent_class;
2704+};
2705+
2706+guint pattern_users (SPPattern *pattern);
2707+SPPattern *pattern_chain (SPPattern *pattern);
2708+SPPattern *sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property);
2709+void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Matrix postmul, bool set);
2710+
2711+const gchar *pattern_tile (GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Matrix transform, Geom::Matrix move);
2712+
2713+SPPattern *pattern_getroot (SPPattern *pat);
2714+
2715+guint pattern_patternUnits (SPPattern *pat);
2716+guint pattern_patternContentUnits (SPPattern *pat);
2717+Geom::Matrix const &pattern_patternTransform(SPPattern const *pat);
2718+gdouble pattern_x (SPPattern *pat);
2719+gdouble pattern_y (SPPattern *pat);
2720+gdouble pattern_width (SPPattern *pat);
2721+gdouble pattern_height (SPPattern *pat);
2722+NRRect *pattern_viewBox (SPPattern *pat);
2723+
2724+#endif //__SP_PATTERN_H__
2725+
2726+/*
2727+ Local Variables:
2728+ mode:c++
2729+ c-file-style:"stroustrup"
2730+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
2731+ indent-tabs-mode:nil
2732+ fill-column:99
2733+ End:
2734+*/
2735+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
2736diff -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
2737--- inkscape-0.48.1~/src/sp-shape.h 2010-07-13 04:48:40.000000000 +0100
2738+++ inkscape-0.48.1/src/sp-shape.h 2011-05-01 00:56:19.611250878 +0100
2739@@ -19,6 +19,7 @@
2740 #include "sp-marker-loc.h"
2741 #include <2geom/forward.h>
2742
2743+#include <stddef.h>
2744 #include <sigc++/connection.h>
2745
2746 #define SP_TYPE_SHAPE (sp_shape_get_type ())
2747diff -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
2748--- inkscape-0.48.1~/src/sp-shape.h.orig 1970-01-01 01:00:00.000000000 +0100
2749+++ inkscape-0.48.1/src/sp-shape.h.orig 2010-07-13 04:48:40.000000000 +0100
2750@@ -0,0 +1,71 @@
2751+#ifndef __SP_SHAPE_H__
2752+#define __SP_SHAPE_H__
2753+
2754+/*
2755+ * Base class for shapes, including <path> element
2756+ *
2757+ * Author:
2758+ * Lauris Kaplinski <lauris@kaplinski.com>
2759+ *
2760+ * Copyright (C) 1999-2002 Lauris Kaplinski
2761+ * Copyright (C) 2000-2001 Ximian, Inc.
2762+ * Copyright (C) 2008 Johan Engelen
2763+ *
2764+ * Released under GNU GPL, read the file 'COPYING' for more information
2765+ */
2766+
2767+#include "display/display-forward.h"
2768+#include "sp-lpe-item.h"
2769+#include "sp-marker-loc.h"
2770+#include <2geom/forward.h>
2771+
2772+#include <sigc++/connection.h>
2773+
2774+#define SP_TYPE_SHAPE (sp_shape_get_type ())
2775+#define SP_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_SHAPE, SPShape))
2776+#define SP_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_SHAPE, SPShapeClass))
2777+#define SP_IS_SHAPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_SHAPE))
2778+#define SP_IS_SHAPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_SHAPE))
2779+
2780+#define SP_SHAPE_WRITE_PATH (1 << 2)
2781+
2782+struct SPDesktop;
2783+
2784+struct SPShape : public SPLPEItem {
2785+ SPCurve *curve;
2786+
2787+ SPObject *marker[SP_MARKER_LOC_QTY];
2788+ sigc::connection release_connect [SP_MARKER_LOC_QTY];
2789+ sigc::connection modified_connect [SP_MARKER_LOC_QTY];
2790+};
2791+
2792+struct SPShapeClass {
2793+ SPLPEItemClass item_class;
2794+
2795+ /* Build bpath from extra shape attributes */
2796+ void (* set_shape) (SPShape *shape);
2797+};
2798+
2799+GType sp_shape_get_type (void);
2800+
2801+void sp_shape_set_shape (SPShape *shape);
2802+
2803+/* Return duplicate of curve or NULL */
2804+SPCurve *sp_shape_get_curve (SPShape *shape);
2805+
2806+// sets a curve, updates display
2807+void sp_shape_set_curve (SPShape *shape, SPCurve *curve, unsigned int owner);
2808+
2809+// same as sp_shape_set_curve, but without updating display
2810+void sp_shape_set_curve_insync (SPShape *shape, SPCurve *curve, unsigned int owner);
2811+
2812+// markers API
2813+void sp_shape_set_marker (SPObject *object, unsigned int key, const gchar *value);
2814+int sp_shape_has_markers (SPShape const *shape);
2815+int sp_shape_number_of_markers (SPShape* Shape, int type);
2816+
2817+Geom::Matrix sp_shape_marker_get_transform(Geom::Curve const & c1, Geom::Curve const & c2);
2818+Geom::Matrix sp_shape_marker_get_transform_at_start(Geom::Curve const & c);
2819+Geom::Matrix sp_shape_marker_get_transform_at_end(Geom::Curve const & c);
2820+
2821+#endif
2822diff -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
2823--- inkscape-0.48.1~/src/sp-switch.h 2010-07-13 04:48:40.000000000 +0100
2824+++ inkscape-0.48.1/src/sp-switch.h 2011-05-01 00:56:19.611250878 +0100
2825@@ -14,6 +14,7 @@
2826
2827 #include "sp-item-group.h"
2828
2829+#include <stddef.h>
2830 #include <sigc++/connection.h>
2831
2832 #define SP_TYPE_SWITCH (CSwitch::getType())
2833diff -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
2834--- inkscape-0.48.1~/src/sp-text.h 2010-07-13 04:48:40.000000000 +0100
2835+++ inkscape-0.48.1/src/sp-text.h 2011-05-01 00:56:19.611250878 +0100
2836@@ -14,6 +14,7 @@
2837 */
2838
2839 #include <glib/gtypes.h>
2840+#include <stddef.h>
2841 #include <sigc++/sigc++.h>
2842 #include "sp-item.h"
2843 #include "sp-string.h"
2844diff -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
2845--- inkscape-0.48.1~/src/sp-tref-reference.h 2010-07-13 04:48:40.000000000 +0100
2846+++ inkscape-0.48.1/src/sp-tref-reference.h 2011-05-01 00:56:19.611250878 +0100
2847@@ -13,6 +13,7 @@
2848
2849 #include <forward.h>
2850 #include <uri-references.h>
2851+#include <stddef.h>
2852 #include <sigc++/sigc++.h>
2853
2854 #include "util/share.h"
2855diff -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
2856--- inkscape-0.48.1~/src/sp-tref-reference.h.orig 1970-01-01 01:00:00.000000000 +0100
2857+++ inkscape-0.48.1/src/sp-tref-reference.h.orig 2010-07-13 04:48:40.000000000 +0100
2858@@ -0,0 +1,75 @@
2859+#ifndef SEEN_SP_TREF_REFERENCE_H
2860+#define SEEN_SP_TREF_REFERENCE_H
2861+
2862+/*
2863+ * The reference corresponding to href of <tref> element.
2864+ *
2865+ * This file was created based on sp-use-reference.h
2866+ *
2867+ * Copyright (C) 2007 Gail Banaszkiewicz
2868+ *
2869+ * Released under GNU GPL, read the file 'COPYING' for more information.
2870+ */
2871+
2872+#include <forward.h>
2873+#include <uri-references.h>
2874+#include <sigc++/sigc++.h>
2875+
2876+#include "util/share.h"
2877+#include "xml/node-observer.h"
2878+#include "xml/subtree.h"
2879+
2880+
2881+class SPTRefReference : public Inkscape::URIReference,
2882+ public Inkscape::XML::NodeObserver {
2883+public:
2884+ SPTRefReference(SPObject *owner) : URIReference(owner), subtreeObserved(NULL) {
2885+ updateObserver();
2886+ }
2887+
2888+ virtual ~SPTRefReference() {
2889+ if (subtreeObserved) {
2890+ subtreeObserved->removeObserver(*this);
2891+ delete subtreeObserved;
2892+ }
2893+ }
2894+
2895+ SPItem *getObject() const {
2896+ return (SPItem *)URIReference::getObject();
2897+ }
2898+
2899+ void updateObserver();
2900+
2901+ /////////////////////////////////////////////////////////////////////
2902+ // Node Observer Functions
2903+ // -----------------------
2904+ virtual void notifyChildAdded(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev);
2905+ virtual void notifyChildRemoved(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev);
2906+ virtual void notifyChildOrderChanged(Inkscape::XML::Node &node, Inkscape::XML::Node &child,
2907+ Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev);
2908+ virtual void notifyContentChanged(Inkscape::XML::Node &node,
2909+ Inkscape::Util::ptr_shared<char> old_content,
2910+ Inkscape::Util::ptr_shared<char> new_content);
2911+ virtual void notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name,
2912+ Inkscape::Util::ptr_shared<char> old_value,
2913+ Inkscape::Util::ptr_shared<char> new_value);
2914+ /////////////////////////////////////////////////////////////////////
2915+
2916+protected:
2917+ virtual bool _acceptObject(SPObject * obj) const;
2918+
2919+ Inkscape::XML::Subtree *subtreeObserved;
2920+};
2921+
2922+#endif /* !SEEN_SP_TREF_REFERENCE_H */
2923+
2924+/*
2925+ Local Variables:
2926+ mode:c++
2927+ c-file-style:"stroustrup"
2928+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
2929+ indent-tabs-mode:nil
2930+ fill-column:99
2931+ End:
2932+*/
2933+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
2934diff -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
2935--- inkscape-0.48.1~/src/sp-use-reference.h 2010-07-13 04:48:40.000000000 +0100
2936+++ inkscape-0.48.1/src/sp-use-reference.h 2011-05-01 00:56:19.611250878 +0100
2937@@ -11,6 +11,7 @@
2938
2939 #include <forward.h>
2940 #include <uri-references.h>
2941+#include <stddef.h>
2942 #include <sigc++/sigc++.h>
2943
2944 class Path;
2945diff -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
2946--- inkscape-0.48.1~/src/sp-use-reference.h.orig 1970-01-01 01:00:00.000000000 +0100
2947+++ inkscape-0.48.1/src/sp-use-reference.h.orig 2010-07-13 04:48:40.000000000 +0100
2948@@ -0,0 +1,77 @@
2949+#ifndef SEEN_SP_USE_REFERENCE_H
2950+#define SEEN_SP_USE_REFERENCE_H
2951+
2952+/*
2953+ * The reference corresponding to href of <use> element.
2954+ *
2955+ * Copyright (C) 2004 Bulia Byak
2956+ *
2957+ * Released under GNU GPL, read the file 'COPYING' for more information.
2958+ */
2959+
2960+#include <forward.h>
2961+#include <uri-references.h>
2962+#include <sigc++/sigc++.h>
2963+
2964+class Path;
2965+
2966+namespace Inkscape {
2967+namespace XML {
2968+ struct Node;
2969+}
2970+}
2971+
2972+
2973+class SPUseReference : public Inkscape::URIReference {
2974+public:
2975+ SPUseReference(SPObject *owner) : URIReference(owner) {}
2976+
2977+ SPItem *getObject() const {
2978+ return (SPItem *)URIReference::getObject();
2979+ }
2980+
2981+protected:
2982+ virtual bool _acceptObject(SPObject * const obj) const;
2983+
2984+};
2985+
2986+
2987+class SPUsePath : public SPUseReference {
2988+public:
2989+ Path *originalPath;
2990+ bool sourceDirty;
2991+
2992+ SPObject *owner;
2993+ gchar *sourceHref;
2994+ Inkscape::XML::Node *sourceRepr;
2995+ SPObject *sourceObject;
2996+
2997+ sigc::connection _modified_connection;
2998+ sigc::connection _delete_connection;
2999+ sigc::connection _changed_connection;
3000+ sigc::connection _transformed_connection;
3001+
3002+ SPUsePath(SPObject* i_owner);
3003+ ~SPUsePath(void);
3004+
3005+ void link(char* to);
3006+ void unlink(void);
3007+ void start_listening(SPObject* to);
3008+ void quit_listening(void);
3009+ void refresh_source(void);
3010+
3011+ void (*user_unlink) (SPObject *user);
3012+};
3013+
3014+#endif /* !SEEN_SP_USE_REFERENCE_H */
3015+
3016+/*
3017+ Local Variables:
3018+ mode:c++
3019+ c-file-style:"stroustrup"
3020+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
3021+ indent-tabs-mode:nil
3022+ fill-column:99
3023+ End:
3024+*/
3025+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
3026diff -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
3027--- inkscape-0.48.1~/src/sp-use.h 2010-07-13 04:48:40.000000000 +0100
3028+++ inkscape-0.48.1/src/sp-use.h 2011-05-01 00:56:19.611250878 +0100
3029@@ -13,6 +13,7 @@
3030 * Released under GNU GPL, read the file 'COPYING' for more information
3031 */
3032
3033+#include <stddef.h>
3034 #include <sigc++/sigc++.h>
3035 #include "svg/svg-length.h"
3036 #include "sp-item.h"
3037diff -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
3038--- inkscape-0.48.1~/src/spiral-context.h 2010-07-13 04:48:40.000000000 +0100
3039+++ inkscape-0.48.1/src/spiral-context.h 2011-05-01 00:56:19.611250878 +0100
3040@@ -16,6 +16,7 @@
3041 */
3042
3043 #include <gtk/gtktypeutils.h>
3044+#include <stddef.h>
3045 #include <sigc++/sigc++.h>
3046 #include "event-context.h"
3047 #include "libnr/nr-point.h"
3048diff -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
3049--- inkscape-0.48.1~/src/star-context.h 2010-07-13 04:48:40.000000000 +0100
3050+++ inkscape-0.48.1/src/star-context.h 2011-05-01 00:56:19.611250878 +0100
3051@@ -14,6 +14,7 @@
3052 * Released under GNU GPL, read the file 'COPYING' for more information
3053 */
3054
3055+#include <stddef.h>
3056 #include <sigc++/sigc++.h>
3057 #include "event-context.h"
3058 #include "libnr/nr-point.h"
3059diff -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
3060--- inkscape-0.48.1~/src/style.h 2010-08-04 17:45:00.000000000 +0100
3061+++ inkscape-0.48.1/src/style.h 2011-05-01 00:56:19.611250878 +0100
3062@@ -24,6 +24,7 @@
3063 #include "uri.h"
3064 #include "sp-paint-server.h"
3065
3066+#include <stddef.h>
3067 #include <sigc++/connection.h>
3068
3069 namespace Inkscape {
3070diff -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
3071--- inkscape-0.48.1~/src/text-context.h 2010-07-13 04:48:40.000000000 +0100
3072+++ inkscape-0.48.1/src/text-context.h 2011-05-01 00:56:19.611250878 +0100
3073@@ -15,6 +15,7 @@
3074 */
3075
3076 /* #include <gdk/gdkic.h> */
3077+#include <stddef.h>
3078 #include <sigc++/sigc++.h>
3079 #include <gtk/gtkimcontext.h>
3080
3081diff -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
3082--- inkscape-0.48.1~/src/ui/dialog/desktop-tracker.h 2010-07-13 04:48:40.000000000 +0100
3083+++ inkscape-0.48.1/src/ui/dialog/desktop-tracker.h 2011-05-01 00:56:19.611250878 +0100
3084@@ -11,6 +11,7 @@
3085 #ifndef SEEN_DIALOG_DESKTOP_TRACKER
3086 #define SEEN_DIALOG_DESKTOP_TRACKER
3087
3088+#include <stddef.h>
3089 #include <sigc++/connection.h>
3090 #include <glib/gtypes.h>
3091
3092diff -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
3093--- inkscape-0.48.1~/src/ui/dialog/document-metadata.h 2010-07-13 04:48:40.000000000 +0100
3094+++ inkscape-0.48.1/src/ui/dialog/document-metadata.h 2011-05-01 00:56:19.611250878 +0100
3095@@ -14,6 +14,7 @@
3096 #define INKSCAPE_UI_DIALOG_DOCUMENT_METADATA_H
3097
3098 #include <list>
3099+#include <stddef.h>
3100 #include <sigc++/sigc++.h>
3101 #include <gtkmm/notebook.h>
3102 #include <glibmm/i18n.h>
3103diff -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
3104--- inkscape-0.48.1~/src/ui/dialog/document-properties.h 2010-07-13 04:48:40.000000000 +0100
3105+++ inkscape-0.48.1/src/ui/dialog/document-properties.h 2011-05-01 00:56:19.611250878 +0100
3106@@ -15,6 +15,7 @@
3107 #define INKSCAPE_UI_DIALOG_DOCUMENT_PREFERENCES_H
3108
3109 #include <list>
3110+#include <stddef.h>
3111 #include <sigc++/sigc++.h>//
3112 #include <gtkmm/notebook.h>
3113 #include <glibmm/i18n.h>
3114diff -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
3115--- inkscape-0.48.1~/src/ui/dialog/inkscape-preferences.h 2010-11-06 18:47:19.000000000 +0000
3116+++ inkscape-0.48.1/src/ui/dialog/inkscape-preferences.h 2011-05-01 00:56:19.611250878 +0100
3117@@ -28,6 +28,7 @@
3118 #include <gtkmm/frame.h>
3119 #include <gtkmm/notebook.h>
3120 #include "ui/widget/preferences-widget.h"
3121+#include <stddef.h>
3122 #include <sigc++/sigc++.h>
3123 #include <glibmm/i18n.h>
3124 #include <gtkmm/textview.h>
3125diff -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
3126--- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp 2010-07-13 04:48:40.000000000 +0100
3127+++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp 2011-05-01 00:56:19.611250878 +0100
3128@@ -14,6 +14,7 @@
3129
3130 #include <glibmm/i18n.h>
3131 #include <gtk/gtkimage.h>
3132+#include <stddef.h>
3133 #include <sigc++/sigc++.h>
3134
3135
3136diff -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
3137--- inkscape-0.48.1~/src/ui/dialog/undo-history.cpp.orig 1970-01-01 01:00:00.000000000 +0100
3138+++ inkscape-0.48.1/src/ui/dialog/undo-history.cpp.orig 2010-07-13 04:48:40.000000000 +0100
3139@@ -0,0 +1,348 @@
3140+/** @file
3141+ * @brief Undo History dialog - implementation
3142+ */
3143+/* Author:
3144+ * Gustav Broberg <broberg@kth.se>
3145+ *
3146+ * Copyright (C) 2006 Authors
3147+ * Released under GNU GPL. Read the file 'COPYING' for more information.
3148+ */
3149+
3150+#ifdef HAVE_CONFIG_H
3151+# include <config.h>
3152+#endif
3153+
3154+#include <glibmm/i18n.h>
3155+#include <gtk/gtkimage.h>
3156+#include <sigc++/sigc++.h>
3157+
3158+
3159+#include "document.h"
3160+#include "inkscape.h"
3161+#include "verbs.h"
3162+#include "desktop-handles.h"
3163+
3164+#include "undo-history.h"
3165+
3166+namespace Inkscape {
3167+namespace UI {
3168+namespace Dialog {
3169+
3170+/* Rendering functions for custom cell renderers */
3171+
3172+void
3173+CellRendererSPIcon::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
3174+ Gtk::Widget& widget,
3175+ const Gdk::Rectangle& background_area,
3176+ const Gdk::Rectangle& cell_area,
3177+ const Gdk::Rectangle& expose_area,
3178+ Gtk::CellRendererState flags)
3179+{
3180+ // if this event type doesn't have an icon...
3181+ if ( !Inkscape::Verb::get(_property_event_type)->get_image() ) return;
3182+
3183+ // if the icon isn't cached, render it to a pixbuf
3184+ if ( !_icon_cache[_property_event_type] ) {
3185+
3186+ Glib::ustring image = Inkscape::Verb::get(_property_event_type)->get_image();
3187+ Gtk::Widget* icon = sp_icon_get_icon(image, Inkscape::ICON_SIZE_MENU);
3188+
3189+ if (icon) {
3190+
3191+ // check icon type (inkscape, gtk, none)
3192+ if ( SP_IS_ICON(icon->gobj()) ) {
3193+ SPIcon* sp_icon = SP_ICON(icon->gobj());
3194+ sp_icon_fetch_pixbuf(sp_icon);
3195+ _property_icon = Glib::wrap(sp_icon->pb, true);
3196+ } else if ( GTK_IS_IMAGE(icon->gobj()) ) {
3197+ _property_icon = Gtk::Invisible().render_icon(Gtk::StockID(image),
3198+ Gtk::ICON_SIZE_MENU);
3199+ } else {
3200+ delete icon;
3201+ return;
3202+ }
3203+
3204+ delete icon;
3205+ property_pixbuf() = _icon_cache[_property_event_type] = _property_icon.get_value();
3206+ }
3207+
3208+ } else {
3209+ property_pixbuf() = _icon_cache[_property_event_type];
3210+ }
3211+
3212+ Gtk::CellRendererPixbuf::render_vfunc(window, widget, background_area,
3213+ cell_area, expose_area, flags);
3214+}
3215+
3216+
3217+void
3218+CellRendererInt::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window,
3219+ Gtk::Widget& widget,
3220+ const Gdk::Rectangle& background_area,
3221+ const Gdk::Rectangle& cell_area,
3222+ const Gdk::Rectangle& expose_area,
3223+ Gtk::CellRendererState flags)
3224+{
3225+ if( _filter(_property_number) ) {
3226+ std::ostringstream s;
3227+ s << _property_number << std::flush;
3228+ property_text() = s.str();
3229+ Gtk::CellRendererText::render_vfunc(window, widget, background_area,
3230+ cell_area, expose_area, flags);
3231+ }
3232+}
3233+
3234+const CellRendererInt::Filter& CellRendererInt::no_filter = CellRendererInt::NoFilter();
3235+
3236+UndoHistory& UndoHistory::getInstance()
3237+{
3238+ return *new UndoHistory();
3239+}
3240+
3241+void
3242+UndoHistory::setDesktop(SPDesktop* desktop)
3243+{
3244+ Panel::setDesktop(desktop);
3245+
3246+ if (!desktop) return;
3247+
3248+ _document = sp_desktop_document(desktop);
3249+
3250+ _event_log = desktop->event_log;
3251+
3252+ _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block();
3253+
3254+ _event_list_store = _event_log->getEventListStore();
3255+ _event_list_view.set_model(_event_list_store);
3256+ _event_list_selection = _event_list_view.get_selection();
3257+
3258+ _event_log->connectWithDialog(&_event_list_view, &_callback_connections);
3259+ _event_list_view.scroll_to_row(_event_list_store->get_path(_event_list_selection->get_selected()));
3260+
3261+ _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(false);
3262+}
3263+
3264+UndoHistory::UndoHistory()
3265+ : UI::Widget::Panel ("", "/dialogs/undo-history", SP_VERB_DIALOG_UNDO_HISTORY),
3266+ _document (sp_desktop_document(getDesktop())),
3267+ _event_log (getDesktop() ? getDesktop()->event_log : NULL),
3268+ _columns (_event_log ? &_event_log->getColumns() : NULL),
3269+ _event_list_selection (_event_list_view.get_selection())
3270+{
3271+ if ( !_document || !_event_log || !_columns ) return;
3272+
3273+ set_size_request(300, 95);
3274+
3275+ _getContents()->pack_start(_scrolled_window);
3276+ _scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
3277+
3278+ _event_list_store = _event_log->getEventListStore();
3279+
3280+ _event_list_view.set_model(_event_list_store);
3281+ _event_list_view.set_rules_hint(false);
3282+ _event_list_view.set_enable_search(false);
3283+ _event_list_view.set_headers_visible(false);
3284+
3285+ CellRendererSPIcon* icon_renderer = Gtk::manage(new CellRendererSPIcon());
3286+ icon_renderer->property_xpad() = 8;
3287+ icon_renderer->property_width() = 36;
3288+ int cols_count = _event_list_view.append_column("Icon", *icon_renderer);
3289+
3290+ Gtk::TreeView::Column* icon_column = _event_list_view.get_column(cols_count-1);
3291+ icon_column->add_attribute(icon_renderer->property_event_type(), _columns->type);
3292+
3293+ Gtk::CellRendererText* description_renderer = Gtk::manage(new Gtk::CellRendererText());
3294+
3295+ cols_count = _event_list_view.append_column("Description", *description_renderer);
3296+ Gtk::TreeView::Column* description_column = _event_list_view.get_column(cols_count-1);
3297+ description_column->add_attribute(description_renderer->property_text(), _columns->description);
3298+ description_column->set_resizable();
3299+
3300+ _event_list_view.set_expander_column( *_event_list_view.get_column(cols_count-1) );
3301+
3302+ CellRendererInt* children_renderer = Gtk::manage(new CellRendererInt(greater_than_1));
3303+ children_renderer->property_weight() = 600; // =Pango::WEIGHT_SEMIBOLD (not defined in old versions of pangomm)
3304+ children_renderer->property_xalign() = 1.0;
3305+ children_renderer->property_xpad() = 20;
3306+
3307+ cols_count = _event_list_view.append_column("Children", *children_renderer);
3308+ Gtk::TreeView::Column* children_column = _event_list_view.get_column(cols_count-1);
3309+ children_column->add_attribute(children_renderer->property_number(), _columns->child_count);
3310+
3311+ _scrolled_window.add(_event_list_view);
3312+
3313+ // connect EventLog callbacks
3314+ _callback_connections[EventLog::CALLB_SELECTION_CHANGE] =
3315+ _event_list_selection->signal_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onListSelectionChange));
3316+
3317+ _callback_connections[EventLog::CALLB_EXPAND] =
3318+ _event_list_view.signal_row_expanded().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onExpandEvent));
3319+
3320+ _callback_connections[EventLog::CALLB_COLLAPSE] =
3321+ _event_list_view.signal_row_collapsed().connect(sigc::mem_fun(*this, &Inkscape::UI::Dialog::UndoHistory::_onCollapseEvent));
3322+
3323+ // connect with the EventLog
3324+ _event_log->connectWithDialog(&_event_list_view, &_callback_connections);
3325+
3326+ show_all_children();
3327+
3328+ // scroll to the selected row
3329+ _event_list_view.set_cursor(_event_list_store->get_path(_event_log->getCurrEvent()));
3330+}
3331+
3332+UndoHistory::~UndoHistory()
3333+{
3334+}
3335+
3336+void
3337+UndoHistory::_onListSelectionChange()
3338+{
3339+
3340+ EventLog::const_iterator selected = _event_list_selection->get_selected();
3341+
3342+ /* If no event is selected in the view, find the right one and select it. This happens whenever
3343+ * a branch we're currently in is collapsed.
3344+ */
3345+ if (!selected) {
3346+
3347+ EventLog::iterator curr_event = _event_log->getCurrEvent();
3348+
3349+ if (curr_event->parent()) {
3350+
3351+ EventLog::iterator curr_event_parent = curr_event->parent();
3352+ EventLog::iterator last = curr_event_parent->children().end();
3353+
3354+ _event_log->blockNotifications();
3355+ for ( --last ; curr_event != last ; ++curr_event ) {
3356+ sp_document_redo(_document);
3357+ }
3358+ _event_log->blockNotifications(false);
3359+
3360+ _event_log->setCurrEvent(curr_event);
3361+ _event_list_selection->select(curr_event_parent);
3362+
3363+ } else { // this should not happen
3364+ _event_list_selection->select(curr_event);
3365+ }
3366+
3367+ } else {
3368+
3369+ EventLog::const_iterator last_selected = _event_log->getCurrEvent();
3370+
3371+ /* Selecting a collapsed parent event is equal to selecting the last child
3372+ * of that parent's branch.
3373+ */
3374+
3375+ if ( !selected->children().empty() &&
3376+ !_event_list_view.row_expanded(_event_list_store->get_path(selected)) )
3377+ {
3378+ selected = selected->children().end();
3379+ --selected;
3380+ }
3381+
3382+ // An event before the current one has been selected. Undo to the selected event.
3383+ if ( _event_list_store->get_path(selected) <
3384+ _event_list_store->get_path(last_selected) )
3385+ {
3386+ _event_log->blockNotifications();
3387+
3388+ while ( selected != last_selected ) {
3389+
3390+ sp_document_undo(_document);
3391+
3392+ if ( last_selected->parent() &&
3393+ last_selected == last_selected->parent()->children().begin() )
3394+ {
3395+ last_selected = last_selected->parent();
3396+ _event_log->setCurrEventParent((EventLog::iterator)NULL);
3397+ } else {
3398+ --last_selected;
3399+ if ( !last_selected->children().empty() ) {
3400+ _event_log->setCurrEventParent(last_selected);
3401+ last_selected = last_selected->children().end();
3402+ --last_selected;
3403+ }
3404+ }
3405+ }
3406+ _event_log->blockNotifications(false);
3407+ _event_log->updateUndoVerbs();
3408+
3409+ } else { // An event after the current one has been selected. Redo to the selected event.
3410+
3411+ _event_log->blockNotifications();
3412+
3413+ while ( selected != last_selected ) {
3414+
3415+ sp_document_redo(_document);
3416+
3417+ if ( !last_selected->children().empty() ) {
3418+ _event_log->setCurrEventParent(last_selected);
3419+ last_selected = last_selected->children().begin();
3420+ } else {
3421+ ++last_selected;
3422+ if ( last_selected->parent() &&
3423+ last_selected == last_selected->parent()->children().end() )
3424+ {
3425+ last_selected = last_selected->parent();
3426+ ++last_selected;
3427+ _event_log->setCurrEventParent((EventLog::iterator)NULL);
3428+ }
3429+ }
3430+ }
3431+ _event_log->blockNotifications(false);
3432+
3433+ }
3434+
3435+ _event_log->setCurrEvent(selected);
3436+ _event_log->updateUndoVerbs();
3437+ }
3438+
3439+}
3440+
3441+void
3442+UndoHistory::_onExpandEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/)
3443+{
3444+ if ( iter == _event_list_selection->get_selected() ) {
3445+ _event_list_selection->select(_event_log->getCurrEvent());
3446+ }
3447+}
3448+
3449+void
3450+UndoHistory::_onCollapseEvent(const Gtk::TreeModel::iterator &iter, const Gtk::TreeModel::Path &/*path*/)
3451+{
3452+ // Collapsing a branch we're currently in is equal to stepping to the last event in that branch
3453+ if ( iter == _event_log->getCurrEvent() ) {
3454+ EventLog::const_iterator curr_event_parent = _event_log->getCurrEvent();
3455+ EventLog::const_iterator curr_event = curr_event_parent->children().begin();
3456+ EventLog::const_iterator last = curr_event_parent->children().end();
3457+
3458+ _event_log->blockNotifications();
3459+ sp_document_redo(_document);
3460+
3461+ for ( --last ; curr_event != last ; ++curr_event ) {
3462+ sp_document_redo(_document);
3463+ }
3464+ _event_log->blockNotifications(false);
3465+
3466+ _event_log->setCurrEvent(curr_event);
3467+ _event_log->setCurrEventParent(curr_event_parent);
3468+ _event_list_selection->select(curr_event_parent);
3469+ }
3470+}
3471+
3472+const CellRendererInt::Filter& UndoHistory::greater_than_1 = UndoHistory::GreaterThan(1);
3473+
3474+} // namespace Dialog
3475+} // namespace UI
3476+} // namespace Inkscape
3477+
3478+/*
3479+ Local Variables:
3480+ mode:c++
3481+ c-file-style:"stroustrup"
3482+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
3483+ indent-tabs-mode:nil
3484+ fill-column:99
3485+ End:
3486+*/
3487+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
3488diff -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
3489--- inkscape-0.48.1~/src/ui/tool/control-point-selection.h 2010-08-04 17:45:00.000000000 +0100
3490+++ inkscape-0.48.1/src/ui/tool/control-point-selection.h 2011-05-01 00:56:19.611250878 +0100
3491@@ -14,6 +14,7 @@
3492
3493 #include <memory>
3494 #include <boost/optional.hpp>
3495+#include <stddef.h>
3496 #include <sigc++/sigc++.h>
3497 #include <2geom/forward.h>
3498 #include <2geom/point.h>
3499diff -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
3500--- inkscape-0.48.1~/src/ui/tool/control-point.h 2010-07-13 04:48:40.000000000 +0100
3501+++ inkscape-0.48.1/src/ui/tool/control-point.h 2011-05-01 00:56:19.611250878 +0100
3502@@ -12,6 +12,7 @@
3503 #define SEEN_UI_TOOL_CONTROL_POINT_H
3504
3505 #include <boost/utility.hpp>
3506+#include <stddef.h>
3507 #include <sigc++/sigc++.h>
3508 #include <gdkmm.h>
3509 #include <gtkmm.h>
3510diff -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
3511--- inkscape-0.48.1~/src/ui/tool/manipulator.h 2010-07-13 04:48:40.000000000 +0100
3512+++ inkscape-0.48.1/src/ui/tool/manipulator.h 2011-05-01 00:56:19.611250878 +0100
3513@@ -13,6 +13,7 @@
3514
3515 #include <set>
3516 #include <map>
3517+#include <stddef.h>
3518 #include <sigc++/sigc++.h>
3519 #include <glib.h>
3520 #include <gdk/gdk.h>
3521diff -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
3522--- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h 2010-11-06 18:47:19.000000000 +0000
3523+++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h 2011-05-01 00:56:19.611250878 +0100
3524@@ -11,6 +11,7 @@
3525 #ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H
3526 #define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H
3527
3528+#include <stddef.h>
3529 #include <sigc++/connection.h>
3530 #include "display/display-forward.h"
3531 #include "forward.h"
3532diff -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
3533--- inkscape-0.48.1~/src/ui/tool/multi-path-manipulator.h.orig 1970-01-01 01:00:00.000000000 +0100
3534+++ inkscape-0.48.1/src/ui/tool/multi-path-manipulator.h.orig 2010-11-06 18:47:19.000000000 +0000
3535@@ -0,0 +1,139 @@
3536+/** @file
3537+ * Multi path manipulator - a tool component that edits multiple paths at once
3538+ */
3539+/* Authors:
3540+ * Krzysztof Kosiński <tweenk.pl@gmail.com>
3541+ *
3542+ * Copyright (C) 2009 Authors
3543+ * Released under GNU GPL, read the file 'COPYING' for more information
3544+ */
3545+
3546+#ifndef SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H
3547+#define SEEN_UI_TOOL_MULTI_PATH_MANIPULATOR_H
3548+
3549+#include <sigc++/connection.h>
3550+#include "display/display-forward.h"
3551+#include "forward.h"
3552+#include "ui/tool/commit-events.h"
3553+#include "ui/tool/manipulator.h"
3554+#include "ui/tool/modifier-tracker.h"
3555+#include "ui/tool/node.h"
3556+#include "ui/tool/node-types.h"
3557+#include "ui/tool/shape-record.h"
3558+
3559+struct SPCanvasGroup;
3560+
3561+namespace Inkscape {
3562+namespace UI {
3563+
3564+class PathManipulator;
3565+class MultiPathManipulator;
3566+struct PathSharedData;
3567+
3568+/**
3569+ * Manipulator that manages multiple path manipulators active at the same time.
3570+ */
3571+class MultiPathManipulator : public PointManipulator {
3572+public:
3573+ MultiPathManipulator(PathSharedData &data, sigc::connection &chg);
3574+ virtual ~MultiPathManipulator();
3575+ virtual bool event(GdkEvent *event);
3576+
3577+ bool empty() { return _mmap.empty(); }
3578+ unsigned size() { return _mmap.empty(); }
3579+ void setItems(std::set<ShapeRecord> const &);
3580+ void clear() { _mmap.clear(); }
3581+ void cleanup();
3582+
3583+ void selectSubpaths();
3584+ void shiftSelection(int dir);
3585+ void invertSelectionInSubpaths();
3586+
3587+ void setNodeType(NodeType t);
3588+ void setSegmentType(SegmentType t);
3589+
3590+ void insertNodes();
3591+ void duplicateNodes();
3592+ void joinNodes();
3593+ void breakNodes();
3594+ void deleteNodes(bool keep_shape = true);
3595+ void joinSegments();
3596+ void deleteSegments();
3597+ void alignNodes(Geom::Dim2 d);
3598+ void distributeNodes(Geom::Dim2 d);
3599+ void reverseSubpaths();
3600+ void move(Geom::Point const &delta);
3601+
3602+ void showOutline(bool show);
3603+ void showHandles(bool show);
3604+ void showPathDirection(bool show);
3605+ void setLiveOutline(bool set);
3606+ void setLiveObjects(bool set);
3607+ void updateOutlineColors();
3608+
3609+ sigc::signal<void> signal_coords_changed; /// Emitted whenever the coordinates
3610+ /// shown in the status bar need updating
3611+private:
3612+ typedef std::pair<ShapeRecord, boost::shared_ptr<PathManipulator> > MapPair;
3613+ typedef std::map<ShapeRecord, boost::shared_ptr<PathManipulator> > MapType;
3614+
3615+ template <typename R>
3616+ void invokeForAll(R (PathManipulator::*method)()) {
3617+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
3618+ ((i->second.get())->*method)();
3619+ }
3620+ }
3621+ template <typename R, typename A>
3622+ void invokeForAll(R (PathManipulator::*method)(A), A a) {
3623+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
3624+ ((i->second.get())->*method)(a);
3625+ }
3626+ }
3627+ template <typename R, typename A>
3628+ void invokeForAll(R (PathManipulator::*method)(A const &), A const &a) {
3629+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
3630+ ((i->second.get())->*method)(a);
3631+ }
3632+ }
3633+ template <typename R, typename A, typename B>
3634+ void invokeForAll(R (PathManipulator::*method)(A,B), A a, B b) {
3635+ for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
3636+ ((i->second.get())->*method)(a, b);
3637+ }
3638+ }
3639+
3640+ void _commit(CommitEvent cps);
3641+ void _done(gchar const *);
3642+ void _doneWithCleanup(gchar const *);
3643+ guint32 _getOutlineColor(ShapeRole role);
3644+
3645+ MapType _mmap;
3646+public:
3647+ PathSharedData const &_path_data;
3648+private:
3649+ sigc::connection &_changed;
3650+ ModifierTracker _tracker;
3651+ bool _show_handles;
3652+ bool _show_outline;
3653+ bool _show_path_direction;
3654+ bool _live_outline;
3655+ bool _live_objects;
3656+
3657+ friend class PathManipulator;
3658+};
3659+
3660+} // namespace UI
3661+} // namespace Inkscape
3662+
3663+#endif
3664+
3665+/*
3666+ Local Variables:
3667+ mode:c++
3668+ c-file-style:"stroustrup"
3669+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
3670+ indent-tabs-mode:nil
3671+ fill-column:99
3672+ End:
3673+*/
3674+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
3675diff -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
3676--- inkscape-0.48.1~/src/ui/tool/node-tool.h 2010-11-06 18:47:19.000000000 +0000
3677+++ inkscape-0.48.1/src/ui/tool/node-tool.h 2011-05-01 00:56:19.611250878 +0100
3678@@ -14,6 +14,7 @@
3679 #include <memory>
3680 #include <boost/ptr_container/ptr_map.hpp>
3681 #include <glib.h>
3682+#include <stddef.h>
3683 #include <sigc++/sigc++.h>
3684 #include "event-context.h"
3685 #include "forward.h"
3686diff -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
3687--- inkscape-0.48.1~/src/ui/tool/node.h 2011-01-02 04:34:09.000000000 +0000
3688+++ inkscape-0.48.1/src/ui/tool/node.h 2011-05-01 00:56:19.611250878 +0100
3689@@ -15,6 +15,7 @@
3690 #include <iterator>
3691 #include <iosfwd>
3692 #include <stdexcept>
3693+#include <cstddef>
3694 #include <tr1/functional>
3695 #include <boost/utility.hpp>
3696 #include <boost/shared_ptr.hpp>
3697diff -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
3698--- inkscape-0.48.1~/src/ui/view/view.h 2010-07-13 04:48:40.000000000 +0100
3699+++ inkscape-0.48.1/src/ui/view/view.h 2011-05-01 00:56:19.611250878 +0100
3700@@ -15,6 +15,7 @@
3701 */
3702
3703 #include <gdk/gdktypes.h>
3704+#include <stddef.h>
3705 #include <sigc++/connection.h>
3706 #include "message.h"
3707 #include "gc-managed.h"
3708diff -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
3709--- inkscape-0.48.1~/src/ui/widget/color-picker.h 2010-07-13 04:48:40.000000000 +0100
3710+++ inkscape-0.48.1/src/ui/widget/color-picker.h 2011-05-01 00:56:19.611250878 +0100
3711@@ -13,6 +13,7 @@
3712 #ifndef __COLOR_PICKER_H__
3713 #define __COLOR_PICKER_H__
3714
3715+#include <stddef.h>
3716 #include <sigc++/sigc++.h>
3717 #include <gtkmm/button.h>
3718 #include <gtkmm/dialog.h>
3719diff -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
3720--- inkscape-0.48.1~/src/ui/widget/page-sizer.h 2010-07-13 04:48:40.000000000 +0100
3721+++ inkscape-0.48.1/src/ui/widget/page-sizer.h 2011-05-01 00:56:19.611250878 +0100
3722@@ -13,6 +13,7 @@
3723 #define INKSCAPE_UI_WIDGET_PAGE_SIZER__H
3724
3725 #include <gtkmm.h>
3726+#include <stddef.h>
3727 #include <sigc++/sigc++.h>
3728
3729 #include "helper/units.h"
3730diff -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
3731--- inkscape-0.48.1~/src/ui/widget/preferences-widget.h 2010-07-13 04:48:40.000000000 +0100
3732+++ inkscape-0.48.1/src/ui/widget/preferences-widget.h 2011-05-01 00:56:19.611250878 +0100
3733@@ -26,6 +26,7 @@
3734 #include <gtkmm/drawingarea.h>
3735 #include <gtkmm/frame.h>
3736 #include <gtkmm/filechooserbutton.h>
3737+#include <stddef.h>
3738 #include <sigc++/sigc++.h>
3739 #include <glibmm/i18n.h>
3740
3741diff -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
3742--- inkscape-0.48.1~/src/ui/widget/selected-style.h 2010-07-13 04:48:40.000000000 +0100
3743+++ inkscape-0.48.1/src/ui/widget/selected-style.h 2011-05-01 00:56:19.611250878 +0100
3744@@ -23,6 +23,7 @@
3745 #include <gtkmm/adjustment.h>
3746 #include <gtkmm/spinbutton.h>
3747
3748+#include <stddef.h>
3749 #include <sigc++/sigc++.h>
3750
3751 #include <glibmm/i18n.h>
3752diff -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
3753--- inkscape-0.48.1~/src/ui/widget/style-subject.h 2010-07-13 04:48:40.000000000 +0100
3754+++ inkscape-0.48.1/src/ui/widget/style-subject.h 2011-05-01 00:56:19.611250878 +0100
3755@@ -14,6 +14,7 @@
3756 #include "libnr/nr-rect.h"
3757 #include <2geom/rect.h>
3758 #include "sp-item.h"
3759+#include <stddef.h>
3760 #include <sigc++/sigc++.h>
3761
3762 class SPDesktop;
3763diff -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
3764--- inkscape-0.48.1~/src/uri-references.h 2010-07-13 04:48:40.000000000 +0100
3765+++ inkscape-0.48.1/src/uri-references.h 2011-05-01 00:56:19.611250878 +0100
3766@@ -13,6 +13,7 @@
3767 * Released under GNU GPL, read the file 'COPYING' for more information
3768 */
3769
3770+#include <stddef.h>
3771 #include <sigc++/connection.h>
3772 #include <sigc++/trackable.h>
3773
3774diff -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
3775--- inkscape-0.48.1~/src/uri-references.h.orig 1970-01-01 01:00:00.000000000 +0100
3776+++ inkscape-0.48.1/src/uri-references.h.orig 2010-07-13 04:48:40.000000000 +0100
3777@@ -0,0 +1,152 @@
3778+#ifndef __SP_URI_REFERENCES_H__
3779+#define __SP_URI_REFERENCES_H__
3780+
3781+/*
3782+ * Helper methods for resolving URI References
3783+ *
3784+ * Authors:
3785+ * Lauris Kaplinski <lauris@kaplinski.com>
3786+ *
3787+ * Copyright (C) 2001-2002 Lauris Kaplinski
3788+ * Copyright (C) 2001 Ximian, Inc.
3789+ *
3790+ * Released under GNU GPL, read the file 'COPYING' for more information
3791+ */
3792+
3793+#include <sigc++/connection.h>
3794+#include <sigc++/trackable.h>
3795+
3796+#include "bad-uri-exception.h"
3797+#include "forward.h"
3798+
3799+namespace Inkscape {
3800+
3801+/**
3802+ * A class encapsulating a reference to a particular URI; observers can
3803+ * be notified when the URI comes to reference a different SPObject.
3804+ *
3805+ * The URIReference increments and decrements the SPObject's hrefcount
3806+ * automatically.
3807+ *
3808+ * @see SPObject
3809+ * @see sp_object_href
3810+ * @see sp_object_hunref
3811+ */
3812+class URIReference : public sigc::trackable {
3813+public:
3814+ /**
3815+ * Constructor.
3816+ *
3817+ * @param owner The object on whose behalf this URIReference
3818+ * is holding a reference to the target object.
3819+ */
3820+ URIReference(SPObject *owner);
3821+ URIReference(SPDocument *owner_document);
3822+
3823+ /**
3824+ * Destructor. Calls shutdown() if the reference has not been
3825+ * shut down yet.
3826+ */
3827+ virtual ~URIReference();
3828+
3829+ /**
3830+ * Attaches to a URI, relative to the specified document.
3831+ *
3832+ * Throws a BadURIException if the URI is unsupported,
3833+ * or the fragment identifier is xpointer and malformed.
3834+ *
3835+ * @param rel_document document for relative URIs
3836+ * @param uri the URI to watch
3837+ */
3838+ void attach(const URI &uri) throw(BadURIException);
3839+
3840+ /**
3841+ * Detaches from the currently attached URI target, if any;
3842+ * the current referrent is signaled as NULL.
3843+ */
3844+ void detach();
3845+
3846+ /**
3847+ * @brief Returns a pointer to the current referrent of the
3848+ * attached URI, or NULL.
3849+ *
3850+ * @return a pointer to the referenced SPObject or NULL
3851+ */
3852+ SPObject *getObject() const { return _obj; }
3853+
3854+ /**
3855+ * @brief Returns a pointer to the URIReference's owner
3856+ *
3857+ * @return a pointer to the URIReference's owner
3858+ */
3859+ SPObject *getOwner() const { return _owner; }
3860+
3861+ /**
3862+ * Accessor for the referrent change notification signal;
3863+ * this signal is emitted whenever the URIReference's
3864+ * referrent changes.
3865+ *
3866+ * Signal handlers take two parameters: the old and new
3867+ * referrents.
3868+ *
3869+ * @returns a signal
3870+ */
3871+ sigc::signal<void, SPObject *, SPObject *> changedSignal() {
3872+ return _changed_signal;
3873+ }
3874+
3875+ /**
3876+ * Returns a pointer to a URI containing the currently attached
3877+ * URI, or NULL if no URI is currently attached.
3878+ *
3879+ * @returns the currently attached URI, or NULL
3880+ */
3881+ const URI *getURI() const {
3882+ return _uri;
3883+ }
3884+
3885+ /**
3886+ * Returns true if there is currently an attached URI
3887+ *
3888+ * @returns true if there is an attached URI
3889+ */
3890+ bool isAttached() const {
3891+ return (bool)_uri;
3892+ }
3893+
3894+ SPDocument *getOwnerDocument() { return _owner_document; }
3895+ SPObject *getOwnerObject() { return _owner; }
3896+
3897+protected:
3898+ virtual bool _acceptObject(SPObject *obj) const {
3899+ (void)obj;
3900+ return true;
3901+ }
3902+
3903+private:
3904+ SPObject *_owner;
3905+ SPDocument *_owner_document;
3906+ sigc::connection _connection;
3907+ sigc::connection _release_connection;
3908+ SPObject *_obj;
3909+ URI *_uri;
3910+
3911+ sigc::signal<void, SPObject *, SPObject *> _changed_signal;
3912+
3913+ void _setObject(SPObject *object);
3914+ void _release(SPObject *object);
3915+
3916+ void operator=(const URIReference &ref);
3917+ /* Private and definition-less to prevent accidental use. */
3918+};
3919+
3920+}
3921+
3922+/**
3923+ * Resolves an item referenced by a URI in CSS form contained in "url(...)"
3924+ */
3925+SPObject* sp_css_uri_reference_resolve( SPDocument *document, const gchar *uri );
3926+
3927+SPObject *sp_uri_reference_resolve (SPDocument *document, const gchar *uri);
3928+
3929+#endif
3930diff -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
3931--- inkscape-0.48.1~/src/util/forward-pointer-iterator.h 2010-07-13 04:48:40.000000000 +0100
3932+++ inkscape-0.48.1/src/util/forward-pointer-iterator.h 2011-05-01 00:56:19.611250878 +0100
3933@@ -15,6 +15,7 @@
3934 #define SEEN_INKSCAPE_UTIL_FORWARD_POINTER_ITERATOR_H
3935
3936 #include <iterator>
3937+#include <cstddef>
3938 #include "util/reference.h"
3939
3940 namespace Inkscape {
3941diff -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
3942--- inkscape-0.48.1~/src/util/share.h 2010-07-13 04:48:40.000000000 +0100
3943+++ inkscape-0.48.1/src/util/share.h 2011-05-01 00:56:19.611250878 +0100
3944@@ -14,6 +14,7 @@
3945
3946 #include "gc-core.h"
3947 #include <cstring>
3948+#include <cstddef>
3949
3950 namespace Inkscape {
3951 namespace Util {
3952diff -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
3953--- inkscape-0.48.1~/src/util/unordered-containers.h 2010-07-13 04:48:40.000000000 +0100
3954+++ inkscape-0.48.1/src/util/unordered-containers.h 2011-05-01 00:56:19.611250878 +0100
3955@@ -41,6 +41,8 @@
3956 # define INK_UNORDERED_MAP __gnu_cxx::hash_map
3957 # define INK_HASH __gnu_cxx::hash
3958
3959+#include <cstddef>
3960+
3961 namespace __gnu_cxx {
3962 // hash function for pointers
3963 // TR1 and Boost have this defined by default, __gnu_cxx doesn't
3964diff -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
3965--- inkscape-0.48.1~/src/widgets/desktop-widget.h 2010-07-13 04:48:40.000000000 +0100
3966+++ inkscape-0.48.1/src/widgets/desktop-widget.h 2011-05-01 00:56:19.611250878 +0100
3967@@ -21,6 +21,7 @@
3968 #include "ui/view/view-widget.h"
3969 #include "ui/view/edit-widget-interface.h"
3970
3971+#include <stddef.h>
3972 #include <sigc++/connection.h>
3973
3974 // forward declaration
3975diff -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
3976--- inkscape-0.48.1~/src/widgets/desktop-widget.h.orig 1970-01-01 01:00:00.000000000 +0100
3977+++ inkscape-0.48.1/src/widgets/desktop-widget.h.orig 2010-07-13 04:48:40.000000000 +0100
3978@@ -0,0 +1,268 @@
3979+#ifndef SEEN_SP_DESKTOP_WIDGET_H
3980+#define SEEN_SP_DESKTOP_WIDGET_H
3981+
3982+/** \file
3983+ * SPDesktopWidget: handling Gtk events on a desktop.
3984+ *
3985+ * Authors:
3986+ * Jon A. Cruz <jon@joncruz.org> (c) 2010
3987+ * John Bintz <jcoswell@coswellproductions.org> (c) 2006
3988+ * Ralf Stephan <ralf@ark.in-berlin.de> (c) 2005, distrib. under GPL2
3989+ * ? -2004
3990+ */
3991+
3992+#include <gtk/gtktooltips.h>
3993+#include <gtk/gtkwindow.h>
3994+
3995+#include "display/display-forward.h"
3996+#include "libnr/nr-point.h"
3997+#include "forward.h"
3998+#include "message.h"
3999+#include "ui/view/view-widget.h"
4000+#include "ui/view/edit-widget-interface.h"
4001+
4002+#include <sigc++/connection.h>
4003+
4004+// forward declaration
4005+typedef struct _EgeColorProfTracker EgeColorProfTracker;
4006+
4007+
4008+#define SP_TYPE_DESKTOP_WIDGET SPDesktopWidget::getType()
4009+#define SP_DESKTOP_WIDGET(o) (GTK_CHECK_CAST ((o), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidget))
4010+#define SP_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), SP_TYPE_DESKTOP_WIDGET, SPDesktopWidgetClass))
4011+#define SP_IS_DESKTOP_WIDGET(o) (GTK_CHECK_TYPE ((o), SP_TYPE_DESKTOP_WIDGET))
4012+#define SP_IS_DESKTOP_WIDGET_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), SP_TYPE_DESKTOP_WIDGET))
4013+
4014+void sp_desktop_widget_destroy (SPDesktopWidget* dtw);
4015+
4016+void sp_desktop_widget_show_decorations(SPDesktopWidget *dtw, gboolean show);
4017+void sp_desktop_widget_iconify(SPDesktopWidget *dtw);
4018+void sp_desktop_widget_maximize(SPDesktopWidget *dtw);
4019+void sp_desktop_widget_fullscreen(SPDesktopWidget *dtw);
4020+void sp_desktop_widget_update_zoom(SPDesktopWidget *dtw);
4021+void sp_desktop_widget_update_rulers (SPDesktopWidget *dtw);
4022+void sp_desktop_widget_update_hruler (SPDesktopWidget *dtw);
4023+void sp_desktop_widget_update_vruler (SPDesktopWidget *dtw);
4024+
4025+/* Show/hide rulers & scrollbars */
4026+void sp_desktop_widget_toggle_rulers (SPDesktopWidget *dtw);
4027+void sp_desktop_widget_toggle_scrollbars (SPDesktopWidget *dtw);
4028+void sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale);
4029+void sp_desktop_widget_toggle_color_prof_adj( SPDesktopWidget *dtw );
4030+
4031+void sp_dtw_desktop_activate (SPDesktopWidget *dtw);
4032+void sp_dtw_desktop_deactivate (SPDesktopWidget *dtw);
4033+
4034+namespace Inkscape { namespace Widgets { class LayerSelector; } }
4035+
4036+namespace Inkscape { namespace UI { namespace Widget { class SelectedStyle; } } }
4037+
4038+namespace Inkscape { namespace UI { namespace Dialogs { class SwatchesPanel; } } }
4039+
4040+/// A GtkEventBox on an SPDesktop.
4041+struct SPDesktopWidget {
4042+ SPViewWidget viewwidget;
4043+
4044+ unsigned int update : 1;
4045+
4046+ sigc::connection modified_connection;
4047+
4048+ GtkTooltips *tt;
4049+
4050+ SPDesktop *desktop;
4051+
4052+ Gtk::Window *window;
4053+
4054+ // The root vbox of the window layout.
4055+ GtkWidget *vbox;
4056+
4057+ GtkWidget *hbox;
4058+
4059+ GtkWidget *menubar, *statusbar;
4060+
4061+ Inkscape::UI::Dialogs::SwatchesPanel *panels;
4062+
4063+ GtkWidget *hscrollbar, *vscrollbar, *vscrollbar_box;
4064+
4065+ /* Rulers */
4066+ GtkWidget *hruler, *vruler;
4067+ GtkWidget *hruler_box, *vruler_box; // eventboxes for setting tooltips
4068+
4069+ GtkWidget *sticky_zoom;
4070+ GtkWidget *cms_adjust;
4071+ GtkWidget *coord_status;
4072+ GtkWidget *coord_status_x;
4073+ GtkWidget *coord_status_y;
4074+ GtkWidget *select_status;
4075+ GtkWidget *select_status_eventbox;
4076+ GtkWidget *zoom_status;
4077+ gulong zoom_update;
4078+
4079+ Inkscape::UI::Widget::Dock *dock;
4080+
4081+ Inkscape::UI::Widget::SelectedStyle *selected_style;
4082+
4083+ gint coord_status_id, select_status_id;
4084+
4085+ unsigned int _interaction_disabled_counter;
4086+
4087+ SPCanvas *canvas;
4088+ Geom::Point ruler_origin;
4089+ double dt2r;
4090+
4091+ GtkAdjustment *hadj, *vadj;
4092+
4093+ Inkscape::Widgets::LayerSelector *layer_selector;
4094+
4095+ EgeColorProfTracker* _tracker;
4096+
4097+ struct WidgetStub : public Inkscape::UI::View::EditWidgetInterface {
4098+ SPDesktopWidget *_dtw;
4099+ SPDesktop *_dt;
4100+ WidgetStub (SPDesktopWidget* dtw) : _dtw(dtw) {}
4101+
4102+ virtual void setTitle (gchar const *uri)
4103+ { _dtw->updateTitle (uri); }
4104+ virtual Gtk::Window* getWindow()
4105+ { return _dtw->window; }
4106+
4107+ virtual void layout() {
4108+ _dtw->layoutWidgets();
4109+ }
4110+
4111+ virtual void present()
4112+ { _dtw->presentWindow(); }
4113+ virtual void getGeometry (gint &x, gint &y, gint &w, gint &h)
4114+ { _dtw->getWindowGeometry (x, y, w, h); }
4115+ virtual void setSize (gint w, gint h)
4116+ { _dtw->setWindowSize (w, h); }
4117+ virtual void setPosition (Geom::Point p)
4118+ { _dtw->setWindowPosition (p); }
4119+ virtual void setTransient (void* p, int transient_policy)
4120+ { _dtw->setWindowTransient (p, transient_policy); }
4121+ virtual Geom::Point getPointer()
4122+ { return _dtw->window_get_pointer(); }
4123+ virtual void setIconified()
4124+ { sp_desktop_widget_iconify (_dtw); }
4125+ virtual void setMaximized()
4126+ { sp_desktop_widget_maximize (_dtw); }
4127+ virtual void setFullscreen()
4128+ { sp_desktop_widget_fullscreen (_dtw); }
4129+ virtual bool shutdown()
4130+ { return _dtw->shutdown(); }
4131+ virtual void destroy()
4132+ {
4133+ if(_dtw->window != NULL)
4134+ delete _dtw->window;
4135+ _dtw->window = NULL;
4136+ }
4137+
4138+ virtual void requestCanvasUpdate()
4139+ { _dtw->requestCanvasUpdate(); }
4140+ virtual void requestCanvasUpdateAndWait()
4141+ { _dtw->requestCanvasUpdateAndWait(); }
4142+ virtual void enableInteraction()
4143+ { _dtw->enableInteraction(); }
4144+ virtual void disableInteraction()
4145+ { _dtw->disableInteraction(); }
4146+ virtual void activateDesktop()
4147+ { sp_dtw_desktop_activate (_dtw); }
4148+ virtual void deactivateDesktop()
4149+ { sp_dtw_desktop_deactivate (_dtw); }
4150+ virtual void viewSetPosition (Geom::Point p)
4151+ { _dtw->viewSetPosition (p); }
4152+ virtual void updateRulers()
4153+ { sp_desktop_widget_update_rulers (_dtw); }
4154+ virtual void updateScrollbars (double scale)
4155+ { sp_desktop_widget_update_scrollbars (_dtw, scale); }
4156+ virtual void toggleRulers()
4157+ { sp_desktop_widget_toggle_rulers (_dtw); }
4158+ virtual void toggleScrollbars()
4159+ { sp_desktop_widget_toggle_scrollbars (_dtw); }
4160+ virtual void toggleColorProfAdjust()
4161+ { sp_desktop_widget_toggle_color_prof_adj(_dtw); }
4162+ virtual void updateZoom()
4163+ { sp_desktop_widget_update_zoom (_dtw); }
4164+ virtual void letZoomGrabFocus()
4165+ { _dtw->letZoomGrabFocus(); }
4166+ virtual void setToolboxFocusTo (const gchar * id)
4167+ { _dtw->setToolboxFocusTo (id); }
4168+ virtual void setToolboxAdjustmentValue (const gchar *id, double val)
4169+ { _dtw->setToolboxAdjustmentValue (id, val); }
4170+ virtual void setToolboxSelectOneValue (gchar const *id, int val)
4171+ { _dtw->setToolboxSelectOneValue (id, val); }
4172+ virtual bool isToolboxButtonActive (gchar const* id)
4173+ { return _dtw->isToolboxButtonActive (id); }
4174+ virtual void setCoordinateStatus (Geom::Point p)
4175+ { _dtw->setCoordinateStatus (p); }
4176+ virtual void setMessage (Inkscape::MessageType type, gchar const* msg)
4177+ { _dtw->setMessage (type, msg); }
4178+ virtual bool warnDialog (gchar* text)
4179+ { return _dtw->warnDialog (text); }
4180+ virtual Inkscape::UI::Widget::Dock* getDock ()
4181+ { return _dtw->getDock(); }
4182+ };
4183+
4184+ WidgetStub *stub;
4185+
4186+ void setMessage(Inkscape::MessageType type, gchar const *message);
4187+ Geom::Point window_get_pointer();
4188+ bool shutdown();
4189+ void viewSetPosition (Geom::Point p);
4190+ void letZoomGrabFocus();
4191+ void getWindowGeometry (gint &x, gint &y, gint &w, gint &h);
4192+ void setWindowPosition (Geom::Point p);
4193+ void setWindowSize (gint w, gint h);
4194+ void setWindowTransient (void *p, int transient_policy);
4195+ void presentWindow();
4196+ bool warnDialog (gchar *text);
4197+ void setToolboxFocusTo (gchar const *);
4198+ void setToolboxAdjustmentValue (gchar const * id, double value);
4199+ void setToolboxSelectOneValue (gchar const * id, gint value);
4200+ bool isToolboxButtonActive (gchar const *id);
4201+ void setToolboxPosition(Glib::ustring const& id, GtkPositionType pos);
4202+ void setCoordinateStatus(Geom::Point p);
4203+ void requestCanvasUpdate();
4204+ void requestCanvasUpdateAndWait();
4205+ void enableInteraction();
4206+ void disableInteraction();
4207+ void updateTitle(gchar const *uri);
4208+ bool onFocusInEvent(GdkEventFocus*);
4209+
4210+ Inkscape::UI::Widget::Dock* getDock();
4211+
4212+ static GtkType getType();
4213+ static SPDesktopWidget* createInstance(SPNamedView *namedview);
4214+
4215+ void updateNamedview();
4216+
4217+private:
4218+ GtkWidget *tool_toolbox;
4219+ GtkWidget *aux_toolbox;
4220+ GtkWidget *commands_toolbox,;
4221+ GtkWidget *snap_toolbox;
4222+
4223+ static void init(SPDesktopWidget *widget);
4224+ void layoutWidgets();
4225+
4226+ void namedviewModified(SPObject *obj, guint flags);
4227+
4228+};
4229+
4230+/// The SPDesktopWidget vtable
4231+struct SPDesktopWidgetClass {
4232+ SPViewWidgetClass parent_class;
4233+};
4234+
4235+#endif /* !SEEN_SP_DESKTOP_WIDGET_H */
4236+
4237+/*
4238+ Local Variables:
4239+ mode:c++
4240+ c-file-style:"stroustrup"
4241+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
4242+ indent-tabs-mode:nil
4243+ fill-column:99
4244+ End:
4245+*/
4246+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
4247diff -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
4248--- inkscape-0.48.1~/src/widgets/gradient-image.h 2010-07-13 04:48:40.000000000 +0100
4249+++ inkscape-0.48.1/src/widgets/gradient-image.h 2011-05-01 00:56:19.611250878 +0100
4250@@ -19,6 +19,7 @@
4251
4252 #include <glib.h>
4253
4254+#include <stddef.h>
4255 #include <sigc++/connection.h>
4256
4257 #define SP_TYPE_GRADIENT_IMAGE (sp_gradient_image_get_type ())
4258diff -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
4259--- inkscape-0.48.1~/src/widgets/gradient-vector.h 2010-07-13 04:48:40.000000000 +0100
4260+++ inkscape-0.48.1/src/widgets/gradient-vector.h 2011-05-01 00:56:19.611250878 +0100
4261@@ -17,6 +17,7 @@
4262
4263 #include <glib.h>
4264
4265+#include <stddef.h>
4266 #include <sigc++/connection.h>
4267
4268 #include <gtk/gtkvbox.h>
4269diff -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
4270--- inkscape-0.48.1~/src/widgets/sp-attribute-widget.h 2010-07-13 04:48:40.000000000 +0100
4271+++ inkscape-0.48.1/src/widgets/sp-attribute-widget.h 2011-05-01 00:56:19.611250878 +0100
4272@@ -14,6 +14,7 @@
4273 #define SEEN_DIALOGS_SP_ATTRIBUTE_WIDGET_H
4274
4275 #include <glib.h>
4276+#include <stddef.h>
4277 #include <sigc++/connection.h>
4278
4279 #define SP_TYPE_ATTRIBUTE_WIDGET (sp_attribute_widget_get_type ())
4280diff -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
4281--- inkscape-0.48.1~/src/widgets/sp-color-notebook.cpp 2010-07-13 04:48:40.000000000 +0100
4282+++ inkscape-0.48.1/src/widgets/sp-color-notebook.cpp 2011-05-01 00:56:19.611250878 +0100
4283@@ -22,6 +22,7 @@
4284 #include <cstring>
4285 #include <string>
4286 #include <cstdlib>
4287+#include <cstddef>
4288 #include <gtk/gtk.h>
4289 #include <glibmm/i18n.h>
4290
4291diff -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
4292--- inkscape-0.48.1~/src/xml/helper-observer.h 2010-07-13 04:48:40.000000000 +0100
4293+++ inkscape-0.48.1/src/xml/helper-observer.h 2011-05-01 00:56:19.611250878 +0100
4294@@ -5,6 +5,7 @@
4295 #include "node.h"
4296 #include "../sp-object.h"
4297 //#include "../sp-object-repr.h"
4298+#include <stddef.h>
4299 #include <sigc++/sigc++.h>
4300
4301 namespace Inkscape {
43020
=== 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 10:26:27 +0000
@@ -0,0 +1,22 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2# Description: Add Unity static quicklist support to inkscape
3# Bug: https://launchpad.net/bugs/676886
4# Bug-Ubuntu: https://launchpad.net/bugs/676886
5# Author: Didier Roche <didrocks@ubuntu.com>
6# Applied-Upstream: commit:10201
7# Last-Update: 2011-05-08
8
9@DPATCH@
10diff -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
11--- inkscape-0.48.1~/inkscape.desktop.in 2010-07-13 05:48:40.000000000 +0200
12+++ inkscape-0.48.1/inkscape.desktop.in 2011-02-17 16:21:42.690388423 +0100
13@@ -12,3 +12,9 @@
14 Terminal=false
15 StartupNotify=true
16 Icon=inkscape
17+X-Ayatana-Desktop-Shortcuts=Drawing
18+
19+[Drawing Shortcut Group]
20+_Name=New Drawing
21+Exec=inkscape
22+TargetEnvironment=Unity
023
=== 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 10:26:27 +0000
@@ -0,0 +1,25 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## From: Alex Valavanis <valavanisalex@gmail.com>
3## Description: Add translation domain to Desktop Entry file
4## This is an Ubuntu-specific fix to allow translations to be stripped
5## from the Desktop entry file and read from language packs instead.
6## This is needed to save space on installation media because Inkcape is in
7## the "main" repository in Ubuntu. Most other distributions do not use this
8## method, or recognise the X-Ubuntu-Gettext key, so there is no point in
9## forwarding the patch upstream.
10## Bug-Ubuntu: https://launchpad.net/bugs/726850
11## Forwarded: not-needed
12## Last-Update: 2011-05-08
13
14@DPATCH@
15diff -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
16--- fix-726850~/inkscape.desktop.in 2011-05-08 00:33:13.722220290 +0100
17+++ fix-726850/inkscape.desktop.in 2011-05-08 00:34:01.752220306 +0100
18@@ -12,6 +12,7 @@
19 Terminal=false
20 StartupNotify=true
21 Icon=inkscape
22+X-Ubuntu-Gettext-Domain=inkscape
23 X-Ayatana-Desktop-Shortcuts=Drawing
24
25 [Drawing Shortcut Group]
026
=== 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 10:26:27 +0000
@@ -0,0 +1,4302 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## Author: theAdib <theadib@gmail.com>
3## Author: Alex Valavanis <valavanisalex@gmail.com>
4## Description: Fix build failure with gcc 4.6
5## Bug: https://launchpad.net/bugs/707205
6## Bug-Ubuntu: https://launchpad.net/bugs/707205
7## Bug-Debian: https://bugs.debian.org/625085
8## Applied-Upstream: commit:10196
9## Last-Update: 2011-05-08
10
11@DPATCH@
12diff -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
13--- inkscape-0.48.1~/src/2geom/utils.h 2010-07-13 04:48:40.000000000 +0100
14+++ inkscape-0.48.1/src/2geom/utils.h 2011-05-01 00:56:53.101250888 +0100
15@@ -33,6 +33,7 @@
16 *
17 */
18
19+#include <cstddef>
20 #include <cmath>
21 #include <vector>
22
23diff -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
24--- inkscape-0.48.1~/src/Makefile.am 2010-07-13 04:48:40.000000000 +0100
25+++ inkscape-0.48.1/src/Makefile.am 2011-05-01 00:56:19.591250878 +0100
26@@ -205,7 +205,7 @@
27
28 inkscape_SOURCES += main.cpp $(win32_sources)
29 inkscape_LDADD = $(all_libs)
30-inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows)
31+inkscape_LDFLAGS = -Wl,--export-dynamic $(kdeldflags) $(mwindows)
32
33 inkview_SOURCES += inkview.cpp $(win32_sources)
34 inkview_LDADD = $(all_libs)
35diff -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
36--- inkscape-0.48.1~/src/Makefile.am.orig 1970-01-01 01:00:00.000000000 +0100
37+++ inkscape-0.48.1/src/Makefile.am.orig 2010-07-13 04:48:40.000000000 +0100
38@@ -0,0 +1,277 @@
39+## Process this file with automake to produce Makefile.in
40+
41+# ################################################
42+# G L O B A L
43+# ################################################
44+
45+# Should work in either automake1.7 or 1.8, but 1.6 doesn't
46+# handle foo/libfoo_a_CPPFLAGS properly (if at all).
47+# Update: We now avoid setting foo/libfoo_a_CPPFLAGS,
48+# so perhaps 1.6 will work.
49+AUTOMAKE_OPTIONS = 1.7 subdir-objects
50+
51+# Executables compiled by "make" and installed by "make install"
52+bin_PROGRAMS = inkscape inkview
53+
54+# Libraries which should be compiled by "make" but not installed.
55+# Use this only for libraries that are really standalone, rather than for
56+# source tree subdirectories.
57+#if WITH_INKBOARD
58+#libpedro = pedro/libpedro.a
59+#endif
60+noinst_LIBRARIES = \
61+ libinkscape.a \
62+ dom/libdom.a \
63+ libcroco/libcroco.a \
64+ libavoid/libavoid.a \
65+ libgdl/libgdl.a \
66+ libcola/libcola.a \
67+ libvpsc/libvpsc.a \
68+ livarot/libvarot.a \
69+ 2geom/lib2geom.a \
70+ $(libpedro) \
71+ libinkversion.a
72+
73+all_libs = \
74+ $(noinst_LIBRARIES) \
75+ $(INKSCAPE_LIBS) \
76+ $(GNOME_VFS_LIBS) \
77+ $(XFT_LIBS) \
78+ $(FREETYPE_LIBS) \
79+ $(kdeldadd) \
80+ $(win32ldflags) \
81+ $(CARBON_LDFLAGS) \
82+ $(PERL_LIBS) \
83+ $(PYTHON_LIBS) \
84+ $(INKBOARD_LIBS) \
85+ $(LIBWPG_LIBS) \
86+ $(IMAGEMAGICK_LIBS)
87+
88+# Add sources common for Inkscape and Inkview to this variable.
89+ink_common_sources =
90+# Add Inkscape-only sources here.
91+inkscape_SOURCES =
92+# Add Inkview-only sources here.
93+inkview_SOURCES =
94+
95+INCLUDES = \
96+ $(PERL_CFLAGS) $(PYTHON_CFLAGS) \
97+ $(FREETYPE_CFLAGS) \
98+ $(GNOME_PRINT_CFLAGS) \
99+ $(GNOME_VFS_CFLAGS) \
100+ $(IMAGEMAGICK_CFLAGS) \
101+ $(INKBOARD_CFLAGS) \
102+ $(LIBWPG_CFLAGS) \
103+ $(XFT_CFLAGS) \
104+ $(LCMS_CFLAGS) \
105+ $(POPPLER_CFLAGS) \
106+ $(POPPLER_GLIB_CFLAGS) \
107+ -DPOTRACE=\"potrace\" \
108+ $(INKSCAPE_CFLAGS) \
109+ -I$(top_srcdir)/cxxtest \
110+ $(WIN32_CFLAGS) \
111+ -I$(srcdir)/bind/javainc \
112+ -I$(srcdir)/bind/javainc/linux \
113+ $(AM_CPPFLAGS)
114+
115+CXXTEST_TEMPLATE = $(srcdir)/cxxtest-template.tpl
116+CXXTESTGENFLAGS = --root --have-eh --template=$(CXXTEST_TEMPLATE)
117+CXXTESTGEN = $(top_srcdir)/cxxtest/cxxtestgen.pl $(CXXTESTGENFLAGS)
118+# Add test cases to this variable
119+CXXTEST_TESTSUITES =
120+
121+# ################################################
122+#
123+# E X T R A
124+#
125+# ################################################
126+
127+if PLATFORM_WIN32
128+win32_sources = winmain.cpp registrytool.cpp registrytool.h
129+win32ldflags = -lcomdlg32 -lmscms
130+mwindows = -mwindows
131+endif
132+
133+if INKJAR
134+inkjar_dir = inkjar
135+inkjar_libs = inkjar/libinkjar.a
136+endif
137+
138+# Include all partial makefiles from subdirectories
139+include Makefile_insert
140+include application/Makefile_insert
141+include bind/Makefile_insert
142+include dialogs/Makefile_insert
143+include display/Makefile_insert
144+include dom/Makefile_insert
145+include extension/Makefile_insert
146+include extension/implementation/Makefile_insert
147+include extension/internal/Makefile_insert
148+include extension/script/Makefile_insert
149+include filters/Makefile_insert
150+include helper/Makefile_insert
151+include io/Makefile_insert
152+#include pedro/Makefile_insert
153+#include jabber_whiteboard/Makefile_insert
154+include libcroco/Makefile_insert
155+include libgdl/Makefile_insert
156+include libnr/Makefile_insert
157+include libnrtype/Makefile_insert
158+include libavoid/Makefile_insert
159+include livarot/Makefile_insert
160+include live_effects/Makefile_insert
161+include live_effects/parameter/Makefile_insert
162+include libvpsc/Makefile_insert
163+include libcola/Makefile_insert
164+include svg/Makefile_insert
165+include widgets/Makefile_insert
166+include debug/Makefile_insert
167+include xml/Makefile_insert
168+include ui/Makefile_insert
169+include ui/cache/Makefile_insert
170+include ui/dialog/Makefile_insert
171+include ui/tool/Makefile_insert
172+include ui/view/Makefile_insert
173+include ui/widget/Makefile_insert
174+include util/Makefile_insert
175+include trace/Makefile_insert
176+include 2geom/Makefile_insert
177+
178+# Extra files not mentioned as sources to include in the source tarball
179+EXTRA_DIST = \
180+ $(top_srcdir)/Doxyfile \
181+ sp-skeleton.cpp sp-skeleton.h \
182+ util/makefile.in \
183+ application/makefile.in \
184+ bind/makefile.in \
185+ debug/makefile.in \
186+ dialogs/makefile.in \
187+ display/makefile.in \
188+ dom/makefile.in \
189+ extension/implementation/makefile.in \
190+ extension/internal/makefile.in \
191+ extension/makefile.in \
192+ extension/script/makefile.in \
193+ filters/makefile.in \
194+ helper/makefile.in \
195+ io/makefile.in \
196+ io/crystalegg.xml \
197+ io/doc2html.xsl \
198+ pedro/makefile.in \
199+ jabber_whiteboard/makefile.in \
200+ libgdl/makefile.in \
201+ libcroco/makefile.in \
202+ libnr/makefile.in \
203+ libnrtype/makefile.in \
204+ libavoid/makefile.in \
205+ livarot/makefile.in \
206+ live_effects/makefile.in \
207+ live_effects/parameter/makefile.in \
208+ svg/makefile.in \
209+ trace/makefile.in \
210+ ui/makefile.in \
211+ ui/cache/makefile.in \
212+ ui/dialog/makefile.in \
213+ ui/view/makefile.in \
214+ ui/widget/makefile.in \
215+ util/makefile.in \
216+ widgets/makefile.in \
217+ xml/makefile.in \
218+ 2geom/makefile.in \
219+ extension/internal/win32.cpp \
220+ extension/internal/win32.h \
221+ extension/internal/emf-win32-inout.cpp \
222+ extension/internal/emf-win32-inout.h \
223+ extension/internal/emf-win32-print.cpp \
224+ extension/internal/emf-win32-print.h \
225+ helper/sp-marshal.list \
226+ show-preview.bmp \
227+ winconsole.cpp \
228+ $(jabber_whiteboard_SOURCES) \
229+ $(CXXTEST_TEMPLATE)
230+
231+# Extra files to remove when doing "make distclean"
232+DISTCLEANFILES = \
233+ helper/sp-marshal.cpp \
234+ helper/sp-marshal.h \
235+ inkscape-version.cpp
236+
237+# ################################################
238+# B I N A R I E S
239+# ################################################
240+
241+# this should speed up the build
242+libinkscape_a_SOURCES = $(ink_common_sources)
243+
244+inkscape_SOURCES += main.cpp $(win32_sources)
245+inkscape_LDADD = $(all_libs)
246+inkscape_LDFLAGS = --export-dynamic $(kdeldflags) $(mwindows)
247+
248+inkview_SOURCES += inkview.cpp $(win32_sources)
249+inkview_LDADD = $(all_libs)
250+inkview_LDFLAGS = $(mwindows)
251+
252+# ################################################
253+# VERSION REPORTING
254+# ################################################
255+
256+libinkversion_a_SOURCES = inkscape-version.cpp inkscape-version.h
257+
258+if USE_BZR_VERSION
259+inkscape_version_deps = $(top_srcdir)/.bzr/branch/last-revision
260+endif
261+
262+# If this is an BZR snapshot build, regenerate this file every time
263+# someone updates the BZR working directory.
264+inkscape-version.cpp: $(inkscape_version_deps)
265+ VER_PREFIX="$(VERSION)";\
266+ VER_BZRREV=" r`bzr revno`"; \
267+ if test ! -z "`bzr status -S -V $(srcdir)`"; then \
268+ VER_CUSTOM=" custom"; \
269+ fi; \
270+ VERSION="$$VER_PREFIX$$VER_BZRREV$$VER_CUSTOM"; \
271+ echo "namespace Inkscape { " \
272+ "char const *version_string = \"$$VERSION\"; " \
273+ "}" > inkscape-version.new.cpp; \
274+ if cmp -s inkscape-version.new.cpp inkscape-version.cpp; then \
275+ rm inkscape-version.new.cpp; \
276+ else \
277+ mv inkscape-version.new.cpp inkscape-version.cpp; \
278+ fi; \
279+ echo $$VERSION
280+
281+# #################################
282+# ## TESTING STUFF (make check) ###
283+# #################################
284+
285+# List of all programs that should be built before testing. Note that this is
286+# different from TESTS, because some tests can be scripts that don't
287+# need to be built. There should be one test program per directory.
288+# automake adds $(EXEEXT) to check_PROGRAMS items but not to TESTS items:
289+# TESTS items can be scripts etc.
290+check_PROGRAMS = cxxtests
291+
292+# streamtest is unfinished and can't handle the relocations done during
293+# "make distcheck".
294+
295+# List of all tests to be run.
296+TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests
297+XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests
298+
299+# including the the testsuites here ensures that they get distributed
300+cxxtests_SOURCES = cxxtests.cpp libnr/nr-compose-reference.cpp $(CXXTEST_TESTSUITES)
301+cxxtests_LDADD = $(all_libs)
302+
303+cxxtests.cpp: $(CXXTEST_TESTSUITES) $(CXXTEST_TEMPLATE)
304+ $(CXXTESTGEN) -o cxxtests.cpp $(CXXTEST_TESTSUITES)
305+
306+# ################################################
307+# D I S T
308+# ################################################
309+
310+dist-hook:
311+ mkdir $(distdir)/pixmaps
312+ cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps
313+
314+distclean-local:
315+ rm -f cxxtests.xml cxxtests.log
316diff -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
317--- inkscape-0.48.1~/src/arc-context.h 2010-07-13 04:48:40.000000000 +0100
318+++ inkscape-0.48.1/src/arc-context.h 2011-05-01 00:56:19.591250878 +0100
319@@ -15,6 +15,7 @@
320 * Released under GNU GPL, read the file 'COPYING' for more information
321 */
322
323+#include <stddef.h>
324 #include <sigc++/connection.h>
325
326 #include <2geom/point.h>
327diff -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
328--- inkscape-0.48.1~/src/box3d-context.h 2010-07-13 04:48:40.000000000 +0100
329+++ inkscape-0.48.1/src/box3d-context.h 2011-05-01 00:56:19.591250878 +0100
330@@ -15,6 +15,7 @@
331 * Released under GNU GPL
332 */
333
334+#include <stddef.h>
335 #include <sigc++/sigc++.h>
336 #include "event-context.h"
337 #include "proj_pt.h"
338diff -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
339--- inkscape-0.48.1~/src/conn-avoid-ref.h 2010-07-13 04:48:40.000000000 +0100
340+++ inkscape-0.48.1/src/conn-avoid-ref.h 2011-05-01 00:56:19.591250878 +0100
341@@ -14,6 +14,7 @@
342 */
343
344 #include <glib/gslist.h>
345+#include <stddef.h>
346 #include <sigc++/connection.h>
347
348 struct SPDesktop;
349diff -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
350--- inkscape-0.48.1~/src/connection-pool.h 2010-07-13 04:48:40.000000000 +0100
351+++ inkscape-0.48.1/src/connection-pool.h 2011-05-01 00:56:19.591250878 +0100
352@@ -3,6 +3,7 @@
353
354 #include <glib-object.h>
355 #include <gtkmm.h>
356+#include <stddef.h>
357 #include <sigc++/sigc++.h>
358
359 namespace Inkscape
360diff -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
361--- inkscape-0.48.1~/src/connector-context.h 2010-07-13 04:48:40.000000000 +0100
362+++ inkscape-0.48.1/src/connector-context.h 2011-05-01 00:56:19.591250878 +0100
363@@ -12,6 +12,7 @@
364 * Released under GNU GPL, read the file 'COPYING' for more information
365 */
366
367+#include <stddef.h>
368 #include <sigc++/sigc++.h>
369 #include <sigc++/connection.h>
370 #include "event-context.h"
371diff -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
372--- inkscape-0.48.1~/src/desktop.h 2010-07-13 04:48:40.000000000 +0100
373+++ inkscape-0.48.1/src/desktop.h 2011-05-01 00:56:19.591250878 +0100
374@@ -27,6 +27,7 @@
375
376 #include <gdk/gdkevents.h>
377 #include <gtk/gtktypeutils.h>
378+#include <stddef.h>
379 #include <sigc++/sigc++.h>
380
381 #include <2geom/matrix.h>
382diff -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
383--- inkscape-0.48.1~/src/desktop.h.orig 1970-01-01 01:00:00.000000000 +0100
384+++ inkscape-0.48.1/src/desktop.h.orig 2010-07-13 04:48:40.000000000 +0100
385@@ -0,0 +1,379 @@
386+#ifndef SEEN_SP_DESKTOP_H
387+#define SEEN_SP_DESKTOP_H
388+
389+/** \file
390+ * SPDesktop: an editable view.
391+ *
392+ * Author:
393+ * Lauris Kaplinski <lauris@kaplinski.com>
394+ * Frank Felfe <innerspace@iname.com>
395+ * bulia byak <buliabyak@users.sf.net>
396+ * Ralf Stephan <ralf@ark.in-berlin.de>
397+ * John Bintz <jcoswell@coswellproductions.org>
398+ * Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
399+ *
400+ * Copyright (C) 2007 Johan Engelen
401+ * Copyright (C) 2006 John Bintz
402+ * Copyright (C) 1999-2005 authors
403+ * Copyright (C) 2000-2001 Ximian, Inc.
404+ *
405+ * Released under GNU GPL, read the file 'COPYING' for more information
406+ *
407+ */
408+
409+#ifdef HAVE_CONFIG_H
410+#include "config.h"
411+#endif
412+
413+#include <gdk/gdkevents.h>
414+#include <gtk/gtktypeutils.h>
415+#include <sigc++/sigc++.h>
416+
417+#include <2geom/matrix.h>
418+#include <2geom/rect.h>
419+
420+#include "ui/view/view.h"
421+#include "ui/view/edit-widget-interface.h"
422+
423+#include "display/rendermode.h"
424+#include "display/snap-indicator.h"
425+
426+class SPCSSAttr;
427+struct SPCanvas;
428+struct SPCanvasItem;
429+struct SPCanvasGroup;
430+struct SPEventContext;
431+struct SPItem;
432+struct SPNamedView;
433+struct SPObject;
434+struct SPStyle;
435+
436+namespace Gtk
437+{
438+ class Window;
439+}
440+
441+typedef int sp_verb_t;
442+
443+
444+
445+namespace Inkscape {
446+ class Application;
447+ class MessageContext;
448+ class Selection;
449+ class ObjectHierarchy;
450+ class LayerManager;
451+ class EventLog;
452+ namespace UI {
453+ namespace Dialog {
454+ class DialogManager;
455+ }
456+ }
457+ namespace Whiteboard {
458+ class SessionManager;
459+ }
460+ namespace Display {
461+ class TemporaryItemList;
462+ class TemporaryItem;
463+ //class SnapIndicator;
464+ }
465+}
466+
467+/**
468+ * Editable view.
469+ *
470+ * @see \ref desktop-handles.h for desktop macros.
471+ */
472+struct SPDesktop : public Inkscape::UI::View::View
473+{
474+ Inkscape::UI::Dialog::DialogManager *_dlg_mgr;
475+ SPNamedView *namedview;
476+ SPCanvas *canvas;
477+ /// current selection; will never generally be NULL
478+ Inkscape::Selection *selection;
479+ SPEventContext *event_context;
480+ Inkscape::LayerManager *layer_manager;
481+ Inkscape::EventLog *event_log;
482+
483+ Inkscape::Display::TemporaryItemList *temporary_item_list;
484+ Inkscape::Display::SnapIndicator *snapindicator;
485+
486+ SPCanvasItem *acetate;
487+ SPCanvasGroup *main;
488+ SPCanvasGroup *gridgroup;
489+ SPCanvasGroup *guides;
490+ SPCanvasItem *drawing;
491+ SPCanvasGroup *sketch;
492+ SPCanvasGroup *controls;
493+ SPCanvasGroup *tempgroup; ///< contains temporary canvas items
494+ SPCanvasItem *table; ///< outside-of-page background
495+ SPCanvasItem *page; ///< page background
496+ SPCanvasItem *page_border; ///< page border
497+ SPCSSAttr *current; ///< current style
498+ bool _focusMode; ///< Whether we're focused working or general working
499+
500+ GList *zooms_past;
501+ GList *zooms_future;
502+ bool _quick_zoom_enabled; ///< Signifies that currently we're in quick zoom mode
503+ Geom::Rect _quick_zoom_stored_area; ///< The area of the screen before quick zoom
504+ unsigned int dkey;
505+ unsigned int number;
506+ guint window_state;
507+ unsigned int interaction_disabled_counter;
508+ bool waiting_cursor;
509+
510+ /// \todo fixme: This has to be implemented in different way */
511+ guint guides_active : 1;
512+
513+ // storage for selected dragger used by GrDrag as it's
514+ // created and deleted by tools
515+ SPItem *gr_item;
516+ guint gr_point_type;
517+ guint gr_point_i;
518+ bool gr_fill_or_stroke;
519+
520+
521+ Inkscape::ObjectHierarchy *_layer_hierarchy;
522+ gchar * _reconstruction_old_layer_id;
523+
524+ sigc::signal<void, sp_verb_t> _tool_changed;
525+ sigc::signal<void, SPObject *> _layer_changed_signal;
526+ sigc::signal<bool, const SPCSSAttr *>::accumulated<StopOnTrue> _set_style_signal;
527+ sigc::signal<int, SPStyle *, int>::accumulated<StopOnNonZero> _query_style_signal;
528+
529+ /// Emitted when the zoom factor changes (not emitted when scrolling).
530+ /// The parameter is the new zoom factor
531+ sigc::signal<void, double> signal_zoom_changed;
532+
533+ sigc::connection connectDocumentReplaced (const sigc::slot<void,SPDesktop*,SPDocument*> & slot)
534+ {
535+ return _document_replaced_signal.connect (slot);
536+ }
537+
538+ sigc::connection connectEventContextChanged (const sigc::slot<void,SPDesktop*,SPEventContext*> & slot)
539+ {
540+ return _event_context_changed_signal.connect (slot);
541+ }
542+ sigc::connection connectSetStyle (const sigc::slot<bool, const SPCSSAttr *> & slot)
543+ {
544+ return _set_style_signal.connect (slot);
545+ }
546+ sigc::connection connectQueryStyle (const sigc::slot<int, SPStyle *, int> & slot)
547+ {
548+ return _query_style_signal.connect (slot);
549+ }
550+ // subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection
551+ sigc::connection connectToolSubselectionChanged(const sigc::slot<void, gpointer> & slot) {
552+ return _tool_subselection_changed.connect(slot);
553+ }
554+ void emitToolSubselectionChanged(gpointer data);
555+ sigc::connection connectCurrentLayerChanged(const sigc::slot<void, SPObject *> & slot) {
556+ return _layer_changed_signal.connect(slot);
557+ }
558+
559+ // Whiteboard changes
560+
561+#ifdef WITH_INKBOARD
562+ Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() {
563+ return _whiteboard_session_manager;
564+ }
565+
566+ Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager;
567+#endif
568+
569+ SPDesktop();
570+ void init (SPNamedView* nv, SPCanvas* canvas, Inkscape::UI::View::EditWidgetInterface *widget);
571+ virtual ~SPDesktop();
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches