mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-31 18:37:30 +01:00
Fixed #126.
This commit is contained in:
parent
47ae5a9a07
commit
5f4ec58454
@ -9,6 +9,7 @@ http://goo.gl/forms/GcvPYgS2a8
|
||||
|
||||
Added:
|
||||
|
||||
▪ Opened web browser tabs now can be saved. (issue #126)
|
||||
▪ Added experimental support for tweakable statusbar. (issue #158)
|
||||
▪ Opening of download manager when new file download starts is now optional. (issue #165)
|
||||
|
||||
|
@ -181,7 +181,7 @@ QModelIndexList MessagesProxyModel::match(const QModelIndex &start, int role,
|
||||
}
|
||||
|
||||
void MessagesProxyModel::sort(int column, Qt::SortOrder order) {
|
||||
// NOTE: Ignore here, sort is done elsewhere.
|
||||
// NOTE: Ignore here, sort is done elsewhere (server-side).
|
||||
Q_UNUSED(column)
|
||||
Q_UNUSED(order)
|
||||
}
|
||||
|
@ -410,6 +410,7 @@ void FormSettings::loadBrowser() {
|
||||
m_ui->m_checkAutoLoadImages->setChecked(WebFactory::instance()->autoloadImages());
|
||||
m_ui->m_checkEnableJavascript->setChecked(WebFactory::instance()->javascriptEnabled());
|
||||
m_ui->m_checkEnablePlugins->setChecked(WebFactory::instance()->pluginsEnabled());
|
||||
m_ui->m_checkRememberOpenedTabs->setChecked(m_settings->value(GROUP(Browser), SETTING(Browser::RememberBrowserTabs)).toBool());
|
||||
|
||||
// Load settings of e-mail.
|
||||
m_ui->m_cmbExternalEmailPreset->addItem(tr("Mozilla Thunderbird"), QSL("-compose \"subject='%1',body='%2'\""));
|
||||
@ -425,6 +426,7 @@ void FormSettings::saveBrowser() {
|
||||
m_settings->setValue(GROUP(Browser), Browser::QueueTabs, m_ui->m_checkQueueTabs->isChecked());
|
||||
m_settings->setValue(GROUP(Browser), Browser::CustomExternalBrowserExecutable, m_ui->m_txtExternalBrowserExecutable->text());
|
||||
m_settings->setValue(GROUP(Browser), Browser::CustomExternalBrowserArguments, m_ui->m_txtExternalBrowserArguments->text());
|
||||
m_settings->setValue(GROUP(Browser), Browser::RememberBrowserTabs, m_ui->m_checkRememberOpenedTabs->isChecked());
|
||||
|
||||
// Save settings of e-mail.
|
||||
m_settings->setValue(GROUP(Browser), Browser::CustomExternalEmailExecutable, m_ui->m_txtExternalEmailExecutable->text());
|
||||
|
@ -88,7 +88,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QStackedWidget" name="m_stackedSettings">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_pageGeneral">
|
||||
<layout class="QFormLayout" name="formLayout_5">
|
||||
@ -125,6 +125,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="m_checkRememberOpenedTabs">
|
||||
<property name="text">
|
||||
<string>Remember opened web browser tabs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="m_pageDataStorage">
|
||||
@ -1366,7 +1373,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="m_tabFeedsMessages">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabFeeds">
|
||||
<attribute name="title">
|
||||
@ -1565,6 +1572,13 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="m_checkOpenManagerWhenDownloadStarts">
|
||||
<property name="text">
|
||||
<string>Open download manager when new download is started</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
@ -1612,13 +1626,6 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="m_checkOpenManagerWhenDownloadStarts">
|
||||
<property name="text">
|
||||
<string>Open download manager when new download is started</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -153,11 +153,18 @@ void TabWidget::createConnections() {
|
||||
void TabWidget::initializeTabs() {
|
||||
// Create widget for "Feeds" page and add it.
|
||||
m_feedMessageViewer = new FeedMessageViewer(this);
|
||||
const int index_of_browser = addTab(static_cast<TabContent*>(m_feedMessageViewer),
|
||||
const int index_of_browser = addTab(m_feedMessageViewer,
|
||||
QIcon(),
|
||||
tr("Feeds"),
|
||||
TabBar::FeedReader);
|
||||
setTabToolTip(index_of_browser, tr("Browse your feeds and messages"));
|
||||
|
||||
if (qApp->settings()->value(GROUP(Browser), SETTING(Browser::RememberBrowserTabs)).toBool()) {
|
||||
foreach (const QString &url, qApp->settings()->value(GROUP(Browser), SETTING(Browser::OpenedBrowserTabs)).toString().split('##',
|
||||
QString::SkipEmptyParts)) {
|
||||
addBrowser(true, false, QUrl::fromUserInput(url));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TabWidget::setupIcons() {
|
||||
@ -184,6 +191,25 @@ void TabWidget::setupIcons() {
|
||||
m_btnAddTab->setIcon(qApp->icons()->fromTheme(QSL("list-add")));
|
||||
}
|
||||
|
||||
void TabWidget::quit() {
|
||||
if (qApp->settings()->value(GROUP(Browser), SETTING(Browser::RememberBrowserTabs)).toBool()) {
|
||||
QStringList store_urls;
|
||||
|
||||
for (int i = 0; i < count(); i++) {
|
||||
if (tabBar()->tabType(i) == TabBar::Closable) {
|
||||
// We have tab with web browser.
|
||||
QUrl url = widget(i)->webBrowser()->view()->url();
|
||||
|
||||
if (url.isValid() && !url.isEmpty()) {
|
||||
store_urls.append(url.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
qApp->settings()->setValue(GROUP(Browser), Browser::OpenedBrowserTabs, store_urls.join(QSL("##")));
|
||||
}
|
||||
}
|
||||
|
||||
bool TabWidget::closeTab(int index) {
|
||||
if (tabBar()->tabType(index) == TabBar::Closable) {
|
||||
removeTab(index, true);
|
||||
|
@ -75,6 +75,8 @@ class TabWidget : public QTabWidget {
|
||||
return m_feedMessageViewer;
|
||||
}
|
||||
|
||||
void quit();
|
||||
|
||||
protected:
|
||||
// Creates necesary connections.
|
||||
void createConnections();
|
||||
|
@ -275,6 +275,7 @@ void Application::onAboutToQuit() {
|
||||
system()->removeTrolltechJunkRegistryKeys();
|
||||
#endif
|
||||
|
||||
mainForm()->tabWidget()->quit();
|
||||
mainForm()->tabWidget()->feedMessageViewer()->quit();
|
||||
database()->saveDatabase();
|
||||
mainForm()->saveSize();
|
||||
|
@ -271,6 +271,12 @@ DVALUE(bool) Browser::ImagesEnabledDef = true;
|
||||
DKEY Browser::PluginsEnabled = "enable_plugins";
|
||||
DVALUE(bool) Browser::PluginsEnabledDef = false;
|
||||
|
||||
DKEY Browser::RememberBrowserTabs = "remember_browser_tabs";
|
||||
DVALUE(bool)Browser::RememberBrowserTabsDef = false;
|
||||
|
||||
DKEY Browser::OpenedBrowserTabs = "opened_browser_tabs";
|
||||
DVALUE(QString)Browser::OpenedBrowserTabsDef = QString();
|
||||
|
||||
DKEY Browser::CustomExternalBrowserEnabled = "custom_external_browser";
|
||||
DVALUE(bool) Browser::CustomExternalBrowserEnabledDef = false;
|
||||
|
||||
|
@ -302,6 +302,12 @@ namespace Browser {
|
||||
KEY PluginsEnabled;
|
||||
VALUE(bool) PluginsEnabledDef;
|
||||
|
||||
KEY RememberBrowserTabs;
|
||||
VALUE(bool)RememberBrowserTabsDef;
|
||||
|
||||
KEY OpenedBrowserTabs;
|
||||
VALUE(QString)OpenedBrowserTabsDef;
|
||||
|
||||
KEY CustomExternalBrowserEnabled;
|
||||
VALUE(bool) CustomExternalBrowserEnabledDef;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user