Port Logout Effect to KConfigXT

REVIEW: 107935
This commit is contained in:
Martin Gräßlin 2012-12-27 08:12:36 +01:00
parent 34f7127c80
commit a0e8987adb
4 changed files with 23 additions and 3 deletions

View file

@ -6,6 +6,8 @@ set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
logout/logout.cpp
)
kde4_add_kcfg_files(kwin4_effect_builtins_sources logout/logoutconfig.kcfgc)
# .desktop files
install( FILES
logout/logout.desktop

View file

@ -21,11 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#include "logout.h"
// KConfigSkeleton
#include "logoutconfig.h"
#include "kwinglutils.h"
#include <math.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <KDE/KStandardDirs>
@ -80,9 +81,9 @@ LogoutEffect::~LogoutEffect()
void LogoutEffect::reconfigure(ReconfigureFlags)
{
LogoutConfig::self()->readConfig();
frameDelay = 0;
KConfigGroup conf = effects->effectConfig("Logout");
useBlur = conf.readEntry("UseBlur", true);
useBlur = LogoutConfig::useBlur();
delete blurTexture;
blurTexture = NULL;
delete blurTarget;

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name="kwinrc"/>
<group name="Effect-Logout">
<entry name="UseBlur" type="Bool">
<default>true</default>
</entry>
</group>
</kcfg>

View file

@ -0,0 +1,5 @@
File=logout.kcfg
ClassName=LogoutConfig
NameSpace=KWin
Singleton=true
Mutators=true