qDebug() << "Remove Folder alias " << alias;
if( !alias.isEmpty() ) {
FolderMan *folderMan = FolderMan::instance();
- QString aliasGui = folderMan->folder(alias)->aliasGui();
+ QString shortGuiLocalPath = folderMan->folder(alias)->shortGuiLocalPath();
QMessageBox messageBox(QMessageBox::Question,
tr("Confirm Folder Sync Connection Removal"),
tr("<p>Do you really want to stop syncing the folder <i>%1</i>?</p>"
- "<p><b>Note:</b> This will <b>not</b> delete any files.</p>").arg(aliasGui),
+ "<p><b>Note:</b> This will <b>not</b> delete any files.</p>").arg(shortGuiLocalPath),
QMessageBox::NoButton,
this);
QPushButton* yesButton =
}
}
-QString Folder::aliasGui() const
+QString Folder::shortGuiRemotePathOrAppName() const
{
if (remotePath().length() > 0 && remotePath() != QLatin1String("/")) {
QString a = QFile(remotePath()).fileName();
return p;
}
-QString Folder::shortGuiPath() const
+QString Folder::shortGuiLocalPath() const
{
QString p = _definition.localPath;
QString home = QDir::homePath();
"the files were manually removed.\n"
"Are you sure you want to perform this operation?");
QMessageBox msgBox(QMessageBox::Warning, tr("Remove All Files?"),
- msg.arg(aliasGui()));
+ msg.arg(shortGuiLocalPath()));
msgBox.addButton(tr("Remove all files"), QMessageBox::DestructiveRole);
QPushButton* keepBtn = msgBox.addButton(tr("Keep files"), QMessageBox::AcceptRole);
if (msgBox.exec() == -1) {
"file in an earlier state. "
"Do you want to keep your local most recent files as conflict files?");
QMessageBox msgBox(QMessageBox::Warning, tr("Backup detected"),
- msg.arg(aliasGui()));
+ msg.arg(shortGuiLocalPath()));
msgBox.addButton(tr("Normal Synchronisation"), QMessageBox::DestructiveRole);
QPushButton* keepBtn = msgBox.addButton(tr("Keep Local Files as Conflict"), QMessageBox::AcceptRole);
* alias or nickname
*/
QString alias() const;
- QString aliasGui() const; // since 2.0 we don't want to show aliases anymore, show the path instead
+ QString shortGuiRemotePathOrAppName() const; // since 2.0 we don't want to show aliases anymore, show the path instead
/**
- * short path to display on the GUI (native separators)
+ * short local path to display on the GUI (native separators)
*/
- QString shortGuiPath() const;
+ QString shortGuiLocalPath() const;
/**
* local folder path
{
auto folder = new Folder(folderDefinition, accountState, this );
- qDebug() << "Adding folder to Folder Map " << folder;
+ qDebug() << "Adding folder to Folder Map " << folder << folder->alias();
_folderMap[folder->alias()] = folder;
if (folder->syncPaused()) {
_disabledFolders.insert(folder);
const bool accountConnected = _accountState->isConnected();
switch (role) {
- case FolderStatusDelegate::FolderPathRole : return f->shortGuiPath();
+ case FolderStatusDelegate::FolderPathRole : return f->shortGuiLocalPath();
case FolderStatusDelegate::FolderSecondPathRole : return f->remotePath();
case FolderStatusDelegate::FolderErrorMsg : return f->syncResult().errorStrings();
case FolderStatusDelegate::SyncRunning : return f->syncResult().status() == SyncResult::SyncRunning;
- case FolderStatusDelegate::HeaderRole : return f->aliasGui();
+ case FolderStatusDelegate::HeaderRole : return f->shortGuiRemotePathOrAppName();
case FolderStatusDelegate::FolderAliasRole : return f->alias();
case FolderStatusDelegate::FolderSyncPaused : return f->syncPaused();
case FolderStatusDelegate::FolderAccountConnected : return accountConnected;
foreach(Folder* folder, map.values()) {
//qDebug() << "Folder in overallStatus Message: " << folder << " with name " << folder->alias();
QString folderMessage = folderMan->statusToString(folder->syncResult().status(), folder->syncPaused());
- allStatusStrings += tr("Folder %1: %2").arg(folder->aliasGui(), folderMessage);
+ allStatusStrings += tr("Folder %1: %2").arg(folder->shortGuiLocalPath(), folderMessage);
}
trayMessage = allStatusStrings.join(QLatin1String("\n"));
#endif
menu->addAction(tr("Managed Folders:"))->setDisabled(true);
}
- QAction *action = new QAction( tr("Open folder '%1'").arg(folder->shortGuiPath()), this );
+ QAction *action = new QAction( tr("Open folder '%1'").arg(folder->shortGuiLocalPath()), this );
connect(action, SIGNAL(triggered()),_folderOpenActionMapper, SLOT(map()));
_folderOpenActionMapper->setMapping( action, folder->alias() );
menu->addAction(action);
columns << timeStr;
columns << Utility::fileNameForGuiUse(item._originalFile);
- columns << f->shortGuiPath();
+ columns << f->shortGuiLocalPath();
// If the error string is set, it's prefered because it is a useful user message.
QString message = item._errorString;