add a --nonmodal option.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29138 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2009-02-06 16:21:17 +00:00
parent 9af9826fca
commit 3813268c9c
2 changed files with 18 additions and 3 deletions

View File

@ -30,7 +30,8 @@ const char *kLoginAppSig = "application/x-vnd.Haiku-Login";
LoginApp::LoginApp()
: BApplication(kLoginAppSig),
fEditShelfMode(false)
fEditShelfMode(false),
fModalMode(true)
{
}
@ -107,9 +108,22 @@ LoginApp::ArgvReceived(int32 argc, char **argv)
{
int i;
for (i = 1; i < argc; i++) {
printf("[%d]: %s\n", i, argv[i]);
if (argv[i] == BString("--edit"))
BString arg(argv[i]);
//printf("[%d]: %s\n", i, argv[i]);
if (arg == "--edit")
fEditShelfMode = true;
else if (arg == "--nonmodal")
fModalMode = false;
else /*if (arg == "--help")*/ {
printf("Login application for Haiku\nUsage:\n");
printf("%s [--nonmodal] [--edit]\n", argv[0]);
printf("--nonmodal Do not make the window modal\n");
printf("--edit Launch in Shelf editting mode to "
"allow customizing the desktop.\n");
// just return to the shell
exit((arg == "--help") ? 0 : 1);
return;
}
}
}

View File

@ -35,6 +35,7 @@ private:
DesktopWindow* fDesktopWindow;
LoginWindow* fLoginWindow;
bool fEditShelfMode;
bool fModalMode;
};
#endif // _LOGINAPP_H_