TrayMenu: Ensure it updates when accounts are added or removed.

This commit is contained in:
Christian Kamm 2015-07-03 11:13:19 +02:00
parent 76903fb55a
commit 9ad79cfc52
3 changed files with 7 additions and 3 deletions

View file

@ -216,7 +216,7 @@ void AccountManager::deleteAccount(AccountState* account)
auto settings = Account::settingsWithGroup(QLatin1String(accountsC));
settings->remove(account->account()->id());
accountRemoved(account);
emit accountRemoved(account);
}

View file

@ -89,6 +89,11 @@ ownCloudGui::ownCloudGui(Application *parent) :
connect( folderMan, SIGNAL(folderSyncStateChange(Folder*)),
this,SLOT(slotSyncStateChange(Folder*)));
connect( AccountManager::instance(), SIGNAL(accountAdded(AccountState*)),
SLOT(setupContextMenu()));
connect( AccountManager::instance(), SIGNAL(accountRemoved(AccountState*)),
SLOT(setupContextMenu()));
connect( Logger::instance(), SIGNAL(guiLog(QString,QString)),
SLOT(slotShowTrayMessage(QString,QString)));
connect( Logger::instance(), SIGNAL(optionalGuiLog(QString,QString)),

View file

@ -43,8 +43,6 @@ class ownCloudGui : public QObject
public:
explicit ownCloudGui(Application *parent = 0);
void setupContextMenu();
bool checkAccountExists(bool openSettings);
static void raiseDialog(QWidget *raiseWidget);
@ -54,6 +52,7 @@ signals:
void setupProxy();
public slots:
void setupContextMenu();
void slotComputeOverallSyncStatus();
void slotShowTrayMessage(const QString &title, const QString &msg);
void slotShowOptionalTrayMessage(const QString &title, const QString &msg);