Add option to ignore symblo link (#1588)
* Add option to ignore symblo link * Modify parameter names --------- Co-authored-by: yangheran <heran.yang@seafile.com>
This commit is contained in:
parent
69b1e05156
commit
4376ac0a95
4 changed files with 30 additions and 1 deletions
|
@ -57,6 +57,7 @@ const char *kProxyPort = "proxy_port";
|
|||
const char *kProxyUsername = "proxy_username";
|
||||
const char *kProxyPassword = "proxy_password";
|
||||
const char *kHideWindowsIncompatiblePathNotification = "hide_windows_incompatible_path_notification";
|
||||
const char *kIgnoreSymlinks = "ignore_symlinks";
|
||||
const char *kRepoSortOrdersGroup = "repo_sort_orders";
|
||||
|
||||
const int kCheckSystemProxyIntervalMSecs = 5 * 1000;
|
||||
|
@ -721,6 +722,20 @@ void SettingsManager::setHideWindowsIncompatibilityPathMsg(bool enabled)
|
|||
seafApplet->rpcClient()->seafileSetConfig(kHideWindowsIncompatiblePathNotification, set_value);
|
||||
return;
|
||||
}
|
||||
|
||||
bool SettingsManager::getIgnoreSymlinks()
|
||||
{
|
||||
QString str;
|
||||
seafApplet->rpcClient()->seafileGetConfig(kIgnoreSymlinks, &str);
|
||||
return str == "true";
|
||||
}
|
||||
|
||||
void SettingsManager::setIgnoreSymlinks(bool enabled)
|
||||
{
|
||||
QString set_value = enabled == true ? "true" : "false";
|
||||
seafApplet->rpcClient()->seafileSetConfig(kIgnoreSymlinks, set_value);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
|
|
|
@ -116,6 +116,8 @@ public:
|
|||
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
|
||||
bool getHideWindowsIncompatibilityPathMsg();
|
||||
void setHideWindowsIncompatibilityPathMsg(bool enabled);
|
||||
bool getIgnoreSymlinks();
|
||||
void setIgnoreSymlinks(bool enabled);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
|
|
|
@ -80,7 +80,8 @@ void SettingsDialog::updateSettings()
|
|||
mgr->setFinderSyncExtension(mFinderSyncCheckBox->checkState() == Qt::Checked);
|
||||
#endif
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
|
||||
mgr -> setHideWindowsIncompatibilityPathMsg(mHideWindowsIncompatibilityCheckBox->checkState() == Qt::Checked);
|
||||
mgr->setHideWindowsIncompatibilityPathMsg(mHideWindowsIncompatibilityCheckBox->checkState() == Qt::Checked);
|
||||
mgr->setIgnoreSymlinks(mIgnoreSymlinksCheckBox->checkState() == Qt::Checked);
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
|
@ -156,8 +157,12 @@ void SettingsDialog::showEvent(QShowEvent *event)
|
|||
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
|
||||
state = mgr->getHideWindowsIncompatibilityPathMsg() ? Qt::Checked : Qt::Unchecked;
|
||||
mHideWindowsIncompatibilityCheckBox->setCheckState(state);
|
||||
|
||||
state = mgr->getIgnoreSymlinks() ? Qt::Checked : Qt::Unchecked;
|
||||
mIgnoreSymlinksCheckBox->setCheckState(state);
|
||||
#else
|
||||
mHideWindowsIncompatibilityCheckBox->hide();
|
||||
mIgnoreSymlinksCheckBox->hide();
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
|
|
|
@ -80,6 +80,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mIgnoreSymlinksCheckBox">
|
||||
<property name="text">
|
||||
<string>Don't sync symbolic links</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="labelAlignment">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue