mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 12:09:57 +00:00
commit
7b049bbae9
6 changed files with 54 additions and 8 deletions
|
@ -91,7 +91,7 @@ Window {
|
|||
KeyNavigation.tab: cancelButton
|
||||
onClicked: {
|
||||
root.close()
|
||||
appWindow.startDaemon();
|
||||
appWindow.startDaemon(daemonFlags.text);
|
||||
root.started()
|
||||
}
|
||||
}
|
||||
|
@ -112,6 +112,24 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
id: advancedRow
|
||||
MoneroComponents.Label {
|
||||
id: daemonFlagsLabel
|
||||
color: "#4A4949"
|
||||
text: qsTr("Daemon startup flags") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
}
|
||||
|
||||
MoneroComponents.LineEdit {
|
||||
id: daemonFlags
|
||||
Layout.preferredWidth: 200
|
||||
Layout.fillWidth: true
|
||||
text: appWindow.persistentSettings.daemonFlags;
|
||||
placeholderText: qsTr("(optional)")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
6
main.qml
6
main.qml
|
@ -341,9 +341,10 @@ ApplicationWindow {
|
|||
onWalletUpdate();
|
||||
}
|
||||
|
||||
function startDaemon(){
|
||||
function startDaemon(flags){
|
||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to start..."))
|
||||
daemonManager.start();
|
||||
daemonManager.start(flags);
|
||||
persistentSettings.daemonFlags = flags
|
||||
}
|
||||
|
||||
function stopDaemon(){
|
||||
|
@ -714,6 +715,7 @@ ApplicationWindow {
|
|||
property int restore_height : 0
|
||||
property bool is_recovering : false
|
||||
property bool customDecorations : true
|
||||
property string daemonFlags
|
||||
}
|
||||
|
||||
// Information dialog
|
||||
|
|
|
@ -299,7 +299,7 @@ Rectangle {
|
|||
releasedColor: "#FF6C3C"
|
||||
pressedColor: "#FF4304"
|
||||
onClicked: {
|
||||
appWindow.startDaemon()
|
||||
appWindow.startDaemon(daemonFlags.text)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,6 +335,23 @@ Rectangle {
|
|||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: daemonFlagsRow
|
||||
Label {
|
||||
id: daemonFlagsLabel
|
||||
color: "#4A4949"
|
||||
text: qsTr("Daemon startup flags") + translationManager.emptyString
|
||||
fontSize: 16
|
||||
}
|
||||
LineEdit {
|
||||
id: daemonFlags
|
||||
Layout.preferredWidth: 200
|
||||
Layout.fillWidth: true
|
||||
text: appWindow.persistentSettings.daemonFlags;
|
||||
placeholderText: qsTr("(optional)") + translationManager.emptyString
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
CheckBox {
|
||||
id: customDecorationsCheckBox
|
||||
|
|
|
@ -433,7 +433,7 @@ Rectangle {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
textFormat: Text.RichText
|
||||
onLinkActivated: { appWindow.startDaemon(); }
|
||||
onLinkActivated: { appWindow.startDaemon(appWindow.persistentSettings.daemonFlags); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ DaemonManager *DaemonManager::instance(const QStringList *args)
|
|||
return m_instance;
|
||||
}
|
||||
|
||||
bool DaemonManager::start()
|
||||
bool DaemonManager::start(const QString &flags)
|
||||
{
|
||||
//
|
||||
QString process;
|
||||
|
@ -43,9 +43,18 @@ bool DaemonManager::start()
|
|||
QStringList arguments;
|
||||
foreach (const QString &str, m_clArgs) {
|
||||
qDebug() << QString(" [%1] ").arg(str);
|
||||
arguments << str;
|
||||
if (!str.isEmpty())
|
||||
arguments << str;
|
||||
}
|
||||
|
||||
// Custom startup flags for daemon
|
||||
foreach (const QString &str, flags.split(" ")) {
|
||||
qDebug() << QString(" [%1] ").arg(str);
|
||||
if (!str.isEmpty())
|
||||
arguments << str;
|
||||
}
|
||||
|
||||
|
||||
qDebug() << "starting monerod " + process;
|
||||
qDebug() << "With command line arguments " << arguments;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public:
|
|||
|
||||
static DaemonManager * instance(const QStringList *args);
|
||||
|
||||
Q_INVOKABLE bool start();
|
||||
Q_INVOKABLE bool start(const QString &flags);
|
||||
Q_INVOKABLE bool stop();
|
||||
|
||||
// return true if daemon process is started
|
||||
|
|
Loading…
Reference in a new issue