mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
TrayMenu: Ensure it updates when accounts are added or removed.
This commit is contained in:
parent
76903fb55a
commit
9ad79cfc52
3 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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)),
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue