Code clean up and SetSizeLimit added.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4056 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,19 +7,7 @@ Devices by Sikosis
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Includes -------------------------------------------------------------------------------------------------- //
|
// Includes -------------------------------------------------------------------------------------------------- //
|
||||||
#include <Alert.h>
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Button.h>
|
|
||||||
#include <Deskbar.h>
|
|
||||||
#include <Entry.h>
|
|
||||||
#include <File.h>
|
|
||||||
#include <FilePanel.h>
|
|
||||||
#include <ListView.h>
|
|
||||||
#include <Path.h>
|
|
||||||
#include <Screen.h>
|
|
||||||
#include <ScrollView.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
|
||||||
@@ -31,19 +19,11 @@ Devices by Sikosis
|
|||||||
|
|
||||||
DevicesWindow *ptrDevicesWindow;
|
DevicesWindow *ptrDevicesWindow;
|
||||||
|
|
||||||
|
|
||||||
// Devices -- constructor
|
// Devices -- constructor
|
||||||
Devices::Devices() : BApplication (APP_SIGNATURE)
|
Devices::Devices() : BApplication (APP_SIGNATURE)
|
||||||
{
|
{
|
||||||
// Default Window Size - even though we centre the form to the current screen size
|
BRect DevicesWindowRect(0,0,396,400);
|
||||||
//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);
|
|
||||||
|
|
||||||
ptrDevicesWindow = new DevicesWindow(DevicesWindowRect);
|
ptrDevicesWindow = new DevicesWindow(DevicesWindowRect);
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------------------------------- //
|
// ---------------------------------------------------------------------------------------------------------- //
|
||||||
@@ -61,6 +41,7 @@ void Devices::MessageReceived (BMessage *message)
|
|||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------------------------------- //
|
// ---------------------------------------------------------------------------------------------------------- //
|
||||||
|
|
||||||
|
|
||||||
// Devices Main
|
// Devices Main
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
@@ -70,4 +51,3 @@ int main(void)
|
|||||||
}
|
}
|
||||||
// end ------------------------------------------------------------------------------------------------------ //
|
// end ------------------------------------------------------------------------------------------------------ //
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -207,6 +207,9 @@ void DevicesWindow::InitWindow(void)
|
|||||||
ptrDevicesView->AddChild(outlinesv);
|
ptrDevicesView->AddChild(outlinesv);
|
||||||
ptrDevicesView->AddChild(btnConfigure);
|
ptrDevicesView->AddChild(btnConfigure);
|
||||||
ptrDevicesView->AddChild(BottomFrame);
|
ptrDevicesView->AddChild(BottomFrame);
|
||||||
|
|
||||||
|
// Set Window Limits
|
||||||
|
SetSizeLimits(396,396,400,400);
|
||||||
}
|
}
|
||||||
// ---------------------------------------------------------------------------------------------------------- //
|
// ---------------------------------------------------------------------------------------------------------- //
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user