Added the following two functions:

- Switch one desktop to the left
  - Switch one desktop to the right

svn path=/trunk/kdebase/kwin/; revision=55397
This commit is contained in:
Jesper Pedersen 2000-07-04 17:07:58 +00:00
parent 160a2d549b
commit 797a25747c
3 changed files with 18 additions and 3 deletions

View file

@ -6,7 +6,8 @@
keys->insertItem(i18n("Switch to desktop 6"), "Switch to desktop 6" ,"CTRL+F6");
keys->insertItem(i18n("Switch to desktop 7"), "Switch to desktop 7" ,"CTRL+F7");
keys->insertItem(i18n("Switch to desktop 8"), "Switch to desktop 8" ,"CTRL+F8");
keys->insertItem(i18n("Switch one desktop to the left"), "Switch desktop left" ,"");
keys->insertItem(i18n("Switch one desktop to the right"), "Switch desktop right" ,"");
keys->insertItem(i18n("Window operations menu"), "Pop-up window operations menu" ,"ALT+F3");
keys->insertItem(i18n("Window close"),"Window close", "ALT+F4");

View file

@ -1874,6 +1874,8 @@ void Workspace::createKeybindings(){
keys->connectItem( "Switch to desktop 6", this, SLOT( slotSwitchDesktop6() ));
keys->connectItem( "Switch to desktop 7", this, SLOT( slotSwitchDesktop7() ));
keys->connectItem( "Switch to desktop 8", this, SLOT( slotSwitchDesktop8() ));
keys->connectItem( "Switch desktop left", this, SLOT( slotSwitchDesktopLeft() ));
keys->connectItem( "Switch desktop right", this, SLOT( slotSwitchDesktopRight() ));
keys->connectItem( "Pop-up window operations menu", this, SLOT( slotWindowOperations() ) );
keys->connectItem( "Window close", this, SLOT( slotWindowClose() ) );
@ -1917,8 +1919,18 @@ void Workspace::slotSwitchDesktop7(){
void Workspace::slotSwitchDesktop8(){
setCurrentDesktop(8);
}
void Workspace::slotSwitchDesktopRight(){
int d = currentDesktop() + 1;
if ( d > number_of_desktops )
d = 1;
setCurrentDesktop(d);
}
void Workspace::slotSwitchDesktopLeft(){
int d = currentDesktop() - 1;
if ( d <= 0 )
d = number_of_desktops;
setCurrentDesktop(d);
}
/*!
Maximizes the popup client

View file

@ -187,6 +187,8 @@ public slots:
void slotSwitchDesktop6();
void slotSwitchDesktop7();
void slotSwitchDesktop8();
void slotSwitchDesktopRight();
void slotSwitchDesktopLeft();
void slotWindowMaximize();
void slotWindowMaximizeVertical();