From 57dd76be4d527265589593dac68da39c96cfdd31 Mon Sep 17 00:00:00 2001 From: Phil Greenway Date: Thu, 24 Jul 2003 14:09:11 +0000 Subject: [PATCH] Code clean up and SetSizeLimit added. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4056 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/prefs/devices/Devices.cpp | 26 +++----------------------- src/prefs/devices/DevicesWindow.cpp | 3 +++ 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/src/prefs/devices/Devices.cpp b/src/prefs/devices/Devices.cpp index e014613da7..a883282ce3 100644 --- a/src/prefs/devices/Devices.cpp +++ b/src/prefs/devices/Devices.cpp @@ -7,19 +7,7 @@ Devices by Sikosis */ // Includes -------------------------------------------------------------------------------------------------- // -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include @@ -31,19 +19,11 @@ Devices by Sikosis DevicesWindow *ptrDevicesWindow; + // Devices -- constructor Devices::Devices() : BApplication (APP_SIGNATURE) { - // Default Window Size - even though we centre the form to the current screen size - //BRect screenFrame = (BScreen(B_MAIN_SCREEN_ID).Frame()); - - float FormTopDefault = 0; - float FormLeftDefault = 0; - float FormWidthDefault = 396; - float FormHeightDefault = 400; - - BRect DevicesWindowRect(FormTopDefault,FormLeftDefault,FormLeftDefault+FormWidthDefault,FormTopDefault+FormHeightDefault); - + BRect DevicesWindowRect(0,0,396,400); ptrDevicesWindow = new DevicesWindow(DevicesWindowRect); } // ---------------------------------------------------------------------------------------------------------- // @@ -61,6 +41,7 @@ void Devices::MessageReceived (BMessage *message) } // ---------------------------------------------------------------------------------------------------------- // + // Devices Main int main(void) { @@ -70,4 +51,3 @@ int main(void) } // end ------------------------------------------------------------------------------------------------------ // - diff --git a/src/prefs/devices/DevicesWindow.cpp b/src/prefs/devices/DevicesWindow.cpp index 607257e0cb..9d37e36f04 100644 --- a/src/prefs/devices/DevicesWindow.cpp +++ b/src/prefs/devices/DevicesWindow.cpp @@ -207,6 +207,9 @@ void DevicesWindow::InitWindow(void) ptrDevicesView->AddChild(outlinesv); ptrDevicesView->AddChild(btnConfigure); ptrDevicesView->AddChild(BottomFrame); + + // Set Window Limits + SetSizeLimits(396,396,400,400); } // ---------------------------------------------------------------------------------------------------------- //