From ecb5fcff336c8b0e5ad2503f0880c439a6c323a5 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Wed, 10 Jan 2018 17:50:43 +0100 Subject: Introduce gtk3_kde5 vcl plugin This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only the file and folder picker are replaced by KDE dialogs. This gives us a well-maintained GTK LO base with basic KDE integration with minimum effort. To prevent issues with nested event loops, the KDE dialogs are launched from a separate process, the new lo_kde5filepicker helper executable. A trivial stdin/stdout IPC mechanism transfers the data between LO and the Qt/KDE helper. The usage of an external process also allows us to copy'n'paste between LO and the KDE file dialog without freezing the UI, as would happen when one would do this in-process. This is in general also the architecture applied by the kmozillahelper, which is used to integrate KDE file dialogs into Firefox. While the KDE dialog is shown, the GTK3 main window is disabled and close requests are ignored. The KDE dialog in turn also sets the LO window as transient parent. Together, this makes the illusion perfect and the KDE dialog behaves like a modal dialog. This works properly also with multiple LO main windows, and only individual windows will get blocked as one would expect. Functionality wise, most of the features of the KDE4 dialog are supported. You can pick files and folders, and save files under a new name. Some custom checkbox widgets are supported, but lists, buttons and preview widgets are not yet implemented. Also, loading remote files via KIO is not possible yet. Change-Id: I1a97cf7c272307a19ace4222d5f12253bc722829 Reviewed-on: https://gerrit.libreoffice.org/47718 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- configure.ac | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ce9b28feba0f..80ec735478a6 100644 --- a/configure.ac +++ b/configure.ac @@ -595,6 +595,7 @@ linux-gnu*|k*bsd*-gnu*) test_kde4=yes test_kde5=yes test_qt5=yes + test_gtk3_kde5=yes if test "$enable_fuzzers" != yes; then test_freetype=yes test_fontconfig=yes @@ -691,6 +692,7 @@ freebsd*) test_kde4=yes test_kde5=yes test_qt5=yes + test_gtk3_kde5=yes test_freetype=yes AC_MSG_CHECKING([the FreeBSD operating system release]) if test -n "$with_os_version"; then @@ -721,6 +723,7 @@ freebsd*) test_kde4=yes test_kde5=yes test_qt5=yes + test_gtk3_kde5=yes test_freetype=yes PTHREAD_LIBS="-pthread -lpthread" _os=NetBSD @@ -748,6 +751,7 @@ dragonfly*) test_kde4=yes test_kde5=yes test_qt5=yes + test_gtk3_kde5=yes test_freetype=yes PTHREAD_LIBS="-pthread" _os=DragonFly @@ -773,6 +777,7 @@ linux-android*) test_kde4=no test_kde5=no test_qt5=no + test_gtk3_kde5=no test_randr=no test_xrender=no _os=Android @@ -1227,6 +1232,12 @@ AC_ARG_ENABLE(kde5, KF5 are available.]), ,) +AC_ARG_ENABLE(gtk3_kde5, + AS_HELP_STRING([--enable-gtk3-kde5], + [Determines whether to use Gtk3 vclplug with KDE file dialogs on + platforms where Gtk3, Qt5 and Plasma is available.]), +,) + libo_FUZZ_ARG_ENABLE(gui, AS_HELP_STRING([--disable-gui], [Disable use of X11 or Wayland to reduce dependencies. Not related to the --headless @@ -4542,6 +4553,7 @@ if test "$USING_X11" != TRUE; then test_kde4=no test_kde5=no test_qt5=no + test_gtk3_kde5=no enable_cairo_canvas=no fi @@ -9797,6 +9809,14 @@ if test "x$enable_kde5" = "xyes"; then fi AC_SUBST(ENABLE_KDE5) +ENABLE_GTK3_KDE5="" +if test "x$enable_gtk3_kde5" = "xyes"; then + ENABLE_GTK3_KDE5="TRUE" + AC_DEFINE(ENABLE_GTK3_KDE5) + R="$R gtk3_kde5" +fi +AC_SUBST(ENABLE_GTK3_KDE5) + build_vcl_plugins="$R" if test -z "$build_vcl_plugins"; then build_vcl_plugins="none" @@ -10804,7 +10824,8 @@ QT5_GLIB_CFLAGS="" QT5_GLIB_LIBS="" QT5_HAVE_GLIB="" if test \( "$test_kde5" = "yes" -a "$ENABLE_KDE5" = "TRUE" \) -o \ - \( "$test_qt5" = "yes" -a "$ENABLE_QT5" = "TRUE" \) + \( "$test_qt5" = "yes" -a "$ENABLE_QT5" = "TRUE" \) -o \ + \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \) then qt5_incdirs="$QT5INC /usr/include/qt5 /usr/include $x_includes" qt5_libdirs="$QT5LIB /usr/lib/qt5 /usr/lib $x_libraries" @@ -10892,7 +10913,8 @@ KF5_CFLAGS="" KF5_LIBS="" KF5_CONFIG="kf5-config" if test \( "$test_kde5" = "yes" -a "$ENABLE_KDE5" = "TRUE" \) -o \ - \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \) + \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \) -o \ + \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \) then kf5_incdirs="$KF5INC /usr/include/ $x_includes" kf5_libdirs="$KF5LIB /usr/lib /usr/lib/kf5 /usr/lib/kf5/devel $x_libraries" @@ -10942,8 +10964,8 @@ then PKG_CHECK_MODULES(KF5_XCB,[xcb],,[AC_MSG_ERROR([XCB not installed])]) - KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT $KF5_XCB_CFLAGS" - KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network -lQt5X11Extras $KF5_XCB_LIBS" + KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$kf5_incdir/KIOWidgets -I$kf5_incdir/KIOFileWidgets -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT $KF5_XCB_CFLAGS" + KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network -lQt5X11Extras $KF5_XCB_LIBS" KF5_CFLAGS=$(printf '%s' "$KF5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") AC_LANG_PUSH([C++]) @@ -12513,6 +12535,7 @@ AC_CONFIG_HEADERS([config_host/config_mpl.h]) AC_CONFIG_HEADERS([config_host/config_kde4.h]) AC_CONFIG_HEADERS([config_host/config_qt5.h]) AC_CONFIG_HEADERS([config_host/config_kde5.h]) +AC_CONFIG_HEADERS([config_host/config_gtk3_kde5.h]) AC_CONFIG_HEADERS([config_host/config_oox.h]) AC_CONFIG_HEADERS([config_host/config_options.h]) AC_CONFIG_HEADERS([config_host/config_options_calc.h]) -- cgit