summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-07-21 23:15:34 +0200
committerThomas Arnhold <thomas@arnhold.org>2011-07-22 01:30:19 +0200
commit5ebe002488dd179180b4c6b1a78a89da4e13c0f2 (patch)
tree4b0856dd3788aa51c06eee6875ee59c5b70f9109 /vcl
parentcabc06e510214b3c11ded790b9e4eb63b986eef9 (diff)
Kill DtIntegrator
Do settings directly at UpdateSettings without DtIntegrator. This is like it's done with kde, windows, aqua,... See vcl/unx/kde/salnativewidgets-kde.cxx
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Library_vclplug_gen.mk1
-rw-r--r--vcl/inc/unx/dtint.hxx74
-rw-r--r--vcl/inc/unx/saldisp.hxx3
-rw-r--r--vcl/unx/generic/app/saldisp.cxx7
-rw-r--r--vcl/unx/generic/app/salinst.cxx1
-rw-r--r--vcl/unx/generic/app/salsys.cxx1
-rw-r--r--vcl/unx/generic/gdi/dtint.cxx121
-rw-r--r--vcl/unx/generic/window/salframe.cxx11
8 files changed, 3 insertions, 216 deletions
diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index 1a7dfc863ffa..8e1e8428cc00 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -111,7 +111,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
vcl/unx/generic/dtrans/X11_selection \
vcl/unx/generic/dtrans/X11_service \
vcl/unx/generic/dtrans/X11_transferable \
- vcl/unx/generic/gdi/dtint \
vcl/unx/generic/gdi/gcach_xpeer \
vcl/unx/generic/gdi/pspgraphics \
vcl/unx/generic/gdi/salbmp \
diff --git a/vcl/inc/unx/dtint.hxx b/vcl/inc/unx/dtint.hxx
deleted file mode 100644
index 010a0417d89b..000000000000
--- a/vcl/inc/unx/dtint.hxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SV_DTINT_HXX
-#define _SV_DTINT_HXX
-
-#include <tools/link.hxx>
-#include <tools/string.hxx>
-#include <tools/color.hxx>
-#include <vcl/font.hxx>
-#include "svunx.h"
-
-class SalBitmap;
-class SalDisplay;
-class AllSettings;
-
-enum DtType {
- DtGeneric,
- DtCDE
-};
-
-class DtIntegrator
-{
-protected:
- DtType meType;
- Display* mpDisplay;
- SalDisplay* mpSalDisplay;
- int mnSystemLookCommandProcess;
-
-
- DtIntegrator();
-
- static String aHomeDir;
-
-public:
- static DtIntegrator* CreateDtIntegrator();
-
- virtual ~DtIntegrator();
-
- // SystemLook
- virtual void GetSystemLook( AllSettings& rSettings );
-
- DtType GetDtType() { return meType; }
- SalDisplay* GetSalDisplay() { return mpSalDisplay; }
- Display* GetDisplay() { return mpDisplay; }
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 194e050df2b0..5f0bc8c11f5f 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -55,7 +55,6 @@ class SalFrame;
class ColorMask;
namespace vcl_sal { class WMAdaptor; }
-class DtIntegrator;
// -=-= #defines -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#define PROPERTY_SUPPORT_WM_SetPos 0x00000001
@@ -375,7 +374,6 @@ protected:
rtl::OString m_aKeyboardName;
vcl_sal::WMAdaptor* m_pWMAdaptor;
- DtIntegrator* m_pDtIntegrator;
bool m_bXinerama;
std::vector< Rectangle > m_aXineramaScreens;
@@ -497,7 +495,6 @@ public:
{ mpKbdExtension = pKbdExtension; }
const char* GetKeyboardName( bool bRefresh = false );
::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; }
- DtIntegrator* getDtIntegrator() const { return m_pDtIntegrator; }
bool IsXinerama() const { return m_bXinerama; }
const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; }
XLIB_Window GetRootWindow( int nScreen ) const
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 3b313a3ab86a..e0e00caaec67 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -92,7 +92,6 @@ Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*);
#include <unx/salobj.h>
#include <unx/sm.hxx>
#include <unx/wmadaptor.hxx>
-#include <unx/dtint.hxx>
#include <osl/socket.h>
#include <poll.h>
@@ -505,7 +504,6 @@ SalDisplay::SalDisplay( Display *display ) :
mpInputMethod( NULL ),
pDisp_( display ),
m_pWMAdaptor( NULL ),
- m_pDtIntegrator( NULL ),
m_bUseRandRWrapper( true ),
m_nLastUserEventTime( CurrentTime )
{
@@ -547,8 +545,6 @@ void SalDisplay::doDestruct()
delete m_pWMAdaptor;
m_pWMAdaptor = NULL;
- delete m_pDtIntegrator;
- m_pDtIntegrator = NULL;
X11SalBitmap::ImplDestroyCache();
X11SalGraphics::releaseGlyphPeer();
@@ -940,9 +936,6 @@ void SalDisplay::Init()
InitXinerama();
- // initialize system settings update
- m_pDtIntegrator = DtIntegrator::CreateDtIntegrator();
-
#ifdef DBG_UTIL
PrintInfo();
#endif
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 81bc26cb3672..83a9e07a92d4 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -41,7 +41,6 @@
#include "unx/saldisp.hxx"
#include "unx/salinst.h"
#include "unx/salframe.h"
-#include "unx/dtint.hxx"
#include "unx/salprn.h"
#include "unx/sm.hxx"
diff --git a/vcl/unx/generic/app/salsys.cxx b/vcl/unx/generic/app/salsys.cxx
index c5f7174e3d4c..ab69cda23a47 100644
--- a/vcl/unx/generic/app/salsys.cxx
+++ b/vcl/unx/generic/app/salsys.cxx
@@ -30,7 +30,6 @@
#include "precompiled_vcl.hxx"
#include <unx/salunx.h>
-#include <unx/dtint.hxx>
#include <unx/saldata.hxx>
#include <unx/salinst.h>
#include <unx/saldisp.hxx>
diff --git a/vcl/unx/generic/gdi/dtint.cxx b/vcl/unx/generic/gdi/dtint.cxx
deleted file mode 100644
index af0acb704df2..000000000000
--- a/vcl/unx/generic/gdi/dtint.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dlfcn.h>
-
-#include "osl/file.h"
-#include "osl/process.h"
-#include "osl/security.h"
-
-#include "vcl/svapp.hxx"
-
-#include "unx/salunx.h"
-#include <X11/Xatom.h>
-#include "unx/dtint.hxx"
-#include "unx/saldisp.hxx"
-#include "unx/saldata.hxx"
-#include "unx/wmadaptor.hxx"
-
-#include "dtsetenum.hxx"
-
-#include <set>
-#include <stdio.h>
-
-// NETBSD has no RTLD_GLOBAL
-#ifndef RTLD_GLOBAL
-#define DLOPEN_MODE (RTLD_LAZY)
-#else
-#define DLOPEN_MODE (RTLD_GLOBAL | RTLD_LAZY)
-#endif
-
-
-using namespace vcl_sal;
-
-using ::rtl::OUString;
-
-String DtIntegrator::aHomeDir;
-
-DtIntegrator::DtIntegrator() :
- meType( DtGeneric ),
- mnSystemLookCommandProcess( -1 )
-{
- mpSalDisplay = GetX11SalData()->GetDisplay();
- mpDisplay = mpSalDisplay->GetDisplay();
- OUString aDir;
- oslSecurity aCur = osl_getCurrentSecurity();
- if( aCur )
- {
- osl_getHomeDir( aCur, &aDir.pData );
- osl_freeSecurityHandle( aCur );
- OUString aSysDir;
- osl_getSystemPathFromFileURL( aDir.pData, &aSysDir.pData );
- aHomeDir = aSysDir;
- }
-}
-
-DtIntegrator::~DtIntegrator()
-{
-}
-
-DtIntegrator* DtIntegrator::CreateDtIntegrator()
-{
- /*
- * #i22061# override desktop detection
- * if environment variable OOO_FORCE_DESKTOP is set
- * to one of "cde" "kde" "gnome" then autodetection
- * is overridden.
- */
- static const char* pOverride = getenv( "OOO_FORCE_DESKTOP" );
- if( pOverride && *pOverride )
- {
- OString aOver( pOverride );
-
- if( aOver.equalsIgnoreAsciiCase( "none" ) )
- return new DtIntegrator();
- }
-
- // default: generic implementation
- return new DtIntegrator();
-}
-
-void DtIntegrator::GetSystemLook( AllSettings& rSettings )
-{
- // #i48001# set a default blink rate
- StyleSettings aStyleSettings = rSettings.GetStyleSettings();
- aStyleSettings.SetCursorBlinkTime( 500 );
- rSettings.SetStyleSettings( aStyleSettings );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index f925a6543259..fc16a90605ae 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -60,7 +60,6 @@
#include "unx/salgdi.h"
#include "unx/salframe.h"
#include "unx/soicon.hxx"
-#include "unx/dtint.hxx"
#include "unx/sm.hxx"
#include "unx/wmadaptor.hxx"
#include "unx/salprn.h"
@@ -2663,13 +2662,9 @@ inline Color getColorFromLong( long nColor )
void X11SalFrame::UpdateSettings( AllSettings& rSettings )
{
-
- DtIntegrator* pIntegrator = GetDisplay()->getDtIntegrator();
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "DtIntegrator: %d\n", pIntegrator ? pIntegrator->GetDtType() : -1 );
-#endif
- if( pIntegrator )
- pIntegrator->GetSystemLook( rSettings );
+ StyleSettings aStyleSettings = rSettings.GetStyleSettings();
+ aStyleSettings.SetCursorBlinkTime( 500 );
+ rSettings.SetStyleSettings( aStyleSettings );
}
void X11SalFrame::CaptureMouse( sal_Bool bCapture )