Add ability to switch the active window tab to the left/right by
scrolling on the titlebar or when using the WM modifier key. svn path=/trunk/KDE/kdebase/workspace/; revision=1049547icc-effect-5.14.5
parent
742d31ab28
commit
72c3a553ca
|
@ -184,6 +184,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
|
||||||
comboW->addItem(i18n("Keep Above/Below"));
|
comboW->addItem(i18n("Keep Above/Below"));
|
||||||
comboW->addItem(i18n("Move to Previous/Next Desktop"));
|
comboW->addItem(i18n("Move to Previous/Next Desktop"));
|
||||||
comboW->addItem(i18n("Change Opacity"));
|
comboW->addItem(i18n("Change Opacity"));
|
||||||
|
comboW->addItem(i18n("Switch to Group Window to the Left/Right"));
|
||||||
comboW->addItem(i18n("Nothing"));
|
comboW->addItem(i18n("Nothing"));
|
||||||
comboW->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
comboW->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||||
connect(comboW, SIGNAL(activated(int)), SLOT(changed()));
|
connect(comboW, SIGNAL(activated(int)), SLOT(changed()));
|
||||||
|
@ -474,6 +475,7 @@ const char* tbl_TiWAc[] = {
|
||||||
"Above/Below",
|
"Above/Below",
|
||||||
"Previous/Next Desktop",
|
"Previous/Next Desktop",
|
||||||
"Change Opacity",
|
"Change Opacity",
|
||||||
|
"Switch to Group Window to the Left/Right",
|
||||||
"Nothing",
|
"Nothing",
|
||||||
"" };
|
"" };
|
||||||
|
|
||||||
|
@ -484,6 +486,7 @@ const char* tbl_AllW[] = {
|
||||||
"Above/Below",
|
"Above/Below",
|
||||||
"Previous/Next Desktop",
|
"Previous/Next Desktop",
|
||||||
"Change Opacity",
|
"Change Opacity",
|
||||||
|
"Switch to Group Window to the Left/Right",
|
||||||
"Nothing",
|
"Nothing",
|
||||||
"" };
|
"" };
|
||||||
|
|
||||||
|
@ -841,6 +844,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, KConfig *_config,
|
||||||
combo->addItem(i18n("Keep Above/Below"));
|
combo->addItem(i18n("Keep Above/Below"));
|
||||||
combo->addItem(i18n("Move to Previous/Next Desktop"));
|
combo->addItem(i18n("Move to Previous/Next Desktop"));
|
||||||
combo->addItem(i18n("Change Opacity"));
|
combo->addItem(i18n("Change Opacity"));
|
||||||
|
combo->addItem(i18n("Switch to Group Window to the Left/Right"));
|
||||||
combo->addItem(i18n("Nothing"));
|
combo->addItem(i18n("Nothing"));
|
||||||
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
connect(combo, SIGNAL(activated(int)), SLOT(changed()));
|
||||||
coAllW = combo;
|
coAllW = combo;
|
||||||
|
|
|
@ -340,6 +340,7 @@ Options::MouseWheelCommand Options::mouseWheelCommand(const QString &name)
|
||||||
if (lowerName == "above/below") return MouseWheelAboveBelow;
|
if (lowerName == "above/below") return MouseWheelAboveBelow;
|
||||||
if (lowerName == "previous/next desktop") return MouseWheelPreviousNextDesktop;
|
if (lowerName == "previous/next desktop") return MouseWheelPreviousNextDesktop;
|
||||||
if (lowerName == "change opacity") return MouseWheelChangeOpacity;
|
if (lowerName == "change opacity") return MouseWheelChangeOpacity;
|
||||||
|
if (lowerName == "switch to group window to the left/right") return MouseWheelChangeGroupWindow;
|
||||||
return MouseWheelNothing;
|
return MouseWheelNothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,6 +412,8 @@ Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int d
|
||||||
return delta > 0 ? MousePreviousDesktop : MouseNextDesktop;
|
return delta > 0 ? MousePreviousDesktop : MouseNextDesktop;
|
||||||
case MouseWheelChangeOpacity:
|
case MouseWheelChangeOpacity:
|
||||||
return delta > 0 ? MouseOpacityMore : MouseOpacityLess;
|
return delta > 0 ? MouseOpacityMore : MouseOpacityLess;
|
||||||
|
case MouseWheelChangeGroupWindow:
|
||||||
|
return delta > 0 ? MouseLeftGroupWindow : MouseRightGroupWindow;
|
||||||
default:
|
default:
|
||||||
return MouseNothing;
|
return MouseNothing;
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ class Options : public KDecorationOptions
|
||||||
MouseNextDesktop, MousePreviousDesktop,
|
MouseNextDesktop, MousePreviousDesktop,
|
||||||
MouseAbove, MouseBelow,
|
MouseAbove, MouseBelow,
|
||||||
MouseOpacityMore, MouseOpacityLess,
|
MouseOpacityMore, MouseOpacityLess,
|
||||||
MouseClose,
|
MouseClose, MouseLeftGroupWindow, MouseRightGroupWindow,
|
||||||
MouseNothing
|
MouseNothing
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ class Options : public KDecorationOptions
|
||||||
{
|
{
|
||||||
MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
|
MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
|
||||||
MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
|
MouseWheelAboveBelow, MouseWheelPreviousNextDesktop,
|
||||||
MouseWheelChangeOpacity,
|
MouseWheelChangeOpacity, MouseWheelChangeGroupWindow,
|
||||||
MouseWheelNothing
|
MouseWheelNothing
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -934,6 +934,26 @@ bool Client::performMouseCommand( Options::MouseCommand command, const QPoint &g
|
||||||
if( !isDesktop() ) // No point in changing the opacity of the desktop
|
if( !isDesktop() ) // No point in changing the opacity of the desktop
|
||||||
setOpacity( qMax( opacity() - 0.1, 0.1 ));
|
setOpacity( qMax( opacity() - 0.1, 0.1 ));
|
||||||
break;
|
break;
|
||||||
|
case Options::MouseLeftGroupWindow:
|
||||||
|
{
|
||||||
|
int c_id = clientGroup()->indexOfClient( this );
|
||||||
|
int size = clientGroup()->clients().count();
|
||||||
|
if( c_id > 0 )
|
||||||
|
clientGroup()->setVisible( c_id - 1 );
|
||||||
|
else
|
||||||
|
clientGroup()->setVisible( size - 1 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Options::MouseRightGroupWindow:
|
||||||
|
{
|
||||||
|
int c_id = clientGroup()->indexOfClient( this );
|
||||||
|
int size = clientGroup()->clients().count();
|
||||||
|
if( c_id < size - 1 )
|
||||||
|
clientGroup()->setVisible( c_id + 1 );
|
||||||
|
else
|
||||||
|
clientGroup()->setVisible( 0 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
case Options::MouseClose:
|
case Options::MouseClose:
|
||||||
closeWindow();
|
closeWindow();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue