2 * Copyright (c) 2005-2010, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
6 * DarkWyrm <darkwyrm@gmail.com>
23 : BApplication("application/x-vnd.Haiku-ResEdit")
25 fOpenPanel
= new BFilePanel();
38 // CountWindows() needs to be used instead of fWindowCount because the registration
39 // message isn't processed in time. One of the windows belong to the BFilePanels and is
40 // counted in CountWindows().
41 if (CountWindows() < 2)
42 new ResWindow(BRect(50, 100, 600, 400));
47 App::MessageReceived(BMessage
*msg
)
50 case M_SHOW_OPEN_PANEL
: {
51 // Don't do anything if it's already open
52 if (fOpenPanel
->IsShowing())
58 BApplication::MessageReceived(msg
);
64 App::ArgvReceived(int32 argc
, char** argv
)
66 for (int32 i
= 1; i
< argc
; i
++) {
67 BEntry
entry(argv
[i
]);
69 if (entry
.GetRef(&ref
) < B_OK
)
71 new ResWindow(BRect(50, 100, 600, 400), &ref
);
77 App::RefsReceived(BMessage
*msg
)
81 while (msg
->FindRef("refs", i
++, &ref
) == B_OK
)
82 new ResWindow(BRect(50, 100, 600, 400), &ref
);