mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #630 from RetroPooh/master
small gui fixes in lobbies id menu and stats window
This commit is contained in:
commit
7e750d3161
@ -48,6 +48,7 @@
|
|||||||
#include "gui/gxs/GxsIdDetails.h"
|
#include "gui/gxs/GxsIdDetails.h"
|
||||||
#include "util/HandleRichText.h"
|
#include "util/HandleRichText.h"
|
||||||
#include "gui/SoundManager.h"
|
#include "gui/SoundManager.h"
|
||||||
|
#include "gui/Identity/IdDialog.h"
|
||||||
|
|
||||||
#include <retroshare/rsnotify.h>
|
#include <retroshare/rsnotify.h>
|
||||||
|
|
||||||
@ -87,9 +88,12 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||||||
ui.participantsList->setColumnHidden(COLUMN_ID,true);
|
ui.participantsList->setColumnHidden(COLUMN_ID,true);
|
||||||
|
|
||||||
muteAct = new QAction(QIcon(), tr("Mute participant"), this);
|
muteAct = new QAction(QIcon(), tr("Mute participant"), this);
|
||||||
banAct = new QAction(QIcon(":/icons/yellow_biohazard64.png"), tr("Ban this person (Sets negative opinion)"), this);
|
banAct = new QAction(QIcon(":/icons/png/thumbs-down.png"), tr("Ban this person (Sets negative opinion)"), this);
|
||||||
|
voteNeutralAct = new QAction(QIcon(":/icons/png/thumbs-neutral.png"), tr("Give neutral opinion"), this);
|
||||||
|
votePositiveAct = new QAction(QIcon(":/icons/png/thumbs-up.png"), tr("Give positive opinion"), this);
|
||||||
distantChatAct = new QAction(QIcon(":/images/chat_24.png"), tr("Start private chat"), this);
|
distantChatAct = new QAction(QIcon(":/images/chat_24.png"), tr("Start private chat"), this);
|
||||||
sendMessageAct = new QAction(QIcon(":/images/mail_new.png"), tr("Send Message"), this);
|
sendMessageAct = new QAction(QIcon(":/images/mail_new.png"), tr("Send Message"), this);
|
||||||
|
showinpeopleAct = new QAction(QIcon(), tr("Show author in people tab"), this);
|
||||||
|
|
||||||
QActionGroup *sortgrp = new QActionGroup(this);
|
QActionGroup *sortgrp = new QActionGroup(this);
|
||||||
actionSortByName = new QAction(QIcon(), tr("Sort by Name"), this);
|
actionSortByName = new QAction(QIcon(), tr("Sort by Name"), this);
|
||||||
@ -106,7 +110,10 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||||||
connect(muteAct, SIGNAL(triggered()), this, SLOT(changePartipationState()));
|
connect(muteAct, SIGNAL(triggered()), this, SLOT(changePartipationState()));
|
||||||
connect(distantChatAct, SIGNAL(triggered()), this, SLOT(distantChatParticipant()));
|
connect(distantChatAct, SIGNAL(triggered()), this, SLOT(distantChatParticipant()));
|
||||||
connect(sendMessageAct, SIGNAL(triggered()), this, SLOT(sendMessage()));
|
connect(sendMessageAct, SIGNAL(triggered()), this, SLOT(sendMessage()));
|
||||||
connect(banAct, SIGNAL(triggered()), this, SLOT(banParticipant()));
|
connect(votePositiveAct, SIGNAL(triggered()), this, SLOT(voteParticipantPositive()));
|
||||||
|
connect(voteNeutralAct, SIGNAL(triggered()), this, SLOT(voteParticipantNeutral()));
|
||||||
|
connect(banAct, SIGNAL(triggered()), this, SLOT(voteParticipantNegative()));
|
||||||
|
connect(showinpeopleAct, SIGNAL(triggered()), this, SLOT(showInPeopleTab()));
|
||||||
|
|
||||||
connect(actionSortByName, SIGNAL(triggered()), this, SLOT(sortParcipants()));
|
connect(actionSortByName, SIGNAL(triggered()), this, SLOT(sortParcipants()));
|
||||||
connect(actionSortByActivity, SIGNAL(triggered()), this, SLOT(sortParcipants()));
|
connect(actionSortByActivity, SIGNAL(triggered()), this, SLOT(sortParcipants()));
|
||||||
@ -215,79 +222,128 @@ void ChatLobbyDialog::participantsTreeWidgetCustomPopupMenu(QPoint)
|
|||||||
QMenu contextMnu(this);
|
QMenu contextMnu(this);
|
||||||
|
|
||||||
contextMnu.addAction(distantChatAct);
|
contextMnu.addAction(distantChatAct);
|
||||||
contextMnu.addAction(sendMessageAct);
|
contextMnu.addAction(sendMessageAct);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction(actionSortByActivity);
|
contextMnu.addAction(actionSortByActivity);
|
||||||
contextMnu.addAction(actionSortByName);
|
contextMnu.addAction(actionSortByName);
|
||||||
contextMnu.addSeparator();
|
contextMnu.addSeparator();
|
||||||
contextMnu.addAction(muteAct);
|
contextMnu.addAction(muteAct);
|
||||||
|
contextMnu.addAction(votePositiveAct);
|
||||||
|
contextMnu.addAction(voteNeutralAct);
|
||||||
contextMnu.addAction(banAct);
|
contextMnu.addAction(banAct);
|
||||||
|
contextMnu.addAction(showinpeopleAct);
|
||||||
|
|
||||||
|
distantChatAct->setEnabled(false);
|
||||||
|
sendMessageAct->setEnabled(selectedItems.count()==1);
|
||||||
muteAct->setCheckable(true);
|
muteAct->setCheckable(true);
|
||||||
muteAct->setEnabled(false);
|
muteAct->setEnabled(false);
|
||||||
muteAct->setChecked(false);
|
muteAct->setChecked(false);
|
||||||
banAct->setEnabled(false);
|
votePositiveAct->setEnabled(false);
|
||||||
|
voteNeutralAct->setEnabled(false);
|
||||||
if (selectedItems.size())
|
banAct->setEnabled(false);
|
||||||
|
showinpeopleAct->setEnabled(selectedItems.count()==1);
|
||||||
|
if(selectedItems.count()==1)
|
||||||
{
|
{
|
||||||
RsGxsId nickName;
|
RsGxsId nickName;
|
||||||
rsMsgs->getIdentityForChatLobby(lobbyId, nickName);
|
rsMsgs->getIdentityForChatLobby(lobbyId, nickName);
|
||||||
|
if(RsGxsId(selectedItems.at(0)->text(COLUMN_ID).toStdString())!=nickName)
|
||||||
if(selectedItems.count()>1 || (RsGxsId(selectedItems.at(0)->text(COLUMN_ID).toStdString())!=nickName))
|
{
|
||||||
{
|
distantChatAct->setEnabled(true);
|
||||||
muteAct->setEnabled(true);
|
RsGxsId gxsid ;
|
||||||
banAct->setEnabled(true);
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*selectedItems.begin())->getId(gxsid);
|
||||||
|
votePositiveAct->setEnabled(rsReputations->overallReputationLevel(gxsid) != RsReputations::REPUTATION_LOCALLY_POSITIVE);
|
||||||
QList<QTreeWidgetItem*>::iterator item;
|
voteNeutralAct->setEnabled((rsReputations->overallReputationLevel(gxsid) == RsReputations::REPUTATION_LOCALLY_POSITIVE) || (rsReputations->overallReputationLevel(gxsid) == RsReputations::REPUTATION_LOCALLY_NEGATIVE) );
|
||||||
for (item = selectedItems.begin(); item != selectedItems.end(); ++item) {
|
banAct->setEnabled(rsReputations->overallReputationLevel(gxsid) != RsReputations::REPUTATION_LOCALLY_NEGATIVE);
|
||||||
|
muteAct->setEnabled(true);
|
||||||
RsGxsId gxsid ;
|
if(isParticipantMuted(gxsid))
|
||||||
if ( dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(gxsid) && isParticipantMuted(gxsid))
|
muteAct->setChecked(true);
|
||||||
{
|
}
|
||||||
muteAct->setChecked(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
distantChatAct->setEnabled(selectedItems.count()==1 && RsGxsId(selectedItems.front()->text(COLUMN_ID).toStdString())!=nickName) ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contextMnu.exec(QCursor::pos());
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatLobbyDialog::voteParticipantPositive()
|
||||||
|
{
|
||||||
|
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
||||||
|
if (selectedItems.isEmpty())
|
||||||
|
return;
|
||||||
|
QList<QTreeWidgetItem*>::iterator item;
|
||||||
|
for (item = selectedItems.begin(); item != selectedItems.end(); ++item)
|
||||||
|
{
|
||||||
|
RsGxsId nickname;
|
||||||
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(nickname) ;
|
||||||
|
RsGxsId gxs_id;
|
||||||
|
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||||
|
// This test avoids to mute/ban your own identity
|
||||||
|
if (gxs_id!=nickname)
|
||||||
|
{
|
||||||
|
rsReputations->setOwnOpinion(nickname, RsReputations::OPINION_POSITIVE);
|
||||||
|
std::cerr << "Giving positive opinion to GXS id " << nickname << std::endl;
|
||||||
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->forceUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChatLobbyDialog::voteParticipantNeutral()
|
||||||
|
{
|
||||||
|
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
||||||
|
if (selectedItems.isEmpty())
|
||||||
|
return;
|
||||||
|
QList<QTreeWidgetItem*>::iterator item;
|
||||||
|
for (item = selectedItems.begin(); item != selectedItems.end(); ++item)
|
||||||
|
{
|
||||||
|
RsGxsId nickname;
|
||||||
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(nickname) ;
|
||||||
|
RsGxsId gxs_id;
|
||||||
|
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||||
|
// This test avoids to mute/ban your own identity
|
||||||
|
if (gxs_id!=nickname)
|
||||||
|
{
|
||||||
|
rsReputations->setOwnOpinion(nickname, RsReputations::OPINION_NEUTRAL);
|
||||||
|
std::cerr << "Giving neutral opinion to GXS id " << nickname << std::endl;
|
||||||
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->forceUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Called when the "ban" menu is selected. Sets a negative reputation on the selected user.
|
* @brief Called when the "ban" menu is selected. Sets a negative reputation on the selected user.
|
||||||
*/
|
*/
|
||||||
void ChatLobbyDialog::banParticipant()
|
void ChatLobbyDialog::voteParticipantNegative()
|
||||||
{
|
{
|
||||||
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
||||||
|
if (selectedItems.isEmpty())
|
||||||
if (selectedItems.isEmpty()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
QList<QTreeWidgetItem*>::iterator item;
|
QList<QTreeWidgetItem*>::iterator item;
|
||||||
for (item = selectedItems.begin(); item != selectedItems.end(); ++item) {
|
for (item = selectedItems.begin(); item != selectedItems.end(); ++item)
|
||||||
|
{
|
||||||
RsGxsId nickname;
|
RsGxsId nickname;
|
||||||
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(nickname) ;
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(nickname) ;
|
||||||
|
|
||||||
RsGxsId gxs_id;
|
RsGxsId gxs_id;
|
||||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||||
|
|
||||||
// This test avoids to mute/ban your own identity
|
// This test avoids to mute/ban your own identity
|
||||||
|
|
||||||
if (gxs_id!=nickname)
|
if (gxs_id!=nickname)
|
||||||
{
|
{
|
||||||
|
rsReputations->setOwnOpinion(nickname, RsReputations::OPINION_NEGATIVE);
|
||||||
std::cerr << "Giving negative opinion to GXS id " << nickname << std::endl;
|
std::cerr << "Giving negative opinion to GXS id " << nickname << std::endl;
|
||||||
rsReputations->setOwnOpinion(nickname, RsReputations::OPINION_NEGATIVE);
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->forceUpdate();
|
||||||
|
|
||||||
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->forceUpdate();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatLobbyDialog::showInPeopleTab()
|
||||||
|
{
|
||||||
|
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
||||||
|
if (selectedItems.count()!=1)
|
||||||
|
return;
|
||||||
|
RsGxsId nickname;
|
||||||
|
dynamic_cast<GxsIdRSTreeWidgetItem*>(*selectedItems.begin())->getId(nickname);
|
||||||
|
IdDialog *idDialog = dynamic_cast<IdDialog*>(MainWindow::getPage(MainWindow::People));
|
||||||
|
if (!idDialog)
|
||||||
|
return ;
|
||||||
|
MainWindow::showWindow(MainWindow::People);
|
||||||
|
idDialog->navigate(nickname);
|
||||||
|
}
|
||||||
|
|
||||||
void ChatLobbyDialog::init()
|
void ChatLobbyDialog::init()
|
||||||
{
|
{
|
||||||
|
@ -54,6 +54,7 @@ private slots:
|
|||||||
void inviteFriends() ;
|
void inviteFriends() ;
|
||||||
void leaveLobby() ;
|
void leaveLobby() ;
|
||||||
void filterChanged(const QString &text);
|
void filterChanged(const QString &text);
|
||||||
|
void showInPeopleTab();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void lobbyLeave(ChatLobbyId) ;
|
void lobbyLeave(ChatLobbyId) ;
|
||||||
@ -80,7 +81,9 @@ protected slots:
|
|||||||
void distantChatParticipant();
|
void distantChatParticipant();
|
||||||
void participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item, int column);
|
void participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item, int column);
|
||||||
void sendMessage();
|
void sendMessage();
|
||||||
void banParticipant();
|
void voteParticipantPositive();
|
||||||
|
void voteParticipantNeutral();
|
||||||
|
void voteParticipantNegative();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateParticipantsList();
|
void updateParticipantsList();
|
||||||
@ -108,12 +111,15 @@ private:
|
|||||||
std::set<RsGxsId> mutedParticipants;
|
std::set<RsGxsId> mutedParticipants;
|
||||||
|
|
||||||
QAction *muteAct;
|
QAction *muteAct;
|
||||||
|
QAction *votePositiveAct;
|
||||||
|
QAction *voteNeutralAct;
|
||||||
QAction *banAct;
|
QAction *banAct;
|
||||||
QAction *distantChatAct;
|
QAction *distantChatAct;
|
||||||
QAction *actionSortByName;
|
QAction *actionSortByName;
|
||||||
QAction *actionSortByActivity;
|
QAction *actionSortByActivity;
|
||||||
QWidgetAction *checkableAction;
|
QWidgetAction *checkableAction;
|
||||||
QAction *sendMessageAct;
|
QAction *sendMessageAct;
|
||||||
|
QAction *showinpeopleAct;
|
||||||
|
|
||||||
GxsIdChooser *ownIdChooser ;
|
GxsIdChooser *ownIdChooser ;
|
||||||
};
|
};
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "gui/common/ElidedLabel.h"
|
#include "gui/common/ElidedLabel.h"
|
||||||
#include "gui/settings/rsharesettings.h"
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "util/QtVersion.h"
|
#include "util/QtVersion.h"
|
||||||
|
#include "util/DateTime.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
@ -477,10 +478,14 @@ void GroupTreeWidget::fillGroupItems(QTreeWidgetItem *categoryItem, const QList<
|
|||||||
tooltip += "\n" + tr("You have been granted as publisher (you can post here!)");
|
tooltip += "\n" + tr("You have been granted as publisher (you can post here!)");
|
||||||
|
|
||||||
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
||||||
{
|
|
||||||
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
|
tooltip += "\n" + QString::number(itemInfo.max_visible_posts) + " messages available" ;
|
||||||
|
// if(itemInfo.max_visible_posts) // wtf? this=0 when there are some posts definitely exist - lastpost is recent
|
||||||
|
if(itemInfo.lastpost == QDateTime::fromTime_t(0))
|
||||||
|
tooltip += "\n" + tr("Last Post") + ": " + tr("Never") ;
|
||||||
|
else
|
||||||
|
tooltip += "\n" + tr("Last Post") + ": " + DateTime::formatLongDateTime(itemInfo.lastpost) ;
|
||||||
|
if(!IS_GROUP_SUBSCRIBED(itemInfo.subscribeFlags))
|
||||||
tooltip += "\n" + tr("Subscribe to download and read messages") ;
|
tooltip += "\n" + tr("Subscribe to download and read messages") ;
|
||||||
}
|
|
||||||
|
|
||||||
item->setToolTip(COLUMN_NAME, tooltip);
|
item->setToolTip(COLUMN_NAME, tooltip);
|
||||||
item->setToolTip(COLUMN_UNREAD, tooltip);
|
item->setToolTip(COLUMN_UNREAD, tooltip);
|
||||||
|
@ -416,7 +416,10 @@ void GxsGroupDialog::updateFromExistingMeta(const QString &description)
|
|||||||
ui.nameline->setText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
|
ui.nameline->setText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
|
||||||
ui.popline->setText(QString::number( mGrpMeta.mPop)) ;
|
ui.popline->setText(QString::number( mGrpMeta.mPop)) ;
|
||||||
ui.postsline->setText(QString::number(mGrpMeta.mVisibleMsgCount));
|
ui.postsline->setText(QString::number(mGrpMeta.mVisibleMsgCount));
|
||||||
ui.lastpostline->setText(DateTime::formatLongDateTime(mGrpMeta.mLastPost));
|
if(mGrpMeta.mLastPost==0)
|
||||||
|
ui.lastpostline->setText(tr("Never"));
|
||||||
|
else
|
||||||
|
ui.lastpostline->setText(DateTime::formatLongDateTime(mGrpMeta.mLastPost));
|
||||||
ui.authorLabel->setId(mGrpMeta.mAuthorId);
|
ui.authorLabel->setId(mGrpMeta.mAuthorId);
|
||||||
ui.IDline->setText(QString::fromStdString(mGrpMeta.mGroupId.toStdString()));
|
ui.IDline->setText(QString::fromStdString(mGrpMeta.mGroupId.toStdString()));
|
||||||
ui.descriptiontextEdit->setPlainText(description);
|
ui.descriptiontextEdit->setPlainText(description);
|
||||||
|
@ -991,6 +991,12 @@ QString nickname ;
|
|||||||
else
|
else
|
||||||
comment += QString("<br/>%1: %2").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "anonymous"));
|
comment += QString("<br/>%1: %2").arg(QApplication::translate("GxsIdDetails", "Authentication"), QApplication::translate("GxsIdDetails", "anonymous"));
|
||||||
|
|
||||||
|
if(details.mReputation.mFriendsPositiveVotes || details.mReputation.mFriendsNegativeVotes)
|
||||||
|
{
|
||||||
|
comment += "<br/>Votes:";
|
||||||
|
if(details.mReputation.mFriendsPositiveVotes > 0) comment += " <b>+" + QString::number(details.mReputation.mFriendsPositiveVotes) + "</b>";
|
||||||
|
if(details.mReputation.mFriendsNegativeVotes > 0) comment += " <b>-" + QString::number(details.mReputation.mFriendsNegativeVotes) + "</b>";
|
||||||
|
}
|
||||||
return comment;
|
return comment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "gui/feeds/SubFileItem.h"
|
#include "gui/feeds/SubFileItem.h"
|
||||||
#include "gui/notifyqt.h"
|
#include "gui/notifyqt.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include "util/DateTime.h"
|
||||||
|
|
||||||
#define CHAN_DEFAULT_IMAGE ":/images/channels.png"
|
#define CHAN_DEFAULT_IMAGE ":/images/channels.png"
|
||||||
|
|
||||||
@ -265,8 +266,12 @@ void GxsChannelPostsWidget::insertChannelDetails(const RsGxsChannelGroup &group)
|
|||||||
ui->infoPosts->clear();
|
ui->infoPosts->clear();
|
||||||
ui->infoDescription->clear();
|
ui->infoDescription->clear();
|
||||||
} else {
|
} else {
|
||||||
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
|
ui->infoPosts->setText(QString::number(group.mMeta.mVisibleMsgCount));
|
||||||
ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str()));
|
if(group.mMeta.mLastPost==0)
|
||||||
|
ui->infoLastPost->setText(tr("Never"));
|
||||||
|
else
|
||||||
|
ui->infoLastPost->setText(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
||||||
|
ui->infoDescription->setText(QString::fromUtf8(group.mDescription.c_str()));
|
||||||
|
|
||||||
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
ui->infoAdministrator->setId(group.mMeta.mAuthorId) ;
|
||||||
|
|
||||||
|
@ -397,7 +397,7 @@
|
|||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@ -429,7 +429,26 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" colspan="2">
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="infoLastPostLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Last Post:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
<widget class="QTextBrowser" name="infoDescription">
|
<widget class="QTextBrowser" name="infoDescription">
|
||||||
<property name="html">
|
<property name="html">
|
||||||
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string notr="true"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
@ -446,7 +465,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="infoDescriptionLabel">
|
<widget class="QLabel" name="infoDescriptionLabel">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@ -459,7 +478,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="GxsIdLabel" name="infoAdministrator">
|
<widget class="GxsIdLabel" name="infoAdministrator">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>unknown</string>
|
<string>unknown</string>
|
||||||
@ -473,7 +492,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="infoLastPost">
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">unknown</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
@ -486,7 +512,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLabel" name="infoDistribution">
|
<widget class="QLabel" name="infoDistribution">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>unknown</string>
|
<string>unknown</string>
|
||||||
|
@ -909,6 +909,10 @@ static QString getDurationString(uint32_t days)
|
|||||||
tw->mForumDescription = QString("<b>%1: \t</b>%2<br/>").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str()));
|
tw->mForumDescription = QString("<b>%1: \t</b>%2<br/>").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str()));
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Subscribers")).arg(group.mMeta.mPop);
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Subscribers")).arg(group.mMeta.mPop);
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
||||||
|
if(group.mMeta.mLastPost==0)
|
||||||
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Last post")).arg(tr("Never"));
|
||||||
|
else
|
||||||
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Last post")).arg(DateTime::formatLongDateTime(group.mMeta.mLastPost));
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Synchronization")).arg(getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ;
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Synchronization")).arg(getDurationString( rsGxsForums->getSyncPeriod(group.mMeta.mGroupId)/86400 )) ;
|
||||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Storage")).arg(getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));
|
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Storage")).arg(getDurationString( rsGxsForums->getStoragePeriod(group.mMeta.mGroupId)/86400));
|
||||||
|
|
||||||
|
@ -124,9 +124,6 @@ void StatisticsWindow::initStackedPage()
|
|||||||
QActionGroup *grp = new QActionGroup(this);
|
QActionGroup *grp = new QActionGroup(this);
|
||||||
QAction *action;
|
QAction *action;
|
||||||
|
|
||||||
ui->stackPages->add(dhtw = new DhtWindow(ui->stackPages),
|
|
||||||
action = createPageAction(QIcon(IMAGE_DHT), tr("DHT"), grp));
|
|
||||||
|
|
||||||
ui->stackPages->add(bwdlg = new BwCtrlWindow(ui->stackPages),
|
ui->stackPages->add(bwdlg = new BwCtrlWindow(ui->stackPages),
|
||||||
action = createPageAction(QIcon(IMAGE_BANDWIDTH), tr("Bandwidth"), grp));
|
action = createPageAction(QIcon(IMAGE_BANDWIDTH), tr("Bandwidth"), grp));
|
||||||
|
|
||||||
@ -139,6 +136,9 @@ void StatisticsWindow::initStackedPage()
|
|||||||
ui->stackPages->add(rttdlg = new RttStatistics(ui->stackPages),
|
ui->stackPages->add(rttdlg = new RttStatistics(ui->stackPages),
|
||||||
action = createPageAction(QIcon(IMAGE_RTT), tr("RTT Statistics"), grp));
|
action = createPageAction(QIcon(IMAGE_RTT), tr("RTT Statistics"), grp));
|
||||||
|
|
||||||
|
ui->stackPages->add(dhtw = new DhtWindow(ui->stackPages),
|
||||||
|
action = createPageAction(QIcon(IMAGE_DHT), tr("DHT"), grp));
|
||||||
|
|
||||||
/*std::cerr << "Looking for interfaces in existing plugins:" << std::endl;
|
/*std::cerr << "Looking for interfaces in existing plugins:" << std::endl;
|
||||||
for(int i = 0;i<rsPlugins->nbPlugins();++i)
|
for(int i = 0;i<rsPlugins->nbPlugins();++i)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user