Add a remorse popup when resetting the database

pull/1/head
Grégory Oestreicher 2016-12-16 15:14:28 +01:00
parent 3a61c6c040
commit d804994019
2 changed files with 16 additions and 1 deletions

View File

@ -59,10 +59,21 @@ Page {
model: serversModel
visible: serversModel.loaded
RemorsePopup {
id: remorsePopup
}
PullDownMenu {
MenuItem {
text: qsTr( "Reset database" )
onClicked: resetDatabase()
onClicked: {
remorsePopup.execute(
qsTr( "Resetting database" ),
function() {
serversPage.resetDatabase()
}
)
}
}
MenuItem {

View File

@ -119,6 +119,10 @@
<source>No servers configured yet, create your first one with the Settings menu</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Resetting database</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsPage</name>