Do the previous commit at buildtime instead of runtime.
CCMAIL: espen.hustad@gmail.com svn path=/trunk/KDE/kdebase/workspace/; revision=894258
This commit is contained in:
parent
d760d90eb6
commit
3f1f5b8686
2 changed files with 11 additions and 19 deletions
|
@ -70,8 +70,6 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
: KCModule( KWinCompositingConfigFactory::componentData(), parent )
|
||||
, mKWinConfig(KSharedConfig::openConfig( "kwinrc" ))
|
||||
, m_showConfirmDialog( false )
|
||||
, openglIndex( 0 )
|
||||
, xrenderIndex( 1 )
|
||||
{
|
||||
KGlobal::locale()->insertCatalog( "kwin_effects" );
|
||||
ui.setupUi(this);
|
||||
|
@ -80,23 +78,20 @@ KWinCompositingConfig::KWinCompositingConfig(QWidget *parent, const QVariantList
|
|||
ui.statusTitleWidget->hide();
|
||||
setupElectricBorders();
|
||||
|
||||
#define OPENGL_INDEX 0
|
||||
#define XRENDER_INDEX 1
|
||||
#ifndef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
ui.compositingType->removeItem(openglIndex);
|
||||
ui.glGroup->setEnabled(false);
|
||||
ui.compositingType->removeItem( OPENGL_INDEX );
|
||||
ui.glGroup->setEnabled( false );
|
||||
#define OPENGL_INDEX -1
|
||||
#define XRENDER_INDEX 0
|
||||
#endif
|
||||
#ifndef KWIN_HAVE_XRENDER_COMPOSITING
|
||||
ui.compositingType->removeItem(xrenderIndex);
|
||||
ui.xrenderGroup->setEnabled(false);
|
||||
ui.compositingType->removeItem( XRENDER_INDEX );
|
||||
ui.xrenderGroup->setEnabled( false );
|
||||
#define XRENDER_INDEX -1
|
||||
#endif
|
||||
|
||||
openglIndex = ui.glGroup->isEnabled() ? 0 : -1;
|
||||
if(ui.xrenderGroup->isEnabled() && ui.glGroup->isEnabled())
|
||||
xrenderIndex = 1;
|
||||
else if(ui.xrenderGroup->isEnabled() && !ui.glGroup->isEnabled())
|
||||
xrenderIndex = 0;
|
||||
else
|
||||
xrenderIndex = -1;
|
||||
|
||||
connect(ui.useCompositing, SIGNAL(toggled(bool)), this, SLOT(compositingEnabled(bool)));
|
||||
connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
|
||||
|
||||
|
@ -363,7 +358,7 @@ void KWinCompositingConfig::loadAdvancedTab()
|
|||
{
|
||||
KConfigGroup config(mKWinConfig, "Compositing");
|
||||
QString backend = config.readEntry("Backend", "OpenGL");
|
||||
ui.compositingType->setCurrentIndex((backend == "XRender") ? xrenderIndex : 0);
|
||||
ui.compositingType->setCurrentIndex((backend == "XRender") ? XRENDER_INDEX : 0);
|
||||
// 4 - off, 5 - shown, 6 - always, other are old values
|
||||
int hps = config.readEntry("HiddenPreviews", 5);
|
||||
if( hps == 6 ) // always
|
||||
|
@ -521,7 +516,7 @@ bool KWinCompositingConfig::saveAdvancedTab()
|
|||
|| config.readEntry("XRenderSmoothScale", false ) != ui.xrenderSmoothScale->isChecked() )
|
||||
advancedChanged = true;
|
||||
|
||||
config.writeEntry("Backend", (ui.compositingType->currentIndex() == openglIndex) ? "OpenGL" : "XRender");
|
||||
config.writeEntry("Backend", (ui.compositingType->currentIndex() == OPENGL_INDEX) ? "OpenGL" : "XRender");
|
||||
config.writeEntry("HiddenPreviews", hps[ ui.windowThumbnails->currentIndex() ] );
|
||||
config.writeEntry("DisableChecks", ui.disableChecks->isChecked());
|
||||
|
||||
|
|
|
@ -91,9 +91,6 @@ class KWinCompositingConfig : public KCModule
|
|||
KSharedConfigPtr mTmpConfig;
|
||||
bool m_showConfirmDialog;
|
||||
|
||||
int openglIndex;
|
||||
int xrenderIndex;
|
||||
|
||||
enum ElectricBorderEffects
|
||||
{
|
||||
NoEffect,
|
||||
|
|
Loading…
Reference in a new issue