* Made printing related windows close on pressing the

Escape key.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39736 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Pfeiffer 2010-12-05 12:34:09 +00:00
parent 1f1db8cf7e
commit 0e216008df
17 changed files with 25 additions and 17 deletions

View File

@ -54,7 +54,8 @@ SelectPrinterDialog::SelectPrinterDialog(GPData* data)
:
DialogWindow(BRect(100, 100, 500, 500),
"Select Printer", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS),
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
| B_CLOSE_ON_ESCAPE),
fData(data)
{
SetResult(B_ERROR);

View File

@ -54,7 +54,7 @@ static BMessage* BorderWidthMessage(uint32 what, float width)
AdvancedSettingsWindow::AdvancedSettingsWindow(BMessage *settings)
: HWindow(BRect(0, 0, 450, 180), "Advanced Settings", B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_MINIMIZABLE |
B_NOT_ZOOMABLE),
B_NOT_ZOOMABLE | B_CLOSE_ON_ESCAPE),
fSettings(settings)
{
AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));

View File

@ -51,7 +51,7 @@ THE SOFTWARE.
DocInfoWindow::DocInfoWindow(BMessage *docInfo)
: HWindow(BRect(0, 0, 400, 250), "Document Information", B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL, B_NOT_MINIMIZABLE),
B_MODAL_APP_WINDOW_FEEL, B_NOT_MINIMIZABLE | B_CLOSE_ON_ESCAPE),
fDocInfo(docInfo)
{
BRect bounds(Bounds());

View File

@ -108,7 +108,7 @@ DragListView::InitiateDrag(BPoint point, int32 index, bool wasSelected)
FontsWindow::FontsWindow(Fonts *fonts)
: HWindow(BRect(0,0,400,220), "Fonts", B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_MINIMIZABLE |
B_NOT_ZOOMABLE)
B_NOT_ZOOMABLE | B_CLOSE_ON_ESCAPE)
{
// ---- Ok, build a default page setup user interface
BRect r, r1;

View File

@ -57,7 +57,7 @@ JobSetupWindow::JobSetupWindow(BMessage *msg, const char * printerName)
B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_AUTO_UPDATE_SIZE_LIMITS)
| B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
{
fSetupMsg = msg;
fExitSem = create_sem(0, "JobSetup");

View File

@ -98,7 +98,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
: HWindow(BRect(0, 0, 200, 100), "Page setup", B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_AUTO_UPDATE_SIZE_LIMITS),
| B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE),
fResult(B_ERROR),
fSetupMsg(msg),
fAdvancedSettings(*msg),

View File

@ -50,7 +50,8 @@ public:
SelectPPDDlg::SelectPPDDlg(PSData* data)
: DialogWindow(BRect(10, 10, 400, 400),
"Select PPD", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS),
B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_ASYNCHRONOUS_CONTROLS
| B_CLOSE_ON_ESCAPE),
fPSData(data)
{
SetResult(B_ERROR);

View File

@ -30,7 +30,7 @@ JobSetupWindow::JobSetupWindow(BMessage *msg, const char * printerName)
: BlockingWindow(BRect(0, 0, 100, 100), "Job Setup",
B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_MINIMIZABLE |
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE),
fPrinterName(printerName),
fSetupMsg(msg)
{

View File

@ -97,7 +97,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
B_TITLED_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_AUTO_UPDATE_SIZE_LIMITS),
| B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE),
fSetupMsg(msg),
fPrinterDirName(printerName)
{

View File

@ -161,7 +161,8 @@ SetupView::CheckSetup()
SetupWindow::SetupWindow(BDirectory* printerDirectory)
: BWindow(BRect(100, 100, 100 + DLG_WIDTH, 100 + DLG_HEIGHT),
"HP JetDirect Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE)
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_CLOSE_ON_ESCAPE)
{
fResult = 0;

View File

@ -148,7 +148,8 @@ bool IppSetupView::UpdateViewData()
IppSetupDlg::IppSetupDlg(BDirectory *dir)
: BWindow(BRect(100, 100, 100 + DLG_WIDTH, 100 + DLG_HEIGHT),
"IPP Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE)
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_CLOSE_ON_ESCAPE)
{
result = 0;

View File

@ -164,7 +164,8 @@ LprSetupDlg::LprSetupDlg(BDirectory *dir)
:
DialogWindow(BRect(100, 100, 100 + DLG_WIDTH, 100 + DLG_HEIGHT),
"LPR Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE)
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_CLOSE_ON_ESCAPE)
{
fSetupView = new LprSetupView(Bounds(), dir);
AddChild(fSetupView);

View File

@ -37,7 +37,7 @@
FileSelector::FileSelector(void)
: BWindow(BRect(0,0,320,160), "printtofile", B_TITLED_WINDOW,
B_NOT_ZOOMABLE, B_CURRENT_WORKSPACE)
B_NOT_ZOOMABLE | B_CLOSE_ON_ESCAPE, B_CURRENT_WORKSPACE)
{
fExitSem = create_sem(0, "FileSelector");
fResult = B_ERROR;

View File

@ -75,7 +75,8 @@ public:
};
AboutBoxWindow::AboutBoxWindow(BRect frame, const char *driver_name, const char *version, const char *copyright)
: BWindow(frame, "", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE )
: BWindow(frame, "", B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_CLOSE_ON_ESCAPE)
{
char title[256];
sprintf(title, "About %s Driver", driver_name);

View File

@ -1022,7 +1022,8 @@ JobSetupDlg::JobSetupDlg(JobData* jobData, PrinterData* printerData,
DialogWindow(BRect(100, 100, 200, 200), "PrintJob Setup",
B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
| B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS
| B_CLOSE_ON_ESCAPE)
{
SetResult(B_ERROR);
AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));

View File

@ -350,7 +350,7 @@ PageSetupDlg::PageSetupDlg(JobData *job_data, PrinterData *printer_data, const P
: DialogWindow(BRect(100, 100, 160, 160),
"Page Setup", B_TITLED_WINDOW_LOOK, B_MODAL_APP_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE
| B_AUTO_UPDATE_SIZE_LIMITS)
| B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
{
AddShortcut('W',B_COMMAND_KEY,new BMessage(B_QUIT_REQUESTED));

View File

@ -128,7 +128,8 @@ ConfigWindow::ConfigWindow(config_setup_kind kind, Printer* defaultPrinter,
BWindow(ConfigWindow::GetWindowFrame(),
B_TRANSLATE("Page setup"),
B_TITLED_WINDOW,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS
| B_CLOSE_ON_ESCAPE),
fKind(kind),
fDefaultPrinter(defaultPrinter),
fSettings(settings),