connect(_tray.data(), &Systray::openHelp,
this, &ownCloudGui::slotHelp);
+ connect(_tray.data(), &Systray::openAccountWizard,
+ this, &ownCloudGui::slotNewAccountWizard);
+
connect(_tray.data(), &Systray::openMainDialog,
this, &ownCloudGui::slotOpenMainDialog);
#ifndef Q_OS_MAC
auto contextMenu = new QMenu();
- contextMenu->addAction(tr("Open main dialog"), this, &Systray::openMainDialog);
- contextMenu->addAction(tr("Settings"), this, &Systray::openSettings);
+ if (AccountManager::instance()->accounts().isEmpty()) {
+ contextMenu->addAction(tr("Add account"), this, &Systray::openAccountWizard);
+ } else {
+ contextMenu->addAction(tr("Open main dialog"), this, &Systray::openMainDialog);
+ contextMenu->addAction(tr("Settings"), this, &Systray::openSettings);
+ }
contextMenu->addAction(tr("Exit %1").arg(Theme::instance()->appNameGUI()), this, &Systray::shutdown);
setContextMenu(contextMenu);
#endif