diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-12-13 17:52:01 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-12-13 17:54:14 +0000 |
commit | b664d9290852f3f4f07ea86f9c2234df6e83b2cf (patch) | |
tree | bd5b61cf3c8eea3f5f67bd2bc0ded7fd81743cb1 /vcl/unx/gtk | |
parent | 55b9dc002a7ffbf5d3abdece74a09029e2da94a5 (diff) |
Disable gtk3 at run-time, unless in experimental mode.
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r-- | vcl/unx/gtk/gdi/salprn-gtk.cxx | 67 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 2 |
2 files changed, 2 insertions, 67 deletions
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index 3db1dfe4ebea..fb25aeca8e65 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -39,7 +39,6 @@ #include "vcl/help.hxx" #include "vcl/print.hxx" #include "vcl/svapp.hxx" -#include "vcl/unohelp.hxx" #include "vcl/window.hxx" #include <gtk/gtk.h> @@ -53,7 +52,6 @@ #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/io/XOutputStream.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <com/sun/star/sheet/XSpreadsheetView.hpp> @@ -181,72 +179,9 @@ lcl_getGtkSalInstance() } bool -lcl_enableExperimentalFeatures() -{ - bool bEnable = true; - try - { - // get service provider - uno::Reference<lang::XMultiServiceFactory> const xSMgr(vcl::unohelper::GetMultiServiceFactory()); - // create configuration hierachical access name - if (xSMgr.is()) - { - try - { - uno::Reference<lang::XMultiServiceFactory> const xConfigProvider( - uno::Reference<lang::XMultiServiceFactory>( - xSMgr->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider"))), - UNO_QUERY)) - ; - if (xConfigProvider.is()) - { - uno::Sequence<uno::Any> aArgs(1); - beans::PropertyValue aVal; - aVal.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); - aVal.Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/Misc")); - aArgs.getArray()[0] <<= aVal; - uno::Reference<container::XNameAccess> const xConfigAccess( - uno::Reference<container::XNameAccess>( - xConfigProvider->createInstanceWithArguments( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), - aArgs), - UNO_QUERY)) - ; - if (xConfigAccess.is()) - { - try - { - sal_Bool bValue = sal_False; - uno::Any const aAny(xConfigAccess->getByName(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExperimentalMode")))); - if (aAny >>= bValue) - bEnable = bValue; - } - catch (container::NoSuchElementException const&) - { - } - catch (lang::WrappedTargetException const&) - { - } - } - } - } - catch (uno::Exception const&) - { - } - } - } - catch (lang::WrappedTargetException const&) - { - } - - return bEnable; -} - -bool lcl_useSystemPrintDialog() { - return vcl::useSystemPrintDialog() && lcl_enableExperimentalFeatures() + return vcl::useSystemPrintDialog() && SalGenericSystem::enableExperimentalFeatures() && lcl_getGtkSalInstance().getPrintWrapper()->supportsPrinting(); } diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index 2e1c1068c890..0c195d339de6 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -3285,7 +3285,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame ) RevertToParent, CurrentTime ); } #else - (void)pWidget; + (void)pWidget; (void)bSetFocus; # warning FIXME no set input focus ... #endif |