mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -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
@ -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()
|
||||
|
@ -86,6 +86,7 @@ private slots:
|
||||
|
||||
void previousMessage ();
|
||||
void nextMessage ();
|
||||
void nextUnreadMessage();
|
||||
void downloadAllFiles();
|
||||
|
||||
void changedViewBox();
|
||||
|
@ -950,7 +950,7 @@ background: white;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<item row="0" column="7">
|
||||
<widget class="QPushButton" name="expandButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
@ -976,7 +976,7 @@ background: white;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<item row="0" column="6">
|
||||
<widget class="QPushButton" name="downloadButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
@ -996,6 +996,25 @@ background: white;}</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QPushButton" name="nextUnreadButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next unread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
|
Loading…
Reference in New Issue
Block a user