Apache OpenOffice (AOO) Bugzilla – Issue 22061
force detection of Gnome ...
Last modified: 2004-01-27 10:27:47 UTC
This tiny patch does the obvious, and allows users with whacked out systems: XFCE + no nautilus + no gnome session to force the gtk+/gnome integration bits to be used: --- vcl/unx/source/gdi/dtint.cxx 28 May 2003 12:33:47 -0000 1.16 +++ vcl/unx/source/gdi/dtint.cxx 3 Nov 2003 15:59:48 -0000 @@ -161,7 +161,9 @@ DtIntegrator* DtIntegrator::CreateDtInte // but there currently does not seem to be a better one nDtAtom = XInternAtom( pDisplay, "GNOME_SM_PROXY", True ); Atom nDtAtom2 = XInternAtom( pDisplay, "NAUTILUS_DESKTOP_WINDOW_ID", True ); - if( nDtAtom || nDtAtom2 ) + const char *pEnv = getenv ("OOO_GNOME_DESKTOP"); + bool bIsGnome = pEnv && atoi (pEnv); + if( nDtAtom || nDtAtom2 || bIsGnome ) { int nProperties = 0; Atom* pProperties = XListProperties( pDisplay, pSalDisplay->GetRootWindow(), &nProperties );
cp->pl: maybe you can skip the getenv() if (nDtAtom || nDtAtom2) is already set (though maybe it's overdose optimizing). Please take care of it.
Would it be OK if i instead ask for an environment variable OOO_FORCE_DESKTOP that could be set to "gnome" or "kde" ?
made it so in CWS vcl7pp1r3
Oh; sure - the problem being that it didn't look elegant / easy to construct the stock RTL strings to do this right. It's well worth using the RTL strings - since (AFAIR) strncasecmp is not that portable. Anyhow - I've extracted your patch for our set too.
? which platform does not have strncasecmp ?
No idea - I googled for this: > I've noticed that glib has a lot of wrappers/substitute functions for > things like strerror() and strcasecmp() which I use, and are very helpful > from a portability standpoint, since if glib compiled for them, I'm over > the portability hurdle on those functions. The functions have been in glib for a while - along with locale insensitive versions more recently. My man page specifies only BSD 4.4 for strncasecmp. HTH.
Hi Philipp, Can we add support for OOO_FORCE_DESKTOP=none too please? if( strncasecmp( pOverride, "none", 4 ) == 0 ) return new DtIntegrator( pFrame ); It is helpful for comparing/testing non-themed behaviour. Chris
Done. Also eliminated strncasecmp and replaced by OString method.
(OString("This is a string").equalsIgnoreAsciiCase("This is a string") == 0) == false! You need to remove the '==0' from each of the aOver.equalsIgnoreAsciiCase lines.. Or is this designed to fan the desktop flamewars? Choose KDE, you get Gnome. Choose Gnome, you get KDE :D
*blush* Sorry, it was a leftover from the strncasecmp version - and i didn't check after the change compiled as i should have. Thank you for noticing.
verified changes are in CWS vcl7pp1r3
merged in 645m25s1