diff --git a/include/wx/printdlg.h b/include/wx/printdlg.h index 4cf036b94f..dfe34ac267 100644 --- a/include/wx/printdlg.h +++ b/include/wx/printdlg.h @@ -23,10 +23,12 @@ class WXDLLEXPORT wxPrintDialogBase : public wxDialog { public: wxPrintDialogBase() { } - wxPrintDialogBase(wxWindow *parent, wxWindowID id = -1, const wxString &title = _("Print"), - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE ); + wxPrintDialogBase(wxWindow *parent, + wxWindowID id = wxID_ANY, + const wxString &title = wxEmptyString, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE); virtual int ShowModal() = 0; diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 590624296f..3ff2d387a9 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -277,9 +277,21 @@ wxPrintDialogData& wxPrinter::GetPrintDialogData() const IMPLEMENT_ABSTRACT_CLASS(wxPrintDialogBase, wxObject) -wxPrintDialogBase::wxPrintDialogBase(wxWindow *parent, wxWindowID id, - const wxString &title, const wxPoint &pos, const wxSize &size, long style ) : - wxDialog( parent, id, title, pos, size, style ) +wxPrintDialogBase::wxPrintDialogBase(wxWindow *parent, + wxWindowID id, + const wxString &title, + const wxPoint &pos, + const wxSize &size, + long style) + : wxDialog + ( + parent, + id, + title.empty() ? wxString(_("Print")) : title, + pos, + size, + style + ) { }