mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-08 06:11:31 +01:00
Fixed #47.
This commit is contained in:
parent
6b27ac84ed
commit
9917a8415e
@ -8,6 +8,7 @@ Fixed:
|
||||
|
||||
Added:
|
||||
<ul>
|
||||
<li>Automatic detection of feeds on websites. User loads website and can add feeds via custom web browser toolbar button. (issue #47)</li>
|
||||
<li>Better format for logged messages. Logging to file is possible via "rssguard 2> log.txt" command.</li>
|
||||
<li>Full support for podcasts (issue #81). Supports RSS 2.0 podcasts and ATOM 1.0 podcasts. In ATOM, RSS Guard is able to fetch multiple podcasts per message. Podcasts are displayed as additional URL addresses in message preview panel.</li>
|
||||
</ul>
|
||||
|
@ -1,3 +1,20 @@
|
||||
// This file is part of RSS Guard.
|
||||
//
|
||||
// Copyright (C) 2011-2015 by Martin Rotter <rotter.martinos@gmail.com>
|
||||
//
|
||||
// RSS Guard is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// RSS Guard is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "network-web/discoverfeedsbutton.h"
|
||||
|
||||
#include "miscellaneous/application.h"
|
||||
@ -7,6 +24,7 @@
|
||||
DiscoverFeedsButton::DiscoverFeedsButton(QWidget *parent) : QToolButton(parent) {
|
||||
setEnabled(false);
|
||||
setIcon(qApp->icons()->fromTheme("folder-feed"));
|
||||
setPopupMode(QToolButton::InstantPopup);
|
||||
}
|
||||
|
||||
DiscoverFeedsButton::~DiscoverFeedsButton() {
|
||||
@ -24,8 +42,7 @@ void DiscoverFeedsButton::setFeedAddresses(const QStringList &addresses) {
|
||||
|
||||
if (menu() == NULL) {
|
||||
setMenu(new QMenu(this));
|
||||
|
||||
// TODO: pokračovat asi zde, po kliku na menu vyslat signal, ten odchytne webbrowser a provede akce.
|
||||
connect(menu(), SIGNAL(triggered(QAction*)), this, SLOT(linkTriggered(QAction*)));
|
||||
}
|
||||
|
||||
menu()->hide();
|
||||
@ -36,7 +53,9 @@ void DiscoverFeedsButton::setFeedAddresses(const QStringList &addresses) {
|
||||
foreach (const QString &feed, addresses) {
|
||||
menu()->addAction(feed);
|
||||
}
|
||||
|
||||
connect(this, SIGNAL(clicked(bool)), this, SLOT(showMenu()));
|
||||
}
|
||||
}
|
||||
|
||||
void DiscoverFeedsButton::linkTriggered(QAction *action) {
|
||||
emit addingOfFeedRequested(action->text());
|
||||
}
|
||||
|
@ -1,3 +1,20 @@
|
||||
// This file is part of RSS Guard.
|
||||
//
|
||||
// Copyright (C) 2011-2015 by Martin Rotter <rotter.martinos@gmail.com>
|
||||
//
|
||||
// RSS Guard is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// RSS Guard is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef DISCOVERFEEDSBUTTON_H
|
||||
#define DISCOVERFEEDSBUTTON_H
|
||||
|
||||
@ -13,6 +30,12 @@ class DiscoverFeedsButton : public QToolButton {
|
||||
|
||||
void clearFeedAddresses();
|
||||
void setFeedAddresses(const QStringList &addresses);
|
||||
|
||||
private slots:
|
||||
void linkTriggered(QAction *action);
|
||||
|
||||
signals:
|
||||
void addingOfFeedRequested(const QString &feed_link);
|
||||
};
|
||||
|
||||
#endif // DISCOVERFEEDSBUTTON_H
|
||||
|
@ -25,6 +25,8 @@
|
||||
#include "miscellaneous/skinfactory.h"
|
||||
#include "gui/formmain.h"
|
||||
#include "gui/tabwidget.h"
|
||||
#include "gui/feedmessageviewer.h"
|
||||
#include "gui/feedsview.h"
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
@ -36,6 +38,7 @@
|
||||
#include <QLabel>
|
||||
#include <QProgressBar>
|
||||
#include <QToolButton>
|
||||
#include <QClipboard>
|
||||
|
||||
|
||||
QList<WebBrowser*> WebBrowser::m_runningWebBrowsers;
|
||||
@ -90,7 +93,7 @@ void WebBrowser::initializeZoomWidget() {
|
||||
layout->setMargin(3);
|
||||
m_zoomButtons->setLayout(layout);
|
||||
|
||||
// Make connections..
|
||||
// Make connections.
|
||||
connect(button_increase, SIGNAL(clicked()), this, SLOT(increaseZoom()));
|
||||
connect(button_decrease, SIGNAL(clicked()), this, SLOT(decreaseZoom()));
|
||||
connect(m_btnResetZoom, SIGNAL(clicked()), this, SLOT(resetZoom()));
|
||||
@ -198,12 +201,18 @@ void WebBrowser::createConnections() {
|
||||
|
||||
// Misc connections.
|
||||
connect(m_webView, SIGNAL(zoomFactorChanged()), this, SLOT(updateZoomGui()));
|
||||
connect(m_btnDiscoverFeeds, SIGNAL(addingOfFeedRequested(QString)), this, SLOT(addFeedFromWebsite(QString)));
|
||||
}
|
||||
|
||||
void WebBrowser::onIconChanged() {
|
||||
emit iconChanged(m_index, m_webView->icon());
|
||||
}
|
||||
|
||||
void WebBrowser::addFeedFromWebsite(const QString &feed_link) {
|
||||
qApp->clipboard()->setText(feed_link);
|
||||
qApp->mainForm()->tabWidget()->feedMessageViewer()->feedsView()->addNewFeed();
|
||||
}
|
||||
|
||||
void WebBrowser::onTitleChanged(const QString &new_title) {
|
||||
if (new_title.isEmpty()) {
|
||||
//: Webbrowser tab title when no title is available.
|
||||
|
@ -132,6 +132,8 @@ class WebBrowser : public TabContent {
|
||||
void onTitleChanged(const QString &new_title);
|
||||
void onIconChanged();
|
||||
|
||||
void addFeedFromWebsite(const QString &feed_link);
|
||||
|
||||
signals:
|
||||
// User requests opening of new tab or clicks the link
|
||||
// with middle mouse button
|
||||
|
Loading…
Reference in New Issue
Block a user