def set_regedit_keys(self): """Reset regedit keys according to config.""" prefix_manager = WinePrefixManager(self.prefix_path) # Those options are directly changed with the prefix manager and skip # any calls to regedit. managed_keys = { "ShowCrashDialog": prefix_manager.set_crash_dialogs, "Desktop": prefix_manager.set_virtual_desktop, "WineDesktop": prefix_manager.set_desktop_size, } for key, path in self.reg_keys.items(): value = self.runner_config.get(key) or "auto" if not value or value == "auto" and key not in managed_keys: prefix_manager.clear_registry_subkeys(path, key) elif key in self.runner_config: if key in managed_keys: # Do not pass fallback 'auto' value to managed keys if value == "auto": value = None managed_keys[key](value) continue # Convert numeric strings to integers so they are saved as dword if value.isdigit(): value = int(value) prefix_manager.set_registry_key(path, key, value) # We always configure the DPI, because if the user turns off DPI scaling, but it # had been on the only way to implement that is to save 96 DPI into the registry. prefix_manager.set_dpi(self.get_dpi())
def set_regedit_keys(self): """Reset regedit keys according to config.""" prefix_manager = WinePrefixManager(self.prefix_path) # Those options are directly changed with the prefix manager and skip # any calls to regedit. managed_keys = { "ShowCrashDialog": prefix_manager.set_crash_dialogs, "UseXVidMode": prefix_manager.use_xvid_mode, "Desktop": prefix_manager.set_virtual_desktop, "WineDesktop": prefix_manager.set_desktop_size, } for key, path in self.reg_keys.items(): value = self.runner_config.get(key) or "auto" if not value or value == "auto" and key not in managed_keys.keys(): prefix_manager.clear_registry_subkeys(path, key) elif key in self.runner_config: if key in managed_keys.keys(): # Do not pass fallback 'auto' value to managed keys if value == "auto": value = None managed_keys[key](value) continue # Convert numeric strings to integers so they are saved as dword if value.isdigit(): value = int(value) prefix_manager.set_registry_key(path, key, value)
def set_regedit_keys(self): """Reset regedit keys according to config.""" prefix_manager = WinePrefixManager(self.prefix_path) # Those options are directly changed with the prefix manager and skip # any calls to regedit. managed_keys = { "ShowCrashDialog": prefix_manager.set_crash_dialogs, "UseXVidMode": prefix_manager.use_xvid_mode, "Desktop": prefix_manager.set_virtual_desktop, "WineDesktop": prefix_manager.set_desktop_size, } for key, path in self.reg_keys.items(): value = self.runner_config.get(key) or "auto" if not value or value == "auto" and key not in managed_keys.keys(): prefix_manager.clear_registry_subkeys(path, key) elif key in self.runner_config: if key in managed_keys.keys(): # Do not pass fallback 'auto' value to managed keys if value == "auto": value = None managed_keys[key](value) continue # Convert numeric strings to integers so they are saved as dword if value.isdigit(): value = int(value) prefix_manager.set_registry_key(path, key, value)