[PATCH libreoffice-4-0] fdo#64311 - don't encourage the fpicker to give us URLs we c...
Fridrich Strba (via Code Review)
gerrit at gerrit.libreoffice.org
Mon May 13 01:03:37 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3881
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/81/3881/1
fdo#64311 - don't encourage the fpicker to give us URLs we can't handle.
(cherry picked from commit 8659ca5c350b9b08fb5f343c68955cdd6d361c96)
Signed-off-by: Fridrich Štrba <fridrich.strba at bluewin.ch>
Conflicts:
config_host/config_vclplug.h.in
Change-Id: Ide7d833801e96a3375909238d036687082f34605
---
M configure.ac
M vcl/Library_vclplug_gtk.mk
M vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
M vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
4 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9a89227..17f792d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9266,6 +9266,7 @@
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
@@ -9405,6 +9406,7 @@
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/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk
index 153498c..86c1c6a 100644
--- a/vcl/Library_vclplug_gtk.mk
+++ b/vcl/Library_vclplug_gtk.mk
@@ -37,6 +37,18 @@
))
endif
+ifeq ($(ENABLE_GIO),TRUE)
+$(eval $(call gb_Library_add_defs,vclplug_gtk,\
+ -DENABLE_GIO \
+))
+endif
+
+ifeq ($(ENABLE_GNOMEVFS),TRUE)
+$(eval $(call gb_Library_add_defs,vclplug_gtk,\
+ -DENABLE_GNOME_VFS \
+))
+endif
+
$(eval $(call gb_Library_use_sdk_api,vclplug_gtk))
$(eval $(call gb_Library_use_libraries,vclplug_gtk,\
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index b4f1c6a..f2e1141 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -146,7 +146,9 @@
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 d062cda..b80d6f5 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -56,7 +56,9 @@
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 );
}
--
To view, visit https://gerrit.libreoffice.org/3881
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide7d833801e96a3375909238d036687082f34605
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Fridrich Strba <fridrich at documentfoundation.org>
Gerrit-Reviewer: Michael Meeks <michael.meeks at suse.com>
More information about the LibreOffice
mailing list