diff --git a/weboob/applications/qwebcontentedit/main_window.py b/weboob/applications/qwebcontentedit/main_window.py
index da02e0f3..0d6a9021 100644
--- a/weboob/applications/qwebcontentedit/main_window.py
+++ b/weboob/applications/qwebcontentedit/main_window.py
@@ -45,6 +45,7 @@ class MainWindow(QtMainWindow):
self._currentTabChanged)
self.connect(self.ui.saveButton, SIGNAL("clicked()"), self.savePage)
self.connect(self.ui.actionBackends, SIGNAL("triggered()"), self.backendsConfig)
+ self.connect(self.ui.contentEdit, SIGNAL("textChanged()"), self._textChanged)
if self.weboob.count_backends() == 0:
self.backendsConfig()
@@ -66,6 +67,10 @@ class MainWindow(QtMainWindow):
if self.backend is not None:
self.showPreview()
+ def _textChanged(self):
+ self.ui.saveButton.setEnabled(True)
+ self.ui.saveButton.setText('Save')
+
def loadPage(self):
_id = unicode(self.ui.idEdit.text())
if not _id:
@@ -109,6 +114,8 @@ class MainWindow(QtMainWindow):
minor = self.ui.minorBox.isChecked()
if new_content != self.content.content:
self.ui.saveButton.setEnabled(False)
+ self.ui.saveButton.setText('Saving...')
+ self.ui.contentEdit.setReadOnly(True)
self.content.content = new_content
message = unicode(self.ui.descriptionEdit.text())
self.process = QtDo(self.weboob, self._savePage_cb, self._savePage_eb)
@@ -117,7 +124,8 @@ class MainWindow(QtMainWindow):
def _savePage_cb(self, backend, data):
if not backend:
self.process = None
- self.ui.saveButton.setEnabled(True)
+ self.ui.saveButton.setText('Saved')
+ self.ui.contentEdit.setReadOnly(False)
return
self.ui.descriptionEdit.clear()
diff --git a/weboob/applications/qwebcontentedit/ui/main_window.ui b/weboob/applications/qwebcontentedit/ui/main_window.ui
index 2b9e0fd9..e481c773 100644
--- a/weboob/applications/qwebcontentedit/ui/main_window.ui
+++ b/weboob/applications/qwebcontentedit/ui/main_window.ui
@@ -6,8 +6,8 @@
0
0
- 469
- 520
+ 498
+ 543
@@ -89,7 +89,7 @@
false
- Save
+ No changes
@@ -102,8 +102,8 @@
0
0
- 469
- 20
+ 498
+ 22