Am 01.01.2011 22:15, schrieb leavengood@xxxxxxxxx:
Modified: haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp =================================================================== --- haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp 2011-01-01 19:04:32 UTC (rev 40055) +++ haiku/trunk/src/preferences/virtualmemory/SettingsWindow.cpp 2011-01-01 21:15:07 UTC (rev 40056) @@ -365,6 +365,12 @@ } fSettings.SetSwapEnabled(value != 0); + if (value == 1&& fSettings.SwapSize() == 0) + { + off_t min, max; + _GetSwapFileLimits(min, max); + fSettings.SetSwapSize(min); + } _Update(); break; }
Hope it's ok, since this was applying a patch, I thought it could be a good idea to simply do a commit instead of pointing out the coding style violations via email which seems a bit much overhead sometimes. If that's not considered good style, please shout! :-)
Best regards, -Stephan