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:
parent
75fe8391f9
commit
3ecd55ed65
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user