mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 09:11:06 -04:00
added next unread button to forums (patch from devnewton #3401840)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4614 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fdd8825399
commit
ad4b0153b2
3 changed files with 45 additions and 2 deletions
|
@ -152,6 +152,8 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
|||
connect(ui.expandButton, SIGNAL(clicked()), this, SLOT(togglethreadview()));
|
||||
connect(ui.previousButton, SIGNAL(clicked()), this, SLOT(previousMessage()));
|
||||
connect(ui.nextButton, SIGNAL(clicked()), this, SLOT(nextMessage()));
|
||||
connect(ui.nextUnreadButton, SIGNAL(clicked()), this, SLOT(nextUnreadMessage()));
|
||||
|
||||
connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(downloadAllFiles()));
|
||||
|
||||
connect(ui.clearButton, SIGNAL(clicked()), this, SLOT(clearFilter()));
|
||||
|
@ -1159,6 +1161,27 @@ void ForumsDialog::downloadAllFiles()
|
|||
RetroShareLink::process(urls, RetroShareLink::TYPE_FILE/*, true*/);
|
||||
}
|
||||
|
||||
void ForumsDialog::nextUnreadMessage()
|
||||
{
|
||||
QTreeWidgetItem* currentItem = ui.threadTreeWidget->currentItem();
|
||||
if( !currentItem )
|
||||
{
|
||||
currentItem = ui.threadTreeWidget->topLevelItem(0);
|
||||
if( !currentItem )
|
||||
return;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
uint32_t status = currentItem->data(COLUMN_THREAD_DATA, ROLE_THREAD_STATUS).toUInt();
|
||||
if( IS_UNREAD(status) )
|
||||
{
|
||||
ui.threadTreeWidget->setCurrentItem(currentItem);
|
||||
return;
|
||||
}
|
||||
} while( currentItem = ui.threadTreeWidget->itemBelow(currentItem) );
|
||||
}
|
||||
|
||||
// TODO
|
||||
#if 0
|
||||
void ForumsDialog::removemessage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue