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

Subscribers

People subscribed via source and target branches