forked from disreali/SystemInfo
/
main.cpp
43 lines (33 loc) · 819 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* SystemInfoReplicant
*
* Copyright 2002 Brent Miszalski
* Copyright 2012 Disreali disreali[at]users[dot]sourceforge[dot]net
* All rights reserved. Distributed under the terms of the MIT License.
*
*/
#include "SIReplicant.h"
#include <Application.h>
#include <Window.h>
int main(int argc, char ** argv)
{
BApplication app("application/x-vnd.misza-SystemInfoReplicant");
BRect temp,r;
BPath path;
find_directory(B_USER_SETTINGS_DIRECTORY,&path);
path.Append("SystemInfoReplicant",true);
BFile file(path.Path(),B_READ_ONLY);
if(file.InitCheck() == B_OK)
{
BMessage msg;
msg.Unflatten(&file);
if(msg.FindRect("frame",&temp) == B_OK)
r = temp;
}
else
r = BRect(250,250,424,385);
BWindow* window = new SIReplicant(r);
window->Show();
app.Run();
return 0;
}