mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Enable proper KeePassXC-Browser interaction for AppImage
This commit is contained in:
parent
09d3896304
commit
2e9f247e29
@ -88,6 +88,11 @@ unset XDG_DATA_DIRS
|
|||||||
if [ "\${1}" == "cli" ]; then
|
if [ "\${1}" == "cli" ]; then
|
||||||
shift
|
shift
|
||||||
exec keepassxc-cli "\$@"
|
exec keepassxc-cli "\$@"
|
||||||
|
elif [ "\${1}" == "proxy" ]; then
|
||||||
|
shift
|
||||||
|
exec keepassxc-proxy "\$@"
|
||||||
|
elif [ -v CHROME_WRAPPER ] || [ -v MOZ_LAUNCHED_CHILD ]; then
|
||||||
|
exec keepassxc-proxy "\$@"
|
||||||
else
|
else
|
||||||
exec keepassxc "\$@"
|
exec keepassxc "\$@"
|
||||||
fi
|
fi
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "BrowserOptionDialog.h"
|
#include "BrowserOptionDialog.h"
|
||||||
#include "ui_BrowserOptionDialog.h"
|
#include "ui_BrowserOptionDialog.h"
|
||||||
|
#include "config-keepassx.h"
|
||||||
#include "BrowserSettings.h"
|
#include "BrowserSettings.h"
|
||||||
#include "core/FilePath.h"
|
#include "core/FilePath.h"
|
||||||
|
|
||||||
@ -45,6 +46,11 @@ BrowserOptionDialog::BrowserOptionDialog(QWidget* parent) :
|
|||||||
connect(m_ui->useCustomProxy, SIGNAL(toggled(bool)), m_ui->customProxyLocation, SLOT(setEnabled(bool)));
|
connect(m_ui->useCustomProxy, SIGNAL(toggled(bool)), m_ui->customProxyLocation, SLOT(setEnabled(bool)));
|
||||||
connect(m_ui->useCustomProxy, SIGNAL(toggled(bool)), m_ui->customProxyLocationBrowseButton, SLOT(setEnabled(bool)));
|
connect(m_ui->useCustomProxy, SIGNAL(toggled(bool)), m_ui->customProxyLocationBrowseButton, SLOT(setEnabled(bool)));
|
||||||
connect(m_ui->customProxyLocationBrowseButton, SIGNAL(clicked()), this, SLOT(showProxyLocationFileDialog()));
|
connect(m_ui->customProxyLocationBrowseButton, SIGNAL(clicked()), this, SLOT(showProxyLocationFileDialog()));
|
||||||
|
|
||||||
|
#ifdef KEEPASSXC_DIST_APPIMAGE
|
||||||
|
m_ui->supportBrowserProxy->setChecked(true);
|
||||||
|
m_ui->supportBrowserProxy->setEnabled(false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserOptionDialog::~BrowserOptionDialog()
|
BrowserOptionDialog::~BrowserOptionDialog()
|
||||||
|
@ -17,12 +17,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "HostInstaller.h"
|
#include "HostInstaller.h"
|
||||||
|
#include "config-keepassx.h"
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QProcessEnvironment>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
const QString HostInstaller::HOST_NAME = "org.keepassxc.keepassxc_browser";
|
const QString HostInstaller::HOST_NAME = "org.keepassxc.keepassxc_browser";
|
||||||
@ -161,6 +163,13 @@ QString HostInstaller::getInstallDir(SupportedBrowsers browser) const
|
|||||||
QJsonObject HostInstaller::constructFile(SupportedBrowsers browser, const bool& proxy, const QString& location)
|
QJsonObject HostInstaller::constructFile(SupportedBrowsers browser, const bool& proxy, const QString& location)
|
||||||
{
|
{
|
||||||
QString path;
|
QString path;
|
||||||
|
#ifdef KEEPASSXC_DIST_APPIMAGE
|
||||||
|
if (proxy && !location.isEmpty()) {
|
||||||
|
path = location;
|
||||||
|
} else {
|
||||||
|
path = QProcessEnvironment::systemEnvironment().value("APPIMAGE");
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
if (!location.isEmpty()) {
|
if (!location.isEmpty()) {
|
||||||
path = location;
|
path = location;
|
||||||
@ -178,6 +187,8 @@ QJsonObject HostInstaller::constructFile(SupportedBrowsers browser, const bool&
|
|||||||
path.replace("/","\\");
|
path.replace("/","\\");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // #ifdef KEEPASSXC_DIST_APPIMAGE
|
||||||
|
|
||||||
QJsonObject script;
|
QJsonObject script;
|
||||||
script["name"] = HostInstaller::HOST_NAME;
|
script["name"] = HostInstaller::HOST_NAME;
|
||||||
script["description"] = "KeePassXC integration with native messaging support";
|
script["description"] = "KeePassXC integration with native messaging support";
|
||||||
|
Loading…
Reference in New Issue
Block a user