diff --git a/libretroshare/src/retroshare/rsmsgs.h b/libretroshare/src/retroshare/rsmsgs.h index 6658a53bc..f1e42c4c3 100644 --- a/libretroshare/src/retroshare/rsmsgs.h +++ b/libretroshare/src/retroshare/rsmsgs.h @@ -563,8 +563,8 @@ public: /** * @brief MessageToTrash * @jsonapi{development} - * @param[in] msgId - * @param[in] bTrash + * @param[in] msgId Id of the message to mode to trash box + * @param[in] bTrash Move to trash if true, otherwise remove from trash * @return true on success */ virtual bool MessageToTrash(const std::string &msgId, bool bTrash) = 0; diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index c9e2e9c0b..3a81877ce 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -40,7 +40,7 @@ #include "gui/FileTransfer/SearchDialog.h" #include "gui/FileTransfer/SharedFilesDialog.h" #include "gui/FileTransfer/TransfersDialog.h" -#include "MessagesDialog.h" +#include "gui/msgs/MessagesDialog.h" #include "PluginsPage.h" #include "NewsFeed.h" #include "ShareManager.h" diff --git a/retroshare-gui/src/gui/msgs/MessageModel.cpp b/retroshare-gui/src/gui/msgs/MessageModel.cpp index 3f30b2342..441b02bbc 100644 --- a/retroshare-gui/src/gui/msgs/MessageModel.cpp +++ b/retroshare-gui/src/gui/msgs/MessageModel.cpp @@ -336,11 +336,11 @@ bool RsMessageModel::passesFilter(const Rs::Msgs::MsgInfoSummary& fmpe,int colum || (std::find(fmpe.msgtags.begin(),fmpe.msgtags.end(),mQuickViewFilter) != fmpe.msgtags.end()) || (mQuickViewFilter==QUICK_VIEW_STARRED && (fmpe.msgflags & RS_MSG_STAR)) || (mQuickViewFilter==QUICK_VIEW_SYSTEM && (fmpe.msgflags & RS_MSG_SYSTEM)); - - std::cerr << "Passes filter: type=" << mFilterType << " s=\"" << s.toStdString() - << "MsgFlags=" << fmpe.msgflags << " msgtags=" ; +#ifdef DEBUG_MESSAGE_MODEL + std::cerr << "Passes filter: type=" << mFilterType << " s=\"" << s.toStdString() << "MsgFlags=" << fmpe.msgflags << " msgtags=" ; foreach(uint32_t i,fmpe.msgtags) std::cerr << i << " " ; std::cerr << "\" strings:" << passes_strings << " quick_view:" << passes_quick_view << std::endl; +#endif return passes_quick_view && passes_strings; } @@ -621,10 +621,10 @@ void RsMessageModel::getMessageSummaries(BoxName box,std::listmsgflags & RS_MSG_BOXMASK) == RS_MSG_INBOX ; break ; - case BOX_SENT : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_SENTBOX; break ; - case BOX_OUTBOX : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX ; break ; - case BOX_DRAFTS : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_DRAFTBOX ; break ; + case BOX_INBOX : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_INBOX && !(it->msgflags & RS_MSG_TRASH); break ; + case BOX_SENT : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_SENTBOX && !(it->msgflags & RS_MSG_TRASH); break ; + case BOX_OUTBOX : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX && !(it->msgflags & RS_MSG_TRASH); break ; + case BOX_DRAFTS : ok = (it->msgflags & RS_MSG_BOXMASK) == RS_MSG_DRAFTBOX && !(it->msgflags & RS_MSG_TRASH); break ; case BOX_TRASH : ok = (it->msgflags & RS_MSG_TRASH) ; break ; default: ++it; diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp similarity index 99% rename from retroshare-gui/src/gui/MessagesDialog.cpp rename to retroshare-gui/src/gui/msgs/MessagesDialog.cpp index e8c130e88..2837b5b3a 100644 --- a/retroshare-gui/src/gui/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -27,21 +27,21 @@ #include "MessagesDialog.h" -#include "notifyqt.h" -#include "common/TagDefs.h" -#include "common/PeerDefs.h" -#include "common/RSElidedItemDelegate.h" -#include "gxs/GxsIdTreeWidgetItem.h" -#include "gxs/GxsIdDetails.h" +#include "gui/notifyqt.h" +#include "gui/common/TagDefs.h" +#include "gui/common/PeerDefs.h" +#include "gui/common/RSElidedItemDelegate.h" +#include "gui/gxs/GxsIdTreeWidgetItem.h" +#include "gui/gxs/GxsIdDetails.h" #include "gui/Identity/IdDialog.h" #include "gui/MainWindow.h" -#include "msgs/MessageComposer.h" -#include "msgs/MessageInterface.h" -#include "msgs/MessageUserNotify.h" -#include "msgs/MessageWidget.h" -#include "msgs/TagsMenu.h" -#include "msgs/MessageModel.h" -#include "settings/rsharesettings.h" +#include "gui/msgs/MessageComposer.h" +#include "gui/msgs/MessageInterface.h" +#include "gui/msgs/MessageUserNotify.h" +#include "gui/msgs/MessageWidget.h" +#include "gui/msgs/TagsMenu.h" +#include "gui/msgs/MessageModel.h" +#include "gui/settings/rsharesettings.h" #include "util/DateTime.h" #include "util/RsProtectedTimer.h" diff --git a/retroshare-gui/src/gui/MessagesDialog.h b/retroshare-gui/src/gui/msgs/MessagesDialog.h similarity index 100% rename from retroshare-gui/src/gui/MessagesDialog.h rename to retroshare-gui/src/gui/msgs/MessagesDialog.h diff --git a/retroshare-gui/src/gui/MessagesDialog.ui b/retroshare-gui/src/gui/msgs/MessagesDialog.ui similarity index 100% rename from retroshare-gui/src/gui/MessagesDialog.ui rename to retroshare-gui/src/gui/msgs/MessagesDialog.ui diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro index 5769274b8..70050a727 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -443,6 +443,7 @@ HEADERS += rshare.h \ gui/connect/ConfCertDialog.h \ gui/connect/PGPKeyDialog.h \ gui/connect/FriendRecommendDialog.h \ + gui/msgs/MessagesDialog.h \ gui/msgs/MessageInterface.h \ gui/msgs/MessageComposer.h \ gui/msgs/MessageWindow.h \ @@ -541,7 +542,6 @@ HEADERS += rshare.h \ gui/common/ToasterNotify.h \ gui/style/RSStyle.h \ gui/style/StyleDialog.h \ - gui/MessagesDialog.h \ gui/help/browser/helpbrowser.h \ gui/help/browser/helptextbrowser.h \ gui/statusbar/peerstatus.h \ @@ -621,7 +621,6 @@ FORMS += gui/StartDialog.ui \ gui/FriendsDialog.ui \ gui/ShareManager.ui \ # gui/ShareDialog.ui \ - gui/MessagesDialog.ui \ gui/help/browser/helpbrowser.ui \ gui/HelpDialog.ui \ gui/ServicePermissionDialog.ui \ @@ -640,6 +639,7 @@ FORMS += gui/StartDialog.ui \ gui/connect/ConnectFriendWizard.ui \ gui/connect/ConnectProgressDialog.ui \ gui/connect/FriendRecommendDialog.ui \ + gui/msgs/MessagesDialog.ui \ gui/msgs/MessageComposer.ui \ gui/msgs/MessageWindow.ui\ gui/msgs/MessageWidget.ui\ @@ -745,7 +745,6 @@ SOURCES += main.cpp \ # gui/ShareDialog.cpp \ # gui/SFListDelegate.cpp \ gui/SoundManager.cpp \ - gui/MessagesDialog.cpp \ gui/im_history/ImHistoryBrowser.cpp \ gui/im_history/IMHistoryItemDelegate.cpp \ gui/im_history/IMHistoryItemPainter.cpp \ @@ -800,6 +799,7 @@ SOURCES += main.cpp \ gui/chat/ChatLobbyUserNotify.cpp \ gui/connect/ConfCertDialog.cpp \ gui/connect/PGPKeyDialog.cpp \ + gui/msgs/MessagesDialog.cpp \ gui/msgs/MessageComposer.cpp \ gui/msgs/MessageWidget.cpp \ gui/msgs/MessageWindow.cpp \