pax_global_header 0000666 0000000 0000000 00000000064 13507732167 0014525 g ustar 00root root 0000000 0000000 52 comment=387a3e3cdc31032e63b3c0e660d6629e91b6ccdd
woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/ 0000775 0000000 0000000 00000000000 13507732167 0025312 5 ustar 00root root 0000000 0000000 woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/weboob/ 0000775 0000000 0000000 00000000000 13507732167 0026567 5 ustar 00root root 0000000 0000000 woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/weboob/applications/ 0000775 0000000 0000000 00000000000 13507732167 0031255 5 ustar 00root root 0000000 0000000 qboobmsg/ 0000775 0000000 0000000 00000000000 13507732167 0033007 5 ustar 00root root 0000000 0000000 woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/weboob/applications __init__.py 0000664 0000000 0000000 00000000067 13507732167 0035123 0 ustar 00root root 0000000 0000000 woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/weboob/applications/qboobmsg from .qboobmsg import QBoobMsg
__all__ = ['QBoobMsg']
main_window.py 0000664 0000000 0000000 00000003602 13507732167 0035675 0 ustar 00root root 0000000 0000000 woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/weboob/applications/qboobmsg # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# weboob is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with weboob. If not, see
')
extra = u''
if message.flags & message.IS_NOT_RECEIVED:
extra += u'Status: Unread
'
elif message.flags & message.IS_RECEIVED:
extra += u'Status: Read
'
elif message.flags & message.IS_UNREAD:
extra += u'Status: New
'
self.ui.messageBody.setText("
%s
" % (message.title, str(message.date), message.sender, extra, content)) if item and message.flags & message.IS_UNREAD: backend.set_message_read(message) message.flags &= ~message.IS_UNREAD item.setForeground(0, QBrush()) item.setForeground(1, QBrush()) item.setForeground(2, QBrush()) if message.thread.flags & message.thread.IS_DISCUSSION: self.ui.profileButton.show() else: self.ui.profileButton.hide() @Slot() def _profilePressed(self): print(self.thread.id) self.display_contact.emit(self.thread.id) def displayReply(self): self.ui.replyButton.setText(self.tr('Cancel')) self.ui.replyWidget.show() def hideReply(self): self.ui.replyButton.setText(self.tr('Reply')) self.ui.replyWidget.hide() self.ui.replyEdit.clear() self.ui.titleEdit.clear() @Slot() def _replyPressed(self): if self.ui.replyWidget.isVisible(): self.hideReply() else: self.displayReply() @Slot() def _sendPressed(self): if not self.ui.replyWidget.isVisible(): return text = self.ui.replyEdit.toPlainText() title = self.ui.titleEdit.text() self.ui.backendsList.setEnabled(False) self.ui.threadsList.setEnabled(False) self.ui.messagesTree.setEnabled(False) self.ui.replyButton.setEnabled(False) self.ui.replyWidget.setEnabled(False) self.ui.sendButton.setText(self.tr('Sending...')) flags = 0 if self.ui.htmlBox.currentIndex() == 0: flags = Message.IS_HTML m = Message(thread=self.thread, id=0, title=title, sender=None, receivers=None, content=text, parent=self.message, flags=flags) self.process_reply = QtDo(self.weboob, None, self._postReply_eb, self._postReply_fb) self.process_reply.do('post_message', m, backends=self.thread.backend) def _postReply_fb(self): self.ui.backendsList.setEnabled(True) self.ui.threadsList.setEnabled(True) self.ui.messagesTree.setEnabled(True) self.ui.replyButton.setEnabled(True) self.ui.replyWidget.setEnabled(True) self.ui.sendButton.setEnabled(True) self.ui.sendButton.setText(self.tr('Send')) self.hideReply() self.process_reply = None self.refreshThreadMessages(self.thread.backend, self.thread.id) def _postReply_eb(self, backend, error, backtrace): content = self.tr('Unable to send message:\n%s\n') % to_unicode(error) if logging.root.level <= logging.DEBUG: content += '\n%s\n' % to_unicode(backtrace) QMessageBox.critical(self, self.tr('Error while posting reply'), content, QMessageBox.Ok) self.ui.backendsList.setEnabled(True) self.ui.threadsList.setEnabled(True) self.ui.messagesTree.setEnabled(True) self.ui.replyButton.setEnabled(True) self.ui.replyWidget.setEnabled(True) self.ui.sendButton.setText(self.tr('Send')) self.process_reply = None qboobmsg.py 0000664 0000000 0000000 00000002607 13507732167 0035177 0 ustar 00root root 0000000 0000000 woob-387a3e3cdc31032e63b3c0e660d6629e91b6ccdd-weboob-applications-qboobmsg/weboob/applications/qboobmsg # -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # weboob is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with weboob. If not, see