Allow downloading posts from the toolbar
This allows downloading if the QML area is not filled. TODO: Configure infinite scrolling
This commit is contained in:
parent
db03bdbce2
commit
7b8214401b
3 changed files with 11 additions and 1 deletions
|
|
@ -117,6 +117,7 @@ DanbooruMainWindow::DanbooruMainWindow(QWidget *parent)
|
|||
m_view->rootObject()->setProperty("poolMode", QVariant(false));
|
||||
|
||||
statusBar()->addPermanentWidget(m_connectWidget);
|
||||
statusBar()->hide();
|
||||
|
||||
setupDockWidgets();
|
||||
|
||||
|
|
@ -140,6 +141,7 @@ DanbooruMainWindow::DanbooruMainWindow(QWidget *parent)
|
|||
actionCollection()->action(QLatin1String("find"))->setEnabled(true);
|
||||
actionCollection()->action(QLatin1String("poolDownload"))->setEnabled(true);
|
||||
actionCollection()->action(QLatin1String("tags"))->setEnabled(true);
|
||||
actionCollection()->action(QLatin1String("morePosts"))->setEnabled(true);
|
||||
|
||||
if (DanbooruSettings::self()->autoDownload()) {
|
||||
m_view->rootObject()->setProperty("poolMode", QVariant(false));
|
||||
|
|
@ -261,6 +263,8 @@ void DanbooruMainWindow::setupActions()
|
|||
i18n("Search"), this);
|
||||
KToggleAction *poolAction = new KToggleAction(QIcon::fromTheme(QLatin1String("image-x-generic")),
|
||||
i18n("Pools"), this);
|
||||
QAction* nextPageAction = new QAction(QIcon::fromTheme(QLatin1String("download")),
|
||||
i18n("More posts"), this);
|
||||
|
||||
KDualAction* tagAction = new KDualAction(i18n("Show tags"), i18n("Hide tags"), this);
|
||||
tagAction->setIconForStates(QIcon::fromTheme(QLatin1String("tag")));
|
||||
|
|
@ -268,6 +272,7 @@ void DanbooruMainWindow::setupActions()
|
|||
fetchAction->setEnabled(false);
|
||||
findAction->setEnabled(false);
|
||||
poolAction->setEnabled(false);
|
||||
nextPageAction->setEnabled(false);
|
||||
|
||||
poolAction->setChecked(false);
|
||||
findAction->setChecked(false);
|
||||
|
|
@ -278,6 +283,7 @@ void DanbooruMainWindow::setupActions()
|
|||
actionCollection()->addAction(QLatin1String("find"), findAction);
|
||||
actionCollection()->addAction(QLatin1String("poolDownload"), poolAction);
|
||||
actionCollection()->addAction(QLatin1String("tags"), tagAction);
|
||||
actionCollection()->addAction(QLatin1String("morePosts"), nextPageAction);
|
||||
|
||||
actionCollection()->setDefaultShortcut(connectAction, KStandardShortcut::Open);
|
||||
actionCollection()->setDefaultShortcut(findAction, KStandardShortcut::Find);
|
||||
|
|
@ -339,6 +345,8 @@ void DanbooruMainWindow::setupActions()
|
|||
|
||||
});
|
||||
|
||||
connect(nextPageAction, &QAction::triggered, [this]() {m_service->nextPostPage();});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue