[haiku-commits] Re: r40101 - haiku/trunk/src/preferences/virtualmemory

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 04 Jan 2011 12:27:52 +0100

Hi,

Am 04.01.2011 03:13, schrieb leavengood@xxxxxxxxx:
@@ -216,15 +228,34 @@
                .SetInsets(10, 10, 10, 10)
        );

-       _Update();
-
        BScreen screen;
        BRect screenFrame = screen.Frame();
-
        if (!screenFrame.Contains(fSettings.WindowPosition()))
                CenterOnScreen();
        else
                MoveTo(fSettings.WindowPosition());
+
+#ifdef SWAP_VOLUME_IMPLEMENTED
+       // Validate the volume specified in settings file
+       status_t result = fSettings.SwapVolume().InitCheck();
+
+       if (result == B_NO_INIT) {
+               int32 choice = (new BAlert("VirtualMemory",   B_TRANSLATE(
+                       "The swap volume specified in the settings file is 
invalid.\n"

It's not so good to check for a specific error codes here, != B_OK would be much more robust.

Best regards,
-Stephan

Other related posts: