aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-02-24 16:04:13 +0200
committerRiccardo Spagni <ric@spagni.net>2017-02-24 16:04:13 +0200
commit2ca2376d45224f02bba54059b219abf4de679b36 (patch)
tree75150695f2d5b2a2c8a4b52d94f39173dd992e91 /components
parent6120013ae2bdd195d7b0e71fb2a276490db26efb (diff)
parentfaacd3d6a11efcb6dcf9a54ce55ed20e573b40f5 (diff)
downloadmonzero-gui-2ca2376d45224f02bba54059b219abf4de679b36.tar.gz
monzero-gui-2ca2376d45224f02bba54059b219abf4de679b36.tar.xz
monzero-gui-2ca2376d45224f02bba54059b219abf4de679b36.zip
Merge pull request #486
faacd3d start daemon automatically and detached (Jaquee)
Diffstat (limited to 'components')
-rw-r--r--components/DaemonManagerDialog.qml60
-rw-r--r--components/ProcessingSplash.qml4
2 files changed, 31 insertions, 33 deletions
diff --git a/components/DaemonManagerDialog.qml b/components/DaemonManagerDialog.qml
index f07e982d..0780b513 100644
--- a/components/DaemonManagerDialog.qml
+++ b/components/DaemonManagerDialog.qml
@@ -39,12 +39,14 @@ Window {
id: root
modality: Qt.ApplicationModal
flags: Qt.Window | Qt.FramelessWindowHint
-
+ property int countDown: 5;
signal rejected()
signal started();
function open() {
show()
+ countDown = 5;
+ timer.start();
}
// TODO: implement without hardcoding sizes
@@ -61,15 +63,29 @@ Window {
//anchors {fill: parent; margins: 16 }
Layout.alignment: Qt.AlignHCenter
- Label {
- text: qsTr("Daemon doesn't appear to be running")
+ Timer {
+ id: timer
+ interval: 1000;
+ running: false;
+ repeat: true
+ onTriggered: {
+ countDown--;
+ if(countDown < 0){
+ running = false;
+ // Start daemon
+ root.close()
+ appWindow.startDaemon(persistentSettings.daemonFlags);
+ root.started();
+ }
+ }
+ }
+
+ Text {
+ text: qsTr("Starting Monero daemon in %1 seconds").arg(countDown);
+ font.pixelSize: 18
Layout.alignment: Qt.AlignHCenter
- Layout.columnSpan: 2
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 24
- font.family: "Arial"
- color: "#555555"
}
}
@@ -81,57 +97,39 @@ Window {
MoneroComponents.StandardButton {
id: okButton
- width: 120
+ visible:false
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
- text: qsTr("Start daemon")
+ text: qsTr("Start daemon (%1)").arg(countDown)
KeyNavigation.tab: cancelButton
onClicked: {
+ timer.stop();
root.close()
- appWindow.startDaemon(daemonFlags.text);
+ appWindow.startDaemon(persistentSettings.daemonFlags);
root.started()
}
}
MoneroComponents.StandardButton {
id: cancelButton
- width: 120
fontSize: 14
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
- text: qsTr("Cancel")
+ text: qsTr("Use custom settings")
onClicked: {
+ timer.stop();
root.close()
root.rejected()
}
}
}
- 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)")
- }
-
- }
}
-
}
diff --git a/components/ProcessingSplash.qml b/components/ProcessingSplash.qml
index d8dc0e84..2f6725db 100644
--- a/components/ProcessingSplash.qml
+++ b/components/ProcessingSplash.qml
@@ -61,7 +61,7 @@ Window {
id: messageTitle
text: "Please wait..."
font {
- pointSize: 22
+ pixelSize: 22
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
@@ -72,7 +72,7 @@ Window {
Text {
id: heightProgress
font {
- pointSize: 18
+ pixelSize: 18
}
horizontalAlignment: Text.AlignHCenter
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter