cacas
This commit is contained in:
parent
651fe22c64
commit
9f13912f5c
@ -39,6 +39,8 @@
|
|||||||
#define APP_CFG_PROXY "proxy"
|
#define APP_CFG_PROXY "proxy"
|
||||||
#define APP_CFG_CUTS "keyboard"
|
#define APP_CFG_CUTS "keyboard"
|
||||||
#define APP_CFG_BROWSER "browser"
|
#define APP_CFG_BROWSER "browser"
|
||||||
|
#define APP_CFG_MESSAGES "messages"
|
||||||
|
#define APP_CFG_FEEDS "feeds"
|
||||||
|
|
||||||
#define APP_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
#define APP_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||||
#define APP_REVISION "@APP_REVISION@"
|
#define APP_REVISION "@APP_REVISION@"
|
||||||
|
@ -22,6 +22,7 @@ class Message {
|
|||||||
|
|
||||||
friend class WebBrowser;
|
friend class WebBrowser;
|
||||||
friend class MessagesModel;
|
friend class MessagesModel;
|
||||||
|
friend class MessagesView;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ void FeedMessageViewer::createConnections() {
|
|||||||
connect(m_messagesView, SIGNAL(openMessageNewTabRequested(Message)),
|
connect(m_messagesView, SIGNAL(openMessageNewTabRequested(Message)),
|
||||||
FormMain::getInstance()->m_ui->m_tabWidget,
|
FormMain::getInstance()->m_ui->m_tabWidget,
|
||||||
SLOT(addBrowserWithMessage(Message)));
|
SLOT(addBrowserWithMessage(Message)));
|
||||||
|
connect(m_messagesView, SIGNAL(openLinkMessageNewTabRequested(QString)),
|
||||||
|
FormMain::getInstance()->m_ui->m_tabWidget,
|
||||||
|
SLOT(addLinkedBrowser(QString)));
|
||||||
|
|
||||||
// Toolbar forwardings.
|
// Toolbar forwardings.
|
||||||
connect(FormMain::getInstance()->m_ui->m_actionSwitchImportanceOfSelectedMessages,
|
connect(FormMain::getInstance()->m_ui->m_actionSwitchImportanceOfSelectedMessages,
|
||||||
|
@ -124,7 +124,14 @@ void FormSettings::changeBrowserProgressColor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FormSettings::loadFeedsMessages() {
|
void FormSettings::loadFeedsMessages() {
|
||||||
|
Settings *settings = Settings::getInstance();
|
||||||
|
|
||||||
m_ui->m_cmbExternalBrowserPreset->addItem("Chromium", "aa %1");
|
m_ui->m_cmbExternalBrowserPreset->addItem("Chromium", "aa %1");
|
||||||
|
|
||||||
|
m_ui->m_txtExternalBrowserExecutable->setText(settings->value(APP_CFG_MESSAGES,
|
||||||
|
"external_browser_executable").toString());
|
||||||
|
m_ui->m_txtExternalBrowserArguments->setText(settings->value(APP_CFG_MESSAGES,
|
||||||
|
"external_browser_arguments").toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormSettings::saveFeedsMessages() {
|
void FormSettings::saveFeedsMessages() {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>803</width>
|
<width>803</width>
|
||||||
<height>373</height>
|
<height>410</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -182,12 +182,13 @@ void MessagesView::openSelectedSourceArticlesExternally() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MessagesView::openSelectedSourceMessagesInternally() {
|
void MessagesView::openSelectedSourceMessagesInternally() {
|
||||||
// TODO: otevre vybrane zpravy ze zdrojovych webz v internch tabech
|
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
||||||
|
// TODO: What to do with messages w/o link?
|
||||||
|
emit openLinkMessageNewTabRequested(m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()).m_url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MessagesView::openSelectedMessagesInternally() {
|
void MessagesView::openSelectedMessagesInternally() {
|
||||||
// TODO: otevre vybrane nactene zpravy v internich tabech
|
|
||||||
|
|
||||||
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
foreach (const QModelIndex &index, selectionModel()->selectedRows()) {
|
||||||
emit openMessageNewTabRequested(m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()));
|
emit openMessageNewTabRequested(m_sourceModel->messageAt(m_proxyModel->mapToSource(index).row()));
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@ class MessagesView : public QTreeView {
|
|||||||
const QItemSelection &deselected);
|
const QItemSelection &deselected);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void openLinkMessageNewTabRequested(const QString &link);
|
||||||
void openMessageNewTabRequested(const Message &message);
|
void openMessageNewTabRequested(const Message &message);
|
||||||
void currentMessageChanged(const Message &message);
|
void currentMessageChanged(const Message &message);
|
||||||
void currentMessageRemoved();
|
void currentMessageRemoved();
|
||||||
|
@ -184,6 +184,10 @@ int TabWidget::addEmptyBrowser() {
|
|||||||
return addBrowser(false, true);
|
return addBrowser(false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int TabWidget::addLinkedBrowser(const QString &initial_url) {
|
||||||
|
return addLinkedBrowser(QUrl(initial_url));
|
||||||
|
}
|
||||||
|
|
||||||
int TabWidget::addLinkedBrowser(const QUrl &initial_url) {
|
int TabWidget::addLinkedBrowser(const QUrl &initial_url) {
|
||||||
return addBrowser(Settings::getInstance()->value(APP_CFG_BROWSER,
|
return addBrowser(Settings::getInstance()->value(APP_CFG_BROWSER,
|
||||||
"queue_tabs",
|
"queue_tabs",
|
||||||
|
@ -81,6 +81,7 @@ class TabWidget : public QTabWidget {
|
|||||||
// Adds new WebBrowser with link. This is used when user
|
// Adds new WebBrowser with link. This is used when user
|
||||||
// selects to "Open link in new tab.".
|
// selects to "Open link in new tab.".
|
||||||
int addLinkedBrowser(const QUrl &initial_url = QUrl());
|
int addLinkedBrowser(const QUrl &initial_url = QUrl());
|
||||||
|
int addLinkedBrowser(const QString &initial_url);
|
||||||
|
|
||||||
// General method for adding WebBrowsers.
|
// General method for adding WebBrowsers.
|
||||||
int addBrowser(bool move_after_current,
|
int addBrowser(bool move_after_current,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user