connect(_ui->ignoredFilesButton, &QAbstractButton::clicked, this, &GeneralSettings::slotIgnoreFilesEditor);
// accountAdded means the wizard was finished and the wizard might change some options.
- connect(AccountManager::instance(), &AccountManager::accountAdded, this, &GeneralSettings::loadMiscSettings);
+ // Update 01/2020: Show new tray window instead
+ // connect(AccountManager::instance(), &AccountManager::accountAdded, this, &GeneralSettings::loadMiscSettings);
customizeStyle();
}
connect(UserModel::instance(), &UserModel::newUserSelected,
this, &Systray::slotChangeActivityModel);
+
+ connect(AccountManager::instance(), &AccountManager::accountAdded,
+ this, &Systray::showWindow);
}
Systray::~Systray()
#include <QDesktopServices>
#include <QIcon>
+#include <QMessageBox>
#include <QSvgRenderer>
#include <QPainter>
+#include <QPushButton>
namespace OCC {
Q_INVOKABLE void UserModel::removeAccount(const int &id)
{
+ QMessageBox messageBox(QMessageBox::Question,
+ tr("Confirm Account Removal"),
+ tr("<p>Do you really want to remove the connection to the account <i>%1</i>?</p>"
+ "<p><b>Note:</b> This will <b>not</b> delete any files.</p>")
+ .arg(_users[id].name()),
+ QMessageBox::NoButton);
+ QPushButton *yesButton =
+ messageBox.addButton(tr("Remove connection"), QMessageBox::YesRole);
+ messageBox.addButton(tr("Cancel"), QMessageBox::NoRole);
+
+ messageBox.exec();
+ if (messageBox.clickedButton() != yesButton) {
+ return;
+ }
+
_users[id].logout();
_users[id].removeAccount();
if (_users.count() > 1) {