2010/10/1 Robert Norris <rw_nor...@hotmail.com>: > > ---------------------------------------- >> Date: Fri, 1 Oct 2010 21:29:15 +0200 >> Subject: Re: [Viking-devel] [PATCH] Make more portable .vik file, as don't >> save the map cache directory if it's the map cache default directory. >> From: guilhem.bonnefi...@gmail.com >> To: rw_nor...@hotmail.com >> CC: viking-de...@lists.sf.net >> >> Patch applied. >> >> Nevertheless, such solution creates .vik file that does not support a >> change of the preference. >> Here is a scenario: I save a file, change the preference, and reopen >> the saved file... > > > Ah yes you're right, I didn't think about that.
What should we do? Revert? > I was hoping to try to make the .vik file a bit portable, but perhaps that > can not be done in a such a simple way as I was hoping. > > Normally I think other software that deals with references to other files are > often relative references. > Obviously absolute filename references are not cross platform. I can imagine some solutions. First one: remove absolute path when it use *default* directories, but not *prefered* directory. Another one: replace home directory part (as returned by g_get_home_dir()) with a marker (for exemple '~'). I also imagine much more complex solution: 1) replace map's numerical id by real identifiers (like "osm-mapnik" or "osmarender"...) 2) do not use absolute path, but a lookup in different directories: For exemple, current map uses "osmarender" id, so look for "osmarender" directory in /home/user/.viking-maps, then in /var/viking/maps then in /usr/share/viking/maps... But it is much more complex and really different from current solution. Perhaps for viking 2.0 ;-) -- Guilhem BONNEFILLE -=- JID: gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com -=- mailto:guilhem.bonnefi...@gmail.com -=- http://nathguil.free.fr/ ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/