Add option to hide menu bar

parent 5043987f
......@@ -103,6 +103,7 @@
#include <QUndoGroup>
#include <QFileDialog>
#include <QStyleFactory>
#include <QMenuBar>
#include <stdlib.h>
#include <QStandardPaths>
......@@ -1350,7 +1351,9 @@ void MainWindow::setupActions()
QAction *sentToLibrary = addAction(QStringLiteral("send_library"), i18n("Add Selection to Library"), pCore->library(), SLOT(slotAddToLibrary()), KoIconUtils::themedIcon(QStringLiteral("bookmark-new")));
pCore->library()->setupActions(QList <QAction *>() << sentToLibrary);
QAction *a = KStandardAction::quit(this, SLOT(close()), actionCollection());
KStandardAction::showMenubar(this, SLOT(showMenuBar(bool)), actionCollection());
QAction *a = KStandardAction::quit(this, SLOT(close()), actionCollection());
a->setIcon(KoIconUtils::themedIcon(QStringLiteral("application-exit")));
// TODO: make the following connection to slotEditKeys work
//KStandardAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection());
......@@ -3617,6 +3620,13 @@ void MainWindow::slotManageCache()
d.exec();
}
void MainWindow::showMenuBar(bool show)
{
if (!show)
KMessageBox::information(this, i18n("This will hide the menu bar completely. You can show it again by typing Ctrl+M."), i18n("Hide menu bar"), QStringLiteral("show-menubar-warning"));
menuBar()->setVisible(show);
}
#ifdef DEBUG_MAINW
#undef DEBUG_MAINW
#endif
......@@ -452,6 +452,7 @@ private slots:
void showTimelineToolbarMenu(const QPoint &pos);
/** @brief Open Cached Data management dialog. */
void slotManageCache();
void showMenuBar(bool show);
signals:
Q_SCRIPTABLE void abortRenderJob(const QString &url);
......
......@@ -698,10 +698,6 @@ void Timeline::updateTrackState(int ix, int state)
QScopedPointer<Mlt::Producer> track(m_tractor->track(ix));
currentState = track->get_int("hide");
if (state == currentState) return;
bool processAudio = false;
bool hideAudio = false;
bool processVideo = false;
bool hideVideo = false;
if (state == 0) {
// Show all
if (currentState & 1) {
......
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