Permalink
Browse files

Init description from selection

  • Loading branch information...
1 parent 289cb4e commit 03ebf565191cef1cc35281224c03f6fd9fc2ca07 @agateau committed Sep 22, 2011
Showing with 6 additions and 0 deletions.
  1. +3 −0 addtaskdialog.py
  2. +3 −0 qyadd.py
View
@@ -42,6 +42,9 @@ def showErrorMessage(self, msg):
self.ui.errorLabel.setText(msg)
self.ui.errorLabel.show()
+ def setInitialDescription(self, text):
+ self.ui.descriptionTextEdit.setPlainText(text)
+
def confirmProjectCreation(self, projectName):
box = QMessageBox(self)
box.setIcon(QMessageBox.Question)
View
@@ -25,6 +25,9 @@ def main(argv):
dlg = AddTaskDialog()
dlg.setWindowFlags(dlg.windowFlags() | Qt.WindowStaysOnTopHint)
+
+ description = app.clipboard().text(QClipboard.Selection)
+ dlg.setInitialDescription(description)
return dlg.exec_()
if __name__ == "__main__":

0 comments on commit 03ebf56

Please sign in to comment.