readBoolEntry->readEntry

svn path=/trunk/KDE/kdebase/workspace/; revision=493850
This commit is contained in:
Laurent Montel 2006-01-03 14:01:15 +00:00
parent 2e11325539
commit b0a95318bc
20 changed files with 92 additions and 92 deletions

View file

@ -115,8 +115,8 @@ static void read_config(B2ClientFactory *f)
KConfig conf("kwinb2rc");
conf.setGroup("General");
colored_frame = conf.readBoolEntry("UseTitleBarBorderColors", false);
do_draw_handle = conf.readBoolEntry("DrawGrabHandle", true);
colored_frame = conf.readEntry("UseTitleBarBorderColors", QVariant(false)).toBool();
do_draw_handle = conf.readEntry("DrawGrabHandle", QVariant(true)).toBool();
drawSmallBorders = !options()->moveResizeMaximizedWindows();
QString opString = conf.readEntry("MenuButtonDoubleClickOperation", "NoOp");

View file

@ -104,10 +104,10 @@ void B2Config::load(KConfig * /*conf*/)
{
b2Config->setGroup("General");
bool override = b2Config->readBoolEntry("UseTitleBarBorderColors", false);
bool override = b2Config->readEntry("UseTitleBarBorderColors", QVariant(false)).toBool();
cbColorBorder->setChecked(override);
override = b2Config->readBoolEntry( "DrawGrabHandle", true );
override = b2Config->readEntry( "DrawGrabHandle", QVariant(true )).toBool();
showGrabHandleCb->setChecked(override);
QString returnString = b2Config->readEntry(

View file

@ -91,14 +91,14 @@ void KDEDefaultConfig::slotSelectionChanged()
void KDEDefaultConfig::load( KConfig* conf )
{
conf->setGroup("KDEDefault");
bool override = conf->readBoolEntry( "ShowTitleBarStipple", true );
bool override = conf->readEntry( "ShowTitleBarStipple", QVariant(true )).toBool();
cbShowStipple->setChecked( override );
override = conf->readBoolEntry( "ShowGrabBar", true );
override = conf->readEntry( "ShowGrabBar", QVariant(true )).toBool();
cbShowGrabBar->setChecked( override );
if (highcolor) {
override = conf->readBoolEntry( "UseGradients", true );
override = conf->readEntry( "UseGradients", QVariant(true )).toBool();
cbUseGradients->setChecked( override );
}
}

View file

@ -196,9 +196,9 @@ unsigned long KDEDefaultHandler::readConfig( bool update )
KConfig* conf = KGlobal::config();
conf->setGroup("KDEDefault");
bool new_showGrabBar = conf->readBoolEntry("ShowGrabBar", true);
bool new_showTitleBarStipple = conf->readBoolEntry("ShowTitleBarStipple", true);
bool new_useGradients = conf->readBoolEntry("UseGradients", true);
bool new_showGrabBar = conf->readEntry("ShowGrabBar", QVariant(true)).toBool();
bool new_showTitleBarStipple = conf->readEntry("ShowTitleBarStipple", QVariant(true)).toBool();
bool new_useGradients = conf->readEntry("UseGradients", QVariant(true)).toBool();
int new_titleHeight = QFontMetrics(options()->font(true)).height();
int new_toolTitleHeight = QFontMetrics(options()->font(true, true)).height()-2;

View file

@ -77,10 +77,10 @@ KeramikConfig::~KeramikConfig()
void KeramikConfig::load( KConfig* )
{
c->setGroup("General");
ui->showAppIcons->setChecked( c->readBoolEntry("ShowAppIcons", true) );
ui->smallCaptions->setChecked( c->readBoolEntry("SmallCaptionBubbles", false) );
ui->largeGrabBars->setChecked( c->readBoolEntry("LargeGrabBars", true) );
ui->useShadowedText->setChecked( c->readBoolEntry("UseShadowedText", true) );
ui->showAppIcons->setChecked( c->readEntry("ShowAppIcons", QVariant(true)).toBool() );
ui->smallCaptions->setChecked( c->readEntry("SmallCaptionBubbles", QVariant(false)).toBool() );
ui->largeGrabBars->setChecked( c->readEntry("LargeGrabBars", QVariant(true)).toBool() );
ui->useShadowedText->setChecked( c->readEntry("UseShadowedText", QVariant(true)).toBool() );
}

View file

@ -559,10 +559,10 @@ void KeramikHandler::readConfig()
KConfig *c = new KConfig( "kwinkeramikrc" );
c->setGroup( "General" );
showIcons = c->readBoolEntry( "ShowAppIcons", true );
shadowedText = c->readBoolEntry( "UseShadowedText", true );
smallCaptionBubbles = c->readBoolEntry( "SmallCaptionBubbles", false );
largeGrabBars = c->readBoolEntry( "LargeGrabBars", true );
showIcons = c->readEntry( "ShowAppIcons", QVariant(true )).toBool();
shadowedText = c->readEntry( "UseShadowedText", QVariant(true )).toBool();
smallCaptionBubbles = c->readEntry( "SmallCaptionBubbles", QVariant(false )).toBool();
largeGrabBars = c->readEntry( "LargeGrabBars", QVariant(true )).toBool();
if ( ! settings_cache ) {
settings_cache = new SettingsCache;

View file

@ -146,9 +146,9 @@ static void create_pixmaps()
titleAlign = Qt::AlignCenter;
else
titleAlign = Qt::AlignLeft | Qt::AlignVCenter;
titleSunken = config->readBoolEntry("TitleFrameShaded", true);
titleSunken = config->readEntry("TitleFrameShaded", QVariant(true)).toBool();
// titleSunken = true; // is this fixed?
titleTransparent = config->readBoolEntry("PixmapUnderTitleText", true);
titleTransparent = config->readEntry("PixmapUnderTitleText", QVariant(true)).toBool();
tmpStr = config->readEntry("TitlebarLook");
if(tmpStr == "shadedVertical"){

View file

@ -103,7 +103,7 @@ void ModernSysConfig::slotSelectionChanged()
void ModernSysConfig::load(KConfig* /*conf*/)
{
clientrc->setGroup("General");
bool i = clientrc->readBoolEntry("ShowHandle", true );
bool i = clientrc->readEntry("ShowHandle", QVariant(true )).toBool();
cbShowHandle->setChecked(i);
hbox->setEnabled(i);
handleSizeSlider->setEnabled(i);

View file

@ -222,7 +222,7 @@ void ModernSysFactory::read_config()
KConfig c("kwinmodernsysrc");
c.setGroup("General");
showh = c.readBoolEntry("ShowHandle", true);
showh = c.readEntry("ShowHandle", QVariant(true)).toBool();
hwidth = c.readUnsignedNumEntry("HandleWidth", 6);
hsize = c.readUnsignedNumEntry("HandleSize", 30);

View file

@ -75,13 +75,13 @@ void PlastikConfig::load(KConfig*)
QString value = m_config->readEntry("TitleAlignment", "AlignLeft");
QRadioButton *button = (QRadioButton*)m_dialog->titleAlign->child(value.latin1());
if (button) button->setChecked(true);
bool animateButtons = m_config->readBoolEntry("AnimateButtons", true);
bool animateButtons = m_config->readEntry("AnimateButtons", QVariant(true)).toBool();
m_dialog->animateButtons->setChecked(animateButtons);
bool menuClose = m_config->readBoolEntry("CloseOnMenuDoubleClick", true);
bool menuClose = m_config->readEntry("CloseOnMenuDoubleClick", QVariant(true)).toBool();
m_dialog->menuClose->setChecked(menuClose);
bool titleShadow = m_config->readBoolEntry("TitleShadow", true);
bool titleShadow = m_config->readEntry("TitleShadow", QVariant(true)).toBool();
m_dialog->titleShadow->setChecked(titleShadow);
bool coloredBorder = m_config->readBoolEntry("ColoredBorder", true);
bool coloredBorder = m_config->readEntry("ColoredBorder", QVariant(true)).toBool();
m_dialog->coloredBorder->setChecked(coloredBorder);
}

View file

@ -167,7 +167,7 @@ void PlastikHandler::readConfig()
config.setGroup("General");
// grab settings
m_titleShadow = config.readBoolEntry("TitleShadow", true);
m_titleShadow = config.readEntry("TitleShadow", QVariant(true)).toBool();
QFontMetrics fm(m_titleFont); // active font = inactive font
int titleHeightMin = config.readNumEntry("MinTitleHeight", 16);
@ -190,9 +190,9 @@ void PlastikHandler::readConfig()
else if (value == "AlignHCenter") m_titleAlign = Qt::AlignHCenter;
else if (value == "AlignRight") m_titleAlign = Qt::AlignRight;
m_coloredBorder = config.readBoolEntry("ColoredBorder", true);
m_animateButtons = config.readBoolEntry("AnimateButtons", true);
m_menuClose = config.readBoolEntry("CloseOnMenuDoubleClick", true);
m_coloredBorder = config.readEntry("ColoredBorder", QVariant(true)).toBool();
m_animateButtons = config.readEntry("AnimateButtons", QVariant(true)).toBool();
m_menuClose = config.readEntry("CloseOnMenuDoubleClick", QVariant(true)).toBool();
}
QColor PlastikHandler::getColor(KWinPlastik::ColorType type, const bool active)

View file

@ -76,9 +76,9 @@ void QuartzConfig::slotSelectionChanged()
void QuartzConfig::load( KConfig* /*conf*/ )
{
quartzConfig->setGroup("General");
bool override = quartzConfig->readBoolEntry( "UseTitleBarBorderColors", true );
bool override = quartzConfig->readEntry( "UseTitleBarBorderColors", QVariant(true )).toBool();
cbColorBorder->setChecked( override );
override = quartzConfig->readBoolEntry( "UseQuartzExtraSlim", false );
override = quartzConfig->readEntry( "UseQuartzExtraSlim", QVariant(false )).toBool();
cbExtraSmall->setChecked( override );
}

View file

@ -206,8 +206,8 @@ void QuartzHandler::readConfig()
{
KConfig conf("kwinquartzrc");
conf.setGroup("General");
coloredFrame = conf.readBoolEntry( "UseTitleBarBorderColors", true );
extraSlim = conf.readBoolEntry( "UseQuartzExtraSlim", false );
coloredFrame = conf.readEntry( "UseTitleBarBorderColors", QVariant(true )).toBool();
extraSlim = conf.readEntry( "UseQuartzExtraSlim", QVariant(false )).toBool();
// A small hack to make the on all desktops button look nicer
onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().contains( 'S' );

View file

@ -187,7 +187,7 @@ WebClient::init()
KConfig c("kwinwebrc");
c.setGroup("General");
shape_ = c.readBoolEntry("Shape", true);
shape_ = c.readEntry("Shape", QVariant(true)).toBool();
KCommonDecoration::init();
}

View file

@ -428,8 +428,8 @@ void KWinDecorationModule::readConfig( KConfig* conf )
{
// General tab
// ============
cbShowToolTips->setChecked( conf->readBoolEntry("ShowToolTips", true ));
// cbUseMiniWindows->setChecked( conf->readBoolEntry("MiniWindowBorders", false));
cbShowToolTips->setChecked( conf->readEntry("ShowToolTips", QVariant(true )).toBool());
// cbUseMiniWindows->setChecked( conf->readEntry("MiniWindowBorders", QVariant(false)).toBool());
// Find the corresponding decoration name to that of
// the current plugin library name
@ -455,7 +455,7 @@ void KWinDecorationModule::readConfig( KConfig* conf )
// Buttons tab
// ============
bool customPositions = conf->readBoolEntry("CustomButtonPositions", false);
bool customPositions = conf->readEntry("CustomButtonPositions", QVariant(false)).toBool();
cbUseCustomButtonPositions->setChecked( customPositions );
buttonPositionWidget->setEnabled( customPositions );
// Menu and onAllDesktops buttons are default on LHS

View file

@ -413,13 +413,13 @@ void KFocusConfig::load( void )
key = config->readEntry(KWIN_ALTTABMODE, "KDE");
setAltTabMode(key == "KDE");
setRollOverDesktops( config->readBoolEntry(KWIN_ROLL_OVER_DESKTOPS, true ));
setRollOverDesktops( config->readEntry(KWIN_ROLL_OVER_DESKTOPS, QVariant(true )).toBool());
config->setGroup( "PopupInfo" );
setShowPopupinfo( config->readBoolEntry(KWIN_SHOW_POPUP, false ));
setShowPopupinfo( config->readEntry(KWIN_SHOW_POPUP, QVariant(false )).toBool());
config->setGroup( "TabBox" );
setTraverseAll( config->readBoolEntry(KWIN_TRAVERSE_ALL, false ));
setTraverseAll( config->readEntry(KWIN_TRAVERSE_ALL, QVariant(false )).toBool());
config->setGroup("Desktops");
emit KCModule::changed(false);
@ -667,8 +667,8 @@ void KAdvancedConfig::load( void )
{
config->setGroup( "Windows" );
setAnimateShade(config->readBoolEntry(KWIN_ANIMSHADE, true));
setShadeHover(config->readBoolEntry(KWIN_SHADEHOVER, false));
setAnimateShade(config->readEntry(KWIN_ANIMSHADE, QVariant(true)).toBool());
setShadeHover(config->readEntry(KWIN_SHADEHOVER, QVariant(false)).toBool());
setShadeHoverInterval(config->readNumEntry(KWIN_SHADEHOVER_INTERVAL, 250));
setElectricBorders(config->readNumEntry(KWM_ELECTRIC_BORDER, false));
@ -677,7 +677,7 @@ void KAdvancedConfig::load( void )
// setFocusStealing( config->readNumEntry(KWIN_FOCUS_STEALING, 2 ));
// TODO default to low for now
setFocusStealing( config->readNumEntry(KWIN_FOCUS_STEALING, 1 ));
setHideUtilityWindowsForInactive( config->readBoolEntry( KWIN_HIDE_UTILITY, true ));
setHideUtilityWindowsForInactive( config->readEntry( KWIN_HIDE_UTILITY, QVariant(true )).toBool());
emit KCModule::changed(false);
}
@ -1023,7 +1023,7 @@ void KMovingConfig::load( void )
setMove(OPAQUE);
//CT 17Jun1998 - variable animation speed from 0 (none!!) to 10 (max)
bool anim = config->readBoolEntry(KWIN_MINIMIZE_ANIM, true );
bool anim = config->readEntry(KWIN_MINIMIZE_ANIM, QVariant(true )).toBool();
int animSpeed = config->readNumEntry(KWIN_MINIMIZE_ANIM_SPEED, 5);
if( animSpeed < 1 ) animSpeed = 0;
if( animSpeed > 10 ) animSpeed = 10;
@ -1038,7 +1038,7 @@ void KMovingConfig::load( void )
setResizeOpaque(RESIZE_TRANSPARENT);
//KS 10Jan2003 - Geometry Tip during window move/resize
bool showGeomTip = config->readBoolEntry(KWIN_GEOMETRY, false);
bool showGeomTip = config->readEntry(KWIN_GEOMETRY, QVariant(false)).toBool();
setGeometryTip( showGeomTip );
// placement policy --- CT 19jan98 ---
@ -1076,7 +1076,7 @@ void KMovingConfig::load( void )
setPlacement(SMART_PLACEMENT);
// }
setMoveResizeMaximized(config->readBoolEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false));
setMoveResizeMaximized(config->readEntry(KWIN_MOVE_RESIZE_MAXIMIZED, QVariant(false)).toBool());
int v;
@ -1090,7 +1090,7 @@ void KMovingConfig::load( void )
else if (v < 0) setWindowSnapZone (0);
else setWindowSnapZone(v);
OverlapSnap->setChecked(config->readBoolEntry("SnapOnlyWhenOverlapping",false));
OverlapSnap->setChecked(config->readEntry("SnapOnlyWhenOverlapping", QVariant(false)).toBool());
emit KCModule::changed(false);
}
@ -1429,17 +1429,17 @@ void KTranslucencyConfig::load( void )
if (!kompmgrAvailable_)
return;
config->setGroup( "Notification Messages" );
useTranslucency->setChecked(config->readBoolEntry("UseTranslucency",false));
useTranslucency->setChecked(config->readEntry("UseTranslucency", QVariant(false)).toBool());
config->setGroup( "Translucency" );
activeWindowTransparency->setChecked(config->readBoolEntry("TranslucentActiveWindows",false));
inactiveWindowTransparency->setChecked(config->readBoolEntry("TranslucentInactiveWindows",true));
movingWindowTransparency->setChecked(config->readBoolEntry("TranslucentMovingWindows",false));
removeShadowsOnMove->setChecked(config->readBoolEntry("RemoveShadowsOnMove",false));
removeShadowsOnResize->setChecked(config->readBoolEntry("RemoveShadowsOnResize",false));
dockWindowTransparency->setChecked(config->readBoolEntry("TranslucentDocks",true));
keepAboveAsActive->setChecked(config->readBoolEntry("TreatKeepAboveAsActive",true));
onlyDecoTranslucent->setChecked(config->readBoolEntry("OnlyDecoTranslucent",false));
activeWindowTransparency->setChecked(config->readEntry("TranslucentActiveWindows", QVariant(false)).toBool());
inactiveWindowTransparency->setChecked(config->readEntry("TranslucentInactiveWindows", QVariant(true)).toBool());
movingWindowTransparency->setChecked(config->readEntry("TranslucentMovingWindows", QVariant(false)).toBool());
removeShadowsOnMove->setChecked(config->readEntry("RemoveShadowsOnMove", QVariant(false)).toBool());
removeShadowsOnResize->setChecked(config->readEntry("RemoveShadowsOnResize", QVariant(false)).toBool());
dockWindowTransparency->setChecked(config->readEntry("TranslucentDocks", QVariant(true)).toBool());
keepAboveAsActive->setChecked(config->readEntry("TreatKeepAboveAsActive", QVariant(true)).toBool());
onlyDecoTranslucent->setChecked(config->readEntry("OnlyDecoTranslucent", QVariant(false)).toBool());
activeWindowOpacity->setValue(config->readNumEntry("ActiveWindowOpacity",100));
inactiveWindowOpacity->setValue(config->readNumEntry("InactiveWindowOpacity",75));
@ -1459,7 +1459,7 @@ void KTranslucencyConfig::load( void )
KConfig conf_(QDir::homePath() + "/.xcompmgrrc");
conf_.setGroup("xcompmgr");
disableARGB->setChecked(conf_.readBoolEntry("DisableARGB",FALSE));
disableARGB->setChecked(conf_.readEntry("DisableARGB", QVariant(FALSE)).toBool());
useShadows->setChecked(conf_.readEntry("Compmode","CompClientShadows").compare("CompClientShadows") == 0);
shadowTopOffset->setValue(-1*(conf_.readNumEntry("ShadowOffsetY",-80)));
@ -1479,8 +1479,8 @@ void KTranslucencyConfig::load( void )
else
shadowColor->setColor(QColor(r,g,b));
fadeInWindows->setChecked(conf_.readBoolEntry("FadeWindows",TRUE));
fadeOnOpacityChange->setChecked(conf_.readBoolEntry("FadeTrans",FALSE));
fadeInWindows->setChecked(conf_.readEntry("FadeWindows", QVariant(TRUE)).toBool());
fadeOnOpacityChange->setChecked(conf_.readEntry("FadeTrans", QVariant(FALSE)).toBool());
fadeInSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeInStep",0.020)*1000.0));
fadeOutSpeed->setValue((int)(conf_.readDoubleNumEntry("FadeOutStep",0.070)*1000.0));

View file

@ -169,7 +169,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
QString old_title_buttons_left = title_buttons_left;
QString old_title_buttons_right = title_buttons_right;
bool old_custom_button_positions = custom_button_positions;
custom_button_positions = config->readBoolEntry("CustomButtonPositions", false);
custom_button_positions = config->readEntry("CustomButtonPositions", QVariant(false)).toBool();
if (custom_button_positions)
{
title_buttons_left = config->readEntry("ButtonsOnLeft", "MS");
@ -188,7 +188,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
// SettingTooltips
bool old_show_tooltips = show_tooltips;
show_tooltips = config->readBoolEntry("ShowToolTips", true);
show_tooltips = config->readEntry("ShowToolTips", QVariant(true)).toBool();
if( old_show_tooltips != show_tooltips )
changed |= SettingTooltips;
@ -206,7 +206,7 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
config->setGroup( "Windows" );
bool old_move_resize_maximized_windows = move_resize_maximized_windows;
move_resize_maximized_windows = config->readBoolEntry( "MoveResizeMaximizedWindows", false );
move_resize_maximized_windows = config->readEntry( "MoveResizeMaximizedWindows", QVariant(false )).toBool();
if( old_move_resize_maximized_windows != move_resize_maximized_windows )
changed |= SettingBorder;

View file

@ -54,7 +54,7 @@ unsigned long Options::updateSettings()
config->setGroup( "Windows" );
moveMode = stringToMoveResizeMode( config->readEntry("MoveMode", "Opaque" ));
resizeMode = stringToMoveResizeMode( config->readEntry("ResizeMode", "Opaque" ));
show_geometry_tip = config->readBoolEntry("GeometryTip", false);
show_geometry_tip = config->readEntry("GeometryTip", QVariant(false)).toBool();
QString val;
@ -72,7 +72,7 @@ unsigned long Options::updateSettings()
if ( val == "CDE" )
altTabStyle = CDE;
rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE);
rollOverDesktops = config->readEntry("RollOverDesktops", QVariant(TRUE)).toBool();
// focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 );
// TODO use low level for now
@ -84,14 +84,14 @@ unsigned long Options::updateSettings()
KConfig *gc = new KConfig("kdeglobals", false, false);
bool isVirtual = KApplication::desktop()->isVirtualDesktop();
gc->setGroup("Windows");
xineramaEnabled = gc->readBoolEntry ("XineramaEnabled", isVirtual ) &&
xineramaEnabled = gc->readEntry ("XineramaEnabled", QVariant(isVirtual )).toBool() &&
isVirtual;
if (xineramaEnabled)
{
xineramaPlacementEnabled = gc->readBoolEntry ("XineramaPlacementEnabled", true);
xineramaMovementEnabled = gc->readBoolEntry ("XineramaMovementEnabled", true);
xineramaMaximizeEnabled = gc->readBoolEntry ("XineramaMaximizeEnabled", true);
xineramaFullscreenEnabled = gc->readBoolEntry ("XineramaFullscreenEnabled", true);
xineramaPlacementEnabled = gc->readEntry ("XineramaPlacementEnabled", QVariant(true)).toBool();
xineramaMovementEnabled = gc->readEntry ("XineramaMovementEnabled", QVariant(true)).toBool();
xineramaMaximizeEnabled = gc->readEntry ("XineramaMaximizeEnabled", QVariant(true)).toBool();
xineramaFullscreenEnabled = gc->readEntry ("XineramaFullscreenEnabled", QVariant(true)).toBool();
}
else
{
@ -101,9 +101,9 @@ unsigned long Options::updateSettings()
placement = Placement::policyFromString( config->readEntry("Placement"), true );
animateShade = config->readBoolEntry("AnimateShade", TRUE );
animateShade = config->readEntry("AnimateShade", QVariant(TRUE )).toBool();
animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE );
animateMinimize = config->readEntry("AnimateMinimize", QVariant(TRUE )).toBool();
animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 );
if( focusPolicy == ClickToFocus )
@ -115,21 +115,21 @@ unsigned long Options::updateSettings()
}
else
{
autoRaise = config->readBoolEntry("AutoRaise", FALSE );
autoRaise = config->readEntry("AutoRaise", QVariant(FALSE )).toBool();
autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 );
delayFocus = config->readBoolEntry("DelayFocus", FALSE );
delayFocus = config->readEntry("DelayFocus", QVariant(FALSE )).toBool();
delayFocusInterval = config->readNumEntry("DelayFocusInterval", 0 );
}
shadeHover = config->readBoolEntry("ShadeHover", FALSE );
shadeHover = config->readEntry("ShadeHover", QVariant(FALSE )).toBool();
shadeHoverInterval = config->readNumEntry("ShadeHoverInterval", 250 );
// important: autoRaise implies ClickRaise
clickRaise = autoRaise || config->readBoolEntry("ClickRaise", TRUE );
clickRaise = autoRaise || config->readEntry("ClickRaise", QVariant(TRUE )).toBool();
borderSnapZone = config->readNumEntry("BorderSnapZone", 10);
windowSnapZone = config->readNumEntry("WindowSnapZone", 10);
snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",FALSE);
snapOnlyWhenOverlapping=config->readEntry("SnapOnlyWhenOverlapping", QVariant(FALSE)).toBool();
electric_borders = config->readNumEntry("ElectricBorders", 0);
electric_border_delay = config->readNumEntry("ElectricBorderDelay", 150);
@ -152,7 +152,7 @@ unsigned long Options::updateSettings()
(*it) = (*it).lower();
killPingTimeout = config->readNumEntry( "KillPingTimeout", 5000 );
hideUtilityWindowsForInactive = config->readBoolEntry( "HideUtilityWindowsForInactive", false );
hideUtilityWindowsForInactive = config->readEntry( "HideUtilityWindowsForInactive", QVariant(false )).toBool();
// Mouse bindings
config->setGroup( "MouseBindings");
@ -174,26 +174,26 @@ unsigned long Options::updateSettings()
//translucency settings
config->setGroup( "Notification Messages" );
useTranslucency = config->readBoolEntry("UseTranslucency", false);
useTranslucency = config->readEntry("UseTranslucency", QVariant(false)).toBool();
config->setGroup( "Translucency");
translucentActiveWindows = config->readBoolEntry("TranslucentActiveWindows", false);
translucentActiveWindows = config->readEntry("TranslucentActiveWindows", QVariant(false)).toBool();
activeWindowOpacity = uint((config->readNumEntry("ActiveWindowOpacity", 100)/100.0)*0xFFFFFFFF);
translucentInactiveWindows = config->readBoolEntry("TranslucentInactiveWindows", false);
translucentInactiveWindows = config->readEntry("TranslucentInactiveWindows", QVariant(false)).toBool();
inactiveWindowOpacity = uint((config->readNumEntry("InactiveWindowOpacity", 75)/100.0)*0xFFFFFFFF);
translucentMovingWindows = config->readBoolEntry("TranslucentMovingWindows", false);
translucentMovingWindows = config->readEntry("TranslucentMovingWindows", QVariant(false)).toBool();
movingWindowOpacity = uint((config->readNumEntry("MovingWindowOpacity", 50)/100.0)*0xFFFFFFFF);
translucentDocks = config->readBoolEntry("TranslucentDocks", false);
translucentDocks = config->readEntry("TranslucentDocks", QVariant(false)).toBool();
dockOpacity = uint((config->readNumEntry("DockOpacity", 80)/100.0)*0xFFFFFFFF);
keepAboveAsActive = config->readBoolEntry("TreatKeepAboveAsActive", true);
keepAboveAsActive = config->readEntry("TreatKeepAboveAsActive", QVariant(true)).toBool();
//TODO: remove this variable
useTitleMenuSlider = true;
activeWindowShadowSize = config->readNumEntry("ActiveWindowShadowSize", 200);
inactiveWindowShadowSize = config->readNumEntry("InactiveWindowShadowSize", 100);
dockShadowSize = config->readNumEntry("DockShadowSize", 80);
removeShadowsOnMove = config->readBoolEntry("RemoveShadowsOnMove", true);
removeShadowsOnResize = config->readBoolEntry("RemoveShadowsOnResize", true);
onlyDecoTranslucent = config->readBoolEntry("OnlyDecoTranslucent",false);
if (resetKompmgr = config->readBoolEntry("ResetKompmgr", false))
removeShadowsOnMove = config->readEntry("RemoveShadowsOnMove", QVariant(true)).toBool();
removeShadowsOnResize = config->readEntry("RemoveShadowsOnResize", QVariant(true)).toBool();
onlyDecoTranslucent = config->readEntry("OnlyDecoTranslucent", QVariant(false)).toBool();
if (resetKompmgr = config->readEntry("ResetKompmgr", QVariant(false)).toBool())
config->writeEntry("ResetKompmgr",FALSE);
@ -204,11 +204,11 @@ unsigned long Options::updateSettings()
// "EffectNoTooltip" setting from kdeglobals.
KConfig globalConfig("kdeglobals");
globalConfig.setGroup("KDE");
topmenus = globalConfig.readBoolEntry( "macStyle", false );
topmenus = globalConfig.readEntry( "macStyle", QVariant(false )).toBool();
KConfig kdesktopcfg( "kdesktoprc", true );
kdesktopcfg.setGroup( "Menubar" );
desktop_topmenu = kdesktopcfg.readBoolEntry( "ShowMenubar", false );
desktop_topmenu = kdesktopcfg.readEntry( "ShowMenubar", QVariant(false )).toBool();
if( desktop_topmenu )
topmenus = true;

View file

@ -121,7 +121,7 @@ void Rules::readFromCfg( KConfig& cfg )
{
description = cfg.readEntry( "description" );
READ_MATCH_STRING( wmclass, .lower().latin1() );
wmclasscomplete = cfg.readBoolEntry( "wmclasscomplete" );
wmclasscomplete = cfg.readEntry( "wmclasscomplete" , QVariant(false)).toBool();
READ_MATCH_STRING( windowrole, .lower().latin1() );
READ_MATCH_STRING( title, );
READ_MATCH_STRING( extrarole, .lower().latin1() );

View file

@ -2341,7 +2341,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
{
KConfig cfg( "kwin_dialogsrc" );
cfg.setGroup( "Notification Messages" ); // this depends on KMessageBox
if( !cfg.readBoolEntry( type, true )) // has don't show again checked
if( !cfg.readEntry( type, QVariant(true )).toBool()) // has don't show again checked
return; // save launching kdialog
proc << "--dontagain" << "kwin_dialogsrc:" + type;
}