2 * Copyright 2001-2010, Haiku.
3 * Distributed under the terms of the MIT License.
14 #include "pr_server.h"
16 #include "PrintersWindow.h"
28 PrintersApp::PrintersApp()
29 : Inherited(PRINTERS_SIGNATURE
)
35 PrintersApp::ReadyToRun()
37 PrintersWindow
* win
= new PrintersWindow(BRect(78, 71, 561, 409));
43 PrintersApp::MessageReceived(BMessage
* msg
)
45 if (msg
->what
== B_PRINTER_CHANGED
|| msg
->what
== PRINTERS_ADD_PRINTER
) {
47 uint32 what
= msg
->what
;
48 if (what
== PRINTERS_ADD_PRINTER
)
49 what
= kMsgAddPrinter
;
52 for (int32 i
= 0; (w
= WindowAt(i
)) != NULL
; i
++) {
53 BMessenger
msgr(NULL
, w
);
54 msgr
.SendMessage(what
);
57 BApplication::MessageReceived(msg
);
63 PrintersApp::ArgvReceived(int32 argc
, char** argv
)
65 for (int i
= 1; i
< argc
; i
++) {
66 // TODO: show a pre-filled add printer dialog here