diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-09-15 15:57:29 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-09-15 15:57:29 +0200 |
| commit | c549b7acbd65674019b731c6648a9e8eb22f70dd (patch) | |
| tree | 7e6b8745573d2b8c1f9a61a7393b1e7c2b0d8f69 /fluid/alignment_panel.fl | |
| parent | 000807cc1d1a1c2f00274763f3e8e24145f1af00 (diff) | |
X11 platform: use Gnome printer dialog when the GTK library is available at run-time
The code to determine whether the GTK library is available is now in Fl_X11_System_Driver::probe_for_GTK()
called both by Fl_Printer::begin_job() and Fl_Native_File_Chooser.
New Fl::option OPTION_PRINTER_USES_GTK allows to deactivate use of
the Gnome print dialog.
Minor change in Fl_Native_File_Chooser: GTK version 3 is searched before version 2,
whereas the search order was the opposite before.
Diffstat (limited to 'fluid/alignment_panel.fl')
| -rw-r--r-- | fluid/alignment_panel.fl | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index e2445970a..c3e1c049a 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -484,7 +484,8 @@ wVisibleFocus->value(opt[Fl::OPTION_VISIBLE_FOCUS][mode]); wArrowFocus->value(opt[Fl::OPTION_ARROW_FOCUS][mode]); wShowTooltips->value(opt[Fl::OPTION_SHOW_TOOLTIPS][mode]); wDNDText->value(opt[Fl::OPTION_DND_TEXT][mode]); -wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]);} {} +wGTKText->value(opt[Fl::OPTION_FNFC_USES_GTK][mode]); +wPrintGTKText->value(opt[Fl::OPTION_PRINTER_USES_GTK][mode]);} {} } Function {readPrefs()} { @@ -499,6 +500,7 @@ Function {readPrefs()} { opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][1], 2); opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1], 2); opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][1], 2); + opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][1], 2); } { Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk"); @@ -508,6 +510,7 @@ Function {readPrefs()} { opt_prefs.get("DNDText", opt[Fl::OPTION_DND_TEXT][0], 2); opt_prefs.get("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0], 2); opt_prefs.get("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK ][0], 2); + opt_prefs.get("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK ][0], 2); } refreshUI();} {} } @@ -529,6 +532,8 @@ Function {writePrefs()} { else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][1]); if (opt[Fl::OPTION_FNFC_USES_GTK][1]==2) opt_prefs.deleteEntry("FNFCUsesGTK"); else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][1]); + if (opt[Fl::OPTION_PRINTER_USES_GTK][1]==2) opt_prefs.deleteEntry("PrintUsesGTK"); + else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][1]); } { Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk"); @@ -543,6 +548,8 @@ Function {writePrefs()} { else opt_prefs.set("ShowTooltips", opt[Fl::OPTION_SHOW_TOOLTIPS][0]); if (opt[Fl::OPTION_FNFC_USES_GTK][0]==2) opt_prefs.deleteEntry("FNFCUsesGTK"); else opt_prefs.set("FNFCUsesGTK", opt[Fl::OPTION_FNFC_USES_GTK][0]); + if (opt[Fl::OPTION_PRINTER_USES_GTK][0]==2) opt_prefs.deleteEntry("PrintUsesGTK"); + else opt_prefs.set("PrintUsesGTK", opt[Fl::OPTION_PRINTER_USES_GTK][0]); }} {} } @@ -565,7 +572,7 @@ global_settings_window->show();} {} Function {make_global_settings_window()} {} { Fl_Window global_settings_window { label {FLTK Preferences} open - xywh {1147 190 400 378} type Double color 50 hide + xywh {715 96 400 455} type Double color 50 hide } { Fl_Group {} { label {Keyboard Focus Options} open @@ -719,9 +726,42 @@ Default is on.} xywh {245 300 100 25} down_box BORDER_BOX } } } + Fl_Group {} { + label {Print dialog Options} open + xywh {10 345 380 66} box GTK_DOWN_BOX labelfont 2 align 21 + } { + Fl_Choice wPrintGTKText { + label {Print dialog uses GTK:} + callback {int mode = wUserOrSystem->value(); +opt[Fl::OPTION_PRINTER_USES_GTK ][mode] = wPrintGTKText->value();} open + tooltip {OPTION_PRINTER_USES_GTK + +If 'Print dialog uses GTK' is enabled, the Fl_Printer class +calls the GTK print dialog when it's available on the platfom. If disabled, the Fl_Printer class +always uses FLTK's own print dialog even if GTK is available. + +Default is on.} xywh {245 366 100 25} down_box BORDER_BOX + } { + MenuItem {} { + label off + user_data 0 user_data_type long selected + xywh {30 30 31 20} + } + MenuItem {} { + label on + user_data 1 user_data_type long + xywh {30 30 31 20} divider + } + MenuItem {} { + label default + user_data 2 user_data_type long + xywh {30 30 31 20} + } + } + } Fl_Choice wUserOrSystem { callback {refreshUI();} open - tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 345 141 25} down_box BORDER_BOX + tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 420 141 25} down_box BORDER_BOX } { MenuItem {} { label {User Settings} @@ -737,13 +777,13 @@ Default is on.} xywh {245 300 100 25} down_box BORDER_BOX Fl_Button {} { label Cancel callback {global_settings_window->hide();} - xywh {230 345 75 25} + xywh {230 420 75 25} } Fl_Button {} { label OK callback {writePrefs(); global_settings_window->hide();} - xywh {315 345 75 25} + xywh {315 420 75 25} } } code {readPrefs(); |
