summaryrefslogtreecommitdiffstats
path: root/kcontrol/kicker
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/kicker')
-rw-r--r--kcontrol/kicker/extensionInfo.cpp75
-rw-r--r--kcontrol/kicker/extensionInfo.h1
-rw-r--r--kcontrol/kicker/hidingtab.ui14
-rw-r--r--kcontrol/kicker/hidingtab_impl.cpp8
4 files changed, 61 insertions, 37 deletions
diff --git a/kcontrol/kicker/extensionInfo.cpp b/kcontrol/kicker/extensionInfo.cpp
index 88745b9e2..91e19e2d3 100644
--- a/kcontrol/kicker/extensionInfo.cpp
+++ b/kcontrol/kicker/extensionInfo.cpp
@@ -124,21 +124,22 @@ void ExtensionInfo::load()
KConfig c(_configFile);
c.setGroup("General");
- _position = c.readNumEntry ("Position", _position);
- _alignment = c.readNumEntry ("Alignment", _alignment);
- _xineramaScreen = c.readNumEntry ("XineramaScreen", _xineramaScreen);
- _showLeftHB = c.readBoolEntry("ShowLeftHideButton", _showLeftHB);
- _showRightHB = c.readBoolEntry("ShowRightHideButton", _showRightHB);
- _hideButtonSize = c.readNumEntry ("HideButtonSize", _hideButtonSize);
- _autohidePanel = c.readBoolEntry("AutoHidePanel", _autohidePanel);
- _backgroundHide = c.readBoolEntry("BackgroundHide", _backgroundHide);
- _autoHideSwitch = c.readBoolEntry("AutoHideSwitch", _autoHideSwitch);
- _autoHideDelay = c.readNumEntry ("AutoHideDelay", _autoHideDelay);
- _hideAnim = c.readBoolEntry("HideAnimation", _hideAnim);
- _hideAnimSpeed = c.readNumEntry ("HideAnimationSpeed", _hideAnimSpeed);
- _unhideLocation = c.readNumEntry ("UnhideLocation", _unhideLocation);
- _sizePercentage = c.readNumEntry ("SizePercentage", _sizePercentage);
- _expandSize = c.readBoolEntry("ExpandSize", _expandSize);
+ _position = c.readNumEntry ("Position", _position);
+ _alignment = c.readNumEntry ("Alignment", _alignment);
+ _xineramaScreen = c.readNumEntry ("XineramaScreen", _xineramaScreen);
+ _showLeftHB = c.readBoolEntry("ShowLeftHideButton", _showLeftHB);
+ _showRightHB = c.readBoolEntry("ShowRightHideButton", _showRightHB);
+ _hideButtonSize = c.readNumEntry ("HideButtonSize", _hideButtonSize);
+ _autohidePanel = c.readBoolEntry("AutoHidePanel", _autohidePanel);
+ _backgroundHide = c.readBoolEntry("BackgroundHide", _backgroundHide);
+ _autoHideSwitch = c.readBoolEntry("AutoHideSwitch", _autoHideSwitch);
+ _xineramaHideSwitch = c.readBoolEntry("XineramaHideSwitch", _xineramaHideSwitch);
+ _autoHideDelay = c.readNumEntry ("AutoHideDelay", _autoHideDelay);
+ _hideAnim = c.readBoolEntry("HideAnimation", _hideAnim);
+ _hideAnimSpeed = c.readNumEntry ("HideAnimationSpeed", _hideAnimSpeed);
+ _unhideLocation = c.readNumEntry ("UnhideLocation", _unhideLocation);
+ _sizePercentage = c.readNumEntry ("SizePercentage", _sizePercentage);
+ _expandSize = c.readBoolEntry("ExpandSize", _expandSize);
if (_resizeable)
{
@@ -196,27 +197,28 @@ void ExtensionInfo::configChanged()
void ExtensionInfo::setDefaults()
{
// defaults
- _position = 3;
- _alignment = TQApplication::reverseLayout() ? 2 : 0;
- _xineramaScreen = TQApplication::desktop()->primaryScreen();
- _size = 2;
- _showLeftHB = false;
- _showRightHB = true;
- _hideButtonSize = 14;
- _autohidePanel = false;
- _backgroundHide = false;
- _autoHideSwitch = false;
- _autoHideDelay = 3;
- _hideAnim = true;
- _hideAnimSpeed = 40;
- _unhideLocation = 0;
- _sizePercentage = 100;
- _expandSize = true;
- _customSize = 0;
- _resizeable = false;
- _useStdSizes = false;
- _customSizeMin = 0;
- _customSizeMax = 0;
+ _position = 3;
+ _alignment = TQApplication::reverseLayout() ? 2 : 0;
+ _xineramaScreen = TQApplication::desktop()->primaryScreen();
+ _size = 2;
+ _showLeftHB = false;
+ _showRightHB = true;
+ _hideButtonSize = 14;
+ _autohidePanel = false;
+ _backgroundHide = false;
+ _autoHideSwitch = false;
+ _xineramaHideSwitch = true;
+ _autoHideDelay = 3;
+ _hideAnim = true;
+ _hideAnimSpeed = 40;
+ _unhideLocation = 0;
+ _sizePercentage = 100;
+ _expandSize = true;
+ _customSize = 0;
+ _resizeable = false;
+ _useStdSizes = false;
+ _customSizeMin = 0;
+ _customSizeMax = 0;
}
void ExtensionInfo::save()
@@ -232,6 +234,7 @@ void ExtensionInfo::save()
c.writeEntry("AutoHidePanel", _autohidePanel);
c.writeEntry("BackgroundHide", _backgroundHide);
c.writeEntry("AutoHideSwitch", _autoHideSwitch);
+ c.writeEntry("XineramaHideSwitch", _xineramaHideSwitch);
c.writeEntry("AutoHideDelay", _autoHideDelay);
c.writeEntry("HideAnimation", _hideAnim);
c.writeEntry("HideAnimationSpeed", _hideAnimSpeed);
diff --git a/kcontrol/kicker/extensionInfo.h b/kcontrol/kicker/extensionInfo.h
index 169322aa4..8c571011e 100644
--- a/kcontrol/kicker/extensionInfo.h
+++ b/kcontrol/kicker/extensionInfo.h
@@ -57,6 +57,7 @@ class ExtensionInfo
bool _autohidePanel;
bool _backgroundHide;
bool _autoHideSwitch;
+ bool _xineramaHideSwitch;
int _autoHideDelay;
bool _hideAnim;
int _hideAnimSpeed;
diff --git a/kcontrol/kicker/hidingtab.ui b/kcontrol/kicker/hidingtab.ui
index d6b85c046..11ec229b4 100644
--- a/kcontrol/kicker/hidingtab.ui
+++ b/kcontrol/kicker/hidingtab.ui
@@ -308,6 +308,20 @@
</spacer>
</hbox>
</widget>
+ <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>m_xineramaHide</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Hide panel when configured screen is not available</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>When this option is selected, this panel will be hidden if its Xinerama screen is not available. This panel will be automatically restored when the configured Xinerama screen is reenabked.</string>
+ </property>
+ </widget>
<widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_autoHideSwitch</cstring>
diff --git a/kcontrol/kicker/hidingtab_impl.cpp b/kcontrol/kicker/hidingtab_impl.cpp
index 4a5a36e67..3bde445b8 100644
--- a/kcontrol/kicker/hidingtab_impl.cpp
+++ b/kcontrol/kicker/hidingtab_impl.cpp
@@ -41,8 +41,9 @@ HidingTab::HidingTab(TQWidget *parent, const char* name)
connect(m_manual,TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()));
connect(m_automatic, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()));
connect(m_automatic, TQT_SIGNAL(toggled(bool)), TQT_SLOT(backgroundModeClicked()));
- connect(m_background,TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()));
+ connect(m_background, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()));
connect(m_background, TQT_SIGNAL(toggled(bool)), TQT_SLOT(backgroundModeClicked()));
+ connect(m_xineramaHide, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()));
connect(m_hideSlider, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(changed()));
connect(m_delaySpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(changed()));
connect(m_animateHiding, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(changed()));
@@ -141,6 +142,8 @@ void HidingTab::switchPanel(int panelItem)
m_manual->setChecked(true);
}
+ m_xineramaHide->setChecked(m_panelInfo->_xineramaHideSwitch);
+
m_delaySpinBox->setValue(m_panelInfo->_autoHideDelay);
m_autoHideSwitch->setChecked(m_panelInfo->_autoHideSwitch);
@@ -190,6 +193,8 @@ void HidingTab::storeInfo()
m_panelInfo->_autoHideDelay = m_delaySpinBox->value();
m_panelInfo->_autoHideSwitch = m_autoHideSwitch->isChecked();
+ m_panelInfo->_xineramaHideSwitch = m_xineramaHide->isChecked();
+
m_panelInfo->_unhideLocation = m_backgroundRaise->isChecked() ?
triggerComboToConfig(m_backgroundPos->currentItem()) : 0;
}
@@ -199,6 +204,7 @@ void HidingTab::defaults()
m_manual->setChecked( true );
m_delaySpinBox->setValue( 3 );
m_autoHideSwitch->setChecked( false );
+ m_xineramaHide->setChecked( true );
m_lHB->setChecked( false );
m_rHB->setChecked( true );
m_animateHiding->setChecked( true );