mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 03:22:34 -04:00
- fixed a few bugs in PopupDistantChatDialog (Possible deadlock, wrong window for private chat)
- added method to properly close distant chat conversation (Still needs some work) - improved chat link creation window + clipboard copy git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6426 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3f752b9eae
commit
42db43e590
10 changed files with 111 additions and 25 deletions
|
@ -42,6 +42,7 @@ CreateMsgLinkDialog::CreateMsgLinkDialog()
|
|||
QObject::connect(_create_link_PB,SIGNAL(clicked()),this,SLOT(createLink())) ;
|
||||
QObject::connect(_create_new_PB,SIGNAL(toggled(bool)),this,SLOT(toggleCreateLink(bool))) ;
|
||||
QObject::connect(_existing_links_LW,SIGNAL(currentRowChanged(int)),this,SLOT(updateCurrentRow(int))) ;
|
||||
QObject::connect(_copy_to_clipboard_PB,SIGNAL(clicked()),this,SLOT(copyLinkToClipboard())) ;
|
||||
|
||||
_gpg_selection->setModus(FriendSelectionWidget::MODUS_SINGLE) ;
|
||||
_gpg_selection->setShowType(FriendSelectionWidget::SHOW_NON_FRIEND_GPG | FriendSelectionWidget::SHOW_GPG) ;
|
||||
|
@ -53,6 +54,24 @@ CreateMsgLinkDialog::CreateMsgLinkDialog()
|
|||
updateCurrentRow(-1) ;
|
||||
}
|
||||
|
||||
void CreateMsgLinkDialog::copyLinkToClipboard()
|
||||
{
|
||||
QList<QListWidgetItem*> selected = _existing_links_LW->selectedItems() ;
|
||||
|
||||
QList<RetroShareLink> links ;
|
||||
|
||||
for(QList<QListWidgetItem*>::const_iterator it(selected.begin());it!=selected.end();++it)
|
||||
{
|
||||
QUrl text = (*it)->data(Qt::UserRole).toUrl() ;
|
||||
RetroShareLink link(text) ;
|
||||
|
||||
links.push_back(link) ;
|
||||
}
|
||||
|
||||
if(!links.empty())
|
||||
RSLinkClipboard::copyLinks(links) ;
|
||||
}
|
||||
|
||||
void CreateMsgLinkDialog::updateCurrentRow(int r)
|
||||
{
|
||||
if(r < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue