Author: manolo
Date: 2010-03-29 05:15:22 -0700 (Mon, 29 Mar 2010)
New Revision: 7355
Log:
print_panel.cxx: allow customization of "Print To File" string
Modified:
branches/branch-1.3/FL/Fl_Printer.H
branches/branch-1.3/src/print_panel.cxx
Modified: branches/branch-1.3/FL/Fl_Printer.H
===================================================================
--- branches/branch-1.3/FL/Fl_Printer.H 2010-03-29 11:07:29 UTC (rev 7354)
+++ branches/branch-1.3/FL/Fl_Printer.H 2010-03-29 12:15:22 UTC (rev 7355)
@@ -52,6 +52,16 @@
</ul>
In both cases, begin by start_job(), start_page(), printable_rect() and
origin() calls
and finish by end_page() and end_job() calls.
+ <p>On Xlib-based platforms (<i>e.g.</i>, Linux, Unix), the static public
attributes of this class
+ can be used to set the print dialog to other languages than English. For
example, the "Printer:"
+ dialog item Fl_Printer::dialog_printer can be set to French with:
+ \code
+ Fl_Printer::dialog_printer = "Imprimante:";
+ Fl_Printer myprinter;
+ myprinter.start_job();
+ \endcode
+ Use Fl_PSfile_Device::file_chooser_title to customize the title of the file
chooser dialog that opens
+ when using the "Print To File" option of the print dialog.
*/
class Fl_Printer : public Fl_Abstract_Printer {
private:
@@ -123,6 +133,8 @@
/** [this text may be customized at run-time] */
static const char *dialog_cancel_button;
/** [this text may be customized at run-time] */
+ static const char *dialog_print_to_file;
+ /** [this text may be customized at run-time] */
static const char *property_title;
/** [this text may be customized at run-time] */
static const char *property_pagesize;
@@ -144,7 +156,7 @@
class Fl_Printer : public Fl_PSfile_Device {
public:
- static const char *dialog_title;
+ static const char *dialog_title; // all of this must be duplicated above for
correct documentation
static const char *dialog_printer;
static const char *dialog_range;
static const char *dialog_copies;
@@ -156,6 +168,7 @@
static const char *dialog_copyNo;
static const char *dialog_print_button;
static const char *dialog_cancel_button;
+ static const char *dialog_print_to_file;
static const char *property_title;
static const char *property_pagesize;
static const char *property_mode;
Modified: branches/branch-1.3/src/print_panel.cxx
===================================================================
--- branches/branch-1.3/src/print_panel.cxx 2010-03-29 11:07:29 UTC (rev
7354)
+++ branches/branch-1.3/src/print_panel.cxx 2010-03-29 12:15:22 UTC (rev
7355)
@@ -81,6 +81,7 @@
const char *Fl_Printer::dialog_copyNo = "# Copies:";
const char *Fl_Printer::dialog_print_button = "Print";
const char *Fl_Printer::dialog_cancel_button = "Cancel";
+const char *Fl_Printer::dialog_print_to_file = "Print To File";
const char *Fl_Printer::property_title = "Printer Properties";
const char *Fl_Printer::property_pagesize = "Page Size:";
const char *Fl_Printer::property_mode = "Output Mode:";
@@ -548,7 +549,7 @@
}
print_choice->clear();
- print_choice->add("Print To File", 0, 0, 0, FL_MENU_DIVIDER);
+ print_choice->add(Fl_Printer::dialog_print_to_file, 0, 0, 0,
FL_MENU_DIVIDER);
print_choice->value(0);
print_start = 0;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit