mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 08:35:16 -04:00
Added new RetroShare link formats:
retroshare://forum? retroshare://channel?... Added "Go to" from the news feed of forums and channels. Added "Copy RetroShare Link" to the forum/channel tree and messagees. Fixed style sheet of the auto download button in ChannelFeed. Fixed german language. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4162 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d058bf9511
commit
e5f3518225
20 changed files with 1826 additions and 1207 deletions
|
@ -342,6 +342,41 @@ void GroupTreeWidget::setUnreadCount(QTreeWidgetItem *item, int unreadCount)
|
|||
|
||||
}
|
||||
|
||||
QTreeWidgetItem *GroupTreeWidget::getItemFromId(const QString &id)
|
||||
{
|
||||
if (id.isEmpty()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Search exisiting item */
|
||||
QTreeWidgetItemIterator itemIterator(ui->treeWidget);
|
||||
QTreeWidgetItem *item;
|
||||
while ((item = *itemIterator) != NULL) {
|
||||
itemIterator++;
|
||||
|
||||
if (item->parent() == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (item->data(COLUMN_DATA, ROLE_ID).toString() == id) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QTreeWidgetItem *GroupTreeWidget::activateId(const QString &id, bool focus)
|
||||
{
|
||||
QTreeWidgetItem *item = getItemFromId(id);
|
||||
if (item == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ui->treeWidget->setCurrentItem(item);
|
||||
if (focus) {
|
||||
ui->treeWidget->setFocus();
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
void GroupTreeWidget::calculateScore(QTreeWidgetItem *item)
|
||||
{
|
||||
if (item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue