VM Preflet: Center properly on screen
* On first run, dialog was at 0,0 * Rename window location/settings file from VM_data to virtualmemory_preferences
This commit is contained in:
parent
534268052d
commit
5dff42570e
@ -25,7 +25,7 @@
|
||||
#include <driver_settings.h>
|
||||
|
||||
|
||||
static const char* const kWindowSettingsFile = "VM_data";
|
||||
static const char* const kWindowSettingsFile = "virtualmemory_preferences";
|
||||
static const char* const kVirtualMemorySettings = "virtual_memory";
|
||||
static const off_t kMegaByte = 1024 * 1024;
|
||||
|
||||
|
@ -126,10 +126,10 @@ SettingsWindow::SettingsWindow()
|
||||
gBootDev = dev_for_path("/boot");
|
||||
BAlignment align(B_ALIGN_LEFT, B_ALIGN_MIDDLE);
|
||||
|
||||
if (fSettings.ReadWindowSettings() == B_OK)
|
||||
MoveTo(fSettings.WindowPosition());
|
||||
else
|
||||
if (fSettings.ReadWindowSettings() != B_OK)
|
||||
CenterOnScreen();
|
||||
else
|
||||
MoveTo(fSettings.WindowPosition());
|
||||
|
||||
status_t result = fSettings.ReadSwapSettings();
|
||||
if (result == kErrorSettingsNotFound)
|
||||
@ -243,8 +243,6 @@ SettingsWindow::SettingsWindow()
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user