CT: rollover desktops UI (feature was implemented in kwin before 3.0)

svn path=/trunk/kdebase/kwin/; revision=147692
This commit is contained in:
Cristian Tibirna 2002-04-07 20:47:45 +00:00
parent de30273aad
commit 4eafa82c45
2 changed files with 23 additions and 3 deletions

View file

@ -61,6 +61,7 @@
#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows" #define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows"
#define KWIN_ALTTABMODE "AltTabStyle" #define KWIN_ALTTABMODE "AltTabStyle"
#define KWIN_TRAVERSE_ALL "TraverseAll" #define KWIN_TRAVERSE_ALL "TraverseAll"
#define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops"
#define KWIN_SHADEHOVER "ShadeHover" #define KWIN_SHADEHOVER "ShadeHover"
#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval" #define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval"
#define KWIN_XINERAMA "XineramaEnabled" #define KWIN_XINERAMA "XineramaEnabled"
@ -185,8 +186,8 @@ KFocusConfig::KFocusConfig (KConfig *_config, QWidget * parent, const char *name
lay->addWidget(fcsBox); lay->addWidget(fcsBox);
kbdBox = new QButtonGroup(i18n("Keyboard"), this); kbdBox = new QButtonGroup(i18n("Navigation"), this);
QGridLayout *kLay = new QGridLayout(kbdBox, 3, 3, QGridLayout *kLay = new QGridLayout(kbdBox, 4, 4,
KDialog::marginHint(), KDialog::marginHint(),
KDialog::spacingHint()); KDialog::spacingHint());
kLay->addRowSpacing(0,fontMetrics().lineSpacing()); kLay->addRowSpacing(0,fontMetrics().lineSpacing());
@ -216,6 +217,13 @@ KFocusConfig::KFocusConfig (KConfig *_config, QWidget * parent, const char *name
" windows to the current desktop." ); " windows to the current desktop." );
QWhatsThis::add( traverseAll, wtstr ); QWhatsThis::add( traverseAll, wtstr );
rollOverDesktops = new QCheckBox( i18n("Desktops navigation wraps around"), kbdBox );
kLay->addMultiCellWidget(rollOverDesktops, 3, 3, 0, 2);
wtstr = i18n( "Enable this option if you want that keyboard or electric border navigation beyond"
" an edge desktop brings you to the desktop at the opposite edge" );
QWhatsThis::add( rollOverDesktops, wtstr );
lay->addWidget(kbdBox); lay->addWidget(kbdBox);
lay->addStretch(); lay->addStretch();
@ -227,6 +235,7 @@ KFocusConfig::KFocusConfig (KConfig *_config, QWidget * parent, const char *name
connect(kdeMode, SIGNAL(clicked()), this, SLOT(slotChanged())); connect(kdeMode, SIGNAL(clicked()), this, SLOT(slotChanged()));
connect(cdeMode, SIGNAL(clicked()), this, SLOT(slotChanged())); connect(cdeMode, SIGNAL(clicked()), this, SLOT(slotChanged()));
connect(traverseAll, SIGNAL(clicked()), this, SLOT(slotChanged())); connect(traverseAll, SIGNAL(clicked()), this, SLOT(slotChanged()));
connect(rollOverDesktops, SIGNAL(clicked()), this, SLOT(slotChanged()));
load(); load();
} }
@ -313,6 +322,10 @@ void KFocusConfig::setTraverseAll(bool a) {
traverseAll->setChecked(a); traverseAll->setChecked(a);
} }
void KFocusConfig::setRollOverDesktops(bool a) {
rollOverDesktops->setChecked(a);
}
void KFocusConfig::load( void ) void KFocusConfig::load( void )
{ {
QString key; QString key;
@ -341,6 +354,8 @@ void KFocusConfig::load( void )
key = config->readEntry(KWIN_ALTTABMODE, "KDE"); key = config->readEntry(KWIN_ALTTABMODE, "KDE");
setAltTabMode(key == "KDE"); setAltTabMode(key == "KDE");
setRollOverDesktops( config->readBoolEntry(KWIN_ROLL_OVER_DESKTOPS, true ));
config->setGroup( "TabBox" ); config->setGroup( "TabBox" );
setTraverseAll( config->readBoolEntry(KWIN_TRAVERSE_ALL, false )); setTraverseAll( config->readBoolEntry(KWIN_TRAVERSE_ALL, false ));
@ -382,6 +397,8 @@ void KFocusConfig::save( void )
else else
config->writeEntry(KWIN_ALTTABMODE, "CDE"); config->writeEntry(KWIN_ALTTABMODE, "CDE");
config->writeEntry( KWIN_ROLL_OVER_DESKTOPS, rollOverDesktops->isChecked());
config->setGroup( "TabBox" ); config->setGroup( "TabBox" );
config->writeEntry( KWIN_TRAVERSE_ALL , traverseAll->isChecked()); config->writeEntry( KWIN_TRAVERSE_ALL , traverseAll->isChecked());
@ -395,6 +412,7 @@ void KFocusConfig::defaults()
setClickRaise(false); setClickRaise(false);
setAltTabMode(true); setAltTabMode(true);
setTraverseAll( false ); setTraverseAll( false );
setRollOverDesktops(true);
} }
KAdvancedConfig::~KAdvancedConfig () KAdvancedConfig::~KAdvancedConfig ()

View file

@ -93,6 +93,7 @@ private:
void setClickRaise(bool); void setClickRaise(bool);
void setAltTabMode(bool); void setAltTabMode(bool);
void setTraverseAll(bool); void setTraverseAll(bool);
void setRollOverDesktops(bool);
QButtonGroup *fcsBox; QButtonGroup *fcsBox;
QComboBox *focusCombo; QComboBox *focusCombo;
@ -106,7 +107,8 @@ private:
QRadioButton *kdeMode; QRadioButton *kdeMode;
QRadioButton *cdeMode; QRadioButton *cdeMode;
QCheckBox *traverseAll; QCheckBox *traverseAll;
QCheckBox *rollOverDesktops;
KConfig *config; KConfig *config;
}; };