mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-23 03:58:56 -04:00
Code clean up: illiminate KiwixApp::SideBarType property
Switching sidebar between reading list and library is only MainWindow responsibility. KiwixApp and Tabbar are not involved in it anymore.
This commit is contained in:
parent
f4f3d6914e
commit
5d0f1bd096
@ -84,8 +84,6 @@ void KiwixApp::init()
|
|||||||
mp_tabWidget = mp_mainWindow->getTabBar();
|
mp_tabWidget = mp_mainWindow->getTabBar();
|
||||||
mp_tabWidget->setContentManagerView(mp_manager->getView());
|
mp_tabWidget->setContentManagerView(mp_manager->getView());
|
||||||
mp_tabWidget->setNewTabButton();
|
mp_tabWidget->setNewTabButton();
|
||||||
mp_mainWindow->getSideContentManager()->setContentManager(mp_manager);
|
|
||||||
setSideBar(CONTENTMANAGER_BAR);
|
|
||||||
postInit();
|
postInit();
|
||||||
mp_errorDialog = new QErrorMessage(mp_mainWindow);
|
mp_errorDialog = new QErrorMessage(mp_mainWindow);
|
||||||
setActivationWindow(mp_mainWindow);
|
setActivationWindow(mp_mainWindow);
|
||||||
@ -213,35 +211,6 @@ void KiwixApp::openUrl(const QUrl &url, bool newTab) {
|
|||||||
mp_tabWidget->openUrl(url, newTab);
|
mp_tabWidget->openUrl(url, newTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KiwixApp::setSideBar(KiwixApp::SideBarType type)
|
|
||||||
{
|
|
||||||
auto sideDockWidget = mp_mainWindow->getSideDockWidget();
|
|
||||||
switch(type) {
|
|
||||||
case CONTENTMANAGER_BAR:
|
|
||||||
case READINGLIST_BAR:
|
|
||||||
sideDockWidget->setCurrentIndex(type);
|
|
||||||
sideDockWidget->show();
|
|
||||||
break;
|
|
||||||
case NONE:
|
|
||||||
sideDockWidget->hide();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
m_currentSideType = type;
|
|
||||||
emit(currentSideTypeChanged(type));
|
|
||||||
}
|
|
||||||
|
|
||||||
void KiwixApp::toggleSideBar(KiwixApp::SideBarType type) {
|
|
||||||
if (m_currentSideType == type) {
|
|
||||||
setSideBar(NONE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_currentSideType == CONTENTMANAGER_BAR) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setSideBar(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
void KiwixApp::openRandomUrl(bool newTab)
|
void KiwixApp::openRandomUrl(bool newTab)
|
||||||
{
|
{
|
||||||
auto zimId = mp_tabWidget->currentZimId();
|
auto zimId = mp_tabWidget->currentZimId();
|
||||||
@ -299,6 +268,14 @@ bool KiwixApp::isCurrentArticleBookmarked()
|
|||||||
#define CREATE_ACTION_ICON_SHORTCUT(ID, ICON, TEXT, SHORTCUT) \
|
#define CREATE_ACTION_ICON_SHORTCUT(ID, ICON, TEXT, SHORTCUT) \
|
||||||
mpa_actions[ID] = new QAction(QIcon(":/icons/" ICON ".svg"), TEXT); \
|
mpa_actions[ID] = new QAction(QIcon(":/icons/" ICON ".svg"), TEXT); \
|
||||||
SET_SHORTCUT(ID, TEXT, SHORTCUT)
|
SET_SHORTCUT(ID, TEXT, SHORTCUT)
|
||||||
|
#define CREATE_ACTION_ONOFF_ICON_SHORTCUT(ID, ON_ICON, OFF_ICON, TEXT, SHORTCUT) \
|
||||||
|
CREATE_ACTION(ID, TEXT); \
|
||||||
|
SET_SHORTCUT(ID, TEXT, SHORTCUT); \
|
||||||
|
mpa_actions[ID]->setCheckable(true); \
|
||||||
|
{ QIcon icon; \
|
||||||
|
icon.addPixmap(QPixmap(":/icons/" ON_ICON ".svg"), QIcon::Normal, QIcon::On); \
|
||||||
|
icon.addPixmap(QPixmap(":/icons/" OFF_ICON, ".svg"), QIcon::Normal, QIcon::Off); \
|
||||||
|
mpa_actions[ID]->setIcon(icon); }
|
||||||
#define SET_SHORTCUTS(ID, TEXT, SHORTCUTS) \
|
#define SET_SHORTCUTS(ID, TEXT, SHORTCUTS) \
|
||||||
mpa_actions[ID]->setShortcuts(SHORTCUTS); \
|
mpa_actions[ID]->setShortcuts(SHORTCUTS); \
|
||||||
mpa_actions[ID]->setToolTip(TEXT + " (" + SHORTCUTS.first().toString() + ")" )
|
mpa_actions[ID]->setToolTip(TEXT + " (" + SHORTCUTS.first().toString() + ")" )
|
||||||
@ -384,14 +361,7 @@ void KiwixApp::createAction()
|
|||||||
CREATE_ACTION_SHORTCUT(ToggleTOCAction, gt("table-of-content"), QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_1));
|
CREATE_ACTION_SHORTCUT(ToggleTOCAction, gt("table-of-content"), QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_1));
|
||||||
HIDE_ACTION(ToggleTOCAction);
|
HIDE_ACTION(ToggleTOCAction);
|
||||||
|
|
||||||
CREATE_ACTION_ICON_SHORTCUT(ToggleReadingListAction, "reading-list" ,gt("reading-list"), QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_2));
|
CREATE_ACTION_ONOFF_ICON_SHORTCUT(ToggleReadingListAction, "reading-list-active", "reading-list", gt("reading-list"), QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_2));
|
||||||
connect(mpa_actions[ToggleReadingListAction], &QAction::triggered,
|
|
||||||
this, [=]() { toggleSideBar(READINGLIST_BAR); });
|
|
||||||
connect(this, &KiwixApp::currentSideTypeChanged,
|
|
||||||
this, [=](SideBarType type) {
|
|
||||||
mpa_actions[ToggleReadingListAction]->setIcon(
|
|
||||||
QIcon((type == READINGLIST_BAR) ? ":/icons/reading-list-active.svg" : ":/icons/reading-list.svg"));
|
|
||||||
});
|
|
||||||
|
|
||||||
CREATE_ACTION_SHORTCUTS(ZoomInAction, gt("zoom-in"), QList<QKeySequence>({QKeySequence::ZoomIn, QKeySequence(Qt::CTRL+Qt::Key_Equal)}));
|
CREATE_ACTION_SHORTCUTS(ZoomInAction, gt("zoom-in"), QList<QKeySequence>({QKeySequence::ZoomIn, QKeySequence(Qt::CTRL+Qt::Key_Equal)}));
|
||||||
|
|
||||||
@ -425,7 +395,8 @@ void KiwixApp::postInit() {
|
|||||||
mp_mainWindow->getTopWidget(), &TopWidget::handleWebActionEnabledChanged);
|
mp_mainWindow->getTopWidget(), &TopWidget::handleWebActionEnabledChanged);
|
||||||
connect(mp_tabWidget, &TabBar::currentTitleChanged, this,
|
connect(mp_tabWidget, &TabBar::currentTitleChanged, this,
|
||||||
[=](const QString& title) { emit currentTitleChanged(title); });
|
[=](const QString& title) { emit currentTitleChanged(title); });
|
||||||
connect(mp_tabWidget, &TabBar::libraryPageDisplayed, this, &KiwixApp::disableItemsOnLibraryPage);
|
connect(mp_tabWidget, &TabBar::libraryPageDisplayed,
|
||||||
|
this, &KiwixApp::disableItemsOnLibraryPage);
|
||||||
emit(m_library.booksChanged());
|
emit(m_library.booksChanged());
|
||||||
connect(&m_library, &Library::booksChanged, this, &KiwixApp::updateNameMapper);
|
connect(&m_library, &Library::booksChanged, this, &KiwixApp::updateNameMapper);
|
||||||
disableItemsOnLibraryPage(true);
|
disableItemsOnLibraryPage(true);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
class KiwixApp : public QtSingleApplication
|
class KiwixApp : public QtSingleApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(SideBarType currentSideType MEMBER m_currentSideType NOTIFY currentSideTypeChanged)
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Actions {
|
enum Actions {
|
||||||
@ -59,11 +58,6 @@ public:
|
|||||||
ExitAction,
|
ExitAction,
|
||||||
MAX_ACTION
|
MAX_ACTION
|
||||||
};
|
};
|
||||||
enum SideBarType {
|
|
||||||
CONTENTMANAGER_BAR,
|
|
||||||
READINGLIST_BAR,
|
|
||||||
NONE
|
|
||||||
};
|
|
||||||
|
|
||||||
KiwixApp(int& argc, char *argv[]);
|
KiwixApp(int& argc, char *argv[]);
|
||||||
virtual ~KiwixApp();
|
virtual ~KiwixApp();
|
||||||
@ -77,27 +71,24 @@ public:
|
|||||||
KProfile* getProfile() { return &m_profile; }
|
KProfile* getProfile() { return &m_profile; }
|
||||||
Library* getLibrary() { return &m_library; }
|
Library* getLibrary() { return &m_library; }
|
||||||
MainWindow* getMainWindow() { return mp_mainWindow; }
|
MainWindow* getMainWindow() { return mp_mainWindow; }
|
||||||
|
ContentManager* getContentManager() { return mp_manager; }
|
||||||
kiwix::Downloader* getDownloader() { return mp_downloader; }
|
kiwix::Downloader* getDownloader() { return mp_downloader; }
|
||||||
TabBar* getTabWidget() { return mp_tabWidget; }
|
TabBar* getTabWidget() { return mp_tabWidget; }
|
||||||
QAction* getAction(Actions action);
|
QAction* getAction(Actions action);
|
||||||
QString getLibraryDirectory() { return m_libraryDirectory; };
|
QString getLibraryDirectory() { return m_libraryDirectory; };
|
||||||
kiwix::Server* getLocalServer() { return &m_server; }
|
kiwix::Server* getLocalServer() { return &m_server; }
|
||||||
SettingsManager* getSettingsManager() { return &m_settingsManager; };
|
SettingsManager* getSettingsManager() { return &m_settingsManager; };
|
||||||
SideBarType getSideType() { return m_currentSideType; }
|
|
||||||
QString getText(const QString &key) { return m_translation.getText(key); };
|
QString getText(const QString &key) { return m_translation.getText(key); };
|
||||||
|
|
||||||
bool isCurrentArticleBookmarked();
|
bool isCurrentArticleBookmarked();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentTitleChanged(const QString& title);
|
void currentTitleChanged(const QString& title);
|
||||||
void currentSideTypeChanged(SideBarType type);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void openZimFile(const QString& zimfile="");
|
void openZimFile(const QString& zimfile="");
|
||||||
void openUrl(const QString& url, bool newTab=true);
|
void openUrl(const QString& url, bool newTab=true);
|
||||||
void openUrl(const QUrl& url, bool newTab=true);
|
void openUrl(const QUrl& url, bool newTab=true);
|
||||||
void setSideBar(SideBarType type);
|
|
||||||
void toggleSideBar(KiwixApp::SideBarType type);
|
|
||||||
void printPage();
|
void printPage();
|
||||||
void disableItemsOnLibraryPage(bool displayed);
|
void disableItemsOnLibraryPage(bool displayed);
|
||||||
void updateNameMapper();
|
void updateNameMapper();
|
||||||
@ -117,7 +108,6 @@ private:
|
|||||||
ContentManager* mp_manager;
|
ContentManager* mp_manager;
|
||||||
MainWindow* mp_mainWindow;
|
MainWindow* mp_mainWindow;
|
||||||
TabBar* mp_tabWidget;
|
TabBar* mp_tabWidget;
|
||||||
SideBarType m_currentSideType;
|
|
||||||
QErrorMessage* mp_errorDialog;
|
QErrorMessage* mp_errorDialog;
|
||||||
kiwix::UpdatableNameMapper m_nameMapper;
|
kiwix::UpdatableNameMapper m_nameMapper;
|
||||||
kiwix::Server m_server;
|
kiwix::Server m_server;
|
||||||
|
@ -19,29 +19,38 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
{
|
{
|
||||||
QWidget::setAttribute(Qt::WA_AlwaysShowToolTips);
|
QWidget::setAttribute(Qt::WA_AlwaysShowToolTips);
|
||||||
mp_ui->setupUi(this);
|
mp_ui->setupUi(this);
|
||||||
|
|
||||||
mp_ui->tabBar->setExpanding(false);
|
mp_ui->tabBar->setExpanding(false);
|
||||||
mp_ui->tabBar->setStackedWidget(mp_ui->mainView);
|
mp_ui->tabBar->setStackedWidget(mp_ui->mainView);
|
||||||
|
|
||||||
auto app = KiwixApp::instance();
|
auto app = KiwixApp::instance();
|
||||||
|
|
||||||
connect(app->getAction(KiwixApp::ExitAction), &QAction::triggered,
|
connect(app->getAction(KiwixApp::ExitAction), &QAction::triggered,
|
||||||
this, &QMainWindow::close);
|
this, &QMainWindow::close);
|
||||||
connect(app->getAction(KiwixApp::ToggleFullscreenAction), &QAction::triggered,
|
connect(app->getAction(KiwixApp::ToggleFullscreenAction), &QAction::triggered,
|
||||||
this, &MainWindow::toggleFullScreen);
|
this, &MainWindow::toggleFullScreen);
|
||||||
|
connect(app->getAction(KiwixApp::ToggleReadingListAction), &QAction::toggled,
|
||||||
|
this, &MainWindow::when_ReadingList_toggled);
|
||||||
connect(app->getAction(KiwixApp::AboutAction), &QAction::triggered,
|
connect(app->getAction(KiwixApp::AboutAction), &QAction::triggered,
|
||||||
mp_about, &QDialog::show);
|
mp_about, &QDialog::show);
|
||||||
connect(app->getAction(KiwixApp::DonateAction), &QAction::triggered,
|
connect(app->getAction(KiwixApp::DonateAction), &QAction::triggered,
|
||||||
this, [=]() { QDesktopServices::openUrl(QUrl("https://donate.kiwix.org")); });
|
this, [=]() { QDesktopServices::openUrl(QUrl("https://donate.kiwix.org")); });
|
||||||
connect(app->getAction(KiwixApp::KiwixServeAction), &QAction::triggered,
|
connect(app->getAction(KiwixApp::KiwixServeAction), &QAction::triggered,
|
||||||
mp_localKiwixServer, &QDialog::show);
|
mp_localKiwixServer, &QDialog::show);
|
||||||
|
|
||||||
connect(app, &KiwixApp::currentTitleChanged, this, [=](const QString& title) {
|
connect(app, &KiwixApp::currentTitleChanged, this, [=](const QString& title) {
|
||||||
if (!title.isEmpty() && !title.startsWith("zim://"))
|
if (!title.isEmpty() && !title.startsWith("zim://"))
|
||||||
setWindowTitle(title + " - Kiwix");
|
setWindowTitle(title + " - Kiwix");
|
||||||
else
|
else
|
||||||
setWindowTitle(gt("window-title"));
|
setWindowTitle(gt("window-title"));
|
||||||
});
|
});
|
||||||
|
|
||||||
addAction(app->getAction(KiwixApp::OpenHomePageAction));
|
addAction(app->getAction(KiwixApp::OpenHomePageAction));
|
||||||
|
|
||||||
#if !SYSTEMTITLEBAR
|
#if !SYSTEMTITLEBAR
|
||||||
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
setWindowFlags(Qt::Window | Qt::CustomizeWindowHint);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QWindow *window = windowHandle();
|
QWindow *window = windowHandle();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
@ -52,6 +61,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
connect(mp_ui->tabBar, &QTabBar::currentChanged,
|
connect(mp_ui->tabBar, &QTabBar::currentChanged,
|
||||||
mp_ui->mainToolBar, &TopWidget::updateBackForwardButtons);
|
mp_ui->mainToolBar, &TopWidget::updateBackForwardButtons);
|
||||||
|
connect(mp_ui->tabBar, &TabBar::libraryPageDisplayed,
|
||||||
|
this, &MainWindow::when_libraryPageDisplayed);
|
||||||
|
|
||||||
|
mp_ui->contentmanagerside->setContentManager(app->getContentManager());
|
||||||
|
mp_ui->sideBar->setCurrentWidget(mp_ui->contentmanagerside);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@ -66,6 +80,33 @@ void MainWindow::toggleFullScreen() {
|
|||||||
showFullScreen();
|
showFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::when_ReadingList_toggled(bool state)
|
||||||
|
{
|
||||||
|
if (state) {
|
||||||
|
mp_ui->sideBar->setCurrentWidget(mp_ui->readinglistbar);
|
||||||
|
mp_ui->sideBar->show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mp_ui->sideBar->hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::when_libraryPageDisplayed(bool showed)
|
||||||
|
{
|
||||||
|
auto app = KiwixApp::instance();
|
||||||
|
|
||||||
|
// When library sidebar appeared, or hidden, reading list is always hidden.
|
||||||
|
app->getAction(KiwixApp::ToggleReadingListAction)->setChecked(false);
|
||||||
|
|
||||||
|
if (showed) {
|
||||||
|
mp_ui->sideBar->setCurrentWidget(mp_ui->contentmanagerside);
|
||||||
|
mp_ui->sideBar->show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mp_ui->sideBar->hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::keyPressEvent(QKeyEvent *event)
|
void MainWindow::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
auto key = event->key();
|
auto key = event->key();
|
||||||
@ -87,13 +128,3 @@ TopWidget *MainWindow::getTopWidget()
|
|||||||
{
|
{
|
||||||
return mp_ui->mainToolBar;
|
return mp_ui->mainToolBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStackedWidget *MainWindow::getSideDockWidget()
|
|
||||||
{
|
|
||||||
return mp_ui->sideBar;
|
|
||||||
}
|
|
||||||
|
|
||||||
ContentManagerSide *MainWindow::getSideContentManager()
|
|
||||||
{
|
|
||||||
return mp_ui->contentmanagerside;
|
|
||||||
}
|
|
||||||
|
@ -24,12 +24,15 @@ public:
|
|||||||
|
|
||||||
TabBar* getTabBar();
|
TabBar* getTabBar();
|
||||||
TopWidget* getTopWidget();
|
TopWidget* getTopWidget();
|
||||||
QStackedWidget* getSideDockWidget();
|
|
||||||
ContentManagerSide* getSideContentManager();
|
|
||||||
|
|
||||||
protected slots:
|
protected:
|
||||||
void toggleFullScreen();
|
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void toggleFullScreen();
|
||||||
|
void when_ReadingList_toggled(bool state);
|
||||||
|
void when_libraryPageDisplayed(bool showed);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *mp_ui;
|
Ui::MainWindow *mp_ui;
|
||||||
About *mp_about;
|
About *mp_about;
|
||||||
|
@ -64,7 +64,6 @@ TabBar::TabBar(QWidget *parent) :
|
|||||||
int index = currentIndex() + 1;
|
int index = currentIndex() + 1;
|
||||||
mp_stackedWidget->insertWidget(index, view);
|
mp_stackedWidget->insertWidget(index, view);
|
||||||
insertTab(index,QIcon(":/icons/settings.svg"), gt("settings"));
|
insertTab(index,QIcon(":/icons/settings.svg"), gt("settings"));
|
||||||
KiwixApp::instance()->setSideBar(KiwixApp::SideBarType::NONE);
|
|
||||||
QToolButton *tb = new QToolButton(this);
|
QToolButton *tb = new QToolButton(this);
|
||||||
tb->setDefaultAction(KiwixApp::instance()->getAction(KiwixApp::CloseTabAction));
|
tb->setDefaultAction(KiwixApp::instance()->getAction(KiwixApp::CloseTabAction));
|
||||||
setTabButton(index, QTabBar::RightSide, tb);
|
setTabButton(index, QTabBar::RightSide, tb);
|
||||||
@ -296,22 +295,17 @@ void TabBar::onCurrentChanged(int index)
|
|||||||
emit webActionEnabledChanged(QWebEnginePage::Back, false);
|
emit webActionEnabledChanged(QWebEnginePage::Back, false);
|
||||||
emit webActionEnabledChanged(QWebEnginePage::Forward, false);
|
emit webActionEnabledChanged(QWebEnginePage::Forward, false);
|
||||||
emit libraryPageDisplayed(false);
|
emit libraryPageDisplayed(false);
|
||||||
KiwixApp::instance()->setSideBar(KiwixApp::NONE);
|
|
||||||
QTimer::singleShot(0, [=](){emit currentTitleChanged("");});
|
QTimer::singleShot(0, [=](){emit currentTitleChanged("");});
|
||||||
} else if (auto zv = qobject_cast<ZimView*>(w)) {
|
} else if (auto zv = qobject_cast<ZimView*>(w)) {
|
||||||
auto view = zv->getWebView();
|
auto view = zv->getWebView();
|
||||||
emit webActionEnabledChanged(QWebEnginePage::Back, view->isWebActionEnabled(QWebEnginePage::Back));
|
emit webActionEnabledChanged(QWebEnginePage::Back, view->isWebActionEnabled(QWebEnginePage::Back));
|
||||||
emit webActionEnabledChanged(QWebEnginePage::Forward, view->isWebActionEnabled(QWebEnginePage::Forward));
|
emit webActionEnabledChanged(QWebEnginePage::Forward, view->isWebActionEnabled(QWebEnginePage::Forward));
|
||||||
emit libraryPageDisplayed(false);
|
emit libraryPageDisplayed(false);
|
||||||
if (KiwixApp::instance()->getSideType() == KiwixApp::CONTENTMANAGER_BAR) {
|
|
||||||
KiwixApp::instance()->setSideBar(KiwixApp::NONE);
|
|
||||||
}
|
|
||||||
QTimer::singleShot(0, [=](){emit currentTitleChanged(view->title());});
|
QTimer::singleShot(0, [=](){emit currentTitleChanged(view->title());});
|
||||||
} else if (qobject_cast<ContentManagerView*>(w)) {
|
} else if (qobject_cast<ContentManagerView*>(w)) {
|
||||||
emit webActionEnabledChanged(QWebEnginePage::Back, false);
|
emit webActionEnabledChanged(QWebEnginePage::Back, false);
|
||||||
emit webActionEnabledChanged(QWebEnginePage::Forward, false);
|
emit webActionEnabledChanged(QWebEnginePage::Forward, false);
|
||||||
emit libraryPageDisplayed(true);
|
emit libraryPageDisplayed(true);
|
||||||
KiwixApp::instance()->setSideBar(KiwixApp::CONTENTMANAGER_BAR);
|
|
||||||
QTimer::singleShot(0, [=](){emit currentTitleChanged("");});
|
QTimer::singleShot(0, [=](){emit currentTitleChanged("");});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user