From 252626f5ecde6ca4f4db2531e008f48ebbd079a9 Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 16 Feb 2018 23:24:01 +0100 Subject: [PATCH 1/6] added load/save of known forums to avoid re-displaying it in the NewsFeed after then have been deleted. --- libretroshare/src/gxs/rsgenexchange.h | 1 - libretroshare/src/rsitems/rsserviceids.h | 2 + libretroshare/src/rsserver/rsinit.cc | 1 + libretroshare/src/services/p3gxsforums.cc | 93 ++++++++++++++++++++++- libretroshare/src/services/p3gxsforums.h | 12 ++- 5 files changed, 105 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/gxs/rsgenexchange.h b/libretroshare/src/gxs/rsgenexchange.h index 94a455824..677d1d963 100644 --- a/libretroshare/src/gxs/rsgenexchange.h +++ b/libretroshare/src/gxs/rsgenexchange.h @@ -915,7 +915,6 @@ private: std::vector mMsgDeletePublish; std::map > mRoutingClues ; - std::list > mTrackingClues ; }; #endif // RSGENEXCHANGE_H diff --git a/libretroshare/src/rsitems/rsserviceids.h b/libretroshare/src/rsitems/rsserviceids.h index e3fc4a298..1394ce03b 100644 --- a/libretroshare/src/rsitems/rsserviceids.h +++ b/libretroshare/src/rsitems/rsserviceids.h @@ -84,6 +84,8 @@ const uint16_t RS_SERVICE_GXS_TYPE_REPUTATION = 0x0219; const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220; const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230; +const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315; + // Experimental Services. /* DSDV Testing at the moment - Service Only */ const uint16_t RS_SERVICE_TYPE_DSDV = 0x1010; diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 6f0b668b5..4e960554d 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1649,6 +1649,7 @@ int RsServer::StartupRetroShare() mConfigMgr->addConfiguration("identity.cfg", gxsid_ns); mConfigMgr->addConfiguration("gxsforums.cfg", gxsforums_ns); + mConfigMgr->addConfiguration("gxsforums_srv.cfg", mGxsForums); mConfigMgr->addConfiguration("gxschannels.cfg", gxschannels_ns); mConfigMgr->addConfiguration("gxscircles.cfg", gxscircles_ns); mConfigMgr->addConfiguration("posted.cfg", posted_ns); diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index a64e547b8..f10892de3 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -95,6 +95,91 @@ uint32_t p3GxsForums::forumsAuthenPolicy() return policy; } +static const uint32_t GXS_FORUMS_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months +static const uint8_t GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ; + +struct RsGxsForumNotifyRecordsItem: public RsItem +{ + + RsGxsForumNotifyRecordsItem() + : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_FORUMS_CONFIG,GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD) + {} + + virtual ~RsGxsForumNotifyRecordsItem() {} + + void serial_process( RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext& ctx ) + { + RS_REGISTER_SERIAL_MEMBER(records); + } + void clear() {} + + std::map records; +}; + +class GxsForumsConfigSerializer : public RsServiceSerializer +{ +public: + GxsForumsConfigSerializer() : RsServiceSerializer(RS_SERVICE_TYPE_GXS_TRANS) {} + virtual ~GxsForumsConfigSerializer() {} + + RsItem* create_item(uint16_t service_id, uint8_t item_sub_id) const + { + if(service_id != RS_SERVICE_GXS_TYPE_FORUMS_CONFIG) + return NULL; + + switch(item_sub_id) + { + case GXS_FORUMS_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsForumNotifyRecordsItem(); + default: + return NULL; + } + } +}; + +bool p3GxsForums::saveList(bool &cleanup, std::list&saveList) +{ + cleanup = true ; + + RsGxsForumNotifyRecordsItem *item = new RsGxsForumNotifyRecordsItem ; + + item->records = mKnownForums ; + + saveList.push_back(item) ; + return true; +} + +bool p3GxsForums::loadList(std::list& loadList) +{ + while(!loadList.empty()) + { + RsItem *item = loadList.front(); + loadList.pop_front(); + + time_t now = time(NULL); + + RsGxsForumNotifyRecordsItem *fnr = dynamic_cast(item) ; + + if(fnr != NULL) + { + mKnownForums.clear(); + + for(auto it(fnr->records.begin());it!=fnr->records.end();++it) + if( it->second + GXS_FORUMS_CONFIG_MAX_TIME_NOTIFY_STORAGE < now) + mKnownForums.insert(*it) ; + } + + delete item ; + } + return true; +} + +RsSerialiser* p3GxsForums::setupSerialiser() +{ + RsSerialiser* rss = new RsSerialiser; + rss->addSerialType(new GxsForumsConfigSerializer()); + + return rss; +} void p3GxsForums::notifyChanges(std::vector &changes) { @@ -145,7 +230,9 @@ void p3GxsForums::notifyChanges(std::vector &changes) if(mKnownForums.find(*git) == mKnownForums.end()) { notify->AddFeedItem(RS_FEED_ITEM_FORUM_NEW, git->toStdString()); - mKnownForums.insert(*git) ; + mKnownForums.insert(std::make_pair(*git,time(NULL))) ; + + IndicateConfigChanged(); } else std::cerr << "(II) Not notifying already known forum " << *git << std::endl; @@ -182,7 +269,9 @@ void p3GxsForums::notifyChanges(std::vector &changes) void p3GxsForums::service_tick() { dummy_tick(); +#ifdef TO_REMOVE RsTickEvent::tick_events(); +#endif return; } @@ -564,6 +653,7 @@ bool p3GxsForums::generateGroup(uint32_t &token, std::string groupName) } +#ifdef TO_REMOVE // Overloaded from RsTickEvent for Event callbacks. void p3GxsForums::handle_event(uint32_t event_type, const std::string &/*elabel*/) { @@ -584,4 +674,5 @@ void p3GxsForums::handle_event(uint32_t event_type, const std::string &/*elabel* break; } } +#endif diff --git a/libretroshare/src/services/p3gxsforums.h b/libretroshare/src/services/p3gxsforums.h index 1e2e78d92..daa58c18e 100644 --- a/libretroshare/src/services/p3gxsforums.h +++ b/libretroshare/src/services/p3gxsforums.h @@ -39,8 +39,10 @@ * */ -class p3GxsForums: public RsGenExchange, public RsGxsForums, +class p3GxsForums: public RsGenExchange, public RsGxsForums, public p3Config +#ifdef TO_REMOVE public RsTickEvent /* only needed for testing - remove after */ +#endif { public: @@ -55,8 +57,14 @@ virtual void service_tick(); virtual void notifyChanges(std::vector& changes); +#ifdef TO_REMOVE // Overloaded from RsTickEvent. virtual void handle_event(uint32_t event_type, const std::string &elabel); +#endif + + virtual RsSerialiser* setupSerialiser(); // @see p3Config::setupSerialiser() + virtual bool saveList(bool &cleanup, std::list&saveList); // @see p3Config::saveList(bool &cleanup, std::list&) + virtual bool loadList(std::list& loadList); // @see p3Config::loadList(std::list&) public: @@ -117,7 +125,7 @@ bool generateGroup(uint32_t &token, std::string groupName); int mGenCount; std::vector mGenRefs; RsGxsMessageId mGenThreadId; - std::set mKnownForums ; + std::map mKnownForums ; }; From d57f933109ff36439733428fd6110db6ce89b15a Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 16 Feb 2018 23:51:43 +0100 Subject: [PATCH 2/6] added load/save of known channels to avoid re-displaying it in the NewsFeed after then have been deleted. --- libretroshare/src/rsitems/rsserviceids.h | 3 +- libretroshare/src/rsserver/rsinit.cc | 1 + libretroshare/src/services/p3gxschannels.cc | 88 ++++++++++++++++++++- libretroshare/src/services/p3gxschannels.h | 8 +- libretroshare/src/services/p3gxsforums.cc | 5 -- libretroshare/src/services/p3gxsforums.h | 6 +- 6 files changed, 97 insertions(+), 14 deletions(-) diff --git a/libretroshare/src/rsitems/rsserviceids.h b/libretroshare/src/rsitems/rsserviceids.h index 1394ce03b..557bc54d7 100644 --- a/libretroshare/src/rsitems/rsserviceids.h +++ b/libretroshare/src/rsitems/rsserviceids.h @@ -84,7 +84,8 @@ const uint16_t RS_SERVICE_GXS_TYPE_REPUTATION = 0x0219; const uint16_t RS_SERVICE_TYPE_GXS_RECOGN = 0x0220; const uint16_t RS_SERVICE_TYPE_GXS_TRANS = 0x0230; -const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315; +const uint16_t RS_SERVICE_GXS_TYPE_FORUMS_CONFIG = 0x0315; +const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG = 0x0317; // Experimental Services. /* DSDV Testing at the moment - Service Only */ diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 4e960554d..0d9300202 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1651,6 +1651,7 @@ int RsServer::StartupRetroShare() mConfigMgr->addConfiguration("gxsforums.cfg", gxsforums_ns); mConfigMgr->addConfiguration("gxsforums_srv.cfg", mGxsForums); mConfigMgr->addConfiguration("gxschannels.cfg", gxschannels_ns); + mConfigMgr->addConfiguration("gxschannels_srv.cfg", mGxsChannels); mConfigMgr->addConfiguration("gxscircles.cfg", gxscircles_ns); mConfigMgr->addConfiguration("posted.cfg", posted_ns); #ifdef RS_USE_WIKI diff --git a/libretroshare/src/services/p3gxschannels.cc b/libretroshare/src/services/p3gxschannels.cc index 6805bb0ab..8e2a303f0 100644 --- a/libretroshare/src/services/p3gxschannels.cc +++ b/libretroshare/src/services/p3gxschannels.cc @@ -120,6 +120,92 @@ uint32_t p3GxsChannels::channelsAuthenPolicy() return policy; } +static const uint32_t GXS_CHANNELS_CONFIG_MAX_TIME_NOTIFY_STORAGE = 86400*30*2 ; // ignore notifications for 2 months +static const uint8_t GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD = 0x01 ; + +struct RsGxsForumNotifyRecordsItem: public RsItem +{ + + RsGxsForumNotifyRecordsItem() + : RsItem(RS_PKT_VERSION_SERVICE,RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG,GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD) + {} + + virtual ~RsGxsForumNotifyRecordsItem() {} + + void serial_process( RsGenericSerializer::SerializeJob j, RsGenericSerializer::SerializeContext& ctx ) + { + RS_REGISTER_SERIAL_MEMBER(records); + } + void clear() {} + + std::map records; +}; + +class GxsChannelsConfigSerializer : public RsServiceSerializer +{ +public: + GxsChannelsConfigSerializer() : RsServiceSerializer(RS_SERVICE_TYPE_GXS_TRANS) {} + virtual ~GxsChannelsConfigSerializer() {} + + RsItem* create_item(uint16_t service_id, uint8_t item_sub_id) const + { + if(service_id != RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG) + return NULL; + + switch(item_sub_id) + { + case GXS_CHANNELS_CONFIG_SUBTYPE_NOTIFY_RECORD: return new RsGxsForumNotifyRecordsItem(); + default: + return NULL; + } + } +}; + +bool p3GxsChannels::saveList(bool &cleanup, std::list&saveList) +{ + cleanup = true ; + + RsGxsForumNotifyRecordsItem *item = new RsGxsForumNotifyRecordsItem ; + + item->records = mKnownChannels ; + + saveList.push_back(item) ; + return true; +} + +bool p3GxsChannels::loadList(std::list& loadList) +{ + while(!loadList.empty()) + { + RsItem *item = loadList.front(); + loadList.pop_front(); + + time_t now = time(NULL); + + RsGxsForumNotifyRecordsItem *fnr = dynamic_cast(item) ; + + if(fnr != NULL) + { + mKnownChannels.clear(); + + for(auto it(fnr->records.begin());it!=fnr->records.end();++it) + if( it->second + GXS_CHANNELS_CONFIG_MAX_TIME_NOTIFY_STORAGE < now) + mKnownChannels.insert(*it) ; + } + + delete item ; + } + return true; +} + +RsSerialiser* p3GxsChannels::setupSerialiser() +{ + RsSerialiser* rss = new RsSerialiser; + rss->addSerialType(new GxsChannelsConfigSerializer()); + + return rss; +} + /** Overloaded to cache new groups **/ RsGenExchange::ServiceCreate_Return p3GxsChannels::service_CreateGroup(RsGxsGrpItem* grpItem, RsTlvSecurityKeySet& /* keySet */) @@ -223,7 +309,7 @@ void p3GxsChannels::notifyChanges(std::vector &changes) if(mKnownChannels.find(*git) == mKnownChannels.end()) { notify->AddFeedItem(RS_FEED_ITEM_CHANNEL_NEW, git->toStdString()); - mKnownChannels.insert(*git) ; + mKnownChannels.insert(std::make_pair(*git,time(NULL))) ; } else std::cerr << "(II) Not notifying already known channel " << *git << std::endl; diff --git a/libretroshare/src/services/p3gxschannels.h b/libretroshare/src/services/p3gxschannels.h index db73448cd..4eb5f5fba 100644 --- a/libretroshare/src/services/p3gxschannels.h +++ b/libretroshare/src/services/p3gxschannels.h @@ -55,7 +55,7 @@ class SSGxsChannelGroup class p3GxsChannels: public RsGenExchange, public RsGxsChannels, - public GxsTokenQueue, + public GxsTokenQueue, public p3Config, public RsTickEvent /* only needed for testing - remove after */ { public: @@ -68,6 +68,10 @@ virtual void service_tick(); protected: + virtual RsSerialiser* setupSerialiser(); // @see p3Config::setupSerialiser() + virtual bool saveList(bool &cleanup, std::list&saveList); // @see p3Config::saveList(bool &cleanup, std::list&) + virtual bool loadList(std::list& loadList); // @see p3Config::loadList(std::list&) + // Overloaded to cache new groups. virtual RsGenExchange::ServiceCreate_Return service_CreateGroup(RsGxsGrpItem* grpItem, RsTlvSecurityKeySet& keySet); @@ -218,7 +222,7 @@ bool generateGroup(uint32_t &token, std::string groupName); RsGxsMessageId mGenThreadId; p3GxsCommentService *mCommentService; - std::set mKnownChannels; + std::map mKnownChannels; }; #endif diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index f10892de3..d2eff2ac7 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -269,9 +269,7 @@ void p3GxsForums::notifyChanges(std::vector &changes) void p3GxsForums::service_tick() { dummy_tick(); -#ifdef TO_REMOVE RsTickEvent::tick_events(); -#endif return; } @@ -653,7 +651,6 @@ bool p3GxsForums::generateGroup(uint32_t &token, std::string groupName) } -#ifdef TO_REMOVE // Overloaded from RsTickEvent for Event callbacks. void p3GxsForums::handle_event(uint32_t event_type, const std::string &/*elabel*/) { @@ -674,5 +671,3 @@ void p3GxsForums::handle_event(uint32_t event_type, const std::string &/*elabel* break; } } -#endif - diff --git a/libretroshare/src/services/p3gxsforums.h b/libretroshare/src/services/p3gxsforums.h index daa58c18e..a4e0ebf47 100644 --- a/libretroshare/src/services/p3gxsforums.h +++ b/libretroshare/src/services/p3gxsforums.h @@ -39,10 +39,8 @@ * */ -class p3GxsForums: public RsGenExchange, public RsGxsForums, public p3Config -#ifdef TO_REMOVE +class p3GxsForums: public RsGenExchange, public RsGxsForums, public p3Config, public RsTickEvent /* only needed for testing - remove after */ -#endif { public: @@ -57,10 +55,8 @@ virtual void service_tick(); virtual void notifyChanges(std::vector& changes); -#ifdef TO_REMOVE // Overloaded from RsTickEvent. virtual void handle_event(uint32_t event_type, const std::string &elabel); -#endif virtual RsSerialiser* setupSerialiser(); // @see p3Config::setupSerialiser() virtual bool saveList(bool &cleanup, std::list&saveList); // @see p3Config::saveList(bool &cleanup, std::list&) From 8708dd9b94c36152afaef6fb4e19093d2169eb9c Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 17 Feb 2018 12:04:13 +0100 Subject: [PATCH 3/6] fixed bug due to wrong service ID in serializer --- libretroshare/src/services/p3gxschannels.cc | 2 +- libretroshare/src/services/p3gxsforums.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/services/p3gxschannels.cc b/libretroshare/src/services/p3gxschannels.cc index 8e2a303f0..d2578d470 100644 --- a/libretroshare/src/services/p3gxschannels.cc +++ b/libretroshare/src/services/p3gxschannels.cc @@ -144,7 +144,7 @@ struct RsGxsForumNotifyRecordsItem: public RsItem class GxsChannelsConfigSerializer : public RsServiceSerializer { public: - GxsChannelsConfigSerializer() : RsServiceSerializer(RS_SERVICE_TYPE_GXS_TRANS) {} + GxsChannelsConfigSerializer() : RsServiceSerializer(RS_SERVICE_GXS_TYPE_CHANNELS_CONFIG) {} virtual ~GxsChannelsConfigSerializer() {} RsItem* create_item(uint16_t service_id, uint8_t item_sub_id) const diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index d2eff2ac7..dd98f88d1 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -119,7 +119,7 @@ struct RsGxsForumNotifyRecordsItem: public RsItem class GxsForumsConfigSerializer : public RsServiceSerializer { public: - GxsForumsConfigSerializer() : RsServiceSerializer(RS_SERVICE_TYPE_GXS_TRANS) {} + GxsForumsConfigSerializer() : RsServiceSerializer(RS_SERVICE_GXS_TYPE_FORUMS_CONFIG) {} virtual ~GxsForumsConfigSerializer() {} RsItem* create_item(uint16_t service_id, uint8_t item_sub_id) const From 6d0945fbab9409662de2a5c4b3db307b7e77efd6 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sun, 18 Feb 2018 08:53:31 +0100 Subject: [PATCH 4/6] Fix bug when removing root item in RsCollectionDialog --- retroshare-gui/src/gui/common/RsCollectionDialog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/common/RsCollectionDialog.cpp b/retroshare-gui/src/gui/common/RsCollectionDialog.cpp index 8f7cb20be..9016f96b7 100644 --- a/retroshare-gui/src/gui/common/RsCollectionDialog.cpp +++ b/retroshare-gui/src/gui/common/RsCollectionDialog.cpp @@ -980,7 +980,11 @@ bool RsCollectionDialog::removeItem(QTreeWidgetItem *item, bool &removeOnlyFile) //First uncheck item to update parent informations item->setCheckState(COLUMN_FILE,Qt::Unchecked); QTreeWidgetItem *parent = item->parent(); - parent->removeChild(item); + if (parent) { + parent->removeChild(item); + } else { + getRootItem()->removeChild(item); + } return true; } else { if (!removeOnlyFile) { From d87061ddb344cc009fab04ed1bf075d7dfbff160 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sun, 18 Feb 2018 09:18:44 +0100 Subject: [PATCH 5/6] Fix bug when adding new items when hashing in RsCollectionDialog --- retroshare-gui/src/gui/common/RsCollectionDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/common/RsCollectionDialog.cpp b/retroshare-gui/src/gui/common/RsCollectionDialog.cpp index 9016f96b7..e81afa1b2 100644 --- a/retroshare-gui/src/gui/common/RsCollectionDialog.cpp +++ b/retroshare-gui/src/gui/common/RsCollectionDialog.cpp @@ -797,7 +797,7 @@ void RsCollectionDialog::addRecursive(bool recursive) for (QHash::Iterator it = _listOfFilesAddedInDir.begin(); it != _listOfFilesAddedInDir.end() ; ++it) { QString path = it.value(); - it.value() = ""; + //it.value() = "";//Don't reset value, could be an older attachment not terminated. if (dirToAdd.contains(path)){ it.value() = dirToAdd.value(path); } else if(item) { From 931fdd026e206840597f6072ad2e3eb49c4b885f Mon Sep 17 00:00:00 2001 From: Phenom Date: Sun, 18 Feb 2018 17:30:01 +0100 Subject: [PATCH 6/6] Fix bug in processSettings in RsCollectionDialog.cpp --- .../src/gui/common/RsCollectionDialog.cpp | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/retroshare-gui/src/gui/common/RsCollectionDialog.cpp b/retroshare-gui/src/gui/common/RsCollectionDialog.cpp index e81afa1b2..26e609289 100644 --- a/retroshare-gui/src/gui/common/RsCollectionDialog.cpp +++ b/retroshare-gui/src/gui/common/RsCollectionDialog.cpp @@ -21,17 +21,23 @@ * Boston, MA 02110-1301, USA. ****************************************************************/ +#include "RsCollectionDialog.h" + +#include "RsCollection.h" +#include "util/misc.h" + #include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include "RsCollectionDialog.h" -#include "RsCollection.h" -#include "util/misc.h" +#include + #define COLUMN_FILE 0 #define COLUMN_FILEPATH 1 #define COLUMN_SIZE 2 @@ -366,6 +372,8 @@ void RsCollectionDialog::processSettings(bool bLoad) ui._listSplitter->restoreState(Settings->value("ListSplitterState_CM").toByteArray()); // Load system file header configuration ui._systemFileTW->header()->restoreState(Settings->value("SystemFileHeader_CM").toByteArray()); + // Load file entries header configuration + ui._fileEntriesTW->header()->restoreState(Settings->value("FileEntriesHeader_CM").toByteArray()); } else { // Load windows geometrie restoreGeometry(Settings->value("WindowGeometrie").toByteArray()); @@ -374,22 +382,30 @@ void RsCollectionDialog::processSettings(bool bLoad) ui._listSplitter->restoreState(Settings->value("ListSplitterState").toByteArray()); // Load system file header configuration ui._systemFileTW->header()->restoreState(Settings->value("SystemFileHeader").toByteArray()); + // Load file entries header configuration + ui._fileEntriesTW->header()->restoreState(Settings->value("FileEntriesHeader").toByteArray()); } } else { if(_creationMode && !_readOnly){ // Save windows geometrie Settings->setValue("WindowGeometrie_CM",saveGeometry()); - // Save splitter state - Settings->setValue("SplitterState_CM", ui._listSplitter->saveState()); - // Save treeView header configuration + // Save splitters state + Settings->setValue("MainSplitterState_CM", ui._mainSplitter->saveState()); + Settings->setValue("ListSplitterState_CM", ui._listSplitter->saveState()); + // Save system file header configuration Settings->setValue("SystemFileHeader_CM", ui._systemFileTW->header()->saveState()); + // Save file entries header configuration + Settings->setValue("FileEntriesHeader_CM", ui._fileEntriesTW->header()->saveState()); } else { // Save windows geometrie Settings->setValue("WindowGeometrie",saveGeometry()); // Save splitter state - Settings->setValue("SplitterState", ui._listSplitter->saveState()); - // Save treeView header configuration + Settings->setValue("MainSplitterState", ui._mainSplitter->saveState()); + Settings->setValue("ListSplitterState", ui._listSplitter->saveState()); + // Save system file header configuration Settings->setValue("SystemFileHeader", ui._systemFileTW->header()->saveState()); + // Save file entries header configuration + Settings->setValue("FileEntriesHeader", ui._fileEntriesTW->header()->saveState()); } }