Commit dbcfebc0 authored by Jekyll Wu's avatar Jekyll Wu
Browse files

Fix the problme of global shortcuts getting reset to 'None' on restart

REVIEW:103531
BUG:208641
BUG:239078
BUG:268897
FIXED-IN:4.8.0
(cherry picked from commit 845789de)
parent 3caae847
......@@ -128,29 +128,24 @@ KNotesApp::KNotesApp()
KAction *action = new KAction( KIcon( "document-new" ),
i18n( "New Note" ), this );
actionCollection()->addAction( "new_note", action );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_N ),
KAction::DefaultShortcut );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_N ));
connect( action, SIGNAL(triggered()), SLOT(newNote()) );
action = new KAction( KIcon( "edit-paste" ),
i18n( "New Note From Clipboard" ), this );
actionCollection()->addAction( "new_note_clipboard", action );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_C ),
KAction::DefaultShortcut );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_C ));
connect( action, SIGNAL(triggered()), SLOT(newNoteFromClipboard()) );
action = new KAction( KIcon( "knotes" ), i18n( "Show All Notes" ), this );
actionCollection()->addAction( "show_all_notes", action );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_S ),
KAction::DefaultShortcut );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_S ));
connect( action, SIGNAL(triggered()), SLOT(showAllNotes()) );
action = new KAction( KIcon( "window-close" ),
i18n( "Hide All Notes" ), this );
actionCollection()->addAction( "hide_all_notes", action );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_H ),
KAction::DefaultShortcut );
action->setGlobalShortcut( KShortcut( Qt::ALT + Qt::SHIFT + Qt::Key_H ));
connect( action, SIGNAL(triggered()), SLOT(hideAllNotes()) );
new KHelpMenu( this, KGlobal::mainComponent().aboutData(), false,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment