* make defaultButtonsLeft and defaultButtonsRight non-pure-virtual so that client plugins that want to just go along with the kde defaults can do so and don't need to reimplement these methods; this is SC, but not BIC
* use defaulTitleButtons[Left|Right] instead of hardcoding those values svn path=/trunk/KDE/kdebase/workspace/; revision=737209
This commit is contained in:
parent
003a0ea7d0
commit
16e3e5581e
3 changed files with 18 additions and 8 deletions
|
@ -58,6 +58,16 @@ KCommonDecoration::~KCommonDecoration()
|
|||
delete m_previewWidget;
|
||||
}
|
||||
|
||||
QString KCommonDecoration::defaultButtonsLeft()
|
||||
{
|
||||
return KDecorationOptions::defaultTitleButtonsLeft();
|
||||
}
|
||||
|
||||
QString KCommonDecoration::defaultButtonsRight()
|
||||
{
|
||||
return KDecorationOptions::defaultTitleButtonsRight();
|
||||
}
|
||||
|
||||
bool KCommonDecoration::decorationBehaviour(DecorationBehaviour behaviour) const
|
||||
{
|
||||
switch (behaviour) {
|
||||
|
|
|
@ -138,13 +138,13 @@ class KWIN_EXPORT KCommonDecoration : public KDecoration
|
|||
* @see KDecoration::titleButtonsLeft()
|
||||
* @see KDecoration::titleButtonsRight()
|
||||
*/
|
||||
virtual QString defaultButtonsLeft() const = 0;
|
||||
virtual QString defaultButtonsLeft();
|
||||
/**
|
||||
* The default title button order on the left.
|
||||
* @see KDecoration::titleButtonsLeft()
|
||||
* @see KDecoration::titleButtonsRight()
|
||||
*/
|
||||
virtual QString defaultButtonsRight() const = 0;
|
||||
virtual QString defaultButtonsRight();
|
||||
|
||||
/**
|
||||
* This controls whether some specific behaviour should be enabled or not.
|
||||
|
|
|
@ -52,8 +52,8 @@ KDecorationOptionsPrivate::~KDecorationOptionsPrivate()
|
|||
|
||||
void KDecorationOptionsPrivate::defaultKWinSettings()
|
||||
{
|
||||
title_buttons_left = "MS";
|
||||
title_buttons_right = "HIAX";
|
||||
title_buttons_left = KDecorationOptions::defaultTitleButtonsLeft();
|
||||
title_buttons_right = KDecorationOptions::defaultTitleButtonsRight();
|
||||
custom_button_positions = false;
|
||||
show_tooltips = true;
|
||||
border_size = BorderNormal;
|
||||
|
@ -172,13 +172,13 @@ unsigned long KDecorationOptionsPrivate::updateKWinSettings( KConfig* config )
|
|||
custom_button_positions = styleConfig.readEntry("CustomButtonPositions", false);
|
||||
if (custom_button_positions)
|
||||
{
|
||||
title_buttons_left = styleConfig.readEntry("ButtonsOnLeft", "MS");
|
||||
title_buttons_right = styleConfig.readEntry("ButtonsOnRight", "HIAX");
|
||||
title_buttons_left = styleConfig.readEntry("ButtonsOnLeft", KDecorationOptions::defaultTitleButtonsLeft());
|
||||
title_buttons_right = styleConfig.readEntry("ButtonsOnRight", KDecorationOptions::defaultTitleButtonsRight());
|
||||
}
|
||||
else
|
||||
{
|
||||
title_buttons_left = "MS";
|
||||
title_buttons_right = "HIAX";
|
||||
title_buttons_left = KDecorationOptions::defaultTitleButtonsLeft();
|
||||
title_buttons_right = KDecorationOptions::defaultTitleButtonsRight();
|
||||
}
|
||||
if( old_custom_button_positions != custom_button_positions
|
||||
|| ( custom_button_positions &&
|
||||
|
|
Loading…
Reference in a new issue