Changeset View
Changeset View
Standalone View
Standalone View
effects/mouseclick/mouseclick_config.cpp
Show All 15 Lines | |||||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | 20 | | |||
21 | #include "mouseclick_config.h" | 21 | #include "mouseclick_config.h" | ||
22 | // KConfigSkeleton | 22 | // KConfigSkeleton | ||
23 | #include "mouseclickconfig.h" | 23 | #include "mouseclickconfig.h" | ||
24 | #include <config-kwin.h> | ||||
24 | #include <kwineffects_interface.h> | 25 | #include <kwineffects_interface.h> | ||
25 | 26 | | |||
26 | #include <QAction> | 27 | #include <QAction> | ||
27 | 28 | | |||
28 | #include <KActionCollection> | 29 | #include <KActionCollection> | ||
29 | #include <KAboutData> | 30 | #include <KAboutData> | ||
30 | #include <KGlobalAccel> | 31 | #include <KGlobalAccel> | ||
31 | #include <KLocalizedString> | 32 | #include <KLocalizedString> | ||
Show All 30 Lines | 51 | { | |||
62 | QAction* a = m_actionCollection->addAction(QStringLiteral("ToggleMouseClick")); | 63 | QAction* a = m_actionCollection->addAction(QStringLiteral("ToggleMouseClick")); | ||
63 | a->setText(i18n("Toggle Mouse Click Effect")); | 64 | a->setText(i18n("Toggle Mouse Click Effect")); | ||
64 | a->setProperty("isConfigurationAction", true); | 65 | a->setProperty("isConfigurationAction", true); | ||
65 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_Asterisk); | 66 | KGlobalAccel::self()->setDefaultShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_Asterisk); | ||
66 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_Asterisk); | 67 | KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_Asterisk); | ||
67 | 68 | | |||
68 | m_ui->editor->addCollection(m_actionCollection); | 69 | m_ui->editor->addCollection(m_actionCollection); | ||
69 | 70 | | |||
71 | MouseClickConfig::instance(KWIN_CONFIG); | ||||
70 | addConfig(MouseClickConfig::self(), m_ui); | 72 | addConfig(MouseClickConfig::self(), m_ui); | ||
71 | load(); | 73 | load(); | ||
72 | } | 74 | } | ||
73 | 75 | | |||
74 | MouseClickEffectConfig::~MouseClickEffectConfig() | 76 | MouseClickEffectConfig::~MouseClickEffectConfig() | ||
75 | { | 77 | { | ||
76 | // Undo (only) unsaved changes to global key shortcuts | 78 | // Undo (only) unsaved changes to global key shortcuts | ||
77 | m_ui->editor->undoChanges(); | 79 | m_ui->editor->undoChanges(); | ||
Show All 15 Lines |