|
|
|
@ -675,10 +675,10 @@ void OptionsDialog::saveOptions()
@@ -675,10 +675,10 @@ void OptionsDialog::saveOptions()
|
|
|
|
|
pref->setHideZeroValues(m_ui->checkHideZero->isChecked()); |
|
|
|
|
pref->setHideZeroComboValues(m_ui->comboHideZero->currentIndex()); |
|
|
|
|
#ifndef Q_OS_MACOS |
|
|
|
|
pref->setSystemTrayEnabled(systemTrayEnabled()); |
|
|
|
|
pref->setSystemTrayEnabled(m_ui->checkShowSystray->isChecked()); |
|
|
|
|
pref->setTrayIconStyle(TrayIcon::Style(m_ui->comboTrayIcon->currentIndex())); |
|
|
|
|
pref->setCloseToTray(closeToTray()); |
|
|
|
|
pref->setMinimizeToTray(minimizeToTray()); |
|
|
|
|
pref->setCloseToTray(m_ui->checkCloseToSystray->isChecked()); |
|
|
|
|
pref->setMinimizeToTray(m_ui->checkMinimizeToSysTray->isChecked()); |
|
|
|
|
#endif |
|
|
|
|
pref->setStartMinimized(startMinimized()); |
|
|
|
|
pref->setSplashScreenDisabled(isSplashScreenDisabled()); |
|
|
|
@ -935,12 +935,9 @@ void OptionsDialog::loadOptions()
@@ -935,12 +935,9 @@ void OptionsDialog::loadOptions()
|
|
|
|
|
|
|
|
|
|
#ifndef Q_OS_MACOS |
|
|
|
|
m_ui->checkShowSystray->setChecked(pref->systemTrayEnabled()); |
|
|
|
|
if (m_ui->checkShowSystray->isChecked()) |
|
|
|
|
{ |
|
|
|
|
m_ui->checkMinimizeToSysTray->setChecked(pref->minimizeToTray()); |
|
|
|
|
m_ui->checkCloseToSystray->setChecked(pref->closeToTray()); |
|
|
|
|
m_ui->comboTrayIcon->setCurrentIndex(static_cast<int>(pref->trayIconStyle())); |
|
|
|
|
} |
|
|
|
|
m_ui->checkMinimizeToSysTray->setChecked(pref->minimizeToTray()); |
|
|
|
|
m_ui->checkCloseToSystray->setChecked(pref->closeToTray()); |
|
|
|
|
m_ui->comboTrayIcon->setCurrentIndex(static_cast<int>(pref->trayIconStyle())); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
m_ui->checkPreventFromSuspendWhenDownloading->setChecked(pref->preventFromSuspendWhenDownloading()); |
|
|
|
@ -1354,27 +1351,6 @@ bool OptionsDialog::startMinimized() const
@@ -1354,27 +1351,6 @@ bool OptionsDialog::startMinimized() const
|
|
|
|
|
return m_ui->checkStartMinimized->isChecked(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifndef Q_OS_MACOS |
|
|
|
|
bool OptionsDialog::systemTrayEnabled() const |
|
|
|
|
{ |
|
|
|
|
return QSystemTrayIcon::isSystemTrayAvailable() |
|
|
|
|
? m_ui->checkShowSystray->isChecked() |
|
|
|
|
: false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool OptionsDialog::minimizeToTray() const |
|
|
|
|
{ |
|
|
|
|
if (!m_ui->checkShowSystray->isChecked()) return false; |
|
|
|
|
return m_ui->checkMinimizeToSysTray->isChecked(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool OptionsDialog::closeToTray() const |
|
|
|
|
{ |
|
|
|
|
if (!m_ui->checkShowSystray->isChecked()) return false; |
|
|
|
|
return m_ui->checkCloseToSystray->isChecked(); |
|
|
|
|
} |
|
|
|
|
#endif // Q_OS_MACOS
|
|
|
|
|
|
|
|
|
|
// Return Share ratio
|
|
|
|
|
qreal OptionsDialog::getMaxRatio() const |
|
|
|
|
{ |
|
|
|
|