mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
button to add a new sync folder added to status dialog.
This commit is contained in:
parent
267f444dd1
commit
94481a672a
3 changed files with 15 additions and 0 deletions
|
@ -70,7 +70,9 @@ Application::Application(int argc, char **argv) :
|
|||
|
||||
_folderWizard = new FolderWizard();
|
||||
_owncloudSetupWizard = new OwncloudSetupWizard();
|
||||
|
||||
_statusDialog = new StatusDialog( _theme );
|
||||
connect( _statusDialog, SIGNAL(addASync()), this, SLOT(slotAddFolder()) );
|
||||
|
||||
connect( _statusDialog, SIGNAL(removeFolderAlias( const QString&)),
|
||||
SLOT(slotRemoveFolder(const QString&)));
|
||||
|
|
|
@ -136,6 +136,7 @@ StatusDialog::StatusDialog( Theme *theme, QWidget *parent) :
|
|||
connect(_ButtonOpenOC, SIGNAL(clicked()), this, SLOT(slotOpenOC()));
|
||||
connect(_ButtonEnable, SIGNAL(clicked()), this, SLOT(slotEnableFolder()));
|
||||
connect(_ButtonInfo, SIGNAL(clicked()), this, SLOT(slotInfoFolder()));
|
||||
connect(_ButtonAdd, SIGNAL(clicked()), this, SLOT(slotAddSync()));
|
||||
|
||||
_ButtonOpenOC->setEnabled(false);
|
||||
_ButtonRemove->setEnabled(false);
|
||||
|
@ -143,6 +144,7 @@ StatusDialog::StatusDialog( Theme *theme, QWidget *parent) :
|
|||
_ButtonPush->setEnabled(false);
|
||||
_ButtonEnable->setEnabled(false);
|
||||
_ButtonInfo->setEnabled(false);
|
||||
_ButtonAdd->setEnabled(true);
|
||||
|
||||
connect(_folderList, SIGNAL(activated(QModelIndex)), SLOT(slotFolderActivated(QModelIndex)));
|
||||
|
||||
|
@ -264,6 +266,12 @@ void StatusDialog::slotInfoFolder()
|
|||
}
|
||||
}
|
||||
|
||||
void StatusDialog::slotAddSync()
|
||||
{
|
||||
qDebug() << "Add a sync requested.";
|
||||
emit addASync();
|
||||
}
|
||||
|
||||
void StatusDialog::slotOCInfo( const QString& url, const QString& version )
|
||||
{
|
||||
_OCUrl = url;
|
||||
|
@ -276,6 +284,7 @@ void StatusDialog::slotOCInfoFail()
|
|||
{
|
||||
_ocUrlLabel->setText( tr("Failed to connect to ownCloud. Please check configuration!") );
|
||||
_ButtonOpenOC->setEnabled(false);
|
||||
_ButtonAdd->setEnabled( false);
|
||||
}
|
||||
|
||||
void StatusDialog::slotOpenOC()
|
||||
|
|
|
@ -61,6 +61,9 @@ signals:
|
|||
void enableFolderAlias( const QString&, const bool );
|
||||
void infoFolderAlias( const QString& );
|
||||
|
||||
/* start the add a folder wizard. */
|
||||
void addASync();
|
||||
|
||||
public slots:
|
||||
void slotRemoveFolder();
|
||||
void slotFetchFolder();
|
||||
|
@ -69,6 +72,7 @@ public slots:
|
|||
void slotOpenOC();
|
||||
void slotEnableFolder();
|
||||
void slotInfoFolder();
|
||||
void slotAddSync();
|
||||
|
||||
protected slots:
|
||||
void slotOCInfoFail();
|
||||
|
|
Loading…
Reference in a new issue