improved GUI for distant chat link management

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6425 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-06-11 21:26:12 +00:00
parent d5c645e383
commit 3f752b9eae
2 changed files with 34 additions and 22 deletions

View File

@ -68,12 +68,21 @@ void CreateMsgLinkDialog::updateCurrentRow(int r)
std::cerr << "Parsing link : " << text.toString().toStdString() << std::endl;
RetroShareLink link(text) ;
if( link.type() == RetroShareLink::TYPE_PRIVATE_CHAT )
_current_link_type_LE->setText( tr("Private chat invite") ) ;
else
_current_link_type_LE->setText( tr("Public message invite") ) ;
RsPeerDetails detail ;
rsPeers->getPeerDetails(link.GPGId().toStdString(),detail) ;
_current_link_dst_LE->setText(link.GPGId()) ;
if( link.type() == RetroShareLink::TYPE_PRIVATE_CHAT )
{
_current_link_type_LE->setText( tr("Private chat invite") ) ;
_usable_LB->setText(tr("Usable only by :")) ;
}
else
{
_current_link_type_LE->setText( tr("Public message invite") ) ;
_usable_LB->setText(tr("Usable to contact :")) ;
}
_current_link_dst_LE->setText(QString::fromStdString(detail.name)+" ("+link.GPGId()+")") ;
_current_link_date_DE->setDateTime(QDateTime::fromTime_t(link.timeStamp())) ;
}
@ -117,8 +126,11 @@ void CreateMsgLinkDialog::update()
continue;
}
RsPeerDetails detail ;
rsPeers->getPeerDetails(link.GPGId().toStdString(),detail) ;
QListWidgetItem *item = new QListWidgetItem;
item->setData(Qt::DisplayRole,tr("Private chat invite to ")+QString::fromStdString(invites[i].destination_pgp_id)) ;
item->setData(Qt::DisplayRole,tr("Private chat invite to ")+QString::fromStdString(detail.name)+" ("+QString::fromStdString(invites[i].destination_pgp_id)+")") ;
item->setData(Qt::UserRole,link.toString()) ;
_existing_links_LW->insertItem(0,item) ;

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>565</width>
<height>465</height>
<width>590</width>
<height>388</height>
</rect>
</property>
<property name="windowTitle">
@ -47,7 +47,7 @@
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<widget class="QLabel" name="_usable_LB">
<property name="text">
<string>Usable by:</string>
</property>
@ -91,19 +91,6 @@
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
@ -213,6 +200,19 @@
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>