Re: Removing some #ifdef WIN32 spaghetti code
"Lauris Kaplinski" <[email protected]> Fri, 25 Jun 2004 13:35:38 +0300
| Newsgroups | gmane.comp.graphics.sodipodi |
|---|---|
| Message-ID | <037001c45aa0$2826dfc0$911728c1@BOA> |
Hello! Call this 'evolutionary', as opposed to 'planned' approach :-) In general I agree, that such things should be implemented in central place - something along the lines of g_/gnome_ API (sp_build_filename), that could also perform the (maybe) necessary utf8/filesystem name conversion. As of locations, we need at last: 1. Non-volatile program data (icons) 2. Volatile program data (preferences) 3. Documents There may be more in future, like modules... Best wishes, Lauris Kaplinski ----- Original Message ----- > 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 > _______________________________________________ > Sodipodi-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sodipodi-list > > ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com