mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-30 01:03:33 -05:00
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:
parent
61e8d588a8
commit
cef2c1218f
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,8 @@
|
|||||||
#include "mainpage.h"
|
#include "mainpage.h"
|
||||||
#include "ui_MessagesDialog.h"
|
#include "ui_MessagesDialog.h"
|
||||||
|
|
||||||
|
class RSettings;
|
||||||
|
|
||||||
class MessagesDialog : public MainPage
|
class MessagesDialog : public MainPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -43,7 +45,6 @@ public:
|
|||||||
/** Default Destructor */
|
/** Default Destructor */
|
||||||
~MessagesDialog();
|
~MessagesDialog();
|
||||||
|
|
||||||
void insertMsgTxtAndFiles(QModelIndex index = QModelIndex());
|
|
||||||
// replaced by shortcut
|
// replaced by shortcut
|
||||||
// virtual void keyPressEvent(QKeyEvent *) ;
|
// virtual void keyPressEvent(QKeyEvent *) ;
|
||||||
void updateMessageSummaryList();
|
void updateMessageSummaryList();
|
||||||
@ -77,6 +78,9 @@ private slots:
|
|||||||
|
|
||||||
void removemessage();
|
void removemessage();
|
||||||
|
|
||||||
|
void markAsRead();
|
||||||
|
void markAsUnread();
|
||||||
|
|
||||||
void anchorClicked (const QUrl &);
|
void anchorClicked (const QUrl &);
|
||||||
|
|
||||||
void getcurrentrecommended();
|
void getcurrentrecommended();
|
||||||
@ -100,12 +104,15 @@ private:
|
|||||||
class QStandardItemModel *MessagesModel;
|
class QStandardItemModel *MessagesModel;
|
||||||
QSortFilterProxyModel *proxyModel;
|
QSortFilterProxyModel *proxyModel;
|
||||||
|
|
||||||
|
void insertMsgTxtAndFiles(QModelIndex index = QModelIndex(), bool bSetToRead = true);
|
||||||
|
|
||||||
bool getCurrentMsg(std::string &cid, std::string &mid);
|
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);
|
void setCurrentFileName(const QString &fileName);
|
||||||
|
|
||||||
int getSelectedMsgCount ();
|
int getSelectedMsgCount (QList<int> *pRowsRead, QList<int> *pRowsUnread);
|
||||||
|
bool isMessageRead(int nRow);
|
||||||
|
|
||||||
/* internal handle splitter */
|
/* internal handle splitter */
|
||||||
void togglefileview_internal();
|
void togglefileview_internal();
|
||||||
@ -118,8 +125,8 @@ private:
|
|||||||
std::string mCurrMsgId;
|
std::string mCurrMsgId;
|
||||||
|
|
||||||
QString fileName;
|
QString fileName;
|
||||||
|
|
||||||
QFont mFont;
|
QFont mFont;
|
||||||
|
RSettings *m_pConfig;
|
||||||
|
|
||||||
// timer and index for showing message
|
// timer and index for showing message
|
||||||
QTimer *timer;
|
QTimer *timer;
|
||||||
|
@ -270,6 +270,9 @@
|
|||||||
<file>images/message-mail-forwarded-read.png</file>
|
<file>images/message-mail-forwarded-read.png</file>
|
||||||
<file>images/message-mail-replied.png</file>
|
<file>images/message-mail-replied.png</file>
|
||||||
<file>images/message-mail-forwarded.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-news.png</file>
|
||||||
<file>images/message.png</file>
|
<file>images/message.png</file>
|
||||||
<file>images/messages_new.png</file>
|
<file>images/messages_new.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/images/message-mail-state-header.png
Normal file
BIN
retroshare-gui/src/gui/images/message-mail-state-header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 383 B |
BIN
retroshare-gui/src/gui/images/message-mail-state-read.png
Normal file
BIN
retroshare-gui/src/gui/images/message-mail-state-read.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 208 B |
BIN
retroshare-gui/src/gui/images/message-mail-state-unread.png
Normal file
BIN
retroshare-gui/src/gui/images/message-mail-state-unread.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 302 B |
@ -22,12 +22,13 @@
|
|||||||
#include "MessagePage.h"
|
#include "MessagePage.h"
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
|
|
||||||
|
#include "rsharesettings.h"
|
||||||
|
|
||||||
MessagePage::MessagePage(QWidget * parent, Qt::WFlags flags)
|
MessagePage::MessagePage(QWidget * parent, Qt::WFlags flags)
|
||||||
: ConfigPage(parent, flags)
|
: ConfigPage(parent, flags)
|
||||||
{
|
{
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
setAttribute(Qt::WA_QuitOnClose, false);
|
setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MessagePage::~MessagePage()
|
MessagePage::~MessagePage()
|
||||||
@ -40,18 +41,19 @@ MessagePage::closeEvent (QCloseEvent * event)
|
|||||||
QWidget::closeEvent(event);
|
QWidget::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Saves the changes on this page */
|
/** Saves the changes on this page */
|
||||||
bool
|
bool
|
||||||
MessagePage::save(QString &errmsg)
|
MessagePage::save(QString &errmsg)
|
||||||
{
|
{
|
||||||
return true;
|
Settings->setMsgSetToReadOnActivate(ui.setMsgToReadOnActivate->isChecked());
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Loads the settings for this page */
|
/** Loads the settings for this page */
|
||||||
void
|
void
|
||||||
MessagePage::load()
|
MessagePage::load()
|
||||||
{
|
{
|
||||||
|
ui.setMsgToReadOnActivate->setChecked(Settings->getMsgSetToReadOnActivate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -345,3 +345,13 @@ void RshareSettings::loadWidgetInformation(QMainWindow *widget, QToolBar *toolBa
|
|||||||
loadWidgetInformation(widget);
|
loadWidgetInformation(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Messages */
|
||||||
|
bool RshareSettings::getMsgSetToReadOnActivate ()
|
||||||
|
{
|
||||||
|
return valueFromGroup("MessageDialog", "SetMsgToReadOnActivate", true).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RshareSettings::setMsgSetToReadOnActivate (bool bValue)
|
||||||
|
{
|
||||||
|
setValueToGroup("MessageDialog", "SetMsgToReadOnActivate", bValue);
|
||||||
|
}
|
||||||
|
@ -126,6 +126,10 @@ public:
|
|||||||
//! Method overload. Restore window and toolbar information.
|
//! Method overload. Restore window and toolbar information.
|
||||||
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
void loadWidgetInformation(QMainWindow *widget, QToolBar *toolBar);
|
||||||
|
|
||||||
|
/* Messages */
|
||||||
|
bool getMsgSetToReadOnActivate ();
|
||||||
|
void setMsgSetToReadOnActivate (bool bValue);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Default constructor. */
|
/** Default constructor. */
|
||||||
RshareSettings();
|
RshareSettings();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user