mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 08:35:45 -04:00
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:
parent
d5c645e383
commit
3f752b9eae
2 changed files with 34 additions and 22 deletions
|
@ -68,12 +68,21 @@ void CreateMsgLinkDialog::updateCurrentRow(int r)
|
||||||
std::cerr << "Parsing link : " << text.toString().toStdString() << std::endl;
|
std::cerr << "Parsing link : " << text.toString().toStdString() << std::endl;
|
||||||
RetroShareLink link(text) ;
|
RetroShareLink link(text) ;
|
||||||
|
|
||||||
if( link.type() == RetroShareLink::TYPE_PRIVATE_CHAT )
|
RsPeerDetails detail ;
|
||||||
_current_link_type_LE->setText( tr("Private chat invite") ) ;
|
rsPeers->getPeerDetails(link.GPGId().toStdString(),detail) ;
|
||||||
else
|
|
||||||
_current_link_type_LE->setText( tr("Public message invite") ) ;
|
|
||||||
|
|
||||||
_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())) ;
|
_current_link_date_DE->setDateTime(QDateTime::fromTime_t(link.timeStamp())) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,8 +126,11 @@ void CreateMsgLinkDialog::update()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RsPeerDetails detail ;
|
||||||
|
rsPeers->getPeerDetails(link.GPGId().toStdString(),detail) ;
|
||||||
|
|
||||||
QListWidgetItem *item = new QListWidgetItem;
|
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()) ;
|
item->setData(Qt::UserRole,link.toString()) ;
|
||||||
|
|
||||||
_existing_links_LW->insertItem(0,item) ;
|
_existing_links_LW->insertItem(0,item) ;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>565</width>
|
<width>590</width>
|
||||||
<height>465</height>
|
<height>388</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="_usable_LB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Usable by:</string>
|
<string>Usable by:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -91,19 +91,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -213,6 +200,19 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue