diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-09-14 11:25:20 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-09-14 13:35:00 +0200 |
commit | a3aeca6c6c4f2efb964b590b8e5d838706229da9 (patch) | |
tree | a7680d2acf98993c3e54e42fa251609abc05e84c /vcl | |
parent | da82dc8f87b628c860e26d3e02eb2f92229a8bec (diff) |
vcl-better-fallback.diff: Try all when some of the plugins are not available
i#50857
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/source/plugadapt/salplug.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx index a438760cffba..67d2796c8674 100644 --- a/vcl/unx/source/plugadapt/salplug.cxx +++ b/vcl/unx/source/plugadapt/salplug.cxx @@ -233,9 +233,11 @@ SalInstance *CreateSalInstance() if( ! pInst ) pInst = autodetect_plugin(); - // fallback to gen - if( ! pInst ) - pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gen" ) ) ); + // fallback, try everything + const char* pPlugin[] = { "gtk", "kde", "gen", 0 }; + + for ( int i = 0; !pInst && pPlugin[ i ]; ++i ) + pInst = tryInstance( OUString::createFromAscii( pPlugin[ i ] ) ); if( ! pInst ) { |