diff --git a/retroshare-gui/src/RetroShare.pro b/retroshare-gui/src/RetroShare.pro
index 96758f8bc..6e270a668 100644
--- a/retroshare-gui/src/RetroShare.pro
+++ b/retroshare-gui/src/RetroShare.pro
@@ -186,6 +186,7 @@ HEADERS += rshare.h \
gui/bwgraph/bwgraph.h \
gui/profile/ProfileView.h \
gui/profile/ProfileEdit.h \
+ gui/profile/ProfileWidget.h \
gui/chat/PopupChatDialog.h \
gui/connect/ConnectDialog.h \
gui/connect/ConfCertDialog.h \
@@ -299,6 +300,7 @@ FORMS += gui/BlogDialog.ui \
gui/bwgraph/bwgraph.ui \
gui/profile/ProfileView.ui \
gui/profile/ProfileEdit.ui \
+ gui/profile/ProfileWidget.ui \
gui/chat/PopupChatDialog.ui \
gui/connect/ConnectDialog.ui \
gui/connect/ConfCertDialog.ui \
@@ -409,6 +411,7 @@ SOURCES += main.cpp \
gui/bwgraph/bwgraph.cpp \
gui/profile/ProfileView.cpp \
gui/profile/ProfileEdit.cpp \
+ gui/profile/ProfileWidget.cpp \
gui/chat/PopupChatDialog.cpp \
gui/connect/ConnectDialog.cpp \
gui/connect/ConfCertDialog.cpp \
diff --git a/retroshare-gui/src/gui/PeersDialog.cpp b/retroshare-gui/src/gui/PeersDialog.cpp
index 9119aaa8c..6675ed9f8 100644
--- a/retroshare-gui/src/gui/PeersDialog.cpp
+++ b/retroshare-gui/src/gui/PeersDialog.cpp
@@ -35,6 +35,7 @@
#include "msgs/ChanMsgDialog.h"
#include "connect/ConfCertDialog.h"
#include "profile/ProfileView.h"
+#include "profile/ProfileWidget.h"
#include "GenCertDialog.h"
#include "gui/connect/ConnectFriendWizard.h"
#include "gui/Preferences/rsharesettings.h"
@@ -95,6 +96,9 @@ PeersDialog::PeersDialog(QWidget *parent)
/* hide the Tree +/- */
ui.peertreeWidget -> setRootIsDecorated( false );
+
+ ui.peertabWidget->addTab(new ProfileWidget(),QString(tr("Profile")));
+
/* Set header resize modes and initial section sizes */
QHeaderView * _header = ui.peertreeWidget->header () ;
diff --git a/retroshare-gui/src/gui/PeersDialog.ui b/retroshare-gui/src/gui/PeersDialog.ui
index 63839607e..636c569d1 100644
--- a/retroshare-gui/src/gui/PeersDialog.ui
+++ b/retroshare-gui/src/gui/PeersDialog.ui
@@ -6,8 +6,8 @@
0
0
- 778
- 523
+ 707
+ 467
@@ -482,7 +482,7 @@
Qt::NoContextMenu
-
+
-
@@ -662,7 +662,10 @@ background: white;}
-
+
+
+ 1
+
-
@@ -787,335 +790,312 @@ p, li { white-space: pre-wrap; }
-
-
-
+
+
0
-
-
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 181
- 20
-
-
-
-
+
+
+ Live Chat
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 2
+
+
+ 2
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Qt::DefaultContextMenu
+
+
+ QTextEdit#msgText{border: 1px solid #CCCCCC;
+background: white;}
+
+
+ false
+
+
+ true
+
+
+
+ -
-
-
+
+
+ Qt::Horizontal
+
+
+
+ 321
+ 20
+
+
+
+
+ -
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
+
+
+ Italic
+
-
- :/images/user/agt_forum24.png
+
+
+ :/images/edit-italic.png:/images/edit-italic.png
+
+
+ true
+
+
+
+ -
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
+
+
+ Underline
+
+
+
+
+
+
+ :/images/edit-underline.png:/images/edit-underline.png
+
+
+ true
+
+
+
+ -
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
+
+
+ Bold
+
+
+
+
+
+
+ :/images/edit-bold.png:/images/edit-bold.png
+
+
+ true
+
+
+
+ -
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
+
+
+ Text Color
+
+
+
+
+
+
+ -
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
+
+
+ Font
+
+
+
-
-
-
-
- 10
- 75
- true
-
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
- Live Group Chat:
+
+
+
+
+ :/images/emoticons/kopete/kopete020.png:/images/emoticons/kopete/kopete020.png
+
+
+
+ 24
+ 24
+
+
+
+
+ -
+
+
+
+ 24
+ 24
+
+
+
+
+ 24
+ 24
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777215
+ 60
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ QTextEdit#lineEdit{border: 1px solid #CCCCCC;
+}
+
+
+
+ -
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 321
+ 20
+
+
+
+
+ -
+
+
+ Send
-
- -
-
-
-
- 0
- 0
-
-
-
- Qt::DefaultContextMenu
-
-
- QTextEdit#msgText{border: 1px solid #CCCCCC;
-background: white;}
-
-
- false
-
-
- true
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 321
- 20
-
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
- Italic
-
-
-
-
-
-
- :/images/edit-italic.png:/images/edit-italic.png
-
-
- true
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
- Underline
-
-
-
-
-
-
- :/images/edit-underline.png:/images/edit-underline.png
-
-
- true
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
- Bold
-
-
-
-
-
-
- :/images/edit-bold.png:/images/edit-bold.png
-
-
- true
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
- Text Color
-
-
-
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
- Font
-
-
-
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
-
-
-
-
- :/images/emoticons/kopete/kopete020.png:/images/emoticons/kopete/kopete020.png
-
-
-
- 24
- 24
-
-
-
-
- -
-
-
-
- 24
- 24
-
-
-
-
- 24
- 24
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 100
-
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
- QTextEdit#lineEdit{border: 1px solid #CCCCCC;
-}
-
-
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 321
- 20
-
-
-
-
- -
-
-
- Send
-
-
-
-
+ msgText
+
+ lineEdit
+
+
+
@@ -1149,6 +1129,7 @@ background: white;}
+
diff --git a/retroshare-gui/src/gui/profile/ProfileWidget.cpp b/retroshare-gui/src/gui/profile/ProfileWidget.cpp
new file mode 100644
index 000000000..8ec3d2c5d
--- /dev/null
+++ b/retroshare-gui/src/gui/profile/ProfileWidget.cpp
@@ -0,0 +1,99 @@
+/****************************************************************
+ * RetroShare is distributed under the following license:
+ *
+ * Copyright (C) 2006 - 2009, RetroShre Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ ****************************************************************/
+#include "ProfileWidget.h"
+
+#include "rsiface/rsiface.h"
+#include "rsiface/rspeers.h"
+#include "rsiface/rsdisc.h"
+
+#include
+
+#include
+#include
+
+/* Define the format used for displaying the date and time */
+#define DATETIME_FMT "MMM dd hh:mm:ss"
+
+/** Default constructor */
+ProfileWidget::ProfileWidget(QWidget *parent, Qt::WFlags flags)
+ : QWidget(parent, flags)
+{
+ /* Invoke Qt Designer generated QObject setup routine */
+ ui.setupUi(this);
+
+ loadDialog();
+}
+
+void ProfileWidget::closeEvent (QCloseEvent * event)
+{
+ QWidget::closeEvent(event);
+}
+
+void ProfileWidget::loadDialog()
+{
+
+ RsPeerDetails detail;
+ if (rsPeers->getPeerDetails(rsPeers->getOwnId(),detail))
+ {
+
+ ui.name->setText(QString::fromStdString(detail.name));
+ ui.orgloc->setText(QString::fromStdString(detail.org));
+ ui.country->setText(QString::fromStdString(detail.location));
+
+ ui.peerid->setText(QString::fromStdString(detail.id));
+
+ // Dont Show a timestamp in RS calculate the day
+ QDateTime date = QDateTime::fromTime_t(detail.lastConnect);
+ QString stime = date.toString(Qt::LocalDate);
+ ui.lastcontact-> setText(stime);
+
+ /* set retroshare version */
+ std::map::iterator vit;
+ std::map versions;
+ bool retv = rsDisc->getDiscVersions(versions);
+ if (retv && versions.end() != (vit = versions.find(detail.id)))
+ {
+ ui.version->setText(QString::fromStdString(vit->second));
+ }
+
+ /* set local address */
+ ui.localAddress->setText(QString::fromStdString(detail.localAddr));
+ ui.localPort -> setValue(detail.localPort);
+ /* set the server address */
+ ui.extAddress->setText(QString::fromStdString(detail.extAddr));
+ ui.extPort -> setValue(detail.extPort);
+
+ std::list ids;
+ ids.clear();
+ rsPeers->getFriendList(ids);
+ int friends = ids.size();
+
+ std::ostringstream out;
+ out << friends << "";
+ ui.friendsEdit->setText(QString::fromStdString(out.str()));
+
+ }
+
+}
+
+
+
+
diff --git a/retroshare-gui/src/gui/profile/ProfileWidget.h b/retroshare-gui/src/gui/profile/ProfileWidget.h
new file mode 100644
index 000000000..a99f2b588
--- /dev/null
+++ b/retroshare-gui/src/gui/profile/ProfileWidget.h
@@ -0,0 +1,57 @@
+/****************************************************************
+ * RetroShare is distributed under the following license:
+ *
+ * Copyright (C) 2006 - 2009, RetroShare Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ ****************************************************************/
+
+
+#ifndef _PROFILEWIDGET_H
+#define _PROFILEWIDGET_H
+
+#include
+
+#include "ui_ProfileWidget.h"
+
+class ProfileWidget : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ /** Default constructor */
+ ProfileWidget(QWidget *parent = 0, Qt::WFlags flags = 0);
+ /** Default destructor */
+
+
+protected:
+ void closeEvent (QCloseEvent * event);
+
+private slots:
+
+
+private:
+
+ void loadDialog();
+
+
+ /** Qt Designer generated object */
+ Ui::ProfileWidget ui;
+
+};
+
+#endif
+
diff --git a/retroshare-gui/src/gui/profile/ProfileWidget.ui b/retroshare-gui/src/gui/profile/ProfileWidget.ui
new file mode 100644
index 000000000..00cacfa7f
--- /dev/null
+++ b/retroshare-gui/src/gui/profile/ProfileWidget.ui
@@ -0,0 +1,262 @@
+
+
+ ProfileWidget
+
+
+
+ 0
+ 0
+ 460
+ 370
+
+
+
+ Form
+
+
+ -
+
+
+ Public Information
+
+
+
-
+
+
+ Name:
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Org / Loc:
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Country/State:
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Peer ID
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Last Contact
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ Other Information
+
+
+
-
+
+
+ Number of Friends:
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Version
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+ -
+
+
+ My Address
+
+
+
-
+
+
-
+
+
-
+
+
+ Qt::LeftToRight
+
+
+ Local Address:
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ External Address:
+
+
+
+
+
+ -
+
+
-
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+ -
+
+
-
+
+
+ Port:
+
+
+
+ -
+
+
+ Port:
+
+
+
+
+
+ -
+
+
-
+
+
+ true
+
+
+ 0
+
+
+ 65535
+
+
+ 7812
+
+
+
+ -
+
+
+ true
+
+
+ 0
+
+
+ 65535
+
+
+ 7812
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+