+ def _fixDesktopPList(self):
+ """Removes the entry in the desktop plist file that specifies the wallpaper for each monitor"""
+ try:
+ import Foundation
+ desktopPList = Foundation.NSMutableDictionary.dictionaryWithContentsOfFile_(self._DesktopPlistLocation)
+ # Remove all but the 'default' entry
+ for k in desktopPList['Background'].keys():
+ if k == 'default':
+ continue
+ desktopPList['Background'].removeObjectForKey_(k)
+ # Store the plist again (Make sure we write it out atomically -- Don't want to break finder)
+ desktopPList.writeToFile_atomically_(self._DesktopPlistLocation, True)
+ except ImportError:
+ debug('Could not import the Foundation module, you may have problems with dual screens', DEBUG_LEVEL_MEDIUM)
+