fixed annoying print before page setup aborts print bug
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4105 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1036,22 +1036,20 @@ StyledEditWindow::RevertToSaved()
|
|||||||
status_t
|
status_t
|
||||||
StyledEditWindow::PageSetup(const char *documentname)
|
StyledEditWindow::PageSetup(const char *documentname)
|
||||||
{
|
{
|
||||||
status_t result= B_ERROR;
|
status_t result = B_OK;
|
||||||
|
|
||||||
BPrintJob printJob(documentname);
|
BPrintJob printJob(documentname);
|
||||||
|
|
||||||
if (fPrintSettings!= NULL)
|
if (fPrintSettings != NULL) {
|
||||||
printJob.SetSettings(fPrintSettings);
|
printJob.SetSettings(fPrintSettings);
|
||||||
//else
|
}
|
||||||
//; ///??
|
|
||||||
|
result = printJob.ConfigPage();
|
||||||
|
|
||||||
result= printJob.ConfigPage();
|
if (result == B_NO_ERROR) {
|
||||||
|
fPrintSettings = printJob.Settings();
|
||||||
if (result== B_NO_ERROR){
|
|
||||||
// delete fPrintSettings;
|
|
||||||
fPrintSettings= printJob.Settings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}/***StyledEditWindow::PageSetup()***/
|
}/***StyledEditWindow::PageSetup()***/
|
||||||
|
|
||||||
@@ -1059,17 +1057,16 @@ void
|
|||||||
StyledEditWindow::Print(const char *documentname)
|
StyledEditWindow::Print(const char *documentname)
|
||||||
{
|
{
|
||||||
status_t result = B_OK;
|
status_t result = B_OK;
|
||||||
BPrintJob printJob(documentname);
|
|
||||||
|
|
||||||
if (fPrintSettings == NULL) {
|
if (fPrintSettings == NULL) {
|
||||||
result = PageSetup(fTextView->Window()->Title());
|
result = PageSetup(documentname);
|
||||||
if (result != B_NO_ERROR) {
|
if (result != B_OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
printJob.SetSettings(fPrintSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
BPrintJob printJob(documentname);
|
||||||
|
printJob.SetSettings(fPrintSettings);
|
||||||
result = printJob.ConfigJob();
|
result = printJob.ConfigJob();
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user