connect(_engine.data(), SIGNAL(transmissionProgress(ProgressInfo)), this, SLOT(slotTransmissionProgress(ProgressInfo)));
connect(_engine.data(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
this, SLOT(slotItemCompleted(const SyncFileItem &, const PropagatorJob &)));
- connect(_engine.data(), SIGNAL(newBigFolder(QString)), this, SLOT(slotNewBigFolderDiscovered(QString)));
+ connect(_engine.data(), SIGNAL(newBigFolder(QString,bool)),
+ this, SLOT(slotNewBigFolderDiscovered(QString,bool)));
connect(_engine.data(), SIGNAL(seenLockedFile(QString)), FolderMan::instance(), SLOT(slotSyncOnceFileUnlocks(QString)));
connect(_engine.data(), SIGNAL(aboutToPropagate(SyncFileItemVector&)),
SLOT(slotLogPropagationStart()));
emit ProgressDispatcher::instance()->itemCompleted(alias(), item, job);
}
-void Folder::slotNewBigFolderDiscovered(const QString &newF)
+void Folder::slotNewBigFolderDiscovered(const QString &newF, bool isExternal)
{
auto newFolder = newF;
if (!newFolder.endsWith(QLatin1Char('/'))) {
journal->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, undecidedList);
emit newBigFolderDiscovered(newFolder);
}
- QString message = tr("A new folder larger than %1 MB has been added: %2.\n"
- "Please go in the settings to select it if you wish to download it.")
- .arg(ConfigFile().newBigFolderSizeLimit().second).arg(newF);
+ QString message = !isExternal ?
+ (tr("A new folder larger than %1 MB has been added: %2.\n")
+ .arg(ConfigFile().newBigFolderSizeLimit().second).arg(newF))
+ : (tr("A folder from an external storage has been added.\n"));
+ message += tr("Please go in the settings to select it if you wish to download it.");
auto logger = Logger::instance();
logger->postOptionalGuiLog(Theme::instance()->appNameGUI(), message);
void slotEmitFinishedDelayed();
- void slotNewBigFolderDiscovered(const QString &);
+ void slotNewBigFolderDiscovered(const QString &, bool isExternal);
void slotLogPropagationStart();
<property name="title">
<string>Advanced</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1" colspan="2">
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>555</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="0" colspan="2">
- <widget class="QCheckBox" name="crashreporterCheckBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>S&how crash reporter</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QPushButton" name="ignoredFilesButton">
+ <property name="text">
+ <string>Edit &Ignored Files</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>555</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</item>
- <item row="1" column="0" colspan="3">
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="newFolderLimitCheckBox">
</item>
</layout>
</item>
- <item row="3" column="2">
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="0" column="0">
- <widget class="QPushButton" name="ignoredFilesButton">
+ <item>
+ <widget class="QCheckBox" name="newExternalStorage">
<property name="text">
- <string>Edit &Ignored Files</string>
+ <string>Ask for confirmation before synchronizing external storages</string>
</property>
</widget>
</item>
- <item row="2" column="0" colspan="3">
- <widget class="QCheckBox" name="newExternalStorage">
+ <item>
+ <widget class="QCheckBox" name="crashreporterCheckBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Ask for confirmation before synchronizing external storages</string>
+ <string>S&how crash reporter</string>
</property>
</widget>
</item>
return false;
}
- emit newBigFolder(path);
+ emit newBigFolder(path, true);
return true;
}
if (result >= limit) {
// we tell the UI there is a new folder
- emit newBigFolder(path);
+ emit newBigFolder(path, false);
return true;
} else {
// it is not too big, put it in the white list (so we will not do more query for the children)
void doGetSizeSignal(const QString &path, qint64 *result);
// A new folder was discovered and was not synced because of the confirmation feature
- void newBigFolder(const QString &folder);
+ void newBigFolder(const QString &folder, bool isExternal);
};
}
connect(discoveryJob, SIGNAL(folderDiscovered(bool,QString)),
this, SIGNAL(folderDiscovered(bool,QString)));
- connect(discoveryJob, SIGNAL(newBigFolder(QString)),
- this, SIGNAL(newBigFolder(QString)));
+ connect(discoveryJob, SIGNAL(newBigFolder(QString,bool)),
+ this, SIGNAL(newBigFolder(QString,bool)));
// This is used for the DiscoveryJob to be able to request the main thread/
void aboutToRestoreBackup(bool *restore);
// A new folder was discovered and was not synced because of the confirmation feature
- void newBigFolder(const QString &folder);
+ void newBigFolder(const QString &folder, bool isExternal);
/** Emitted when propagation has problems with a locked file.
*