From 3ecd55ed650a65572c5004ccc577090239596981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 10 Feb 2008 22:29:42 +0000 Subject: [PATCH] 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 --- src/apps/resedit/App.cpp | 14 ++++++++++++++ src/apps/resedit/App.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/apps/resedit/App.cpp b/src/apps/resedit/App.cpp index 13522e4887..3a9173cbe5 100644 --- a/src/apps/resedit/App.cpp +++ b/src/apps/resedit/App.cpp @@ -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) { diff --git a/src/apps/resedit/App.h b/src/apps/resedit/App.h index b5ddbc370c..52d5ead1cf 100644 --- a/src/apps/resedit/App.h +++ b/src/apps/resedit/App.h @@ -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);