Add close window ability to customizable title bar mouse button actions.
Patch by Thomas Lundgaard. CCMAIL: thomaslundgaard@gmail.com svn path=/trunk/KDE/kdebase/workspace/; revision=1015273
This commit is contained in:
parent
cea75106e3
commit
c3a07890f5
4 changed files with 12 additions and 3 deletions
|
@ -273,8 +273,9 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
|
||||||
<< i18n("Lower")
|
<< i18n("Lower")
|
||||||
<< i18n("Operations Menu")
|
<< i18n("Operations Menu")
|
||||||
<< i18n("Toggle Raise & Lower")
|
<< i18n("Toggle Raise & Lower")
|
||||||
<< i18n("Nothing")
|
<< i18n("Shade")
|
||||||
<< i18n("Shade");
|
<< i18n("Close")
|
||||||
|
<< i18n("Nothing");
|
||||||
|
|
||||||
combo = new QComboBox(box);
|
combo = new QComboBox(box);
|
||||||
combo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
combo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
@ -316,6 +317,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf
|
||||||
<< i18n("Operations Menu")
|
<< i18n("Operations Menu")
|
||||||
<< i18n("Raise")
|
<< i18n("Raise")
|
||||||
<< i18n("Lower")
|
<< i18n("Lower")
|
||||||
|
<< i18n("Close")
|
||||||
<< i18n("Nothing");
|
<< i18n("Nothing");
|
||||||
|
|
||||||
combo = new QComboBox(box);
|
combo = new QComboBox(box);
|
||||||
|
@ -419,8 +421,9 @@ const char* const tbl_TiAc[] = {
|
||||||
"Lower",
|
"Lower",
|
||||||
"Operations menu",
|
"Operations menu",
|
||||||
"Toggle raise and lower",
|
"Toggle raise and lower",
|
||||||
"Nothing",
|
|
||||||
"Shade",
|
"Shade",
|
||||||
|
"Close",
|
||||||
|
"Nothing",
|
||||||
"" };
|
"" };
|
||||||
|
|
||||||
const char* const tbl_TiInAc[] = {
|
const char* const tbl_TiInAc[] = {
|
||||||
|
@ -431,6 +434,7 @@ const char* const tbl_TiInAc[] = {
|
||||||
"Operations menu",
|
"Operations menu",
|
||||||
"Raise",
|
"Raise",
|
||||||
"Lower",
|
"Lower",
|
||||||
|
"Close",
|
||||||
"Nothing",
|
"Nothing",
|
||||||
"" };
|
"" };
|
||||||
|
|
||||||
|
|
|
@ -319,6 +319,7 @@ Options::MouseCommand Options::mouseCommand(const QString &name, bool restricted
|
||||||
if (lowerName == "resize") return restricted ? MouseResize : MouseUnrestrictedResize;
|
if (lowerName == "resize") return restricted ? MouseResize : MouseUnrestrictedResize;
|
||||||
if (lowerName == "shade") return MouseShade;
|
if (lowerName == "shade") return MouseShade;
|
||||||
if (lowerName == "minimize") return MouseMinimize;
|
if (lowerName == "minimize") return MouseMinimize;
|
||||||
|
if (lowerName == "close") return MouseClose;
|
||||||
if (lowerName == "nothing") return MouseNothing;
|
if (lowerName == "nothing") return MouseNothing;
|
||||||
return MouseNothing;
|
return MouseNothing;
|
||||||
}
|
}
|
||||||
|
|
|
@ -224,6 +224,7 @@ class Options : public KDecorationOptions
|
||||||
MouseNextDesktop, MousePreviousDesktop,
|
MouseNextDesktop, MousePreviousDesktop,
|
||||||
MouseAbove, MouseBelow,
|
MouseAbove, MouseBelow,
|
||||||
MouseOpacityMore, MouseOpacityLess,
|
MouseOpacityMore, MouseOpacityLess,
|
||||||
|
MouseClose,
|
||||||
MouseNothing
|
MouseNothing
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -734,6 +734,9 @@ 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::MouseClose:
|
||||||
|
closeWindow();
|
||||||
|
break;
|
||||||
case Options::MouseNothing:
|
case Options::MouseNothing:
|
||||||
replay = true;
|
replay = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue