mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04: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 () ;
|
||||
_header->setResizeMode (0, QHeaderView::Interactive);
|
||||
//_header->setResizeMode (1, QHeaderView::Interactive);
|
||||
//_header->setResizeMode (2, QHeaderView::Interactive);
|
||||
//_header->setResizeMode (3, QHeaderView::Interactive);
|
||||
|
||||
_header->resizeSection ( 0, 200 );
|
||||
|
||||
@ -128,7 +125,7 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
|
||||
|
||||
ui.statuscomboBox->setMinimumWidth(20);
|
||||
ui.messagecomboBox->setMinimumWidth(20);
|
||||
ui.messagelineEdit->setMinimumWidth(20);
|
||||
ui.searchlineEdit->setMinimumWidth(20);
|
||||
|
||||
updateAvatar();
|
||||
@ -136,6 +133,7 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
||||
itemFont = QFont("ARIAL", 10);
|
||||
itemFont.setBold(true);
|
||||
|
||||
loadmystatus();
|
||||
|
||||
/* Hide platform specific features */
|
||||
#ifdef Q_WS_WIN
|
||||
@ -227,13 +225,15 @@ void MessengerWindow::insertPeers()
|
||||
|
||||
/* add all the labels */
|
||||
/* (0) Person */
|
||||
item -> setText(0, QString::fromStdString(details.name));
|
||||
/* (1) Org */
|
||||
//item -> setText(1, QString::fromStdString(details.org));
|
||||
/* (2) Location */
|
||||
//item -> setText(2, QString::fromStdString(details.location));
|
||||
/* (3) Email */
|
||||
//item -> setText(3, QString::fromStdString(details.email));
|
||||
if (rsMsgs->getCustomStateString(details.id) != "")
|
||||
{
|
||||
item -> setText( 0, QString::fromStdString(details.name) + tr(" - ") + QString::fromStdString(rsMsgs->getCustomStateString(details.id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
item -> setText(0, QString::fromStdString(details.name));
|
||||
}
|
||||
|
||||
|
||||
/* Hidden ones: RsCertId */
|
||||
item -> setText(4, QString::fromStdString(details.id));
|
||||
@ -522,37 +522,12 @@ void MessengerWindow::changeAvatarClicked()
|
||||
/** Add a Friend ShortCut */
|
||||
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);
|
||||
|
||||
// set widget to be deleted after close
|
||||
connwiz->setAttribute( Qt::WA_DeleteOnClose, true);
|
||||
|
||||
|
||||
connwiz->show();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
LogoBar & MessengerWindow::getLogoBar() const {
|
||||
@ -601,3 +576,9 @@ void MessengerWindow::getAvatar()
|
||||
updateAvatar() ;
|
||||
}
|
||||
}
|
||||
|
||||
/** Loads own personal status */
|
||||
void MessengerWindow::loadmystatus()
|
||||
{
|
||||
ui.messagelineEdit->setText(QString::fromStdString(rsMsgs->getCustomStateString()));
|
||||
}
|
||||
|
@ -97,7 +97,8 @@ private slots:
|
||||
|
||||
void changeAvatarClicked();
|
||||
void updateAvatar();
|
||||
|
||||
|
||||
void loadmystatus();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -189,18 +189,8 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QComboBox" name="messagecomboBox">
|
||||
<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 row="1" column="0">
|
||||
<widget class="QLineEdit" name="messagelineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user