Handle command line args. It still opens an empty window though.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23943 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2008-02-10 22:29:42 +00:00
parent 75fe8391f9
commit 3ecd55ed65
2 changed files with 15 additions and 0 deletions

View File

@ -79,6 +79,20 @@ App::MessageReceived(BMessage *msg)
}
void
App::ArgvReceived(int32 argc, char** argv)
{
int i;
for (i = 1; i < argc; i++) {
BEntry entry(argv[i]);
entry_ref ref;
if (entry.GetRef(&ref) < B_OK)
continue;
ResWindow *win = new ResWindow(BRect(50,100,600,400),&ref);
win->Show();
}
}
void
App::RefsReceived(BMessage *msg)
{

View File

@ -24,6 +24,7 @@ public:
App(void);
~App(void);
void MessageReceived(BMessage *msg);
void ArgvReceived(int32 argc, char** argv);
void RefsReceived(BMessage *msg);
void ReadyToRun(void);
bool QuitRequested(void);