Add a desktop window to put a shelf on later... ActivityMonitor replicant ? ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25073 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
8b2e7d3032
commit
e5f2d374df
@ -1,6 +1,7 @@
|
||||
#include <Alert.h>
|
||||
#include <Screen.h>
|
||||
#include <String.h>
|
||||
#include <View.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -19,6 +20,10 @@
|
||||
|
||||
const char *kLoginAppSig = "application/x-vnd.Haiku-Login";
|
||||
|
||||
const window_feel kPrivateDesktopWindowFeel = window_feel(1024);
|
||||
const window_look kPrivateDesktopWindowLook = window_look(4);
|
||||
// this is a mirror of an app server private values
|
||||
|
||||
|
||||
LoginApp::LoginApp()
|
||||
: BApplication(kLoginAppSig)
|
||||
@ -38,8 +43,23 @@ LoginApp::ReadyToRun()
|
||||
BRect frame(0, 0, 400, 150);
|
||||
frame.OffsetBySelf(s.Frame().Width()/2 - frame.Width()/2,
|
||||
s.Frame().Height()/2 - frame.Height()/2);
|
||||
LoginWindow *w = new LoginWindow(frame);
|
||||
w->Show();
|
||||
fLoginWindow = new LoginWindow(frame);
|
||||
fLoginWindow->Show();
|
||||
|
||||
BScreen screen;
|
||||
fDesktopWindow = new BWindow(screen.Frame(), "Desktop",
|
||||
kPrivateDesktopWindowLook,
|
||||
kPrivateDesktopWindowFeel,
|
||||
B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE
|
||||
| B_NOT_MINIMIZABLE | B_NOT_RESIZABLE
|
||||
| B_ASYNCHRONOUS_CONTROLS,
|
||||
B_ALL_WORKSPACES);
|
||||
BView *desktop = new BView(fDesktopWindow->Bounds(), "desktop",
|
||||
B_FOLLOW_NONE, 0);
|
||||
desktop->SetViewColor(screen.DesktopColor());
|
||||
fDesktopWindow->AddChild(desktop);
|
||||
fDesktopWindow->Show();
|
||||
// TODO: add a shelf with Activity Monitor replicant :)
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,6 +11,8 @@ const uint32 kSuspendAction = 'susp';
|
||||
const uint32 kLoginBad = 'lgba';
|
||||
const uint32 kLoginOk = 'lgok';
|
||||
|
||||
class LoginWindow;
|
||||
|
||||
class LoginApp : public BApplication {
|
||||
public:
|
||||
LoginApp();
|
||||
@ -23,7 +25,12 @@ private:
|
||||
status_t ValidateLogin(const char *login, const char *password/*, bool force = false*/);
|
||||
status_t StartUserSession(const char *login);
|
||||
int getpty(char *pty, char *tty);
|
||||
|
||||
BWindow* fDesktopWindow;
|
||||
LoginWindow* fLoginWindow;
|
||||
|
||||
//TODO:
|
||||
//BShelf* fDesktopShelf;
|
||||
};
|
||||
|
||||
#endif // _LOGINAPP_H_
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <ScrollView.h>
|
||||
#include <String.h>
|
||||
#include <Window.h>
|
||||
|
||||
#include <pwd.h>
|
||||
|
@ -34,7 +34,5 @@ private:
|
||||
BButton* fRebootButton;
|
||||
BButton* fLoginButton;
|
||||
BStringView* fInfoView;
|
||||
//TODO:
|
||||
//BShelf* fShelf;
|
||||
};
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
#include "LoginWindow.h"
|
||||
#include "LoginView.h"
|
||||
|
||||
#define WINDOW_FEEL B_NORMAL_WINDOW_FEEL
|
||||
//#define WINDOW_FEEL B_FLOATING_ALL_WINDOW_FEEL
|
||||
|
||||
LoginWindow::LoginWindow(BRect frame)
|
||||
: BWindow(frame, "Welcome to Haiku", B_TITLED_WINDOW_LOOK,
|
||||
B_NORMAL_WINDOW_FEEL/*B_FLOATING_ALL_WINDOW_FEEL*/,
|
||||
WINDOW_FEEL,
|
||||
B_NOT_MOVABLE | B_NOT_CLOSABLE | B_NOT_ZOOMABLE |
|
||||
B_NOT_MINIMIZABLE | B_NOT_RESIZABLE |
|
||||
B_ASYNCHRONOUS_CONTROLS)
|
||||
|
Loading…
Reference in New Issue
Block a user