mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
parent
c8ccb014c8
commit
6c7700c2e7
@ -564,7 +564,6 @@ void Application::slotSettings()
|
||||
{
|
||||
if (_settingsDialog.isNull()) {
|
||||
_settingsDialog = new SettingsDialog(this);
|
||||
connect(_settingsDialog, SIGNAL(accepted()), _settingsDialog, SLOT(deleteLater()));
|
||||
_settingsDialog->open();
|
||||
} else {
|
||||
Utility::raiseDialog(_settingsDialog);
|
||||
|
||||
@ -102,6 +102,7 @@ public:
|
||||
|
||||
QString seenVersion() const;
|
||||
void setSeenVersion(const QString &version);
|
||||
|
||||
protected:
|
||||
// these classes can only be access from CredentialStore as a friend class.
|
||||
QString ownCloudPasswd( const QString& connection = QString() ) const;
|
||||
|
||||
@ -19,11 +19,13 @@
|
||||
#include "mirall/accountsettings.h"
|
||||
#include "mirall/application.h"
|
||||
#include "mirall/ignorelisteditor.h"
|
||||
#include "mirall/mirallconfigfile.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QStandardItemModel>
|
||||
#include <QPushButton>
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
|
||||
namespace Mirall {
|
||||
|
||||
@ -75,8 +77,11 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
||||
_ui->stack, SLOT(setCurrentIndex(int)));
|
||||
|
||||
QPushButton *closeButton = _ui->buttonBox->button(QDialogButtonBox::Close);
|
||||
connect(closeButton, SIGNAL(pressed()), SLOT(accept()));
|
||||
connect(closeButton, SIGNAL(pressed()), SLOT(done()));
|
||||
|
||||
MirallConfigFile cfg;
|
||||
QSettings settings(cfg.configFile(), QSettings::IniFormat);
|
||||
restoreGeometry(settings.value("Settings/geometry").toByteArray());
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog()
|
||||
@ -99,4 +104,17 @@ void SettingsDialog::slotFolderUploadProgress( const QString& folderAlias, const
|
||||
_accountSettings->slotSetProgress(folderAlias, file, p1, p2);
|
||||
}
|
||||
|
||||
void SettingsDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
MirallConfigFile cfg;
|
||||
QSettings settings(cfg.configFile(), QSettings::IniFormat);
|
||||
settings.setValue("Settings/geometry", saveGeometry());
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
void SettingsDialog::done()
|
||||
{
|
||||
QDialog::done(0);
|
||||
}
|
||||
|
||||
} // namespace Mirall
|
||||
|
||||
@ -37,13 +37,18 @@ public:
|
||||
~SettingsDialog();
|
||||
|
||||
void addAccount(const QString &title, QWidget *widget);
|
||||
|
||||
public slots:
|
||||
// Progress, parameter is
|
||||
// - filename
|
||||
// - progress bytes, overall size.
|
||||
void slotFolderUploadProgress( const QString&, const QString&, long, long );
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
private slots:
|
||||
void done();
|
||||
|
||||
private:
|
||||
Ui::SettingsDialog *_ui;
|
||||
QListWidgetItem *_addItem;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user