* Use true/false instead of on/off in kwinrc, since this no longer

works. Update script for migrating old kwinrc included.

svn path=/trunk/KDE/kdebase/workspace/; revision=714020
This commit is contained in:
Luca Gugelmann 2007-09-18 14:44:41 +00:00
parent 89b9872eef
commit a9f43bbf30
4 changed files with 20 additions and 25 deletions

View file

@ -28,6 +28,6 @@ install(TARGETS kwin_update_default_rules DESTINATION ${LIB_INSTALL_DIR}/kconf_u
install( FILES fsp_workarounds_1.kwinrules DESTINATION ${DATA_INSTALL_DIR}/kwin/default_rules )
install( FILES pop.wav DESTINATION ${SOUND_INSTALL_DIR} )
install( FILES kwin.upd kwinsticky.upd kwiniconify.upd kwin3_plugin.upd kwin_focus1.upd kwinupdatewindowsettings.upd kwin_focus2.upd kwin_fsp_workarounds_1.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install(PROGRAMS pluginlibFix.pl kwin3_plugin.pl kwin_focus1.sh kwin_focus2.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install( FILES kwin.upd kwinsticky.upd kwiniconify.upd kwin3_plugin.upd kwin_focus1.upd kwinupdatewindowsettings.upd kwin_focus2.upd kwin_fsp_workarounds_1.upd kwin_on_off.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
install( PROGRAMS pluginlibFix.pl kwin3_plugin.pl kwin_focus1.sh kwin_focus2.sh on-off_to_true-false.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )

5
data/kwin_on_off.upd Normal file
View file

@ -0,0 +1,5 @@
Id=kwin_on_off
File=kwinrc
Group=Windows
Options=overwrite
Script=on-off_to_true-false.sh,sh

View file

@ -0,0 +1,5 @@
#!/bin/sh
while read line; do
echo "$line" | sed 's@=\s*on\s*$@=true@g' | sed 's@=\s*off\s*$@=false@g'
done

View file

@ -456,12 +456,9 @@ void KFocusConfig::load( void )
k = cg.readEntry(KWIN_DELAYFOCUS_INTERVAL,750);
setDelayFocusInterval(k);
key = cg.readEntry(KWIN_AUTORAISE);
setAutoRaise(key == "on");
key = cg.readEntry(KWIN_DELAYFOCUS);
setDelayFocus(key == "on");
key = cg.readEntry(KWIN_CLICKRAISE);
setClickRaise(key != "off");
setAutoRaise( cg.readEntry(KWIN_AUTORAISE, false));
setDelayFocus( cg.readEntry(KWIN_DELAYFOCUS, false));
setClickRaise( cg.readEntry(KWIN_CLICKRAISE, true));
setAutoRaiseEnabled(); // this will disable/hide the auto raise delay widget if focus==click
setDelayFocusEnabled();
@ -505,20 +502,11 @@ void KFocusConfig::save( void )
if (v <0) v = 0;
cg.writeEntry(KWIN_DELAYFOCUS_INTERVAL,v);
if (autoRaiseOn->isChecked())
cg.writeEntry(KWIN_AUTORAISE, "on");
else
cg.writeEntry(KWIN_AUTORAISE, "off");
cg.writeEntry(KWIN_AUTORAISE, autoRaiseOn->isChecked());
if (delayFocusOn->isChecked())
cg.writeEntry(KWIN_DELAYFOCUS, "on");
else
cg.writeEntry(KWIN_DELAYFOCUS, "off");
cg.writeEntry(KWIN_DELAYFOCUS, delayFocusOn->isChecked());
if (clickRaiseOn->isChecked())
cg.writeEntry(KWIN_CLICKRAISE, "on");
else
cg.writeEntry(KWIN_CLICKRAISE, "off");
cg.writeEntry(KWIN_CLICKRAISE, clickRaiseOn->isChecked());
cg.writeEntry(KWIN_SEPARATE_SCREEN_FOCUS, separateScreenFocus->isChecked());
cg.writeEntry(KWIN_ACTIVE_MOUSE_SCREEN, activeMouseScreen->isChecked());
@ -751,10 +739,7 @@ void KAdvancedConfig::save( void )
KConfigGroup cg(config, "Windows");
cg.writeEntry(KWIN_ANIMSHADE, animateShade->isChecked());
if (shadeHoverOn->isChecked())
cg.writeEntry(KWIN_SHADEHOVER, "on");
else
cg.writeEntry(KWIN_SHADEHOVER, "off");
cg.writeEntry(KWIN_SHADEHOVER, shadeHoverOn->isChecked());
v = getShadeHoverInterval();
if (v<0) v = 0;