improvements MessagesDialog:

- new read/unread state - stored locally
- show all recipients in Outbox, Sentbox and Draftbox


git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2975 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-23 17:21:30 +00:00
parent 61e8d588a8
commit cef2c1218f
10 changed files with 1619 additions and 1379 deletions

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,8 @@
#include "mainpage.h"
#include "ui_MessagesDialog.h"
class RSettings;
class MessagesDialog : public MainPage
{
Q_OBJECT
@ -43,7 +45,6 @@ public:
/** Default Destructor */
~MessagesDialog();
void insertMsgTxtAndFiles(QModelIndex index = QModelIndex());
// replaced by shortcut
// virtual void keyPressEvent(QKeyEvent *) ;
void updateMessageSummaryList();
@ -77,6 +78,9 @@ private slots:
void removemessage();
void markAsRead();
void markAsUnread();
void anchorClicked (const QUrl &);
void getcurrentrecommended();
@ -100,12 +104,15 @@ private:
class QStandardItemModel *MessagesModel;
QSortFilterProxyModel *proxyModel;
void insertMsgTxtAndFiles(QModelIndex index = QModelIndex(), bool bSetToRead = true);
bool getCurrentMsg(std::string &cid, std::string &mid);
void setMsgAsRead(const QModelIndex &index);
void setMsgAsReadUnread(const QList<int> &Rows, bool bRead);
void setCurrentFileName(const QString &fileName);
int getSelectedMsgCount ();
int getSelectedMsgCount (QList<int> *pRowsRead, QList<int> *pRowsUnread);
bool isMessageRead(int nRow);
/* internal handle splitter */
void togglefileview_internal();
@ -118,8 +125,8 @@ private:
std::string mCurrMsgId;
QString fileName;
QFont mFont;
RSettings *m_pConfig;
// timer and index for showing message
QTimer *timer;

View File

@ -270,6 +270,9 @@
<file>images/message-mail-forwarded-read.png</file>
<file>images/message-mail-replied.png</file>
<file>images/message-mail-forwarded.png</file>
<file>images/message-mail-state-read.png</file>
<file>images/message-mail-state-unread.png</file>
<file>images/message-mail-state-header.png</file>
<file>images/message-news.png</file>
<file>images/message.png</file>
<file>images/messages_new.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

View File

@ -22,12 +22,13 @@
#include "MessagePage.h"
#include "rshare.h"
#include "rsharesettings.h"
MessagePage::MessagePage(QWidget * parent, Qt::WFlags flags)
: ConfigPage(parent, flags)
{
ui.setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false);
}
MessagePage::~MessagePage()
@ -40,18 +41,19 @@ MessagePage::closeEvent (QCloseEvent * event)
QWidget::closeEvent(event);
}
/** Saves the changes on this page */
bool
MessagePage::save(QString &errmsg)
{
return true;
Settings->setMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
return true;
}
/** Loads the settings for this page */
void
MessagePage::load()
{
ui.setMsgToReadOnActivate->setChecked(Settings->getMsgSetToReadOnActivate());
}

File diff suppressed because it is too large Load Diff

View File

@ -345,3 +345,13 @@ void RshareSettings::loadWidgetInformation(QMainWindow *widget, QToolBar *toolBa
loadWidgetInformation(widget);
}
/* Messages */
bool RshareSettings::getMsgSetToReadOnActivate ()
{
return valueFromGroup("MessageDialog", "SetMsgToReadOnActivate", true).toBool();
}
void RshareSettings::setMsgSetToReadOnActivate (bool bValue)
{
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", bValue);
}

View File

@ -126,6 +126,10 @@ public:
//! Method overload. Restore window and toolbar information.
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
/* Messages */
bool getMsgSetToReadOnActivate ();
void setMsgSetToReadOnActivate (bool bValue);
protected:
/** Default constructor. */
RshareSettings();