diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h index 245fd2812..365504b30 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.h @@ -122,9 +122,12 @@ private slots: void subscribeGroup(bool subscribe); void setViewMode(int viewMode); void settingsChanged(); - void postChannelPostLoad(); + void postPostLoad(); void postContextMenu(const QPoint&); void copyMessageLink(); + void next10Posts(); + void prev10Posts(); + void filterItems(QString s); public slots: void handlePostsTreeSizeChange(QSize size); diff --git a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui index 5ae0ea3d2..a3c43aaa6 100644 --- a/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui +++ b/retroshare-gui/src/gui/Posted/PostedListWidgetWithModel.ui @@ -385,6 +385,13 @@ p, li { white-space: pre-wrap; } + + + + Search + + + @@ -542,6 +549,11 @@ p, li { white-space: pre-wrap; } QTreeView
gui/common/RSTreeView.h
+ + LineEditClear + QLineEdit +
gui/common/LineEditClear.h
+
GxsIdChooser QComboBox diff --git a/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp b/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp index dbe5239f4..baa7ed0d7 100644 --- a/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp +++ b/retroshare-gui/src/gui/Posted/PostedPostsModel.cpp @@ -137,7 +137,7 @@ void RsPostedPostsModel::postMods() { endResetModel(); - emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mFilteredPosts.size(),0,(void*)NULL)); + emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mDisplayedNbPosts,0,(void*)NULL)); } void RsPostedPostsModel::setFilter(const QStringList& strings, uint32_t& count) @@ -171,8 +171,10 @@ void RsPostedPostsModel::setFilter(const QStringList& strings, uint32_t& count) } count = mFilteredPosts.size(); + mDisplayedStartIndex = 0; + if(mDisplayedNbPosts > count) - mDisplayedNbPosts = count; + mDisplayedNbPosts = count ; std::cerr << "After filtering: " << count << " posts remain." << std::endl; @@ -210,7 +212,7 @@ bool RsPostedPostsModel::getPostData(const QModelIndex& i,RsPostedPost& fmpe) co quintptr ref = i.internalId(); uint32_t entry = 0; - if(!convertRefPointerToTabEntry(ref,entry) || entry >= mFilteredPosts.size()) + if(!convertRefPointerToTabEntry(ref,entry)) return false ; fmpe = mPosts[mFilteredPosts[entry]]; @@ -290,7 +292,7 @@ quintptr RsPostedPostsModel::getChildRef(quintptr ref,int index) const if(ref == quintptr(0)) { quintptr new_ref; - convertTabEntryToRefPointer(index,new_ref); + convertTabEntryToRefPointer(index+mDisplayedStartIndex,new_ref); return new_ref; } else @@ -717,7 +719,7 @@ QModelIndex RsPostedPostsModel::getIndexOfMessage(const RsGxsMessageId& mid) con RsGxsMessageId postId = mid; - for(uint32_t i=0;i