summaryrefslogtreecommitdiff
path: root/src/frontend/displaywindow/ccommentaryreadwindow.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-10-21 22:48:35 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-10-21 22:48:35 -0400
commitdf8f1d512c60a96f9041f9663b3fdc2db51cba33 (patch)
tree3d2bdbd4732d417aca73be022ae9044eac96b7d3 /src/frontend/displaywindow/ccommentaryreadwindow.cpp
parent4885bfcef4d89cf0cb391e00af617b9fd19c9cbb (diff)
Imported Upstream version 2.8.1
Diffstat (limited to 'src/frontend/displaywindow/ccommentaryreadwindow.cpp')
-rw-r--r--src/frontend/displaywindow/ccommentaryreadwindow.cpp35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/frontend/displaywindow/ccommentaryreadwindow.cpp b/src/frontend/displaywindow/ccommentaryreadwindow.cpp
index 4b4d3c2..b1a291f 100644
--- a/src/frontend/displaywindow/ccommentaryreadwindow.cpp
+++ b/src/frontend/displaywindow/ccommentaryreadwindow.cpp
@@ -2,7 +2,7 @@
*
* This file is part of BibleTime's source code, http://www.bibletime.info/.
*
-* Copyright 1999-2009 by the BibleTime developers.
+* Copyright 1999-2011 by the BibleTime developers.
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
*
**********/
@@ -15,9 +15,11 @@
#include <QToolBar>
#include "backend/config/cbtconfig.h"
#include "backend/keys/cswordversekey.h"
+#include "bibletime.h"
#include "frontend/display/cdisplay.h"
#include "frontend/display/creaddisplay.h"
#include "frontend/displaywindow/btactioncollection.h"
+#include "frontend/displaywindow/btmodulechooserbar.h"
#include "frontend/keychooser/ckeychooser.h"
#include "frontend/profile/cprofilewindow.h"
#include "util/directory.h"
@@ -29,6 +31,7 @@ CCommentaryReadWindow::CCommentaryReadWindow(QList<CSwordModuleInfo*> modules, C
}
void CCommentaryReadWindow::insertKeyboardActions(BtActionCollection* const a) {
+ namespace DU = util::directory;
QAction* qaction;
qaction = new QAction(tr("Next book"), a);
@@ -54,6 +57,13 @@ void CCommentaryReadWindow::insertKeyboardActions(BtActionCollection* const a) {
qaction = new QAction(tr("Previous verse"), a);
qaction->setShortcut(CResMgr::displaywindows::bibleWindow::previousVerse::accel);
a->addAction("previousVerse", qaction);
+
+ qaction = new QAction(QIcon(DU::getIcon(CResMgr::displaywindows::commentaryWindow::syncWindow::icon)),
+ tr("Synchronize"), a);
+ qaction->setCheckable(true);
+ qaction->setShortcut(CResMgr::displaywindows::commentaryWindow::syncWindow::accel);
+ qaction->setToolTip(tr("Synchronize the displayed entry of this work with the active Bible window"));
+ a->addAction(CResMgr::displaywindows::commentaryWindow::syncWindow::actionName, qaction);
}
void CCommentaryReadWindow::initActions() {
@@ -91,6 +101,10 @@ void CCommentaryReadWindow::initActions() {
QObject::connect(qaction, SIGNAL(triggered()), this, SLOT(previousVerse()) );
addAction(qaction);
+ qaction = ac->action(CResMgr::displaywindows::commentaryWindow::syncWindow::actionName);
+ m_syncButton = qaction;
+ addAction(qaction);
+
CBTConfig::setupAccelSettings(CBTConfig::commentaryWindow, actionCollection());
}
@@ -107,28 +121,21 @@ void CCommentaryReadWindow::storeProfileSettings( CProfileWindow* profileWindow
}
void CCommentaryReadWindow::initToolbars() {
- namespace DU = util::directory;
-
CLexiconReadWindow::initToolbars();
-
- m_syncButton = new QAction(
- QIcon(DU::getIcon(CResMgr::displaywindows::commentaryWindow::syncWindow::icon)),
- tr("Synchronize"),
- actionCollection()
- );
- m_syncButton->setCheckable(true);
- m_syncButton->setShortcut(CResMgr::displaywindows::commentaryWindow::syncWindow::accel);
- m_syncButton->setToolTip(tr("Synchronize the displayed entry of this work with the active Bible window"));
- actionCollection()->addAction(CResMgr::displaywindows::commentaryWindow::syncWindow::actionName, m_syncButton);
buttonsToolBar()->addAction(m_syncButton);
}
+void CCommentaryReadWindow::setupMainWindowToolBars() {
+ CLexiconReadWindow::setupMainWindowToolBars();
+ btMainWindow()->toolsToolBar()->addAction(m_syncButton);
+}
+
/** Reimplementation to handle the keychooser refresh. */
void CCommentaryReadWindow::reload(CSwordBackend::SetupChangedReason reason) {
CLexiconReadWindow::reload(reason);
//refresh the book lists
- verseKey()->setLocale( backend()->booknameLanguage().toLatin1() );
+ verseKey()->setLocale( CSwordBackend::instance()->booknameLanguage().toLatin1() );
keyChooser()->refreshContent();
CBTConfig::setupAccelSettings(CBTConfig::commentaryWindow, actionCollection());