diff --git a/retroshare-gui/src/gui/msgs/MessageModel.cpp b/retroshare-gui/src/gui/msgs/MessageModel.cpp index 09508cad6..6116e42b4 100644 --- a/retroshare-gui/src/gui/msgs/MessageModel.cpp +++ b/retroshare-gui/src/gui/msgs/MessageModel.cpp @@ -690,6 +690,10 @@ void RsMessageModel::setCurrentBox(Rs::Msgs::BoxName bn) } } +Rs::Msgs::BoxName RsMessageModel::currentBox() const +{ + return mCurrentBox; +} void RsMessageModel::setQuickViewFilter(QuickViewFilter fn) { if(fn != mQuickViewFilter) diff --git a/retroshare-gui/src/gui/msgs/MessageModel.h b/retroshare-gui/src/gui/msgs/MessageModel.h index fb8c6daa5..d23b21f86 100644 --- a/retroshare-gui/src/gui/msgs/MessageModel.h +++ b/retroshare-gui/src/gui/msgs/MessageModel.h @@ -100,6 +100,7 @@ public: // This method will asynchroneously update the data void setCurrentBox(Rs::Msgs::BoxName bn) ; + Rs::Msgs::BoxName currentBox() const ; void setQuickViewFilter(QuickViewFilter fn) ; void setFilter(FilterType filter_type, const QStringList& strings) ; diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp index de91df5ff..be9eedf6b 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -925,9 +925,9 @@ void MessagesDialog::changeBox(int box_row) ui.messageTreeWidget->setPlaceholderText(placeholderText); ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_READ,box_row!=ROW_INBOX); - ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_STAR,box_row==ROW_OUTBOX); - ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_SPAM,box_row==ROW_OUTBOX); - ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_TAGS,box_row==ROW_OUTBOX); + ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_STAR,box_row!=ROW_INBOX); + ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_SPAM,box_row!=ROW_INBOX); + ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_TAGS,box_row!=ROW_INBOX); ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_MSGID,true); ui.messageTreeWidget->setColumnHidden(RsMessageModel::COLUMN_THREAD_CONTENT,true); } @@ -1296,7 +1296,7 @@ void MessagesDialog::updateMessageSummaryList() /* calculating the new messages */ std::list msgList; - rsMail->getMessageSummaries(Rs::Msgs::BoxName::BOX_ALL,msgList); + rsMail->getMessageSummaries(mMessageModel->currentBox(),msgList); QMap tagCount; diff --git a/retroshare-gui/src/gui/settings/JsonApiPage.cc b/retroshare-gui/src/gui/settings/JsonApiPage.cc index 07e75032f..67e5f22b8 100644 --- a/retroshare-gui/src/gui/settings/JsonApiPage.cc +++ b/retroshare-gui/src/gui/settings/JsonApiPage.cc @@ -72,6 +72,10 @@ JsonApiPage::JsonApiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/) mEventHandlerId, RsEventType::JSON_API ); } +JsonApiPage::~JsonApiPage() +{ + rsEvents->unregisterEventsHandler(mEventHandlerId); +} QString JsonApiPage::helpText() const { return tr("

  Webinterface

\ diff --git a/retroshare-gui/src/gui/settings/JsonApiPage.h b/retroshare-gui/src/gui/settings/JsonApiPage.h index f06340d1a..ef28a4294 100644 --- a/retroshare-gui/src/gui/settings/JsonApiPage.h +++ b/retroshare-gui/src/gui/settings/JsonApiPage.h @@ -33,7 +33,7 @@ class JsonApiPage : public ConfigPage public: JsonApiPage(QWidget * parent = nullptr, Qt::WindowFlags flags = 0); - ~JsonApiPage() override = default; + ~JsonApiPage() override ; virtual QPixmap iconPixmap() const override { diff --git a/retroshare-gui/src/gui/settings/WebuiPage.cpp b/retroshare-gui/src/gui/settings/WebuiPage.cpp index 893fd87e2..d7ff0b894 100644 --- a/retroshare-gui/src/gui/settings/WebuiPage.cpp +++ b/retroshare-gui/src/gui/settings/WebuiPage.cpp @@ -66,7 +66,7 @@ WebuiPage::WebuiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/) WebuiPage::~WebuiPage() { - + rsEvents->unregisterEventsHandler(mEventsHandlerId); } void WebuiPage::selectWebInterfaceDirectory()