mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Added display menu in channels and forums to sort the group tree by name, popularity or last post.
Removed unnecessary loop over the forum messages in ForumDetails. Removed date and time when lastPost==0 in ForumDetails and ChannelDetails. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3950 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
28b4534fdf
commit
ff57befb1f
14 changed files with 403 additions and 133 deletions
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "feeds/ChanMsgItem.h"
|
||||
#include "common/PopularityDefs.h"
|
||||
#include "settings/rsharesettings.h"
|
||||
|
||||
#include "channels/CreateChannel.h"
|
||||
#include "channels/ChannelDetails.h"
|
||||
|
@ -70,10 +71,13 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
|||
|
||||
mChannelId.clear();
|
||||
|
||||
ownChannels = treeWidget->addCategoryItem(tr("Own Channels"), QIcon(), true);
|
||||
subcribedChannels = treeWidget->addCategoryItem(tr("Subscribed Channels"), QIcon(), true);
|
||||
popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(), false);
|
||||
otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(), false);
|
||||
/* Initialize group tree */
|
||||
treeWidget->initDisplayMenu(displayButton);
|
||||
|
||||
ownChannels = treeWidget->addCategoryItem(tr("Own Channels"), QIcon(), true);
|
||||
subcribedChannels = treeWidget->addCategoryItem(tr("Subscribed Channels"), QIcon(), true);
|
||||
popularChannels = treeWidget->addCategoryItem(tr("Popular Channels"), QIcon(), false);
|
||||
otherChannels = treeWidget->addCategoryItem(tr("Other Channels"), QIcon(), false);
|
||||
|
||||
//added from ahead
|
||||
updateChannelList();
|
||||
|
@ -87,9 +91,33 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
|||
channelmenu->addSeparator();
|
||||
channelpushButton->setMenu(channelmenu);
|
||||
|
||||
/* load settings */
|
||||
processSettings(true);
|
||||
|
||||
updateChannelMsgs();
|
||||
}
|
||||
|
||||
ChannelFeed::~ChannelFeed()
|
||||
{
|
||||
// save settings
|
||||
processSettings(false);
|
||||
}
|
||||
|
||||
void ChannelFeed::processSettings(bool load)
|
||||
{
|
||||
Settings->beginGroup(QString("ChannelFeed"));
|
||||
|
||||
if (load) {
|
||||
// load settings
|
||||
} else {
|
||||
// save settings
|
||||
}
|
||||
|
||||
treeWidget->processSettings(Settings, load);
|
||||
|
||||
Settings->endGroup();
|
||||
}
|
||||
|
||||
void ChannelFeed::channelListCustomPopupMenu( QPoint point )
|
||||
{
|
||||
ChannelInfo ci;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue