Removing some #ifdef WIN32 spaghetti code

Michael Schumacher <[email protected]> Tue, 25 May 2004 18:37:55 +0200
Newsgroups gmane.comp.graphics.sodipodi
Message-ID <[email protected]>
Hi,

at many places inside the Sodipodi code, there are parts like

#ifdef WIN32
fn = g_build_filename (SODIPODI_APPDATADIR, "preferences", NULL);
#else
fn = g_build_filename (g_get_home_dir (), ".sodipodi/preferences",NULL);
#endif

IMHO, even having different directories for the preferences isn't good, 
but shouldn't this difference at least be handled at one place?

If, for example, SODIPODI_APPDATADIR was defined somwhere and used at 
each of those locations, many #ifdef WIN32 would become unnecessary.
Maybe a better name for this constant can be found, too - APPDATA might 
be a bit too specific for win32.

Michael

-- 
The GIMP > http://www.gimp.org    | IRC: irc://irc.gimp.org/gimp
Sodipodi > http://sodipodi.sf.net | IRC: irc://irc.gimp.org/sodipodi


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click