Index: kicker/core/panel.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/panel.cpp,v retrieving revision 1.59 diff -U5 -r1.59 panel.cpp --- kicker/core/panel.cpp 2001/04/20 11:12:02 1.59 +++ kicker/core/panel.cpp 2001/05/10 10:00:22 @@ -102,11 +102,12 @@ // instantiate plugin manager and kwin module PGlobal::pluginmgr = new KickerPluginManager(); PGlobal::kwin_module = new KWinModule(this ); connect( PGlobal::kwin_module, SIGNAL( strutChanged() ), this, SLOT( strutChanged() ) ); - + connect( PGlobal::kwin_module, SIGNAL( currentDesktopChanged(int) ), + this, SLOT( currentDesktopChanged(int) ) ); // let PGlobal know we are there PGlobal::panel = this; // panel global tooltip group PGlobal::tooltipgroup = new QToolTipGroup( this ); @@ -178,10 +179,11 @@ config->reparseConfiguration(); emit configurationChanged(); config->setGroup("General"); _autoHide = config->readBoolEntry("AutoHidePanel", false); + _autoHideSwitch =3D config->readBoolEntry("AutoHideSwitch", false); _hideAnim = config->readBoolEntry("HideAnimation", true); _autoHideAnim = config->readBoolEntry("AutoHideAnimation", true); _autoHideDelay = config->readNumEntry("AutoHideDelay", 3); _hideAnimSpeed = config->readNumEntry("HideAnimationSpeed", 50); _autoHideAnimSpeed = config->readNumEntry("AutoHideAnimationSpeed", 5); @@ -259,10 +261,18 @@ // auto hide - Lotzi B. // ... or a user hide - Matthias E. if (!_autoHidden && !_userHidden ) { if ( initialGeometry( _pos ) != geometry() ) resetLayout(); + } +} + +void Panel::currentDesktopChanged(int) +{ + if (_autoHideSwitch) { + autoHide(false); + _autohideTimer->start(250, true); } } void Panel::resetLayout() { Index: kicker/core/panel.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/panel.h,v retrieving revision 1.18 diff -U5 -r1.18 panel.h --- kicker/core/panel.h 2001/04/20 10:17:31 1.18 +++ kicker/core/panel.h 2001/05/10 10:00:22 @@ -110,10 +110,11 @@ void autoHideTimeout(); void slotRestart(); void strutChanged(); void showScrollButtons(bool); void containerSizeHintChanged(); + void currentDesktopChanged(int); private: void animatedHide(bool left); @@ -122,10 +123,11 @@ bool _showLeftHB; bool _showRightHB; int _HBwidth; int _panelsize; bool _autoHide; + bool _autoHideSwitch; bool _autoHidden; bool _userHidden; bool _hideAnim, _autoHideAnim; int _autoHideDelay; int _hideAnimSpeed, _autoHideAnimSpeed; Index: kcontrol/kicker/generaltab.ui =================================================================== RCS file: /home/kde/kdebase/kcontrol/kicker/generaltab.ui,v retrieving revision 1.7 diff -U5 -r1.7 generaltab.ui --- kcontrol/kicker/generaltab.ui 2001/04/29 18:11:27 1.7 +++ kcontrol/kicker/generaltab.ui 2001/05/10 10:00:23 @@ -379,10 +379,21 @@ text Enable automatic hide + QCheckBox + + name + m_autoHideSwitch + + + text + Show panel when switching desktop + + + QLayoutWidget name Layout30 @@ -478,10 +489,16 @@ + + m_autoHide + toggled(bool) + m_autoHideSwitch + setEnabled(bool) + m_autoHide toggled(bool) m_delaySlider setEnabled(bool) @@ -520,9 +537,10 @@ m_bottomButton m_normal m_large m_autoHide + m_autoHideSwitch m_delaySlider m_delaySpinBox Index: kcontrol/kicker/generaltab_impl.cpp =================================================================== RCS file: /home/kde/kdebase/kcontrol/kicker/generaltab_impl.cpp,v retrieving revision 1.11 diff -U5 -r1.11 generaltab_impl.cpp --- kcontrol/kicker/generaltab_impl.cpp 2001/04/29 18:11:27 1.11 +++ kcontrol/kicker/generaltab_impl.cpp 2001/05/10 10:00:23 @@ -38,10 +38,11 @@ { // connections connect(m_locationGroup, SIGNAL(clicked(int)), SIGNAL(changed())); connect(m_sizeGroup, SIGNAL(clicked(int)), SIGNAL(changed())); connect(m_autoHide, SIGNAL(clicked()), SIGNAL(changed())); + connect(m_autoHideSwitch, SIGNAL(clicked()), SIGNAL(changed())); connect(m_delaySlider, SIGNAL(valueChanged(int)), SIGNAL(changed())); connect(m_delaySpinBox, SIGNAL(valueChanged(int)), SIGNAL(changed())); connect(m_percentSlider, SIGNAL(valueChanged(int)), SIGNAL(changed())); connect(m_percentSpinBox, SIGNAL(valueChanged(int)), SIGNAL(changed())); connect(m_expandCheckBox, SIGNAL(clicked()), SIGNAL(changed())); @@ -60,10 +61,14 @@ "after some time and reappear when you move the mouse to the " "screen edge the panel is attached to. " "This is particularly useful for small screen resolutions, " "for example, on laptops.") ); + QWhatsThis::add(m_autoHideSwitch, i18n("If this option is enabled, the panel will automatically show " + "itself for a brief period of time when the desktop is switched " + "so you can see what desktop you are on.") ); + QString delaystr = i18n("Here you can change the delay after which the panel will disappear" " if not used."); QWhatsThis::add(m_delaySlider, delaystr); QWhatsThis::add(m_delaySpinBox, delaystr); @@ -84,13 +89,15 @@ m_sizeGroup->setButton(c->readNumEntry("Size", 2)); m_locationGroup->setButton(c->readNumEntry("Position", 3)); bool ah = c->readBoolEntry("AutoHidePanel", false); + bool ahs = c->readBoolEntry("AutoHideSwitch", false); int delay = c->readNumEntry("AutoHideDelay", 3); m_autoHide->setChecked(ah); + m_autoHideSwitch->setChecked(ahs); m_delaySlider->setValue(delay); m_delaySpinBox->setValue(delay); m_delaySlider->setEnabled(ah); m_delaySpinBox->setEnabled(ah); @@ -115,10 +122,11 @@ c->setGroup("General"); c->writeEntry("Size", m_sizeGroup->id(m_sizeGroup->selected())); c->writeEntry("Position", m_locationGroup->id(m_locationGroup->selected())); c->writeEntry("AutoHidePanel", m_autoHide->isChecked()); + c->writeEntry("AutoHideSwitch", m_autoHideSwitch->isChecked()); c->writeEntry("AutoHideDelay", m_delaySlider->value()); c->writeEntry( "SizePercentage", m_percentSlider->value() ); c->writeEntry( "ExpandSize", m_expandCheckBox->isChecked() ); c->sync();