diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-11 17:35:04 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-11 17:36:58 +0100 |
commit | 8659ca5c350b9b08fb5f343c68955cdd6d361c96 (patch) | |
tree | 9fc11bcda16fb01466c26b90752ff99f3dc1b4cf | |
parent | 363b82fdb4016bc42877fea2ebde9227b27579fe (diff) |
fdo#64311 - don't encourage the fpicker to give us URLs we can't handle.
Change-Id: Ide7d833801e96a3375909238d036687082f34605
-rw-r--r-- | config_host/config_vclplug.h.in | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in index 8eecf3453801..4daf38375766 100644 --- a/config_host/config_vclplug.h.in +++ b/config_host/config_vclplug.h.in @@ -11,5 +11,7 @@ Settings about which X11 desktops have support enabled. #define ENABLE_KDE 0 #define ENABLE_KDE4 0 #define ENABLE_TDE 0 +#define ENABLE_GNOME_VFS 0 +#define ENABLE_GIO 0 #endif diff --git a/configure.ac b/configure.ac index 10d064835133..aa65cda5df18 100644 --- a/configure.ac +++ b/configure.ac @@ -9346,6 +9346,7 @@ if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gnome_vfs" = "yes" - ENABLE_GNOMEVFS="TRUE" AC_MSG_RESULT([yes]) PKG_CHECK_MODULES( GNOMEVFS, gnome-vfs-2.0 >= 2.6.0 ) + AC_DEFINE(ENABLE_GNOME_VFS) else AC_MSG_RESULT([no]) fi @@ -9485,6 +9486,7 @@ if test "$test_gtk" = "yes"; then ENABLE_GIO="TRUE" AC_MSG_RESULT([yes]) PKG_CHECK_MODULES( GIO, gio-2.0 ) + AC_DEFINE(ENABLE_GIO) else AC_MSG_RESULT([no]) fi diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 5672b030b76e..b1b2d6087275 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -23,6 +23,8 @@ #undef _LINUX_SOURCE_COMPAT #endif +#include <config_vclplug.h> + #include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -138,7 +140,9 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT ); +#if defined(ENABLE_GNOME_VFS) || defined (ENABLE_GIO) gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); +#endif gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); m_pVBox = gtk_vbox_new( sal_False, 0 ); diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx index e08fdf78f2c4..7c8790628c28 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx @@ -23,6 +23,8 @@ #undef _LINUX_SOURCE_COMPAT #endif +#include <config_vclplug.h> + #include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/lang/XMultiComponentFactory.hpp> @@ -57,7 +59,9 @@ SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference< uno::XComponentCon GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, (char *)NULL ); gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT ); +#if defined(ENABLE_GNOME_VFS) || defined (ENABLE_GIO) gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); +#endif gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER( m_pDialog ), sal_False ); } |