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 model: serversModel
visible: serversModel.loaded visible: serversModel.loaded
RemorsePopup {
id: remorsePopup
}
PullDownMenu { PullDownMenu {
MenuItem { MenuItem {
text: qsTr( "Reset database" ) text: qsTr( "Reset database" )
onClicked: resetDatabase() onClicked: {
remorsePopup.execute(
qsTr( "Resetting database" ),
function() {
serversPage.resetDatabase()
}
)
}
} }
MenuItem { MenuItem {

View File

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