mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-29 09:18:45 -04:00
fixed compilation of RsNxsTransaction encryption code
This commit is contained in:
parent
6ecd2991e7
commit
9da8a8abc3
10 changed files with 454 additions and 898 deletions
|
@ -572,24 +572,6 @@ void IdDialog::updateSelection()
|
|||
}
|
||||
}
|
||||
|
||||
static QString getHumanReadableDuration(uint32_t seconds)
|
||||
{
|
||||
if(seconds < 60)
|
||||
return QString(QObject::tr("%1 seconds ago")).arg(seconds) ;
|
||||
else if(seconds < 120)
|
||||
return QString(QObject::tr("%1 minute ago")).arg(seconds/60) ;
|
||||
else if(seconds < 3600)
|
||||
return QString(QObject::tr("%1 minutes ago")).arg(seconds/60) ;
|
||||
else if(seconds < 7200)
|
||||
return QString(QObject::tr("%1 hour ago")).arg(seconds/3600) ;
|
||||
else if(seconds < 24*3600)
|
||||
return QString(QObject::tr("%1 hours ago")).arg(seconds/3600) ;
|
||||
else if(seconds < 2*24*3600)
|
||||
return QString(QObject::tr("%1 day ago")).arg(seconds/86400) ;
|
||||
else
|
||||
return QString(QObject::tr("%1 days ago")).arg(seconds/86400) ;
|
||||
}
|
||||
|
||||
void IdDialog::requestIdList()
|
||||
{
|
||||
//Disable by default, will be enable by insertIdDetails()
|
||||
|
@ -663,8 +645,8 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
|
|||
item->setText(RSID_COL_NICKNAME, QString::fromUtf8(data.mMeta.mGroupName.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE));
|
||||
item->setText(RSID_COL_KEYID, QString::fromStdString(data.mMeta.mGroupId.toStdString()));
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
item->setText(RSID_COL_LASTUSED, getHumanReadableDuration(now - data.mLastUsageTS)) ;
|
||||
//time_t now = time(NULL) ;
|
||||
//item->setText(RSID_COL_LASTUSED, getHumanReadableDuration(now - data.mLastUsageTS)) ;
|
||||
|
||||
item->setData(RSID_COL_KEYID, Qt::UserRole,QVariant(item_flags)) ;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -35,6 +35,7 @@
|
|||
#include "retroshare/rsgxscircles.h"
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsids.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <QMenu>
|
||||
|
@ -563,8 +564,10 @@ void PeopleDialog::chatIdentity()
|
|||
|
||||
uint32_t error_code ;
|
||||
|
||||
if(!rsMsgs->initiateDistantChatConnexion(RsGxsId(gxs_id), from_gxs_id, error_code))
|
||||
QMessageBox::information(NULL, tr("Distant chat cannot work"), QString("%1 %2: %3").arg(tr("Distant chat refused with this person.")).arg(tr("Error code")).arg(error_code)) ;
|
||||
DistantChatPeerId dpid ;
|
||||
|
||||
if(!rsMsgs->initiateDistantChatConnexion(RsGxsId(gxs_id), from_gxs_id, dpid,error_code))
|
||||
QMessageBox::information(NULL, tr("Distant chat cannot work"), QString("%1 %2: %3").arg(tr("Distant chat refused with this person.")).arg(tr("Error code")).arg(error_code)) ;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue