[Libreoffice-commits] core.git: desktop/Library_sofficeapp.mk desktop/source vcl/unx
Michael Meeks
michael.meeks at suse.com
Sat May 11 09:56:15 PDT 2013
desktop/Library_sofficeapp.mk | 1
desktop/source/app/appinit.cxx | 43 +++++++++++++++++------------
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2 -
vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 2 -
4 files changed, 28 insertions(+), 20 deletions(-)
New commits:
commit fbc486a449808d1d9261f67ffaa4f0213e80787e
Author: Michael Meeks <michael.meeks at suse.com>
Date: Sat May 11 17:52:26 2013 +0100
fdo#64311 - fix pre-processor conditionals & don't bail-out without gnome-vfs.
Change-Id: Ia7a805c95625b52fc99face000587692de21461e
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 6396996..451c1d8 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_Library_use_sdk_api,sofficeapp))
$(eval $(call gb_Library_add_defs,sofficeapp,\
-DDESKTOP_DLLIMPLEMENTATION \
- $(if $(filter TRUE,$(ENABLE_GNOMEVFS)),-DGNOME_VFS_ENABLED) \
$(if $(filter WNT,$(OS)),-DENABLE_QUICKSTART_APPLET) \
$(if $(filter MACOSX,$(OS)),-DENABLE_QUICKSTART_APPLET) \
$(if $(filter TRUE,$(ENABLE_SYSTRAY_GTK)),-DENABLE_QUICKSTART_APPLET) \
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 05b3b30..de9299b 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -20,6 +20,8 @@
#include <algorithm>
+#include <config_vclplug.h>
+
#include "app.hxx"
#include "cmdlineargs.hxx"
#include "desktopresid.hxx"
@@ -73,25 +75,32 @@ static void configureUcb()
// createInstance w/o args directly to obtain an instance:
UniversalContentBroker::create(comphelper::getProcessComponentContext());
-#ifdef GNOME_VFS_ENABLED
- // Instantiate GNOME-VFS UCP in the thread that initialized GNOME in order
- // to avoid a deadlock that may occure in case the UCP gets initialized from
- // a different thread (which may happen when calling remotely via UNO); this
- // is not a fix, just a workaround:
- Reference< XCurrentContext > xCurrentContext(getCurrentContext());
- Any aValue(xCurrentContext->getValueByName("system.desktop-environment"));
- OUString aDesktopEnvironment;
- if ((aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME")
+#if ENABLE_GNOME_VFS
+ try {
+ // Instantiate GNOME-VFS UCP in the thread that initialized GNOME in order
+ // to avoid a deadlock that may occure in case the UCP gets initialized from
+ // a different thread (which may happen when calling remotely via UNO); this
+ // is not a fix, just a workaround:
+ Reference< XCurrentContext > xCurrentContext(getCurrentContext());
+ Any aValue(xCurrentContext->getValueByName("system.desktop-environment"));
+ OUString aDesktopEnvironment;
+ if ((aValue >>= aDesktopEnvironment) && aDesktopEnvironment == "GNOME")
+ {
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ UniversalContentBroker::create(xContext)
+ ->registerContentProvider(
+ Reference<XContentProvider>(
+ xContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.ucb.GnomeVFSContentProvider", xContext),
+ UNO_QUERY_THROW),
+ ".*", false);
+ }
+ }
+ catch ( const uno::Exception & )
{
- Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- UniversalContentBroker::create(xContext)
- ->registerContentProvider(
- Reference<XContentProvider>(
- xContext->getServiceManager()->createInstanceWithContext("com.sun.star.ucb.GnomeVFSContentProvider", xContext),
- UNO_QUERY_THROW),
- ".*", false);
+ SAL_WARN( "desktop", "missing gnome-vfs component to initialize thread workaround" );
}
-#endif // GNOME_VFS_ENABLED
+#endif // ENABLE_GNOME_VFS
}
void Desktop::InitApplicationServiceManager()
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index b1b2d60..102e16e 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -140,7 +140,7 @@ 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)
+#if ENABLE_GNOME_VFS || 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 );
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index 7c87906..f9adefc 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -59,7 +59,7 @@ 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)
+#if ENABLE_GNOME_VFS || 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 );
More information about the Libreoffice-commits
mailing list