Ejemplo n.º 1
0
 def _commentAdded(self):
     if self._currentSelected == None:
         raise RuntimeError('Must select a version to add comment.')
     newComment = _pmCore.scrollField(self._uiWidget['comment'], query=True, text=True)
     userName = _os.environ.get('AM_USERNAME')
     _Database.addComment(self._fileID, self._currentSelected, newComment, userName)
     _pmCore.setParent(self._uiWidget['commentLayout'])
     _pmCore.text(label="{0} @ {1}:".format(userName, _datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')), align='left')
     _pmCore.text(label=newComment, wordWrap=True, align='left')
     _pmCore.scrollField(self._uiWidget['comment'], edit=True, text='')