[submodule "monero"]
path = monero
url = https://github.com/feather-wallet/monero.git
+[submodule "src/third-party/singleapplication"]
+ path = src/third-party/singleapplication
+ url = https://github.com/itay-grudev/SingleApplication.git
find_package(Qt5 REQUIRED COMPONENTS ${QT5_COMPONENTS})
+set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication")
+add_subdirectory(third-party/singleapplication)
+
add_subdirectory(openpgp)
qt5_add_resources(RESOURCES assets.qrc assets_tor.qrc)
${ZLIB_LIBRARIES}
${LIBZIP_LIBRARIES}
${ZBAR_LIBRARIES}
+ SingleApplication::SingleApplication
)
if(DEVICE_TREZOR_READY)
msgBox.exec();
}
+void WindowManager::raise() {
+ if (!m_windows.isEmpty()) {
+ m_windows.first()->bringToFront();
+ }
+ else if (m_wizard) {
+ m_wizard->show();
+ m_wizard->raise();
+ m_wizard->activateWindow();
+ }
+ else {
+ // This shouldn't happen
+ this->close();
+ }
+}
+
// ######################## WALLET OPEN ########################
void WindowManager::tryOpenWallet(const QString &path, const QString &password) {
void showWizard(WalletWizard::Page startPage);
void changeSkin(const QString &skinName);
void restartApplication(const QString &binaryFilename);
+ void raise();
signals:
void torSettingsChanged();
#include <QApplication>
#include <QtCore>
#include <QtGui>
+#include <singleapplication.h>
#include "cli.h"
#include "config-feather.h"
QApplication::setDesktopSettingsAware(true); // use system font
QApplication::setApplicationVersion(FEATHER_VERSION);
- QApplication app(argc, argv);
+ SingleApplication app(argc, argv);
QApplication::setQuitOnLastWindowClosed(false);
QApplication::setApplicationName("FeatherWallet");
WindowManager windowManager;
+ QObject::connect(&app, &SingleApplication::instanceStarted, [&windowManager]() {
+ windowManager.raise();
+ });
+
return QApplication::exec();
}
--- /dev/null
+Subproject commit 3e8e85d1a487e433751711a8a090659684d42e3b