--------------=_4D4801660840084AAB40
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Here are two patches for the kdebase package.
The first one kwin.patch is a patch that adds two key bindings which by =
default don't have any keys connected to them. The new bindings are "mov=
e=20
window to next desktop" which takes the current window to the next=20
desktop and then changes to this desktop. The second one is move to=20
previous desktop.
The second one kicker.patch is a patch that adds an option to the kicker=
=20
to popup an autohidden panel for a brief period when you switch desktop.=
=20
This is for people who are familiar with IceWM and like the kicker to=20
popup and display which desktop you are on.
I don't have write access to the CVS so I need help if this is to be=20
added.
/Henrik Johnson
GlobeCom AB
--------------=_4D4801660840084AAB40
Content-Description: filename="kwin.patch"
Content-Disposition: inline; filename="kwin.patch"
Content-Type: text/plain; name ="kwin.patch"
Content-Transfer-Encoding: quoted-printable
? kwin/plugins.loT
Index: kwin/kwinbindings.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kwin/kwinbindings.cpp,v
retrieving revision 1.14
diff -u -5 -r1.14 kwinbindings.cpp
--- kwin/kwinbindings.cpp 2001/04/02 16:17:06 1.14
+++ kwin/kwinbindings.cpp 2001/04/29 17:44:56
@@ -31,10 +31,12 @@
keys->insertItem(i18n("Window move"),"Window move", "");
keys->insertItem(i18n("Window resize"),"Window resize", "");
keys->insertItem(i18n("Window raise"),"Window raise", "");
keys->insertItem(i18n("Window lower"),"Window lower", "");
keys->insertItem(i18n("Window raise-or-lower"), "Toggle raise and lowe=
r", "");
+ keys->insertItem(i18n("Window to next desktop"),"Window to next deskto=
p", "");
+ keys->insertItem(i18n("Window to previous desktop"),"Window to previou=
s desktop", "");
=20
keys->insertItem(i18n("Walk through desktops"),"Walk through desktops"=
, "CTRL+Tab");
keys->insertItem(i18n("Walk back through desktops"),"Walk back through=
desktops", "SHIFT+CTRL+Tab");
keys->insertItem(i18n("Walk through windows"),"Walk through windows", =
"ALT+Tab");
keys->insertItem(i18n("Walk back through windows"),"Walk back through =
windows", "SHIFT+ALT+Tab");
Index: kwin/workspace.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kwin/workspace.cpp,v
retrieving revision 1.237
diff -u -5 -r1.237 workspace.cpp
--- kwin/workspace.cpp 2001/04/25 16:15:54 1.237
+++ kwin/workspace.cpp 2001/04/29 17:45:03
@@ -2386,10 +2386,12 @@
keys->connectItem( "Window move", this, SLOT( slotWindowMove() ) );=
keys->connectItem( "Window resize", this, SLOT( slotWindowResize() =
) );
keys->connectItem( "Window raise", this, SLOT( slotWindowRaise() ) =
);
keys->connectItem( "Window lower", this, SLOT( slotWindowLower() ) =
);
keys->connectItem( "Toggle raise and lower", this, SLOT( slotWindow=
RaiseOrLower() ) );
+ keys->connectItem( "Window to next desktop", this, SLOT( slotWindow=
NextDesktop() ) );
+ keys->connectItem( "Window to previous desktop", this, SLOT( slotWi=
ndowPreviousDesktop() ) );
=20
keys->connectItem( "Walk through desktops", this, SLOT( slotWalkThr=
oughDesktops()));
keys->connectItem( "Walk back through desktops", this, SLOT( slotWa=
lkBackThroughDesktops()));
keys->connectItem( "Walk through windows",this, SLOT( slotWalkThrou=
ghWindows()));
keys->connectItem( "Walk back through windows",this, SLOT( slotWalk=
BackThroughWindows()));
@@ -2566,10 +2568,33 @@
{
if ( popup_client )
raiseOrLowerClient( popup_client );
}
=20
+/*!
+ Move window to next desktop
+ */
+void Workspace::slotWindowNextDesktop(){
+ int d =3D currentDesktop() + 1;
+ if ( d > numberOfDesktops() )
+ d =3D 1;
+ if (popup_client)
+ sendClientToDesktop(popup_client,d);
+ setCurrentDesktop(d);
+}
+
+/*!
+ Move window to previous desktop
+ */
+void Workspace::slotWindowPreviousDesktop(){
+ int d =3D currentDesktop() - 1;
+ if ( d <=3D 0 )
+ d =3D numberOfDesktops();
+ if (popup_client)
+ sendClientToDesktop(popup_client,d);
+ setCurrentDesktop(d);
+}
=20
/*!
Invokes keyboard mouse emulation
*/
void Workspace::slotMouseEmulation()
Index: kwin/workspace.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kwin/workspace.h,v
retrieving revision 1.80
diff -u -5 -r1.80 workspace.h
--- kwin/workspace.h 2001/04/22 06:51:07 1.80
+++ kwin/workspace.h 2001/04/29 17:45:05
@@ -247,10 +247,13 @@
void slotWindowOperations();
void slotWindowClose();
void slotWindowMove();
void slotWindowResize();
=20
+ void slotWindowNextDesktop();
+ void slotWindowPreviousDesktop();
+
void slotMouseEmulation();
=20
void slotResetAllClientsDelayed();
void slotResetAllClients();
=20
--------------=_4D4801660840084AAB40
Content-Description: filename="kicker.patch"
Content-Disposition: inline; filename="kicker.patch"
Content-Type: text/plain; name ="kicker.patch"
Content-Transfer-Encoding: quoted-printable
? kicker/core/container_button.loT
Index: kicker/core/panel.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kicker/core/panel.cpp,v
retrieving revision 1.59
diff -u -5 -r1.59 panel.cpp
--- kicker/core/panel.cpp 2001/04/20 11:12:02 1.59
+++ kicker/core/panel.cpp 2001/04/29 17:41:41
@@ -102,10 +102,11 @@
=20
// instantiate plugin manager and kwin module
PGlobal::pluginmgr =3D new KickerPluginManager();
PGlobal::kwin_module =3D new KWinModule(this );
connect( PGlobal::kwin_module, SIGNAL( strutChanged() ), this, SLOT=
( strutChanged() ) );
+ connect( PGlobal::kwin_module, SIGNAL( currentDesktopChanged(int) )=
, this, SLOT( currentDesktopChanged(int) ) );
=20
// let PGlobal know we are there
PGlobal::panel =3D this;
=20
// panel global tooltip group
@@ -178,10 +179,11 @@
config->reparseConfiguration();
emit configurationChanged();
config->setGroup("General");
=20
_autoHide =3D config->readBoolEntry("AutoHidePanel", false);
+ _autoHideSwitch =3D config->readBoolEntry("AutoHideSwitch", false);=
_hideAnim =3D config->readBoolEntry("HideAnimation", true);
_autoHideAnim =3D config->readBoolEntry("AutoHideAnimation", true);=
_autoHideDelay =3D config->readNumEntry("AutoHideDelay", 3);
_hideAnimSpeed =3D config->readNumEntry("HideAnimationSpeed", 50);
_autoHideAnimSpeed =3D config->readNumEntry("AutoHideAnimationSpeed=
", 5);
@@ -259,10 +261,18 @@
// auto hide - Lotzi B.
// ... or a user hide - Matthias E.
if (!_autoHidden && !_userHidden ) {
if ( initialGeometry( _pos ) !=3D geometry() )
resetLayout();
+ }
+}
+
+void Panel::currentDesktopChanged(int)
+{
+ if (_autoHideSwitch) {
+ autoHide(false);
+ _autohideTimer->start(250, true);
}
}
=20
void Panel::resetLayout()
{
Index: kicker/core/panel.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kicker/core/panel.h,v
retrieving revision 1.18
diff -u -5 -r1.18 panel.h
--- kicker/core/panel.h 2001/04/20 10:17:31 1.18
+++ kicker/core/panel.h 2001/04/29 17:41:41
@@ -110,10 +110,11 @@
void autoHideTimeout();
void slotRestart();
void strutChanged();
void showScrollButtons(bool);
void containerSizeHintChanged();
+ void currentDesktopChanged(int);
=20
private:
=20
void animatedHide(bool left);
=20
@@ -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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kcontrol/kicker/generaltab.ui,v
retrieving revision 1.6
diff -u -5 -r1.6 generaltab.ui
--- kcontrol/kicker/generaltab.ui 2001/04/20 11:14:16 1.6
+++ kcontrol/kicker/generaltab.ui 2001/04/29 17:41:44
@@ -378,10 +378,21 @@
text
Enable automatic hide
+
+ QCheckBox
+
+ name
+ m_autoHideSwitch
+
+
+ text
+ Show panel when switching desktop
+
+
QLayoutWidget
name
Layout30
@@ -531,10 +542,16 @@
m_autoHide
toggled(bool)
+ m_autoHideSwitch
+ setEnabled(bool)
+
+
+ m_autoHide
+ toggled(bool)
m_delaySlider
setEnabled(bool)
m_autoHide
@@ -570,10 +587,11 @@
m_bottomButton
m_normal
m_large
m_autoHide
+ m_autoHideSwitch
m_delaySlider
m_delaySpinBox
m_terminalInput
Index: kcontrol/kicker/generaltab_impl.cpp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/kde/kdebase/kcontrol/kicker/generaltab_impl.cpp,v
retrieving revision 1.10
diff -u -5 -r1.10 generaltab_impl.cpp
--- kcontrol/kicker/generaltab_impl.cpp 2001/04/21 13:24:07 1.10
+++ kcontrol/kicker/generaltab_impl.cpp 2001/04/29 17:41:44
@@ -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_terminalInput, SIGNAL(textChanged(const QString&)), SIGNA=
L(changed()));
connect(m_percentSlider, SIGNAL(valueChanged(int)), SIGNAL(changed(=
)));
connect(m_percentSpinBox, SIGNAL(valueChanged(int)), SIGNAL(changed=
()));
@@ -61,10 +62,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 s=
mall screen resolutions, "
"for example, on laptops.") );
=20
+ 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 =3D i18n("Here you can change the delay after whic=
h the panel will disappear"
" if not used.");
=20
QWhatsThis::add(m_delaySlider, delaystr);
QWhatsThis::add(m_delaySpinBox, delaystr);
@@ -85,13 +90,15 @@
=20
m_sizeGroup->setButton(c->readNumEntry("Size", 2));
m_locationGroup->setButton(c->readNumEntry("Position", 3));
=20
bool ah =3D c->readBoolEntry("AutoHidePanel", false);
+ bool ahs =3D c->readBoolEntry("AutoHideSwitch", false);
int delay =3D c->readNumEntry("AutoHideDelay", 3);
=20
m_autoHide->setChecked(ah);
+ m_autoHideSwitch->setChecked(ahs);
m_delaySlider->setValue(delay);
m_delaySpinBox->setValue(delay);
m_delaySlider->setEnabled(ah);
m_delaySpinBox->setEnabled(ah);
=20
@@ -120,10 +127,11 @@
c->setGroup("General");
=20
c->writeEntry("Size", m_sizeGroup->id(m_sizeGroup->selected()));
c->writeEntry("Position", m_locationGroup->id(m_locationGroup->sele=
cted()));
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() );
=20
c->setGroup("misc");
--------------=_4D4801660840084AAB40--