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