mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-26 15:34:59 +01:00
poc newspaper
This commit is contained in:
parent
03ce10cbdf
commit
d48309cd17
@ -505,12 +505,6 @@ if(NOT USE_WEBENGINE)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND SOURCES
|
||||
miscellaneous/disablewindowtabbing.mm
|
||||
)
|
||||
endif()
|
||||
|
||||
set(UI_FILES
|
||||
gui/dialogs/formabout.ui
|
||||
gui/dialogs/formaddaccount.ui
|
||||
@ -685,6 +679,7 @@ target_include_directories(rssguard
|
||||
|
||||
# QLiteHtml.
|
||||
if(NOT USE_WEBENGINE)
|
||||
# Gumbo.
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml/3rdparty/litehtml/src/gumbo/include)
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml/3rdparty/litehtml/src/gumbo/include/gumbo)
|
||||
|
||||
@ -692,6 +687,7 @@ if(NOT USE_WEBENGINE)
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml/3rdparty/litehtml/src/gumbo/visualc/include)
|
||||
endif()
|
||||
|
||||
# LiteHtml.
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml/3rdparty/litehtml/src)
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml/3rdparty/litehtml/include)
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml/3rdparty/litehtml/include/litehtml)
|
||||
@ -700,6 +696,7 @@ if(NOT USE_WEBENGINE)
|
||||
target_compile_definitions(rssguard PUBLIC LITEHTML_UTF8)
|
||||
endif()
|
||||
|
||||
# QLiteHtml.
|
||||
target_include_directories(rssguard PRIVATE 3rd-party/qlitehtml)
|
||||
|
||||
target_compile_definitions(rssguard
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "network-web/webfactory.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
#include <QToolButton>
|
||||
|
||||
TabWidget::TabWidget(QWidget* parent) : QTabWidget(parent), m_menuMain(nullptr) {
|
||||
@ -185,28 +186,20 @@ void TabWidget::closeCurrentTab() {
|
||||
}
|
||||
|
||||
int TabWidget::addNewspaperView(RootItem* root, const QList<Message>& messages) {
|
||||
// TODO: dodělat
|
||||
|
||||
/*
|
||||
int msg_height = height() - tabBar()->height() - 50;
|
||||
NewspaperPreviewer* prev = new NewspaperPreviewer(msg_height, root, messages, this);
|
||||
|
||||
connect(prev, &NewspaperPreviewer::markMessageRead,
|
||||
m_feedMessageViewer->messagesView()->sourceModel(), &MessagesModel::setMessageReadById);
|
||||
connect(prev, &NewspaperPreviewer::markMessageImportant,
|
||||
m_feedMessageViewer->messagesView()->sourceModel(), &MessagesModel::setMessageImportantById);
|
||||
|
||||
int index = addTab(prev,
|
||||
WebBrowser* browser = new WebBrowser(this);
|
||||
int index = addTab(browser,
|
||||
qApp->icons()->fromTheme(QSL("format-justify-fill")),
|
||||
tr("Newspaper view"),
|
||||
TabBar::TabType::Closable);
|
||||
|
||||
// NOTE: Do not bring "newspaper" tabs to front anymore.
|
||||
//setCurrentIndex(index);
|
||||
// NOTE: Do not bring "newspaper" tabs to front anymore.
|
||||
//setCurrentIndex(index);
|
||||
|
||||
return index;
|
||||
*/
|
||||
return -1;
|
||||
QTimer::singleShot(300, browser, [browser, root, messages]() {
|
||||
browser->loadMessages(messages, root);
|
||||
});
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
int TabWidget::addEmptyBrowser() {
|
||||
|
@ -1,11 +0,0 @@
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
// Disables auto window tabbing where supported, otherwise a no-op.
|
||||
// See http://lists.qt-project.org/pipermail/interest/2016-September/024488.html
|
||||
void disableWindowTabbing()
|
||||
{
|
||||
//if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)]) {
|
||||
// NSWindow.allowsAutomaticWindowTabbing = NO;
|
||||
//}
|
||||
}
|
Loading…
Reference in New Issue
Block a user