Code

inkscape.git
16 years ago r19125@shi: ted | 2008-04-23 23:32:56 -0700
gouldtj [Thu, 24 Apr 2008 06:36:02 +0000 (06:36 +0000)]
 r19125@shi:  ted | 2008-04-23 23:32:56 -0700
 Cleaning up a couple things.  Making sure we don't leak memory through
 the destructor (rarely used in reality, but we should be clean about these
 things, that's what destructors are for).
 r19126@shi:  ted | 2008-04-23 23:33:30 -0700
 Making it so that snow has a parameter for drift size.  It seems like that
 is what most people would want to change on this relatively complex filter.

16 years agoPatch for Win32 bug 176750 - Envelope and Perspective scripts report "empty string...
ozmikepittman [Thu, 24 Apr 2008 05:33:31 +0000 (05:33 +0000)]
Patch for Win32 bug 176750 - Envelope and Perspective scripts report "empty string for float"

16 years agonoop: Address a couple of warnings from g++-4.3.
pjrm [Thu, 24 Apr 2008 03:06:59 +0000 (03:06 +0000)]
noop: Address a couple of warnings from g++-4.3.

16 years agofix a couple of g++-4.3 compile errors.
pjrm [Thu, 24 Apr 2008 03:05:56 +0000 (03:05 +0000)]
fix a couple of g++-4.3 compile errors.

16 years agoFurther cleanup. Minidom superseded by pedrodom.
ishmal [Wed, 23 Apr 2008 20:30:09 +0000 (20:30 +0000)]
Further cleanup. Minidom superseded by pedrodom.

16 years agoRemove working file phoebedom.h from tree.
ishmal [Wed, 23 Apr 2008 20:00:46 +0000 (20:00 +0000)]
Remove working file phoebedom.h from tree.

16 years agoMore documenting/cleanup. Remove extraneous .h
ishmal [Wed, 23 Apr 2008 19:57:31 +0000 (19:57 +0000)]
More documenting/cleanup.  Remove extraneous .h

16 years agoSplit out domptr stuff into its own .h file, so that it can be used by other things...
ishmal [Wed, 23 Apr 2008 17:56:40 +0000 (17:56 +0000)]
Split out domptr stuff into its own .h file, so that it can be used by other things.  This might lead to a GP smart pointer to use for binding with scripts.

16 years agoFinish commenting Node. Fix bad varname in getUserData()
ishmal [Wed, 23 Apr 2008 17:06:19 +0000 (17:06 +0000)]
Finish commenting Node.  Fix bad varname in getUserData()

16 years agoGet rid of bothersome domconfig.h. Begin cleanup and documentation in preparation...
ishmal [Wed, 23 Apr 2008 15:52:00 +0000 (15:52 +0000)]
Get rid of bothersome domconfig.h. Begin cleanup and documentation in preparation for binding.

16 years agoFixed some further issues with Internal extensions after the introduction of schema...
mfloryan [Wed, 23 Apr 2008 15:42:42 +0000 (15:42 +0000)]
Fixed some further issues with Internal extensions after the introduction of schema for INX files (the boolean values now spelled in lower case). This fixes an intermediate problem of Inkscape concerning its native SVG files as a loosy format.

16 years agoFixed SVN properties.
mfloryan [Wed, 23 Apr 2008 10:17:01 +0000 (10:17 +0000)]
Fixed SVN properties.

16 years agoUpdated the po/POTFILES.in to reflect the new set of translatable files in source...
mfloryan [Wed, 23 Apr 2008 09:42:39 +0000 (09:42 +0000)]
Updated the po/POTFILES.in to reflect the new set of translatable files in source - closes bug #220739. Added a script to generate the POTFILES.in automatically.

16 years agoA small fix to the warning message to make it more explicit.
mfloryan [Wed, 23 Apr 2008 09:02:05 +0000 (09:02 +0000)]
A small fix to the warning message to make it more explicit.

16 years agoChange status bar text for swatch hover
johncoswell [Wed, 23 Apr 2008 01:37:38 +0000 (01:37 +0000)]
Change status bar text for swatch hover

16 years agoKeep swatch status messages visible while hovering
johncoswell [Tue, 22 Apr 2008 23:09:01 +0000 (23:09 +0000)]
Keep swatch status messages visible while hovering

16 years ago r19083@shi: ted | 2008-04-21 16:09:24 -0700
gouldtj [Tue, 22 Apr 2008 22:25:06 +0000 (22:25 +0000)]
 r19083@shi:  ted | 2008-04-21 16:09:24 -0700
 A directory for filter effects
 r19084@shi:  ted | 2008-04-21 20:03:59 -0700
 The basis for the filter interface for defining effects.
 r19085@shi:  ted | 2008-04-21 20:59:04 -0700
 Adding Sepia as an example
 r19086@shi:  ted | 2008-04-21 23:25:57 -0700
 Wiring everything in.  Cleaning it up so that it looks nice.
 r19087@shi:  ted | 2008-04-22 00:00:08 -0700
 Completeing more of the guts.  Not done, but the basic infrastructure is now in place.
 r19088@shi:  ted | 2008-04-22 00:19:38 -0700
 All the basic plumbing code.  It seems to work, except the document is wrong from the controlling filter guy.  That should be fixable.
 r19089@shi:  ted | 2008-04-22 00:31:36 -0700
 Whoo! Hoo! for simple stuff it seems to work.
 r19090@shi:  ted | 2008-04-22 10:36:16 -0700
 First pass at adding the filters from Mauve's example
 r19091@shi:  ted | 2008-04-22 10:37:24 -0700
 Fixing misspelling
 r19092@shi:  ted | 2008-04-22 12:32:18 -0700
 Should be appending instead of prepending these nodes.
 r19093@shi:  ted | 2008-04-22 13:37:34 -0700
 Basic filter with parameters working
 r19094@shi:  ted | 2008-04-22 14:27:20 -0700
 Changing it so that by default an effect will have a call to autogui that will work with live effects.  Basically this involved migrating the implementation of prefs_effect up from script.cpp to implementation.cpp
 r19102@shi:  ted | 2008-04-22 14:38:46 -0700
 Better defaults

 r19103@shi:  ted | 2008-04-22 14:42:07 -0700
 Adding filter stuff to be translated

16 years agoFinal format and comment fix. Sorry.
ishmal [Tue, 22 Apr 2008 20:44:40 +0000 (20:44 +0000)]
Final format and comment fix.   Sorry.

16 years agoImprove comments. Remove tabs.
ishmal [Tue, 22 Apr 2008 20:00:38 +0000 (20:00 +0000)]
Improve comments.  Remove tabs.

16 years agoGreatly improved. More serializable, and 32/64 portable.
ishmal [Tue, 22 Apr 2008 18:29:43 +0000 (18:29 +0000)]
Greatly improved.  More serializable, and 32/64 portable.

16 years agoUse improved Digest code. MD5 (and all others) tested on 32/64.
ishmal [Tue, 22 Apr 2008 18:28:41 +0000 (18:28 +0000)]
Use improved Digest code. MD5 (and all others) tested on 32/64.

16 years agoFix swatch enter-notify event propagation
johncoswell [Mon, 21 Apr 2008 23:39:46 +0000 (23:39 +0000)]
Fix swatch enter-notify event propagation

16 years agoOops, this broke selecting a swatch, rolling back...
johncoswell [Mon, 21 Apr 2008 23:01:01 +0000 (23:01 +0000)]
Oops, this broke selecting a swatch, rolling back...

16 years ago r19076@shi: ted | 2008-04-21 15:42:45 -0700
gouldtj [Mon, 21 Apr 2008 22:57:53 +0000 (22:57 +0000)]
 r19076@shi:  ted | 2008-04-21 15:42:45 -0700
 Core of having a real namespace for Inkscape extensions.
 r19077@shi:  ted | 2008-04-21 15:50:12 -0700
 First layer of adding NS
 r19078@shi:  ted | 2008-04-21 15:56:03 -0700
 Whew, doing the rest of them.

16 years agoShow the name of the swatch that is currently under the pointer in the status bar...
johncoswell [Mon, 21 Apr 2008 22:26:43 +0000 (22:26 +0000)]
Show the name of the swatch that is currently under the pointer in the status bar, making it easier to identify a swatch when using a tablet.

16 years agoUpdated for 32/64
ishmal [Mon, 21 Apr 2008 21:52:10 +0000 (21:52 +0000)]
Updated for 32/64

16 years agoFix SHA1 64bit-ism. Clean up warnings.
ishmal [Mon, 21 Apr 2008 19:21:57 +0000 (19:21 +0000)]
Fix SHA1 64bit-ism.  Clean up warnings.

16 years agoOnly trace the painted area of the screen with each fill, reducing memory usage.
johncoswell [Mon, 21 Apr 2008 00:24:54 +0000 (00:24 +0000)]
Only trace the painted area of the screen with each fill, reducing memory usage.

16 years agoMake parameter tracking for Paint Bucket less memory-intensive.
johncoswell [Sun, 20 Apr 2008 12:32:10 +0000 (12:32 +0000)]
Make parameter tracking for Paint Bucket less memory-intensive.

16 years agoAdd Filter Examples from mauve on IRC
verbalshadow [Sun, 20 Apr 2008 03:59:14 +0000 (03:59 +0000)]
Add Filter Examples from mauve on IRC

16 years agoupdate to latest 2geom. (eol-style fix needed enters at end of some files) 2geom...
johanengelen [Sat, 19 Apr 2008 21:50:45 +0000 (21:50 +0000)]
update to latest 2geom. (eol-style fix needed enters at end of some files)  2geom rev 1216

16 years agonoop: address ‘no newline at end of file’ warning
pjrm [Sat, 19 Apr 2008 01:01:14 +0000 (01:01 +0000)]
noop: address ‘no newline at end of file’ warning

16 years agoYet another md5 fix for 32/64. This time it works on ppc64/gcc
ishmal [Fri, 18 Apr 2008 21:57:47 +0000 (21:57 +0000)]
Yet another md5 fix for 32/64.  This time it works on ppc64/gcc

16 years agoRemoved unnecessary checks from curve.cpp (sp_bpath_check_subpath and friends). ...
jaspervdg [Fri, 18 Apr 2008 16:17:52 +0000 (16:17 +0000)]
Removed unnecessary checks from curve.cpp (sp_bpath_check_subpath and friends). (See bug 166720.)

16 years agoAll extensions are now propper XML files with a namespace and all validate against...
mfloryan [Fri, 18 Apr 2008 15:49:46 +0000 (15:49 +0000)]
All extensions are now propper XML files with a namespace and all validate against the new inkscape.extension.rng RelaxNG schema.

16 years agoAs there is no implementation for this extension it will not validate with the new...
mfloryan [Fri, 18 Apr 2008 15:14:43 +0000 (15:14 +0000)]
As there is no implementation for this extension it will not validate with the new schema. Thus removing this example - all relevant information is now available on the wiki: wiki.inkscape.org/wiki/index.php/Extensions#RadioButton_example

16 years agoupdate to latest 2geom. (eol-style fix)
johanengelen [Fri, 18 Apr 2008 07:20:46 +0000 (07:20 +0000)]
update to latest 2geom. (eol-style fix)

16 years agoallow inx to suppress live preview checkbox
buliabyak [Fri, 18 Apr 2008 03:25:42 +0000 (03:25 +0000)]
allow inx to suppress live preview checkbox

16 years agoprovide a parent for the working-please-wait message so it does not sink
buliabyak [Fri, 18 Apr 2008 02:39:23 +0000 (02:39 +0000)]
provide a parent for the working-please-wait message so it does not sink

16 years agoSmall Paint Bucket optimization for creating GrayMap
johncoswell [Fri, 18 Apr 2008 01:31:11 +0000 (01:31 +0000)]
Small Paint Bucket optimization for creating GrayMap

16 years agoHave Paint Bucket generate the necessary GrayMap for potrace directly, skipping the...
johncoswell [Thu, 17 Apr 2008 22:43:15 +0000 (22:43 +0000)]
Have Paint Bucket generate the necessary GrayMap for potrace directly, skipping the standard, slower potrace filtering routines.

16 years agoFollowing the previous commit - update to the INX files - a step towards proper XML...
mfloryan [Thu, 17 Apr 2008 16:16:48 +0000 (16:16 +0000)]
Following the previous commit - update to the INX files - a step towards proper XML format with schema for INX files.

16 years agoA small step towards making the inx files fully XML / schema compliant
mfloryan [Thu, 17 Apr 2008 16:14:20 +0000 (16:14 +0000)]
A small step towards making the inx files fully XML / schema compliant

16 years agoCreated new Arrange submenu for effects extensions
prokoudine [Thu, 17 Apr 2008 16:01:35 +0000 (16:01 +0000)]
Created new Arrange submenu for effects extensions

16 years agoadded Restack extension from Rob Antonishen
prokoudine [Thu, 17 Apr 2008 15:18:50 +0000 (15:18 +0000)]
added Restack extension from Rob Antonishen

16 years agoupdate to latest 2geom. fixes LPE's ignoring the closing segment of a closed path
johanengelen [Thu, 17 Apr 2008 09:15:33 +0000 (09:15 +0000)]
update to latest 2geom. fixes LPE's ignoring the closing segment of a closed path

16 years agouse the user-specified bounding box type
buliabyak [Thu, 17 Apr 2008 02:41:01 +0000 (02:41 +0000)]
use the user-specified bounding box type

16 years agoreplace text strings by ints for tools/bounding_box
buliabyak [Thu, 17 Apr 2008 02:40:23 +0000 (02:40 +0000)]
replace text strings by ints for tools/bounding_box

16 years agofix by kur9kin for endless loop from bug 212332
buliabyak [Wed, 16 Apr 2008 21:28:19 +0000 (21:28 +0000)]
fix by kur9kin for endless loop from bug 212332

16 years agocmake: copy over excluded dirs from build.xml
johanengelen [Wed, 16 Apr 2008 09:29:16 +0000 (09:29 +0000)]
cmake: copy over excluded dirs from build.xml

16 years agofix include path
johanengelen [Wed, 16 Apr 2008 09:28:45 +0000 (09:28 +0000)]
fix include path

16 years agomake sure --export-area-canvas works for pdf export too
buliabyak [Wed, 16 Apr 2008 06:43:33 +0000 (06:43 +0000)]
make sure --export-area-canvas works for pdf export too

16 years agoCmake: Add simple CMakeLists.txt for 2geom and linking to inkscape
verbalshadow [Wed, 16 Apr 2008 05:18:55 +0000 (05:18 +0000)]
Cmake: Add simple CMakeLists.txt for 2geom and linking to inkscape

16 years agocmake: copy over some excluded files from build.xml
johanengelen [Tue, 15 Apr 2008 20:21:53 +0000 (20:21 +0000)]
cmake: copy over some excluded files from build.xml

16 years agoSet concatenate_before_pwd2 = true in perspective path LPE so that paths don't get...
cilix42 [Tue, 15 Apr 2008 18:38:15 +0000 (18:38 +0000)]
Set concatenate_before_pwd2 = true in perspective path LPE so that paths don't get split into their subpaths (which gives weird results especially with text)

16 years agofixed E/V keys by request from InitMass
prokoudine [Tue, 15 Apr 2008 16:47:07 +0000 (16:47 +0000)]
fixed E/V keys by request from InitMass

16 years agoFixes Bug #216584 (Effects/Color/Replace color not accepting UC) and also implements...
mfloryan [Tue, 15 Apr 2008 16:17:21 +0000 (16:17 +0000)]
Fixes Bug #216584 (Effects/Color/Replace color not accepting UC) and also implements max_length attribute for string parameters in inx files.

16 years agoi18n: Added some comments for translators.
mfloryan [Tue, 15 Apr 2008 08:44:43 +0000 (08:44 +0000)]
i18n: Added some comments for translators.

16 years ago- Clean up LPE bounding box computing code
bgk [Tue, 15 Apr 2008 08:07:29 +0000 (08:07 +0000)]
- Clean up LPE bounding box computing code
- Initial work to make the Perspective Path effect work with groups. Still not working correctly due to a bug in the bounding box code.

16 years agofix include path
johanengelen [Tue, 15 Apr 2008 07:41:43 +0000 (07:41 +0000)]
fix include path

16 years agofix include paths
johanengelen [Tue, 15 Apr 2008 07:37:48 +0000 (07:37 +0000)]
fix include paths

16 years agoMinor string constant fixes to eradicate warnings.
mfloryan [Mon, 14 Apr 2008 19:43:59 +0000 (19:43 +0000)]
Minor string constant fixes to eradicate warnings.

16 years agocmake: move live_effects/n-art-bpath-2geom.* to libnr/n-art-bpath-2geom.*
johanengelen [Mon, 14 Apr 2008 13:43:31 +0000 (13:43 +0000)]
cmake: move live_effects/n-art-bpath-2geom.* to libnr/n-art-bpath-2geom.*

16 years agouse sp_nodepath_make_straight_path in LPE VonKoch
johanengelen [Mon, 14 Apr 2008 08:24:11 +0000 (08:24 +0000)]
use sp_nodepath_make_straight_path in LPE VonKoch

16 years agonode tool update
buliabyak [Mon, 14 Apr 2008 08:18:16 +0000 (08:18 +0000)]
node tool update

16 years agodon't override helperpath preference setting per default in LPE::Effect.
johanengelen [Mon, 14 Apr 2008 08:15:21 +0000 (08:15 +0000)]
don't override helperpath preference setting per default in LPE::Effect.

16 years agopatch from bug 214171
buliabyak [Mon, 14 Apr 2008 07:59:27 +0000 (07:59 +0000)]
patch from bug 214171

16 years agosuppress helperpath and handles showing for LPESpiro
johanengelen [Mon, 14 Apr 2008 07:50:17 +0000 (07:50 +0000)]
suppress helperpath and handles showing for LPESpiro

16 years agouse sp_nodepath_make_straight_path in LPEGears
johanengelen [Mon, 14 Apr 2008 07:42:16 +0000 (07:42 +0000)]
use sp_nodepath_make_straight_path in LPEGears

16 years agowhitespace + comment
johanengelen [Mon, 14 Apr 2008 07:36:34 +0000 (07:36 +0000)]
whitespace + comment

16 years agofix 216898
buliabyak [Mon, 14 Apr 2008 05:32:18 +0000 (05:32 +0000)]
fix 216898

16 years agoplease dont forget to update Makefile_insert\!
buliabyak [Mon, 14 Apr 2008 05:01:31 +0000 (05:01 +0000)]
please dont forget to update Makefile_insert\!

16 years agoplease dont forget to update Makefile_insert\!
buliabyak [Mon, 14 Apr 2008 04:41:21 +0000 (04:41 +0000)]
please dont forget to update Makefile_insert\!

16 years agoshift+s converts node to half-smooth first if adjacent to line, then to full smooth...
buliabyak [Mon, 14 Apr 2008 01:18:04 +0000 (01:18 +0000)]
shift+s converts node to half-smooth first if adjacent to line, then to full smooth; shift+c first converts to cusp then retracts handles; use more robust way to determine if a segment is line, which works for a curve with both retracted handles too

16 years agosuppress helperpath display for spiro
buliabyak [Mon, 14 Apr 2008 01:04:53 +0000 (01:04 +0000)]
suppress helperpath display for spiro

16 years agoC++-ify initialization of Effect class
johanengelen [Sun, 13 Apr 2008 21:15:30 +0000 (21:15 +0000)]
C++-ify initialization of Effect class

16 years agoC++-ify initialization of Parameter and ScalarParam classes
johanengelen [Sun, 13 Apr 2008 21:13:08 +0000 (21:13 +0000)]
C++-ify initialization of Parameter and ScalarParam classes

16 years agofix typo
johanengelen [Sun, 13 Apr 2008 21:09:19 +0000 (21:09 +0000)]
fix typo

16 years agonow with 2geom's arc implem. : accept pasting ellipse path params.
johanengelen [Sun, 13 Apr 2008 21:05:27 +0000 (21:05 +0000)]
now with 2geom's arc implem. : accept pasting ellipse path params.

16 years agomove live_effects/n-art-bpath-2geom.* to libnr/n-art-bpath-2geom.*
johanengelen [Sun, 13 Apr 2008 21:01:01 +0000 (21:01 +0000)]
move live_effects/n-art-bpath-2geom.* to libnr/n-art-bpath-2geom.*

16 years agosync with current 2geom, SVGEllipticalArc
johanengelen [Sun, 13 Apr 2008 21:00:01 +0000 (21:00 +0000)]
sync with current 2geom, SVGEllipticalArc

16 years agotranslator comment
a_b [Sun, 13 Apr 2008 20:29:03 +0000 (20:29 +0000)]
translator comment

16 years agotranslator comment
a_b [Sun, 13 Apr 2008 20:20:43 +0000 (20:20 +0000)]
translator comment

16 years agosync with current 2geom, split_at_discontinuities method and SVGEllipticalArc
johanengelen [Sun, 13 Apr 2008 20:19:07 +0000 (20:19 +0000)]
sync with current 2geom, split_at_discontinuities method and SVGEllipticalArc

16 years agoimprove error reporting from TcpSocket
ishmal [Sun, 13 Apr 2008 20:11:16 +0000 (20:11 +0000)]
improve error reporting from TcpSocket

16 years agotranslator comment
a_b [Sun, 13 Apr 2008 19:58:29 +0000 (19:58 +0000)]
translator comment

16 years agomore debug output messages
ishmal [Sun, 13 Apr 2008 19:34:31 +0000 (19:34 +0000)]
more debug output messages

16 years agoremove split_at_discontinuities from LPE code, because it has been moved to 2geom.
johanengelen [Sun, 13 Apr 2008 19:34:10 +0000 (19:34 +0000)]
remove split_at_discontinuities from LPE code, because it has been moved to 2geom.

16 years agosync with current 2geom, split_at_discontinuities method and SVGEllipticalArc
johanengelen [Sun, 13 Apr 2008 19:27:01 +0000 (19:27 +0000)]
sync with current 2geom, split_at_discontinuities method and SVGEllipticalArc

16 years agoMake fallback to iq auth in the odd situation of server saying it has streams v1...
ishmal [Sun, 13 Apr 2008 19:06:55 +0000 (19:06 +0000)]
Make fallback to iq auth in the odd situation of server saying it has streams v1.0, but doesnt handle sasl (server bug)

16 years agoMake pedro dom list simpler
ishmal [Sun, 13 Apr 2008 17:20:55 +0000 (17:20 +0000)]
Make pedro dom list simpler

16 years agomake saslMd5Authenticate() error message a bit smarter
ishmal [Sun, 13 Apr 2008 16:17:11 +0000 (16:17 +0000)]
make saslMd5Authenticate() error message a bit smarter

16 years agoaddress some char* string literal warnings.
pjrm [Sun, 13 Apr 2008 11:28:59 +0000 (11:28 +0000)]
address some char* string literal warnings.

16 years agoRewrote code to get rid of 32/64 bit problems, and to make is more stream-like. A...
ishmal [Sun, 13 Apr 2008 06:32:58 +0000 (06:32 +0000)]
Rewrote code to get rid of 32/64 bit problems, and to make is more stream-like. A bad type pun assuming that a long was 32 bits caused bug #216571 on a 64 bit machine.

16 years agoSeveral different i18n issues fixed following report from a_b (adresses bug #215387...
mfloryan [Sat, 12 Apr 2008 23:22:47 +0000 (23:22 +0000)]
Several different i18n issues fixed following report from a_b (adresses bug #215387, but still 2 more issues need to be fixed before it can be closed) and minor other issues fixed as spotted. Some changes could be ported to 0.46 branch.

16 years agoMake gnome_canvas_bpath_def_closepath merge two nearly equal endpoints to prevent...
jaspervdg [Sat, 12 Apr 2008 15:43:51 +0000 (15:43 +0000)]
Make gnome_canvas_bpath_def_closepath merge two nearly equal endpoints to prevent endpoints from wrongly being recognized as distinct. (fixing bug 216152)

16 years agoPreserve transform of topmost object when combining paths (fixing bug 215255).
jaspervdg [Sat, 12 Apr 2008 09:32:03 +0000 (09:32 +0000)]
Preserve transform of topmost object when combining paths (fixing bug 215255).

16 years agoSpiro splines LPE using code by Raph Levien
buliabyak [Sat, 12 Apr 2008 08:41:15 +0000 (08:41 +0000)]
Spiro splines LPE using code by Raph Levien

16 years agowith ctrl, snap handles also to the direction of the opposite handle or line segment...
buliabyak [Sat, 12 Apr 2008 04:27:08 +0000 (04:27 +0000)]
with ctrl, snap handles also to the direction of the opposite handle or line segment, its continuation and perpendiculars

16 years agoRefactor snapping mechanisms: in seltrans.cpp, a GSList was converted to a std::list...
dvlierop2 [Fri, 11 Apr 2008 08:03:13 +0000 (08:03 +0000)]
Refactor snapping mechanisms: in seltrans.cpp, a GSList was converted to a std::list in four different places. Now this is handled in only one place