diff --git a/FL/Fl_Printer.H b/FL/Fl_Printer.H index d9a51e3f8..66ae5e677 100644 --- a/FL/Fl_Printer.H +++ b/FL/Fl_Printer.H @@ -25,7 +25,7 @@ // http://www.fltk.org/str.php // /** \file Fl_Printer.H - \brief declaration of class Fl_Printer. + \brief declaration of classes Fl_Printer, Fl_System_Printer and Fl_PostScript_Printer. */ #ifndef Fl_Printer_H @@ -108,7 +108,7 @@ class Fl_PostScript_Printer : public Fl_PostScript_File_Device { friend class Fl_Printer; protected: /** \brief The constructor */ - Fl_PostScript_Printer(void) {}; + Fl_PostScript_Printer(void) {class_name(class_id);}; public: static const char *class_id; int start_job(int pages, int *firstpage = NULL, int *lastpage = NULL); diff --git a/src/Fl_Printer.cxx b/src/Fl_Printer.cxx index 3ed78a826..b4fb0d99d 100644 --- a/src/Fl_Printer.cxx +++ b/src/Fl_Printer.cxx @@ -77,10 +77,11 @@ const char *Fl_Printer::property_save = "Save"; const char *Fl_Printer::property_cancel = "Cancel"; const char *Fl_Printer::class_id = "Fl_Printer"; -#if defined(__APPLE__) || defined(WIN32) -const char *Fl_System_Printer::class_id = "Fl_Printer"; -#elif !defined(FL_DOXYGEN) -const char *Fl_PostScript_Printer::class_id = "Fl_Printer"; +#if defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN) +const char *Fl_System_Printer::class_id = Fl_Printer::class_id; +#endif +#if !( defined(__APPLE__) || defined(WIN32) ) +const char *Fl_PostScript_Printer::class_id = Fl_Printer::class_id; #endif #if defined(__APPLE__) || defined(WIN32) @@ -101,6 +102,7 @@ Fl_Printer::Fl_Printer(void) { #else printer = new Fl_PostScript_Printer(); #endif + class_name(class_id); } int Fl_Printer::start_job(int pagecount, int *frompage, int *topage)