Commit 38b2ffce authored by kh1's avatar kh1

Fix missing help plugin shortcuts.

Reviewed-by: ck
parent ea2aedde
...@@ -384,14 +384,13 @@ void HelpPlugin::setupUi() ...@@ -384,14 +384,13 @@ void HelpPlugin::setupUi()
connect(searchWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget, connect(searchWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget,
SLOT(setSourceFromSearch(QUrl))); SLOT(setSourceFromSearch(QUrl)));
// TODO: enable and find a proper keysequence as this is ambiguous shortcut = new QShortcut(m_splitter);
// shortcut = new QShortcut(m_splitter); shortcut->setWhatsThis(tr("Activate Search in Help mode"));
// shortcut->setWhatsThis(tr("Activate Search in Help mode")); cmd = am->registerShortcut(shortcut, QLatin1String("Help.SearchShortcut"),
// cmd = am->registerShortcut(shortcut, QLatin1String("Help.SearchShortcut"), modecontext);
// modecontext); cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Slash));
// cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_S)); connect(shortcut, SIGNAL(activated()), this, SLOT(activateSearch()));
// connect(shortcut, SIGNAL(activated()), this, SLOT(activateSearch())); shortcutMap.insert(SB_SEARCH, cmd);
// shortcutMap.insert("Search", cmd);
BookmarkManager *manager = &LocalHelpManager::bookmarkManager(); BookmarkManager *manager = &LocalHelpManager::bookmarkManager();
BookmarkWidget *bookmarkWidget = new BookmarkWidget(manager, 0, false); BookmarkWidget *bookmarkWidget = new BookmarkWidget(manager, 0, false);
...@@ -400,14 +399,13 @@ void HelpPlugin::setupUi() ...@@ -400,14 +399,13 @@ void HelpPlugin::setupUi()
connect(bookmarkWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget, connect(bookmarkWidget, SIGNAL(linkActivated(QUrl)), m_centralWidget,
SLOT(setSource(QUrl))); SLOT(setSource(QUrl)));
// TODO: enable and find a proper keysequence as this is ambiguous shortcut = new QShortcut(m_splitter);
// shortcut = new QShortcut(m_splitter); shortcut->setWhatsThis(tr("Activate Bookmarks in Help mode"));
// shortcut->setWhatsThis(tr("Activate Bookmarks in Help mode")); cmd = am->registerShortcut(shortcut, QLatin1String("Help.BookmarkShortcut"),
// cmd = am->registerShortcut(shortcut, QLatin1String("Help.BookmarkShortcut"), modecontext);
// modecontext); cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
// cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::Key_B)); connect(shortcut, SIGNAL(activated()), this, SLOT(activateBookmarks()));
// connect(shortcut, SIGNAL(activated()), this, SLOT(activateBookmarks())); shortcutMap.insert(SB_BOOKMARKS, cmd);
// shortcutMap.insert("Bookmarks", cmd);
QWidget *openPagesWidget = OpenPagesManager::instance().openPagesWidget(); QWidget *openPagesWidget = OpenPagesManager::instance().openPagesWidget();
openPagesWidget->setWindowTitle(tr("Open Pages")); openPagesWidget->setWindowTitle(tr("Open Pages"));
...@@ -739,6 +737,12 @@ void HelpPlugin::activateOpenPages() ...@@ -739,6 +737,12 @@ void HelpPlugin::activateOpenPages()
m_sideBar->activateItem(m_openPagesItem); m_sideBar->activateItem(m_openPagesItem);
} }
void HelpPlugin::activateBookmarks()
{
activateHelpMode();
m_sideBar->activateItem(m_bookmarkItem);
}
QToolBar *HelpPlugin::createToolBar() QToolBar *HelpPlugin::createToolBar()
{ {
QToolBar *toolWidget = new QToolBar; QToolBar *toolWidget = new QToolBar;
......
...@@ -80,6 +80,7 @@ private slots: ...@@ -80,6 +80,7 @@ private slots:
void activateContents(); void activateContents();
void activateSearch(); void activateSearch();
void activateOpenPages(); void activateOpenPages();
void activateBookmarks();
void addBookmark(); void addBookmark();
void updateFilterComboBox(); void updateFilterComboBox();
......
Markdown is supported
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