Changeset View
Changeset View
Standalone View
Standalone View
options.cpp
Show First 20 Lines • Show All 804 Lines • ▼ Show 20 Line(s) | 797 | { | |||
---|---|---|---|---|---|
805 | setOperationMaxButtonLeftClick(windowOperation(config.readEntry("MaximizeButtonLeftClickCommand", "Maximize"), true)); | 805 | setOperationMaxButtonLeftClick(windowOperation(config.readEntry("MaximizeButtonLeftClickCommand", "Maximize"), true)); | ||
806 | setOperationMaxButtonMiddleClick(windowOperation(config.readEntry("MaximizeButtonMiddleClickCommand", "Maximize (vertical only)"), true)); | 806 | setOperationMaxButtonMiddleClick(windowOperation(config.readEntry("MaximizeButtonMiddleClickCommand", "Maximize (vertical only)"), true)); | ||
807 | setOperationMaxButtonRightClick(windowOperation(config.readEntry("MaximizeButtonRightClickCommand", "Maximize (horizontal only)"), true)); | 807 | setOperationMaxButtonRightClick(windowOperation(config.readEntry("MaximizeButtonRightClickCommand", "Maximize (horizontal only)"), true)); | ||
808 | 808 | | |||
809 | // Mouse bindings | 809 | // Mouse bindings | ||
810 | config = KConfigGroup(m_settings->config(), "MouseBindings"); | 810 | config = KConfigGroup(m_settings->config(), "MouseBindings"); | ||
811 | // TODO: add properties for missing options | 811 | // TODO: add properties for missing options | ||
812 | CmdTitlebarWheel = mouseWheelCommand(config.readEntry("CommandTitlebarWheel", "Switch to Window Tab to the Left/Right")); | 812 | CmdTitlebarWheel = mouseWheelCommand(config.readEntry("CommandTitlebarWheel", "Switch to Window Tab to the Left/Right")); | ||
813 | CmdAllModKey = (config.readEntry("CommandAllKey", "Alt") == QStringLiteral("Meta")) ? Qt::Key_Meta : Qt::Key_Alt; | 813 | CmdAllModKey = (config.readEntry("CommandAllKey", "Meta") == QStringLiteral("Meta")) ? Qt::Key_Meta : Qt::Key_Alt; | ||
814 | CmdAllWheel = mouseWheelCommand(config.readEntry("CommandAllWheel", "Nothing")); | 814 | CmdAllWheel = mouseWheelCommand(config.readEntry("CommandAllWheel", "Nothing")); | ||
815 | setCommandActiveTitlebar1(mouseCommand(config.readEntry("CommandActiveTitlebar1", "Raise"), true)); | 815 | setCommandActiveTitlebar1(mouseCommand(config.readEntry("CommandActiveTitlebar1", "Raise"), true)); | ||
816 | setCommandActiveTitlebar2(mouseCommand(config.readEntry("CommandActiveTitlebar2", "Start Window Tab Drag"), true)); | 816 | setCommandActiveTitlebar2(mouseCommand(config.readEntry("CommandActiveTitlebar2", "Start Window Tab Drag"), true)); | ||
817 | setCommandActiveTitlebar3(mouseCommand(config.readEntry("CommandActiveTitlebar3", "Operations menu"), true)); | 817 | setCommandActiveTitlebar3(mouseCommand(config.readEntry("CommandActiveTitlebar3", "Operations menu"), true)); | ||
818 | setCommandInactiveTitlebar1(mouseCommand(config.readEntry("CommandInactiveTitlebar1", "Activate and raise"), true)); | 818 | setCommandInactiveTitlebar1(mouseCommand(config.readEntry("CommandInactiveTitlebar1", "Activate and raise"), true)); | ||
819 | setCommandInactiveTitlebar2(mouseCommand(config.readEntry("CommandInactiveTitlebar2", "Start Window Tab Drag"), true)); | 819 | setCommandInactiveTitlebar2(mouseCommand(config.readEntry("CommandInactiveTitlebar2", "Start Window Tab Drag"), true)); | ||
820 | setCommandInactiveTitlebar3(mouseCommand(config.readEntry("CommandInactiveTitlebar3", "Operations menu"), true)); | 820 | setCommandInactiveTitlebar3(mouseCommand(config.readEntry("CommandInactiveTitlebar3", "Operations menu"), true)); | ||
821 | setCommandWindow1(mouseCommand(config.readEntry("CommandWindow1", "Activate, raise and pass click"), false)); | 821 | setCommandWindow1(mouseCommand(config.readEntry("CommandWindow1", "Activate, raise and pass click"), false)); | ||
▲ Show 20 Lines • Show All 191 Lines • ▼ Show 20 Line(s) | 1007 | auto keyToInterface = [](const QString &key) { | |||
1013 | return defaultGlPlatformInterface(); | 1013 | return defaultGlPlatformInterface(); | ||
1014 | }; | 1014 | }; | ||
1015 | setGlPlatformInterface(keyToInterface(config.readEntry("GLPlatformInterface", interfaceToKey(m_glPlatformInterface)))); | 1015 | setGlPlatformInterface(keyToInterface(config.readEntry("GLPlatformInterface", interfaceToKey(m_glPlatformInterface)))); | ||
1016 | } | 1016 | } | ||
1017 | 1017 | | |||
1018 | // restricted should be true for operations that the user may not be able to repeat | 1018 | // restricted should be true for operations that the user may not be able to repeat | ||
1019 | // if the window is moved out of the workspace (e.g. if the user moves a window | 1019 | // if the window is moved out of the workspace (e.g. if the user moves a window | ||
1020 | // by the titlebar, and moves it too high beneath Kicker at the top edge, they | 1020 | // by the titlebar, and moves it too high beneath Kicker at the top edge, they | ||
1021 | // may not be able to move it back, unless they know about Alt+LMB) | 1021 | // may not be able to move it back, unless they know about Meta+LMB) | ||
1022 | Options::WindowOperation Options::windowOperation(const QString &name, bool restricted) | 1022 | Options::WindowOperation Options::windowOperation(const QString &name, bool restricted) | ||
1023 | { | 1023 | { | ||
1024 | if (name == QStringLiteral("Move")) | 1024 | if (name == QStringLiteral("Move")) | ||
1025 | return restricted ? MoveOp : UnrestrictedMoveOp; | 1025 | return restricted ? MoveOp : UnrestrictedMoveOp; | ||
1026 | else if (name == QStringLiteral("Resize")) | 1026 | else if (name == QStringLiteral("Resize")) | ||
1027 | return restricted ? ResizeOp : UnrestrictedResizeOp; | 1027 | return restricted ? ResizeOp : UnrestrictedResizeOp; | ||
1028 | else if (name == QStringLiteral("Maximize")) | 1028 | else if (name == QStringLiteral("Maximize")) | ||
1029 | return MaximizeOp; | 1029 | return MaximizeOp; | ||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |