Adds checkbox for marking edits as 'minor'.

This commit is contained in:
Clément Schreiner 2011-02-16 19:05:04 +01:00
commit 6509d95659
2 changed files with 11 additions and 3 deletions

View file

@ -61,11 +61,12 @@ self._currentTabChanged)
if self.backend is None: if self.backend is None:
return return
new_content = unicode(self.ui.contentEdit.toPlainText()) new_content = unicode(self.ui.contentEdit.toPlainText())
minor = self.ui.minorBox.isChecked()
if new_content != self.content.content: if new_content != self.content.content:
self.content.content = new_content self.content.content = new_content
message = unicode(self.ui.descriptionEdit.text()) message = unicode(self.ui.descriptionEdit.text())
self.process = QtDo(self.weboob, self._savePage_cb, self._savePage_eb) self.process = QtDo(self.weboob, self._savePage_cb, self._savePage_eb)
self.process.do('push_content', self.content, message, backends=self.backend) self.process.do('push_content', self.content, message, minor=minor, backends=self.backend)
def _savePage_cb(self, backend, data): def _savePage_cb(self, backend, data):
if not backend: if not backend:

View file

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>469</width> <width>469</width>
<height>521</height> <height>520</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -69,6 +69,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="minorBox">
<property name="text">
<string>Minor edit</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="saveButton"> <widget class="QPushButton" name="saveButton">
<property name="text"> <property name="text">