mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 13:55:38 +08:00
Fix "link errors connected with recent Zenity dialog feature" (#602)
This commit is contained in:
+6
-4
@@ -212,12 +212,12 @@ if (FLTK_USE_X11 AND NOT OPTION_USE_WAYLAND)
|
|||||||
fl_dnd_x.cxx
|
fl_dnd_x.cxx
|
||||||
Fl_Native_File_Chooser_FLTK.cxx
|
Fl_Native_File_Chooser_FLTK.cxx
|
||||||
Fl_Native_File_Chooser_GTK.cxx
|
Fl_Native_File_Chooser_GTK.cxx
|
||||||
Fl_Native_File_Chooser_Zenity.cxx
|
|
||||||
Fl_get_key.cxx
|
Fl_get_key.cxx
|
||||||
)
|
)
|
||||||
|
|
||||||
if (OPTION_USE_KDIALOG)
|
if (OPTION_USE_KDIALOG)
|
||||||
set (DRIVER_FILES ${DRIVER_FILES} Fl_Native_File_Chooser_Kdialog.cxx)
|
set (DRIVER_FILES ${DRIVER_FILES} Fl_Native_File_Chooser_Kdialog.cxx
|
||||||
|
Fl_Native_File_Chooser_Zenity.cxx)
|
||||||
endif (OPTION_USE_KDIALOG)
|
endif (OPTION_USE_KDIALOG)
|
||||||
|
|
||||||
if (FLTK_USE_CAIRO)
|
if (FLTK_USE_CAIRO)
|
||||||
@@ -287,9 +287,11 @@ elseif (OPTION_USE_WAYLAND)
|
|||||||
drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
|
drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx
|
||||||
Fl_Native_File_Chooser_FLTK.cxx
|
Fl_Native_File_Chooser_FLTK.cxx
|
||||||
Fl_Native_File_Chooser_GTK.cxx
|
Fl_Native_File_Chooser_GTK.cxx
|
||||||
Fl_Native_File_Chooser_Kdialog.cxx
|
|
||||||
Fl_Native_File_Chooser_Zenity.cxx
|
|
||||||
)
|
)
|
||||||
|
if (OPTION_USE_KDIALOG)
|
||||||
|
set (DRIVER_FILES ${DRIVER_FILES} Fl_Native_File_Chooser_Kdialog.cxx
|
||||||
|
Fl_Native_File_Chooser_Zenity.cxx)
|
||||||
|
endif (OPTION_USE_KDIALOG)
|
||||||
if (FLTK_USE_X11)
|
if (FLTK_USE_X11)
|
||||||
list (APPEND DRIVER_FILES
|
list (APPEND DRIVER_FILES
|
||||||
drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx
|
drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.cxx
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <FL/Fl_Native_File_Chooser.H>
|
#include <FL/Fl_Native_File_Chooser.H>
|
||||||
#include "Fl_Native_File_Chooser_Zenity.H"
|
|
||||||
#if USE_KDIALOG
|
#if USE_KDIALOG
|
||||||
|
# include "Fl_Native_File_Chooser_Zenity.H"
|
||||||
# include "Fl_Native_File_Chooser_Kdialog.H"
|
# include "Fl_Native_File_Chooser_Kdialog.H"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -932,6 +932,7 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) {
|
|||||||
platform_fnfc = NULL;
|
platform_fnfc = NULL;
|
||||||
fl_open_display();
|
fl_open_display();
|
||||||
if (Fl::option(Fl::OPTION_FNFC_USES_GTK)) {
|
if (Fl::option(Fl::OPTION_FNFC_USES_GTK)) {
|
||||||
|
#if USE_KDIALOG
|
||||||
if (Fl::option(Fl::OPTION_FNFC_USES_ZENITY)&& val != BROWSE_MULTI_DIRECTORY) {
|
if (Fl::option(Fl::OPTION_FNFC_USES_ZENITY)&& val != BROWSE_MULTI_DIRECTORY) {
|
||||||
if (!Fl_Zenity_Native_File_Chooser_Driver::have_looked_for_zenity) {
|
if (!Fl_Zenity_Native_File_Chooser_Driver::have_looked_for_zenity) {
|
||||||
// First Time here, try to find zenity
|
// First Time here, try to find zenity
|
||||||
@@ -947,7 +948,6 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) {
|
|||||||
// if we found zenity, we will use the Fl_Zenity_Native_File_Chooser_Driver
|
// if we found zenity, we will use the Fl_Zenity_Native_File_Chooser_Driver
|
||||||
if (Fl_Zenity_Native_File_Chooser_Driver::did_find_zenity) platform_fnfc = new Fl_Zenity_Native_File_Chooser_Driver(val);
|
if (Fl_Zenity_Native_File_Chooser_Driver::did_find_zenity) platform_fnfc = new Fl_Zenity_Native_File_Chooser_Driver(val);
|
||||||
}
|
}
|
||||||
#if USE_KDIALOG
|
|
||||||
const char *desktop = getenv("XDG_CURRENT_DESKTOP");
|
const char *desktop = getenv("XDG_CURRENT_DESKTOP");
|
||||||
if (!platform_fnfc && desktop && strcmp(desktop, "KDE") == 0 && val != BROWSE_MULTI_DIRECTORY) {
|
if (!platform_fnfc && desktop && strcmp(desktop, "KDE") == 0 && val != BROWSE_MULTI_DIRECTORY) {
|
||||||
if (!Fl_Kdialog_Native_File_Chooser_Driver::have_looked_for_kdialog) {
|
if (!Fl_Kdialog_Native_File_Chooser_Driver::have_looked_for_kdialog) {
|
||||||
|
|||||||
Reference in New Issue
Block a user