mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-18 05:44:14 -05:00
added to show personal status of each friend when its avaible
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2128 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
57351f7bbe
commit
de288d196d
@ -115,9 +115,6 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
|||||||
|
|
||||||
QHeaderView * _header = ui.messengertreeWidget->header () ;
|
QHeaderView * _header = ui.messengertreeWidget->header () ;
|
||||||
_header->setResizeMode (0, QHeaderView::Interactive);
|
_header->setResizeMode (0, QHeaderView::Interactive);
|
||||||
//_header->setResizeMode (1, QHeaderView::Interactive);
|
|
||||||
//_header->setResizeMode (2, QHeaderView::Interactive);
|
|
||||||
//_header->setResizeMode (3, QHeaderView::Interactive);
|
|
||||||
|
|
||||||
_header->resizeSection ( 0, 200 );
|
_header->resizeSection ( 0, 200 );
|
||||||
|
|
||||||
@ -128,7 +125,7 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
|||||||
|
|
||||||
|
|
||||||
ui.statuscomboBox->setMinimumWidth(20);
|
ui.statuscomboBox->setMinimumWidth(20);
|
||||||
ui.messagecomboBox->setMinimumWidth(20);
|
ui.messagelineEdit->setMinimumWidth(20);
|
||||||
ui.searchlineEdit->setMinimumWidth(20);
|
ui.searchlineEdit->setMinimumWidth(20);
|
||||||
|
|
||||||
updateAvatar();
|
updateAvatar();
|
||||||
@ -136,6 +133,7 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
|||||||
itemFont = QFont("ARIAL", 10);
|
itemFont = QFont("ARIAL", 10);
|
||||||
itemFont.setBold(true);
|
itemFont.setBold(true);
|
||||||
|
|
||||||
|
loadmystatus();
|
||||||
|
|
||||||
/* Hide platform specific features */
|
/* Hide platform specific features */
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
@ -227,13 +225,15 @@ void MessengerWindow::insertPeers()
|
|||||||
|
|
||||||
/* add all the labels */
|
/* add all the labels */
|
||||||
/* (0) Person */
|
/* (0) Person */
|
||||||
item -> setText(0, QString::fromStdString(details.name));
|
if (rsMsgs->getCustomStateString(details.id) != "")
|
||||||
/* (1) Org */
|
{
|
||||||
//item -> setText(1, QString::fromStdString(details.org));
|
item -> setText( 0, QString::fromStdString(details.name) + tr(" - ") + QString::fromStdString(rsMsgs->getCustomStateString(details.id)));
|
||||||
/* (2) Location */
|
}
|
||||||
//item -> setText(2, QString::fromStdString(details.location));
|
else
|
||||||
/* (3) Email */
|
{
|
||||||
//item -> setText(3, QString::fromStdString(details.email));
|
item -> setText(0, QString::fromStdString(details.name));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Hidden ones: RsCertId */
|
/* Hidden ones: RsCertId */
|
||||||
item -> setText(4, QString::fromStdString(details.id));
|
item -> setText(4, QString::fromStdString(details.id));
|
||||||
@ -522,37 +522,12 @@ void MessengerWindow::changeAvatarClicked()
|
|||||||
/** Add a Friend ShortCut */
|
/** Add a Friend ShortCut */
|
||||||
void MessengerWindow::addFriend2()
|
void MessengerWindow::addFriend2()
|
||||||
{
|
{
|
||||||
/* call load Certificate */
|
|
||||||
#if 0
|
|
||||||
std::string id;
|
|
||||||
if (connectionsDialog)
|
|
||||||
{
|
|
||||||
id = connectionsDialog->loadneighbour();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* call make Friend */
|
|
||||||
if (id != "")
|
|
||||||
{
|
|
||||||
connectionsDialog->showpeerdetails(id);
|
|
||||||
}
|
|
||||||
virtual int NeighLoadPEMString(std::string pem, std::string &id) = 0;
|
|
||||||
#else
|
|
||||||
/*
|
|
||||||
static AddFriendDialog *addDialog2 =
|
|
||||||
new AddFriendDialog(networkDialog2, this);
|
|
||||||
|
|
||||||
std::string invite = "";
|
|
||||||
addDialog2->setInfo(invite);
|
|
||||||
addDialog2->show();
|
|
||||||
*/
|
|
||||||
ConnectFriendWizard* connwiz = new ConnectFriendWizard(this);
|
ConnectFriendWizard* connwiz = new ConnectFriendWizard(this);
|
||||||
|
|
||||||
// set widget to be deleted after close
|
// set widget to be deleted after close
|
||||||
connwiz->setAttribute( Qt::WA_DeleteOnClose, true);
|
connwiz->setAttribute( Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
|
|
||||||
connwiz->show();
|
connwiz->show();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LogoBar & MessengerWindow::getLogoBar() const {
|
LogoBar & MessengerWindow::getLogoBar() const {
|
||||||
@ -601,3 +576,9 @@ void MessengerWindow::getAvatar()
|
|||||||
updateAvatar() ;
|
updateAvatar() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Loads own personal status */
|
||||||
|
void MessengerWindow::loadmystatus()
|
||||||
|
{
|
||||||
|
ui.messagelineEdit->setText(QString::fromStdString(rsMsgs->getCustomStateString()));
|
||||||
|
}
|
||||||
|
@ -97,7 +97,8 @@ private slots:
|
|||||||
|
|
||||||
void changeAvatarClicked();
|
void changeAvatarClicked();
|
||||||
void updateAvatar();
|
void updateAvatar();
|
||||||
|
|
||||||
|
void loadmystatus();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -189,18 +189,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="1" column="0">
|
||||||
<widget class="QComboBox" name="messagecomboBox">
|
<widget class="QLineEdit" name="messagelineEdit"/>
|
||||||
<property name="toolTip">
|
|
||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal; text-decoration:none;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Share a personal message with your contacts</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user