From bd049a0bbdc37e13539c3ca4e62ed62ac1641f3a Mon Sep 17 00:00:00 2001 From: defnax Date: Wed, 3 Feb 2010 23:38:38 +0000 Subject: [PATCH] added nicklabel for MessengerWindow to show own name + location git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2185 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/MessengerWindow.cpp | 5 + retroshare-gui/src/gui/MessengerWindow.ui | 173 ++++++++++++++------- 2 files changed, 121 insertions(+), 57 deletions(-) diff --git a/retroshare-gui/src/gui/MessengerWindow.cpp b/retroshare-gui/src/gui/MessengerWindow.cpp index 2a49b17f7..0e3d9facf 100644 --- a/retroshare-gui/src/gui/MessengerWindow.cpp +++ b/retroshare-gui/src/gui/MessengerWindow.cpp @@ -146,6 +146,7 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags) //loadstatus(); displayMenu(); + updateMessengerDisplay(); /* Hide platform specific features */ #ifdef Q_WS_WIN @@ -244,6 +245,10 @@ void MessengerWindow::updateMessengerDisplay() // add self nick and Avatar to Friends. RsPeerDetails pd ; if (rsPeers->getPeerDetails(rsPeers->getOwnId(),pd)) { + + QString titleStr("%1"); + ui.nicklabel->setText(titleStr.arg(QString::fromStdString(pd.name) + tr(" - ") + QString::fromStdString(pd.location))) ; } insertPeers() ; diff --git a/retroshare-gui/src/gui/MessengerWindow.ui b/retroshare-gui/src/gui/MessengerWindow.ui index d7367f9f4..e69581b0a 100644 --- a/retroshare-gui/src/gui/MessengerWindow.ui +++ b/retroshare-gui/src/gui/MessengerWindow.ui @@ -18,7 +18,7 @@ :/images/rstray3.png:/images/rstray3.png - + 0 @@ -28,13 +28,14 @@ - #messengerframetop { + #messengerframetop { border: none; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #a6a6a6, stop: 0.08 #7f7f7f, stop: 0.39999 #717171, stop: 0.4 #626262, stop: 0.9 #4c4c4c, stop: 1 #333333); -} +} + QFrame::StyledPanel @@ -58,7 +59,7 @@ stop: 0.9 #4c4c4c, stop: 1 #333333); 0 - + @@ -103,7 +104,7 @@ stop: 0.9 #4c4c4c, stop: 1 #333333); 6 - + false @@ -162,54 +163,67 @@ p, li { white-space: pre-wrap; } - + + + + + TextLabel + + + - - - - Share Files for your Friends - - - - - - ... - - - - :/images/friendsfolder24.png:/images/friendsfolder24.png - - - - 24 - 24 - - - - true - - - - - - - Qt::Horizontal - - - - 221 - 20 - - - - - + + + + + + + + 16777215 + 38 + + + + #frame { +border: none; +background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, +stop: 0 #a6a6a6, stop: 0.08 #7f7f7f, +stop: 0.39999 #717171, stop: 0.4 #626262, +stop: 0.9 #4c4c4c, stop: 1 #333333); +} + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 6 + + + 6 + + + + + 0 + 0 + + + + + 32 + 32 + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -237,7 +251,39 @@ p, li { white-space: pre-wrap; } - + + + + + 0 + 0 + + + + Share Files for your Friends + + + + + + ... + + + + :/images/friendsfolder24.png:/images/friendsfolder24.png + + + + 24 + 24 + + + + true + + + + QPushButton::menu-indicator { @@ -265,20 +311,23 @@ subcontrol-position: bottom right; + + + + Qt::Horizontal + + + + 161 + 20 + + + + - - - QFrame::NoFrame - - - QFrame::Raised - - - - 9 @@ -310,6 +359,16 @@ subcontrol-position: bottom right; + + + + QFrame::NoFrame + + + QFrame::Raised + + +