On Sun, Apr 03, 2005 at 04:02:13PM +0200, Andreas Nilsson wrote:
How about working together with the gimp and make both apps look for the palettes in /usr/local/share/palettes and in ~/.palettes or something by default, so one don't need to have duplicates of the palette files in two different places?
Does that involve having a separate package to install (a common dependency of gimp & inkscape), or do both programs install into the same place? If the latter, then what should happen if different programs have different versions of a given filename ?
I suspect that we wouldn't create a common dependency package until there were more sharing happening, e.g. if more of the existing gimp data could be shared between the two programs (gradients & patterns), and/or if more graphics programs would share the data (e.g. scribus).
In the meantime, you might consider adding one or more directories to the list of sources in src/dialogs/swatches.cpp:loadEmUp, along the lines:
sources.push_back( g_build_filename(DATADIR, "gimp/2.0/palettes"), NULL ); sources.push_back( g_strdup("/usr/share/gimp/2.0/palettes") );
If using g_get_home_dir, then note that i think it requires converting to utf8 using g_filename_to_utf8. (Cf src/inkscape.cpp.)
If using DATADIR, then modify configure.ac to put it in config.h as it currently does for INKSCAPE_DATADIR. (A cheap way for temporarty purposes would be to append "../gimp/blah" to INKSCAPE_DATADIR.)
pjrm.