summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-09-15 15:57:29 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-09-15 15:57:29 +0200
commitc549b7acbd65674019b731c6648a9e8eb22f70dd (patch)
tree7e6b8745573d2b8c1f9a61a7393b1e7c2b0d8f69 /src/Fl.cxx
parent000807cc1d1a1c2f00274763f3e8e24145f1af00 (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 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 1327509e8..0a4e22ee9 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1866,7 +1866,9 @@ bool Fl::option(Fl_Option opt)
options_[OPTION_SHOW_TOOLTIPS] = tmp;
opt_prefs.get("FNFCUsesGTK", tmp, 1); // default: on
options_[OPTION_FNFC_USES_GTK] = tmp;
-
+ opt_prefs.get("PrintUsesGTK", tmp, 1); // default: on
+ options_[OPTION_PRINTER_USES_GTK] = tmp;
+
opt_prefs.get("ShowZoomFactor", tmp, 1); // default: on
options_[OPTION_SHOW_SCALING] = tmp;
}
@@ -1888,7 +1890,9 @@ bool Fl::option(Fl_Option opt)
if (tmp >= 0) options_[OPTION_SHOW_TOOLTIPS] = tmp;
opt_prefs.get("FNFCUsesGTK", tmp, -1);
if (tmp >= 0) options_[OPTION_FNFC_USES_GTK] = tmp;
-
+ opt_prefs.get("PrintUsesGTK", tmp, -1);
+ if (tmp >= 0) options_[OPTION_PRINTER_USES_GTK] = tmp;
+
opt_prefs.get("ShowZoomFactor", tmp, -1);
if (tmp >= 0) options_[OPTION_SHOW_SCALING] = tmp;
}