Exemple #1
0
 def updateMessageState(self):
     s = self.__message__.state
     send_button = False
     if s == MsgState.GUI:
         self.noteContent.setReadOnly(False)
         send_button = True
         self.addButton.show()
     elif s == MsgState.TO_SEND:
         send_button = True
         self.addButton.setDisabled(True)
         self.sendButton.setDisabled(True)
         self.noteContent.setReadOnly(True)
     elif s == MsgState.DELETED:
         self.close()
     else:
         self.sendButton.hide()
         self.addButton.hide()
         self.noteContent.setReadOnly(True)
         
     if send_button:
         self.sendButton.show()
         self.senderUserEntry.setText(trunc_str(self.sender(), 6))
     else:
         self.senderUserEntry.setText(trunc_str(self.sender(), 16))
         
     self.senderUserEntry.setToolTip(self.sender())
Exemple #2
0
 def setRecipients(self, recipients):
     '''Ustawia listę nadawców
     Argument recipients: lista str [odbiorca1, odbiorca2, ...]'''
     self.recipients_ = recipients
             
     rec_join = ', '.join(recipients)
     self.recipientsBox.setText(trunc_str(rec_join, 21))
     self.recipientsBox.setToolTip(rec_join)