This commit is contained in:
Martin Rotter 2016-03-05 10:03:57 +01:00
parent e726f3e6f5
commit f42c82503f
6 changed files with 25 additions and 4 deletions

View File

@ -7,6 +7,10 @@ PLEASE, FILL THIS SURVEY.
http://goo.gl/forms/GcvPYgS2a8 http://goo.gl/forms/GcvPYgS2a8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Added:
▪ Opening of download manager when new file download starts is now optional. (issue #165)
Fixed: Fixed:
▪ Fixed little problem with feed list hiding. (bug #163) ▪ Fixed little problem with feed list hiding. (bug #163)

View File

@ -176,6 +176,8 @@ void FormSettings::selectNewNotificationColor() {
} }
void FormSettings::loadDownloads() { void FormSettings::loadDownloads() {
m_ui->m_checkOpenManagerWhenDownloadStarts->setChecked(m_settings->value(GROUP(Downloads),
SETTING(Downloads::ShowDownloadsWhenNewDownloadStarts)).toBool());
m_ui->m_txtDownloadsTargetDirectory->setText(QDir::toNativeSeparators(m_settings->value(GROUP(Downloads), m_ui->m_txtDownloadsTargetDirectory->setText(QDir::toNativeSeparators(m_settings->value(GROUP(Downloads),
SETTING(Downloads::TargetDirectory)).toString())); SETTING(Downloads::TargetDirectory)).toString()));
m_ui->m_rbDownloadsAskEachFile->setChecked(m_settings->value(GROUP(Downloads), m_ui->m_rbDownloadsAskEachFile->setChecked(m_settings->value(GROUP(Downloads),
@ -183,6 +185,7 @@ void FormSettings::loadDownloads() {
} }
void FormSettings::saveDownloads() { void FormSettings::saveDownloads() {
m_settings->setValue(GROUP(Downloads), Downloads::ShowDownloadsWhenNewDownloadStarts, m_ui->m_checkOpenManagerWhenDownloadStarts->isChecked());
m_settings->setValue(GROUP(Downloads), Downloads::TargetDirectory, m_ui->m_txtDownloadsTargetDirectory->text()); m_settings->setValue(GROUP(Downloads), Downloads::TargetDirectory, m_ui->m_txtDownloadsTargetDirectory->text());
m_settings->setValue(GROUP(Downloads), Downloads::AlwaysPromptForFilename, m_ui->m_rbDownloadsAskEachFile->isChecked()); m_settings->setValue(GROUP(Downloads), Downloads::AlwaysPromptForFilename, m_ui->m_rbDownloadsAskEachFile->isChecked());
qApp->downloadManager()->setDownloadDirectory(m_ui->m_txtDownloadsTargetDirectory->text()); qApp->downloadManager()->setDownloadDirectory(m_ui->m_txtDownloadsTargetDirectory->text());

View File

@ -88,7 +88,7 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QStackedWidget" name="m_stackedSettings"> <widget class="QStackedWidget" name="m_stackedSettings">
<property name="currentIndex"> <property name="currentIndex">
<number>6</number> <number>7</number>
</property> </property>
<widget class="QWidget" name="m_pageGeneral"> <widget class="QWidget" name="m_pageGeneral">
<layout class="QFormLayout" name="formLayout_5"> <layout class="QFormLayout" name="formLayout_5">
@ -495,8 +495,8 @@ Authors of this application are NOT responsible for lost data.</string>
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>167</width> <width>208</width>
<height>219</height> <height>238</height>
</rect> </rect>
</property> </property>
<layout class="QFormLayout" name="formLayout"> <layout class="QFormLayout" name="formLayout">
@ -1588,6 +1588,13 @@ Authors of this application are NOT responsible for lost data.</string>
</layout> </layout>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</widget> </widget>

View File

@ -186,6 +186,9 @@ DVALUE(int) Downloads::RemovePolicyDef = DownloadManager::Never;
DKEY Downloads::TargetExplicitDirectory = "target_explicit_directory"; DKEY Downloads::TargetExplicitDirectory = "target_explicit_directory";
DVALUE(QString) Downloads::TargetExplicitDirectoryDef = IOFactory::getSystemFolder(SYSTEM_FOLDER_ENUM::DesktopLocation); DVALUE(QString) Downloads::TargetExplicitDirectoryDef = IOFactory::getSystemFolder(SYSTEM_FOLDER_ENUM::DesktopLocation);
DKEY Downloads::ShowDownloadsWhenNewDownloadStarts = "show_downloads_on_new_download_start";
DVALUE(bool) Downloads::ShowDownloadsWhenNewDownloadStartsDef = true;
DKEY Downloads::ItemUrl = "download_%1_url"; DKEY Downloads::ItemUrl = "download_%1_url";
DKEY Downloads::ItemLocation = "download_%1_location"; DKEY Downloads::ItemLocation = "download_%1_location";
DKEY Downloads::ItemDone = "download_%1_done"; DKEY Downloads::ItemDone = "download_%1_done";

View File

@ -207,6 +207,9 @@ namespace Downloads {
KEY TargetExplicitDirectory; KEY TargetExplicitDirectory;
VALUE(QString) TargetExplicitDirectoryDef; VALUE(QString) TargetExplicitDirectoryDef;
KEY ShowDownloadsWhenNewDownloadStarts;
VALUE(bool) ShowDownloadsWhenNewDownloadStartsDef;
KEY ItemUrl; KEY ItemUrl;
KEY ItemLocation; KEY ItemLocation;
KEY ItemDone; KEY ItemDone;

View File

@ -525,7 +525,8 @@ void DownloadManager::handleUnsupportedContent(QNetworkReply *reply) {
DownloadItem *item = new DownloadItem(reply, this); DownloadItem *item = new DownloadItem(reply, this);
addItem(item); addItem(item);
if (!item->m_canceledFileSelect) { if (!item->m_canceledFileSelect && qApp->settings()->value(GROUP(Downloads),
SETTING(Downloads::ShowDownloadsWhenNewDownloadStarts)).toBool()) {
qApp->mainForm()->tabWidget()->showDownloadManager(); qApp->mainForm()->tabWidget()->showDownloadManager();
} }
} }