"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/ui/settings-dialog.cpp" between
seafile-client-9.0.1.tar.gz and seafile-client-9.0.2.tar.gz

About: Seafile (client) for the Seafile cloud storage system.

settings-dialog.cpp  (seafile-client-9.0.1):settings-dialog.cpp  (seafile-client-9.0.2)
skipping to change at line 15 skipping to change at line 15
#include <QSettings> #include <QSettings>
#include "i18n.h" #include "i18n.h"
#include "account-mgr.h" #include "account-mgr.h"
#include "utils/utils.h" #include "utils/utils.h"
#include "seafile-applet.h" #include "seafile-applet.h"
#include "settings-mgr.h" #include "settings-mgr.h"
#include "api/requests.h" #include "api/requests.h"
#include "settings-dialog.h" #include "settings-dialog.h"
#ifdef HAVE_SPARKLE_SUPPORT
#include "auto-update-service.h"
#endif
namespace { namespace {
const char *kSettingsGroupForSettingsDialog = "SettingsDialog"; const char *kSettingsGroupForSettingsDialog = "SettingsDialog";
} // namespace } // namespace
SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent) SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent)
{ {
setupUi(this); setupUi(this);
setWindowTitle(tr("Settings")); setWindowTitle(tr("Settings"));
skipping to change at line 40 skipping to change at line 36
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
mAutoStartCheckBox->setText( mAutoStartCheckBox->setText(
tr("Auto start %1 after login").arg(getBrand())); tr("Auto start %1 after login").arg(getBrand()));
mHideDockIconCheckBox->setText( mHideDockIconCheckBox->setText(
tr("Hide %1 Icon from the dock").arg(getBrand())); tr("Hide %1 Icon from the dock").arg(getBrand()));
mTabWidget->setCurrentIndex(0); mTabWidget->setCurrentIndex(0);
#ifdef HAVE_SPARKLE_SUPPORT
if (!AutoUpdateService::instance()->shouldSupportAutoUpdate()) {
mCheckLatestVersionBox->setVisible(false);
}
#endif
mLanguageComboBox->addItems(I18NHelper::getInstance()->getLanguages()); mLanguageComboBox->addItems(I18NHelper::getInstance()->getLanguages());
// The range of mProxyPort is set to (0, 65535) in the ui file, so we // The range of mProxyPort is set to (0, 65535) in the ui file, so we
// don't bother with that here. // don't bother with that here.
mProxyMethodComboBox->insertItem(SettingsManager::NoProxy, tr("None")); mProxyMethodComboBox->insertItem(SettingsManager::NoProxy, tr("None"));
mProxyMethodComboBox->insertItem(SettingsManager::HttpProxy, tr("HTTP Proxy" )); mProxyMethodComboBox->insertItem(SettingsManager::HttpProxy, tr("HTTP Proxy" ));
mProxyMethodComboBox->insertItem(SettingsManager::SocksProxy, tr("Socks5 Pro xy")); mProxyMethodComboBox->insertItem(SettingsManager::SocksProxy, tr("Socks5 Pro xy"));
mProxyMethodComboBox->insertItem(SettingsManager::SystemProxy, tr("System Pr oxy")); mProxyMethodComboBox->insertItem(SettingsManager::SystemProxy, tr("System Pr oxy"));
connect(mProxyMethodComboBox, SIGNAL(currentIndexChanged(int)), connect(mProxyMethodComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(showHideControlsBasedOnCurrentProxyType(int))); this, SLOT(showHideControlsBasedOnCurrentProxyType(int)));
connect(mProxyRequirePassword, SIGNAL(stateChanged(int)), connect(mProxyRequirePassword, SIGNAL(stateChanged(int)),
skipping to change at line 102 skipping to change at line 92
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) #if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
mgr -> setHideWindowsIncompatibilityPathMsg(mHideWindowsIncompatibilityCheck Box->checkState() == Qt::Checked); mgr -> setHideWindowsIncompatibilityPathMsg(mHideWindowsIncompatibilityCheck Box->checkState() == Qt::Checked);
#endif #endif
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
mgr->setShellExtensionEnabled(mShellExtCheckBox->checkState() == Qt::Checked ); mgr->setShellExtensionEnabled(mShellExtCheckBox->checkState() == Qt::Checked );
#endif #endif
updateProxySettings(); updateProxySettings();
#ifdef HAVE_SPARKLE_SUPPORT
if (AutoUpdateService::instance()->shouldSupportAutoUpdate()) {
bool enabled = mCheckLatestVersionBox->checkState() == Qt::Checked;
AutoUpdateService::instance()->setAutoUpdateEnabled(enabled);
}
#endif
bool language_changed = false; bool language_changed = false;
if (mLanguageComboBox->currentIndex() != I18NHelper::getInstance()->preferre dLanguage()) { if (mLanguageComboBox->currentIndex() != I18NHelper::getInstance()->preferre dLanguage()) {
language_changed = true; language_changed = true;
I18NHelper::getInstance()->setPreferredLanguage(mLanguageComboBox->curre ntIndex()); I18NHelper::getInstance()->setPreferredLanguage(mLanguageComboBox->curre ntIndex());
} }
if (language_changed && seafApplet->yesOrNoBox(tr("You have changed languang e. Restart to apply it?"), this, true)) if (language_changed && seafApplet->yesOrNoBox(tr("You have changed languang e. Restart to apply it?"), this, true))
seafApplet->restartApp(); seafApplet->restartApp();
// if (proxy_changed && seafApplet->yesOrNoBox(tr("You have changed proxy se ttings. Restart to apply it?"), this, true)) // if (proxy_changed && seafApplet->yesOrNoBox(tr("You have changed proxy se ttings. Restart to apply it?"), this, true))
skipping to change at line 203 skipping to change at line 186
state = mgr->notify() ? Qt::Checked : Qt::Unchecked; state = mgr->notify() ? Qt::Checked : Qt::Unchecked;
mNotifyCheckBox->setCheckState(state); mNotifyCheckBox->setCheckState(state);
int ratio; int ratio;
ratio = mgr->maxDownloadRatio(); ratio = mgr->maxDownloadRatio();
mDownloadSpinBox->setValue(ratio); mDownloadSpinBox->setValue(ratio);
ratio = mgr->maxUploadRatio(); ratio = mgr->maxUploadRatio();
mUploadSpinBox->setValue(ratio); mUploadSpinBox->setValue(ratio);
#ifdef HAVE_SPARKLE_SUPPORT
if (AutoUpdateService::instance()->shouldSupportAutoUpdate()) {
state = AutoUpdateService::instance()->autoUpdateEnabled() ? Qt::Checked
: Qt::Unchecked;
mCheckLatestVersionBox->setCheckState(state);
}
#endif
mDeleteConfirmSpinBox->setValue(mgr->deleteConfirmThreshold()); mDeleteConfirmSpinBox->setValue(mgr->deleteConfirmThreshold());
SettingsManager::SeafileProxy proxy = mgr->getProxy(); SettingsManager::SeafileProxy proxy = mgr->getProxy();
showHideControlsBasedOnCurrentProxyType(proxy.type); showHideControlsBasedOnCurrentProxyType(proxy.type);
mProxyMethodComboBox->setCurrentIndex(proxy.type); mProxyMethodComboBox->setCurrentIndex(proxy.type);
mProxyHost->setText(proxy.host); mProxyHost->setText(proxy.host);
mProxyPort->setValue(proxy.port); mProxyPort->setValue(proxy.port);
mProxyUsername->setText(proxy.username); mProxyUsername->setText(proxy.username);
mProxyPassword->setText(proxy.password); mProxyPassword->setText(proxy.password);
if (!proxy.username.isEmpty()) if (!proxy.username.isEmpty())
 End of changes. 4 change blocks. 
25 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)