mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
generic: adjust to shortcut changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
31edff16e9
commit
2e33c7fa83
5 changed files with 18 additions and 13 deletions
|
@ -170,8 +170,14 @@ FileOpsContextManagerItem::FileOpsContextManagerItem(ContextManager* manager, QL
|
|||
// Copied from Dolphin:
|
||||
// need to remove shift+del from cut action, else the shortcut for deletejob
|
||||
// doesn't work
|
||||
KShortcut cutShortcut = d->mCutAction->shortcut();
|
||||
cutShortcut.remove(Qt::SHIFT + Qt::Key_Delete, KShortcut::KeepEmpty);
|
||||
QKeySequence cutShortcut = d->mCutAction->shortcut();
|
||||
static const int shiftdelete = (Qt::SHIFT | Qt::Key_Delete);
|
||||
if (cutShortcut[0] == shiftdelete) {
|
||||
cutShortcut = QKeySequence(cutShortcut[1]);
|
||||
}
|
||||
if (cutShortcut[0] == shiftdelete) {
|
||||
cutShortcut = QKeySequence();
|
||||
}
|
||||
d->mCutAction->setShortcut(cutShortcut);
|
||||
|
||||
d->mCopyAction = edit->addAction(KStandardAction::Copy, this, SLOT(copy()));
|
||||
|
|
|
@ -370,9 +370,9 @@ struct MainWindow::Private
|
|||
q, SLOT(setActiveViewModeAction(QAction*)));
|
||||
|
||||
mFullScreenAction = static_cast<KToggleFullScreenAction*>(view->addAction(KStandardAction::FullScreen, q, SLOT(toggleFullScreen(bool))));
|
||||
KShortcut shortcut = mFullScreenAction->shortcut();
|
||||
if (shortcut.alternate().isEmpty()) {
|
||||
shortcut.setAlternate(Qt::Key_F11);
|
||||
QKeySequence shortcut = mFullScreenAction->shortcut();
|
||||
if (shortcut[1] == 0) {
|
||||
shortcut = QKeySequence(shortcut[0], Qt::Key_F11);
|
||||
}
|
||||
mFullScreenAction->setShortcut(shortcut);
|
||||
connect(mViewMainPage, SIGNAL(toggleFullScreenRequested()),
|
||||
|
@ -462,14 +462,14 @@ struct MainWindow::Private
|
|||
action->setObjectName(KStandardAction::name(KStandardAction::Redo));
|
||||
action->setIcon(KIcon("edit-redo"));
|
||||
action->setIconText(i18n("Redo"));
|
||||
action->setShortcut(KStandardShortcut::redo().primary());
|
||||
action->setShortcut(KStandardShortcut::redo());
|
||||
edit->addAction(action->objectName(), action);
|
||||
|
||||
action = undoGroup->createUndoAction(actionCollection);
|
||||
action->setObjectName(KStandardAction::name(KStandardAction::Undo));
|
||||
action->setIcon(KIcon("edit-undo"));
|
||||
action->setIconText(i18n("Undo"));
|
||||
action->setShortcut(KStandardShortcut::undo().primary());
|
||||
action->setShortcut(KStandardShortcut::undo());
|
||||
edit->addAction(action->objectName(), action);
|
||||
}
|
||||
|
||||
|
|
|
@ -253,16 +253,16 @@ KSnapshot::KSnapshot(QWidget *parent, KSnapshotObject::CaptureMode mode )
|
|||
Qt::CTRL+Qt::Key_A, this, SLOT(slotSaveAs()));
|
||||
#endif
|
||||
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::Quit ).primary(), this, SLOT(reject()));
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::Quit ), this, SLOT(reject()));
|
||||
|
||||
new QShortcut( Qt::Key_Q, this, SLOT(slotSave()));
|
||||
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::Copy ).primary(), button(User1), SLOT(animateClick()));
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::Copy ), button(User1), SLOT(animateClick()));
|
||||
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::Save ).primary(), button(Apply), SLOT(animateClick()));
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::Save ), button(Apply), SLOT(animateClick()));
|
||||
new QShortcut( Qt::Key_S, button(Apply), SLOT(animateClick()));
|
||||
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::New ).primary(), mainWidget->btnNew, SLOT(animateClick()) );
|
||||
new QShortcut( KStandardShortcut::shortcut( KStandardShortcut::New ), mainWidget->btnNew, SLOT(animateClick()) );
|
||||
new QShortcut( Qt::Key_N, mainWidget->btnNew, SLOT(animateClick()) );
|
||||
new QShortcut( Qt::Key_Space, mainWidget->btnNew, SLOT(animateClick()) );
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ void Part::setupActions()
|
|||
|
||||
m_saveCopyAs = KStandardAction::saveAs( this, SLOT(slotSaveCopyAs()), ac );
|
||||
m_saveCopyAs->setText( i18n( "Save &Copy As..." ) );
|
||||
m_saveCopyAs->setShortcut( KShortcut() );
|
||||
m_saveCopyAs->setShortcut( QKeySequence() );
|
||||
ac->addAction( "file_save_copy", m_saveCopyAs );
|
||||
m_saveCopyAs->setEnabled( false );
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <kiconloader.h>
|
||||
#include <kmessagebox.h>
|
||||
#include <kselectaction.h>
|
||||
#include <kshortcut.h>
|
||||
#include <kdialog.h>
|
||||
#include <solid/powermanagement.h>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue