#endif
const int PROGRESS_HEIGHT = 17;
-const char *DORIAN_VERSION =
+static const char *DORIAN_VERSION =
#include "pkg/version.txt"
;
// Progress
progress = new Progress(central);
- // Tool bar
-
- setUnifiedTitleAndToolBarOnMac(true);
+ // Settings dialog
settings = new QDialog(this);
- toolBar = addToolBar("controls");
- toolBar->setMovable(false);
- toolBar->setFloatable(false);
- toolBar->toggleViewAction()->setVisible(false);
-#if defined(Q_WS_X11) && !defined(Q_WS_MAEMO_5)
- toolBar->setIconSize(QSize(42, 42));
-#endif
- chaptersAction = addToolBarAction(this, SLOT(showChapters()), "chapters");
- bookmarksAction = addToolBarAction(this, SLOT(showBookmarks()), "bookmarks");
- infoAction = addToolBarAction(this, SLOT(showInfo()), "info");
- libraryAction = addToolBarAction(this, SLOT(showLibrary()), "library");
+ // Tool bar actions
+
+ chaptersAction = addToolBarAction(this, SLOT(showChapters()),
+ "chapters", tr("Chapters"));
+ bookmarksAction = addToolBarAction(this, SLOT(showBookmarks()),
+ "bookmarks", tr("Bookmarks"));
+ infoAction = addToolBarAction(this, SLOT(showInfo()),
+ "info", tr("Book info"));
+ libraryAction = addToolBarAction(this, SLOT(showLibrary()),
+ "library", tr("Library"));
#ifdef Q_WS_MAEMO_5
settingsAction = menuBar()->addAction(tr("Settings"));
connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));
#else
settingsAction = addToolBarAction(this, SLOT(showSettings()),
- "preferences-system");
- devToolsAction = addToolBarAction(this, SLOT(showDevTools()), "developer");
- addToolBarAction(this, SLOT(about()), "about");
+ "preferences-system", tr("Settings"));
+ devToolsAction = addToolBarAction(this, SLOT(showDevTools()),
+ "developer", tr("Developer"));
+ addToolBarAction(this, SLOT(about()), "about", tr("About"));
#endif // Q_WS_MAEMO_5
QFrame *frame = new QFrame(toolBar);
toolBar->addWidget(frame);
fullScreenAction = addToolBarAction(this, SLOT(showBig()),
- "view-fullscreen");
+ "view-fullscreen", tr("Full screen"));
// Buttons on top of the book view
previousButton = new TranslucentButton("back", this);
setWindowTitle(book? book->shortName(): tr("Dorian"));
}
-QAction *MainWindow::addToolBarAction(const QObject *receiver,
- const char *member,
- const QString &name)
-{
- return toolBar->
- addAction(QIcon(ICON_PREFIX + name + ".png"), "", receiver, member);
-}
-
void MainWindow::showLibrary()
{
(new LibraryDialog(this))->show();