Changeset 824

Show
Ignore:
Timestamp:
03/30/08 06:23:16 (8 months ago)
Author:
takkaria
Message:

Commit Rowan's Beentje's patch to fix #548 amongst other things:

  • Antialias setting is now stored and retrieved appropriately.
  • The prefs loading code ignored the previous version of the prefs if the version changed at all; this was put in for 3.0.8 when the prefs format changed, but was never cleaned up. I've updated the code so that preference files dating to before 3.0.8 are still ignored, but we now attempt to load newer pref files - with an updated message containing the correct path. I hadn't even thought to wonder why all my prefs kept getting dumped (duh) - this was why.
  • Windows no longer transition onto the screen with the outer-rectangle swoosh, resulting in faster load times (!). There *could* be arguments about this, but I doubt it :D
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main-crb.c

    r778 r824  
    16551655                WindowRef old_win = focus.active; 
    16561656 
    1657                 TransitionWindow(td->w, 
    1658                         kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL); 
     1657                ShowWindow(td->w); 
    16591658 
    16601659                activate(td->w); 
     
    21892188        save_pref_short("graf_mode", graf_mode); 
    21902189 
     2190        /* text antialiasing */ 
     2191        save_pref_short("arg.use_antialiasing", antialias); 
     2192 
    21912193 
    21922194        /* Windows */ 
     
    22542256                (pref_extra != VERSION_EXTRA)) 
    22552257        { 
    2256 #if 1 // For 3.0.8 : pref file change! 
    2257                 /* Message */ 
    2258                 mac_warning( 
    2259                         format("Ignoring %d.%d.%d.%d preferences.", 
    2260                                 pref_major, pref_minor, pref_patch, pref_extra)); 
    2261  
    2262                 /* Ignore */ 
    2263                 return; 
    2264 #else 
    2265                 mac_warning(format("Preference file has changed.  If you have display problems, delete %s and restart", )); 
    2266 #endif 
     2258                /* Version 3.0.8 rewrote the preference file format - don't attempt to load previous versions. */ 
     2259                if ((pref_major < 3) || 
     2260                        ((pref_major == 3) && (pref_minor == 0) && (pref_patch < 8))) 
     2261                { 
     2262                         
     2263                        /* Message */ 
     2264                        mac_warning( 
     2265                                format("Ignoring %d.%d.%d.%d preferences.", 
     2266                                        pref_major, pref_minor, pref_patch, pref_extra)); 
     2267         
     2268                        /* Ignore */ 
     2269                        return; 
     2270                } 
     2271                else 
     2272                { 
     2273                        FSRef fsRef; 
     2274                        char prefpath[1024]; 
     2275                        CFStringRef bundleid = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey); 
     2276                        CFIndex bufferlength = CFStringGetMaximumSizeForEncoding(CFStringGetLength(bundleid), kCFStringEncodingASCII) + 1; 
     2277                        char bundlename[bufferlength]; 
     2278                         
     2279                        CFStringGetCString(bundleid, bundlename, bufferlength, kCFStringEncodingASCII); 
     2280                        FSFindFolder(kOnAppropriateDisk, kPreferencesFolderType, kDontCreateFolder, &fsRef); 
     2281                        FSRefMakePath(&fsRef, (UInt8 *)prefpath, 1024); 
     2282                        mac_warning(format("Preference file has changed.  If you have display problems, delete %s/%s.plist and restart.", prefpath, bundlename)); 
     2283                } 
    22672284        } 
    22682285 
     
    22902307        if (load_pref_short("arg.use_bigtile", &pref_tmp)) 
    22912308                use_bigtile = pref_tmp; 
     2309 
     2310        /* anti-aliasing */ 
     2311        if(load_pref_short("arg.use_antialiasing", &pref_tmp)) 
     2312                antialias = pref_tmp; 
    22922313 
    22932314        if(load_pref_short("graf_mode", &pref_tmp))