mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 16:29:44 -05:00
Added http service start to MainWindow
Added http settings pane to SettingsWidget Settings are probably broken still
This commit is contained in:
parent
235baa3dcc
commit
eea9d7db97
@ -29,6 +29,9 @@
|
||||
#include "gui/AboutDialog.h"
|
||||
#include "gui/DatabaseWidget.h"
|
||||
|
||||
#include "http/Service.h"
|
||||
#include "http/HttpSettings.h"
|
||||
|
||||
const QString MainWindow::BaseWindowTitle = "KeePassX";
|
||||
|
||||
MainWindow::MainWindow()
|
||||
@ -204,6 +207,11 @@ MainWindow::MainWindow()
|
||||
SLOT(openSearch()));
|
||||
|
||||
updateTrayIcon();
|
||||
|
||||
// Keepasshttp service
|
||||
Service *m_service = new Service(m_ui->tabWidget);
|
||||
if (HttpSettings::isEnabled())
|
||||
m_service->start();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -305,6 +313,7 @@ void MainWindow::setMenuActionState(DatabaseWidget::Mode mode)
|
||||
}
|
||||
case DatabaseWidget::EditMode:
|
||||
case DatabaseWidget::LockedMode:
|
||||
case DatabaseWidget::OpenMode:
|
||||
Q_FOREACH (QAction* action, m_ui->menuEntries->actions()) {
|
||||
action->setEnabled(false);
|
||||
}
|
||||
|
@ -23,12 +23,15 @@
|
||||
#include "core/Config.h"
|
||||
#include "core/Translator.h"
|
||||
|
||||
#include "http/OptionDialog.h"
|
||||
|
||||
SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
: EditWidget(parent)
|
||||
, m_secWidget(new QWidget())
|
||||
, m_generalWidget(new QWidget())
|
||||
, m_secUi(new Ui::SettingsWidgetSecurity())
|
||||
, m_generalUi(new Ui::SettingsWidgetGeneral())
|
||||
, m_optionDialogUi(new OptionDialog())
|
||||
, m_globalAutoTypeKey(static_cast<Qt::Key>(0))
|
||||
, m_globalAutoTypeModifiers(Qt::NoModifier)
|
||||
{
|
||||
@ -38,6 +41,9 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
m_generalUi->setupUi(m_generalWidget);
|
||||
add(tr("General"), m_generalWidget);
|
||||
add(tr("Security"), m_secWidget);
|
||||
add(tr("HTTP"), m_optionDialogUi);
|
||||
//QObject::connect(m_optionDialogUi, SIGNAL(removeSharedEncryptionKeys()), m_service, SLOT(removeSharedEncryptionKeys()));
|
||||
//QObject::connect(m_optionDialogUi, SIGNAL(removeStoredPermissions()), m_service, SLOT(removeStoredPermissions()));
|
||||
|
||||
m_generalUi->autoTypeShortcutWidget->setVisible(autoType()->isAvailable());
|
||||
m_generalUi->autoTypeShortcutLabel->setVisible(autoType()->isAvailable());
|
||||
@ -62,6 +68,7 @@ SettingsWidget::~SettingsWidget()
|
||||
|
||||
void SettingsWidget::loadSettings()
|
||||
{
|
||||
m_optionDialogUi->loadSettings();
|
||||
m_generalUi->rememberLastDatabasesCheckBox->setChecked(config()->get("RememberLastDatabases").toBool());
|
||||
m_generalUi->openPreviousDatabasesOnStartupCheckBox->setChecked(
|
||||
config()->get("OpenPreviousDatabasesOnStartup").toBool());
|
||||
@ -107,6 +114,7 @@ void SettingsWidget::loadSettings()
|
||||
|
||||
void SettingsWidget::saveSettings()
|
||||
{
|
||||
m_optionDialogUi->saveSettings();
|
||||
config()->set("RememberLastDatabases", m_generalUi->rememberLastDatabasesCheckBox->isChecked());
|
||||
config()->set("OpenPreviousDatabasesOnStartup",
|
||||
m_generalUi->openPreviousDatabasesOnStartupCheckBox->isChecked());
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define KEEPASSX_SETTINGSWIDGET_H
|
||||
|
||||
#include "gui/EditWidget.h"
|
||||
#include "http/OptionDialog.h"
|
||||
|
||||
namespace Ui {
|
||||
class SettingsWidgetGeneral;
|
||||
@ -55,6 +56,7 @@ private Q_SLOTS:
|
||||
private:
|
||||
QWidget* const m_secWidget;
|
||||
QWidget* const m_generalWidget;
|
||||
OptionDialog* const m_optionDialogUi;
|
||||
const QScopedPointer<Ui::SettingsWidgetSecurity> m_secUi;
|
||||
const QScopedPointer<Ui::SettingsWidgetGeneral> m_generalUi;
|
||||
Qt::Key m_globalAutoTypeKey;
|
||||
|
Loading…
Reference in New Issue
Block a user