aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-02-23 19:47:58 +0100
committerJaquee <jaquee.monero@gmail.com>2017-02-23 19:52:06 +0100
commitfaacd3d6a11efcb6dcf9a54ce55ed20e573b40f5 (patch)
treeed5d7ba5a02dcdc5d705b71075e2d0f8bc03c9f6 /components
parentc6688dc876d4ab8e0cea6f34f4607bf3be9a3648 (diff)
downloadmonzero-gui-faacd3d6a11efcb6dcf9a54ce55ed20e573b40f5.tar.gz
monzero-gui-faacd3d6a11efcb6dcf9a54ce55ed20e573b40f5.tar.xz
monzero-gui-faacd3d6a11efcb6dcf9a54ce55ed20e573b40f5.zip
start daemon automatically and detached
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