Merge pull request #1615 from csoler/v0.6-FriendList

V0.6 friend list
This commit is contained in:
csoler 2019-08-26 19:07:11 +02:00 committed by GitHub
commit c28c193b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 3272 additions and 86 deletions

View File

@ -477,12 +477,24 @@ void p3LinkMgrIMPL::tickMonitors()
if (peer.actions & RS_PEER_CONNECTED) if (peer.actions & RS_PEER_CONNECTED)
{ {
p3Notify *notify = RsServer::notify(); p3Notify *notify = RsServer::notify();
if (notify) if (notify)
{ {
// normally these two below should disappear: there's no notion of popup in libretroshare.
// all GUI-type display features should be chosen in NotifyQt.
notify->AddPopupMessage(RS_POPUP_CONNECT, peer.id.toStdString(),"", "Online: "); notify->AddPopupMessage(RS_POPUP_CONNECT, peer.id.toStdString(),"", "Online: ");
notify->AddFeedItem(RS_FEED_ITEM_PEER_CONNECT, peer.id.toStdString()); notify->AddFeedItem(RS_FEED_ITEM_PEER_CONNECT, peer.id.toStdString());
notify->notifyPeerConnected(peer.id.toStdString());
} }
} }
if (peer.actions & RS_PEER_DISCONNECTED)
{
p3Notify *notify = RsServer::notify();
if (notify)
notify->notifyPeerDisconnected(peer.id.toStdString());
}
} }
} }

View File

@ -217,6 +217,8 @@ void p3Notify::notifyChatLobbyEvent(uint64_t lobby_id, uint32_t event_type,const
void p3Notify::notifyListPreChange(int list, int type) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyListPreChange(list,type) ; } void p3Notify::notifyListPreChange(int list, int type) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyListPreChange(list,type) ; }
void p3Notify::notifyListChange (int list, int type) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyListChange (list,type) ; } void p3Notify::notifyListChange (int list, int type) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyListChange (list,type) ; }
void p3Notify::notifyPeerConnected (const std::string& peer_id) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyPeerConnected(peer_id); }
void p3Notify::notifyPeerDisconnected (const std::string& peer_id) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyPeerDisconnected(peer_id); }
void p3Notify::notifyErrorMsg (int list, int sev, std::string msg) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyErrorMsg(list,sev,msg) ; } void p3Notify::notifyErrorMsg (int list, int sev, std::string msg) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyErrorMsg(list,sev,msg) ; }
void p3Notify::notifyChatMessage (const ChatMessage &msg) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatMessage(msg) ; } void p3Notify::notifyChatMessage (const ChatMessage &msg) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatMessage(msg) ; }
void p3Notify::notifyChatStatus (const ChatId& chat_id, const std::string& status_string) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatStatus(chat_id,status_string) ; } void p3Notify::notifyChatStatus (const ChatId& chat_id, const std::string& status_string) { FOR_ALL_NOTIFY_CLIENTS (*it)->notifyChatStatus(chat_id,status_string) ; }

View File

@ -91,6 +91,8 @@ class p3Notify: public RsNotify
// Notifications of clients. Can be called from anywhere inside libretroshare. // Notifications of clients. Can be called from anywhere inside libretroshare.
// //
void notifyPeerConnected (const std::string& /* peer_id */);
void notifyPeerDisconnected (const std::string& /* peer_id */);
void notifyListPreChange (int /* list */, int /* type */) ; void notifyListPreChange (int /* list */, int /* type */) ;
void notifyListChange (int /* list */, int /* type */) ; void notifyListChange (int /* list */, int /* type */) ;
void notifyErrorMsg (int /* list */, int /* sev */, std::string /* msg */) ; void notifyErrorMsg (int /* list */, int /* sev */, std::string /* msg */) ;

View File

@ -212,6 +212,8 @@ public:
NotifyClient() {} NotifyClient() {}
virtual ~NotifyClient() {} virtual ~NotifyClient() {}
virtual void notifyPeerConnected (const std::string& /* peer_id */) {}
virtual void notifyPeerDisconnected (const std::string& /* peer_id */) {}
virtual void notifyListPreChange (int /* list */, int /* type */) {} virtual void notifyListPreChange (int /* list */, int /* type */) {}
virtual void notifyListChange (int /* list */, int /* type */) {} virtual void notifyListChange (int /* list */, int /* type */) {}
virtual void notifyErrorMsg (int /* list */, int /* sev */, std::string /* msg */) {} virtual void notifyErrorMsg (int /* list */, int /* sev */, std::string /* msg */) {}

View File

@ -460,9 +460,9 @@ public:
virtual RsPgpId getGPGId(const RsPeerId& sslId) = 0; virtual RsPgpId getGPGId(const RsPeerId& sslId) = 0;
virtual bool isKeySupported(const RsPgpId& gpg_ids) = 0; virtual bool isKeySupported(const RsPgpId& gpg_ids) = 0;
virtual bool getGPGAcceptedList(std::list<RsPgpId> &gpg_ids) = 0; virtual bool getGPGAcceptedList(std::list<RsPgpId> &gpg_ids) = 0;
virtual bool getGPGSignedList(std::list<RsPgpId> &gpg_ids) = 0;//friends that we accpet to connect with but we don't want to sign their gpg key virtual bool getGPGSignedList(std::list<RsPgpId> &gpg_ids) = 0;// keys signed by our own PGP key.
virtual bool getGPGValidList(std::list<RsPgpId> &gpg_ids) = 0; virtual bool getGPGValidList(std::list<RsPgpId> &gpg_ids) = 0;// all PGP keys without filtering
virtual bool getGPGAllList(std::list<RsPgpId> &gpg_ids) = 0; virtual bool getGPGAllList(std::list<RsPgpId> &gpg_ids) = 0;// all PGP keys as well
virtual bool getAssociatedSSLIds(const RsPgpId& gpg_id, std::list<RsPeerId>& ids) = 0; virtual bool getAssociatedSSLIds(const RsPgpId& gpg_id, std::list<RsPeerId>& ids) = 0;
virtual bool gpgSignData(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen, std::string reason = "") = 0; virtual bool gpgSignData(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen, std::string reason = "") = 0;

View File

@ -43,6 +43,7 @@
#include "FriendsDialog.h" #include "FriendsDialog.h"
#include "NetworkView.h" #include "NetworkView.h"
#include "NetworkDialog.h" #include "NetworkDialog.h"
#include "gui/common/NewFriendList.h"
#include "gui/Identity/IdDialog.h" #include "gui/Identity/IdDialog.h"
#ifdef RS_USE_CIRCLES #ifdef RS_USE_CIRCLES
#include "gui/Circles/CirclesDialog.h" #include "gui/Circles/CirclesDialog.h"
@ -77,10 +78,8 @@ FriendsDialog::FriendsDialog(QWidget *parent)
ui.chatWidget->setWelcomeMessage(msg); ui.chatWidget->setWelcomeMessage(msg);
ui.chatWidget->init(ChatId::makeBroadcastId(), tr("Broadcast")); ui.chatWidget->init(ChatId::makeBroadcastId(), tr("Broadcast"));
connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)), connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)), this, SLOT(chatMessageReceived(ChatMessage)));
this, SLOT(chatMessageReceived(ChatMessage))); connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)), this, SLOT(chatStatusReceived(ChatId,QString)));
connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)),
this, SLOT(chatStatusReceived(ChatId,QString)));
#else // def RS_DIRECT_CHAT #else // def RS_DIRECT_CHAT
ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.groupChatTab)); ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.groupChatTab));
#endif // def RS_DIRECT_CHAT #endif // def RS_DIRECT_CHAT
@ -97,47 +96,15 @@ FriendsDialog::FriendsDialog(QWidget *parent)
ui.tabWidget->addTab(networkView = new NetworkView(),QIcon(IMAGE_NETWORK2), tr("Network graph")); ui.tabWidget->addTab(networkView = new NetworkView(),QIcon(IMAGE_NETWORK2), tr("Network graph"));
ui.tabWidget->addTab(networkDialog = new NetworkDialog(),QIcon(IMAGE_PEERS), tr("Keyring")); ui.tabWidget->addTab(networkDialog = new NetworkDialog(),QIcon(IMAGE_PEERS), tr("Keyring"));
//ui.tabWidget->addTab(new ProfileWidget(), tr("Profile"));
//newsFeed = new NewsFeed();
//int newsFeedTabIndex = ui.tabWidget->insertTab(0, newsFeed, tr("News Feed"));
//ui.tabWidget->setCurrentIndex(newsFeedTabIndex);
ui.tabWidget->hideCloseButton(0); ui.tabWidget->hideCloseButton(0);
ui.tabWidget->hideCloseButton(1); ui.tabWidget->hideCloseButton(1);
ui.tabWidget->hideCloseButton(2); ui.tabWidget->hideCloseButton(2);
ui.tabWidget->hideCloseButton(3); ui.tabWidget->hideCloseButton(3);
ui.tabWidget->hideCloseButton(4); ui.tabWidget->hideCloseButton(4);
/* get the current text and text color of the tab bar */
//newsFeedTabColor = ui.tabWidget->tabBar()->tabTextColor(newsFeedTabIndex);
//newsFeedText = ui.tabWidget->tabBar()->tabText(newsFeedTabIndex);
//connect(newsFeed, SIGNAL(newsFeedChanged(int)), this, SLOT(newsFeedChanged(int)));
// menu = new QMenu();
// menu->addAction(ui.actionAdd_Friend);
// menu->addAction(ui.actionAdd_Group);
// menu->addAction(ui.actionCreate_new_Chat_lobby);
//
// menu->addSeparator();
// menu->addAction(ui.actionSet_your_Avatar);
// menu->addAction(ui.actionSet_your_Personal_Message);
//
// ui.menutoolButton->setMenu(menu);
/*QToolButton *addFriendButton = new QToolButton(this);
addFriendButton->setIcon(QIcon(":/images/user/add_user24.png"));
addFriendButton->setToolTip(tr("Add friend node"));
connect(addFriendButton, SIGNAL(clicked()), this, SLOT(addFriend()));
ui.friendList->addToolButton(addFriendButton);*/
/* Set initial size the splitter */ /* Set initial size the splitter */
ui.splitter->setStretchFactor(0, 0); ui.splitter->setStretchFactor(0, 0);
ui.splitter->setStretchFactor(1, 1); ui.splitter->setStretchFactor(1, 1);
/*remove
QList<int> sizes;
sizes << height() << 100; // Qt calculates the right sizes
ui.splitter_2->setSizes(sizes);*/
loadmypersonalstatus(); loadmypersonalstatus();
@ -145,9 +112,9 @@ QList<int> sizes;
// load settings // load settings
RsAutoUpdatePage::lockAllEvents(); RsAutoUpdatePage::lockAllEvents();
ui.friendList->setColumnVisible(FriendList::COLUMN_LAST_CONTACT, false); ui.friendList->setColumnVisible(RsFriendListModel::COLUMN_THREAD_LAST_CONTACT, false);
ui.friendList->setColumnVisible(FriendList::COLUMN_IP, false); ui.friendList->setColumnVisible(RsFriendListModel::COLUMN_THREAD_IP, false);
ui.friendList->setColumnVisible(FriendList::COLUMN_ID, false); ui.friendList->setColumnVisible(RsFriendListModel::COLUMN_THREAD_ID, false);
ui.friendList->setShowGroups(true); ui.friendList->setShowGroups(true);
processSettings(true); processSettings(true);
RsAutoUpdatePage::unlockAllEvents(); RsAutoUpdatePage::unlockAllEvents();

View File

@ -145,17 +145,14 @@
</property> </property>
<item row="0" column="0" rowspan="2"> <item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatar"> <widget class="AvatarWidget" name="avatar">
<property name="minimumSize"> <property name="sizePolicy">
<size> <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<width>61</width> <horstretch>0</horstretch>
<height>61</height> <verstretch>0</verstretch>
</size> </sizepolicy>
</property> </property>
<property name="maximumSize"> <property name="scaledContents">
<size> <bool>false</bool>
<width>61</width>
<height>61</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -199,7 +196,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="FriendList" name="friendList" native="true"> <widget class="NewFriendList" name="friendList" native="true">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -353,11 +350,6 @@
</action> </action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget> <customwidget>
<class>AvatarWidget</class> <class>AvatarWidget</class>
<extends>QLabel</extends> <extends>QLabel</extends>
@ -365,9 +357,14 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>FriendList</class> <class>StyledLabel</class>
<extends>QLabel</extends>
<header>gui/common/StyledLabel.h</header>
</customwidget>
<customwidget>
<class>ChatWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/common/FriendList.h</header> <header location="global">gui/chat/ChatWidget.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
@ -382,9 +379,9 @@
<header>gui/common/StyledElidedLabel.h</header> <header>gui/common/StyledElidedLabel.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>ChatWidget</class> <class>NewFriendList</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header location="global">gui/chat/ChatWidget.h</header> <header>gui/common/NewFriendList.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>

View File

@ -31,10 +31,13 @@
#include <retroshare/rsplugin.h> #include <retroshare/rsplugin.h>
#include <retroshare/rsconfig.h> #include <retroshare/rsconfig.h>
#ifdef MESSENGER_WINDOW
#include "MessengerWindow.h"
#endif
#include "rshare.h" #include "rshare.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "ui_MainWindow.h" #include "ui_MainWindow.h"
#include "MessengerWindow.h"
#include "HomePage.h" #include "HomePage.h"
#include "NetworkDialog.h" #include "NetworkDialog.h"
#include "gui/FileTransfer/SearchDialog.h" #include "gui/FileTransfer/SearchDialog.h"
@ -369,7 +372,9 @@ MainWindow::~MainWindow()
delete soundStatus; delete soundStatus;
delete toasterDisable; delete toasterDisable;
delete sysTrayStatus; delete sysTrayStatus;
#ifdef MESSENGER_WINDOW
MessengerWindow::releaseInstance(); MessengerWindow::releaseInstance();
#endif
#ifdef UNFINISHED #ifdef UNFINISHED
delete applicationWindow; delete applicationWindow;
#endif #endif
@ -596,7 +601,9 @@ void MainWindow::createTrayIcon()
notifyMenu->menuAction()->setVisible(false); notifyMenu->menuAction()->setVisible(false);
trayMenu->addSeparator(); trayMenu->addSeparator();
#ifdef MESSENGER_WINDOW
trayMenu->addAction(QIcon(IMAGE_MESSENGER), tr("Open Messenger"), this, SLOT(showMessengerWindow())); trayMenu->addAction(QIcon(IMAGE_MESSENGER), tr("Open Messenger"), this, SLOT(showMessengerWindow()));
#endif
trayMenu->addAction(QIcon(IMAGE_MESSAGES), tr("Open Messages"), this, SLOT(showMess())); trayMenu->addAction(QIcon(IMAGE_MESSAGES), tr("Open Messages"), this, SLOT(showMess()));
#ifdef ENABLE_WEBUI #ifdef ENABLE_WEBUI
trayMenu->addAction(QIcon(":/images/emblem-web.png"), tr("Show web interface"), this, SLOT(showWebinterface())); trayMenu->addAction(QIcon(":/images/emblem-web.png"), tr("Show web interface"), this, SLOT(showWebinterface()));
@ -1095,11 +1102,13 @@ void MainWindow::showSettings()
showWindow(MainWindow::Options); showWindow(MainWindow::Options);
} }
#ifdef MESSENGER_WINDOW
/** Shows Messenger window */ /** Shows Messenger window */
void MainWindow::showMessengerWindow() void MainWindow::showMessengerWindow()
{ {
MessengerWindow::showYourself(); MessengerWindow::showYourself();
} }
#endif
/** Shows Statistics window */ /** Shows Statistics window */
void MainWindow::showStatisticsWindow() void MainWindow::showStatisticsWindow()

View File

@ -59,7 +59,6 @@ class NetworkDialog;
class SearchDialog; class SearchDialog;
class TransfersDialog; class TransfersDialog;
class MessagesDialog; class MessagesDialog;
class MessengerWindow;
class PluginsPage; class PluginsPage;
class HomePage; class HomePage;
//class ChannelFeed; //class ChannelFeed;
@ -68,6 +67,9 @@ class MainPage;
class NewsFeed; class NewsFeed;
class UserNotify; class UserNotify;
#ifdef MESSENGER_WINDOW
class MessengerWindow;
#endif
#ifdef UNFINISHED #ifdef UNFINISHED
class ApplicationWindow; class ApplicationWindow;
#endif #endif
@ -224,7 +226,9 @@ private slots:
/** Toolbar fns. */ /** Toolbar fns. */
void addFriend(); void addFriend();
//void newRsCollection(); //void newRsCollection();
#ifdef MESSENGER_WINDOW
void showMessengerWindow(); void showMessengerWindow();
#endif
void showStatisticsWindow(); void showStatisticsWindow();
#ifdef ENABLE_WEBUI #ifdef ENABLE_WEBUI
void showWebinterface(); void showWebinterface();

View File

@ -18,12 +18,15 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <QBuffer>
#include <rshare.h> #include <rshare.h>
#include <retroshare/rsstatus.h> #include <retroshare/rsstatus.h>
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
#include <retroshare/rsmsgs.h> #include <retroshare/rsmsgs.h>
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
#include "util/misc.h"
#include "gui/common/AvatarDefs.h" #include "gui/common/AvatarDefs.h"
#include "gui/common/AvatarDialog.h" #include "gui/common/AvatarDialog.h"
@ -85,19 +88,33 @@ void AvatarWidget::mouseReleaseEvent(QMouseEvent */*event*/)
if (!mFlag.isOwnId) { if (!mFlag.isOwnId) {
return; return;
} }
QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Choose avatar"), AvatarDialog::RS_AVATAR_DEFAULT_IMAGE_W,AvatarDialog::RS_AVATAR_DEFAULT_IMAGE_H);
AvatarDialog dialog(this); if (img.isNull())
return;
QPixmap avatar; setPixmap(img);
AvatarDefs::getOwnAvatar(avatar, "");
dialog.setAvatar(avatar); QByteArray data;
if (dialog.exec() == QDialog::Accepted) { QBuffer buffer(&data);
QByteArray newAvatar;
dialog.getAvatar(newAvatar);
rsMsgs->setOwnAvatarData((unsigned char *)(newAvatar.data()), newAvatar.size()) ; // last char 0 included. buffer.open(QIODevice::WriteOnly);
} img.save(&buffer, "PNG"); // writes image into a in PNG format
rsMsgs->setOwnAvatarData((unsigned char *)(data.data()), data.size()) ; // last char 0 included.
// AvatarDialog dialog(this);
//
// QPixmap avatar;
// AvatarDefs::getOwnAvatar(avatar, "");
//
// dialog.setAvatar(avatar);
// if (dialog.exec() == QDialog::Accepted) {
// QByteArray newAvatar;
// dialog.getAvatar(newAvatar);
//
// rsMsgs->setOwnAvatarData((unsigned char *)(newAvatar.data()), newAvatar.size()) ; // last char 0 included.
// }
} }
void AvatarWidget::setFrameType(FrameType type) void AvatarWidget::setFrameType(FrameType type)

View File

@ -126,8 +126,7 @@ FriendList::FriendList(QWidget *parent) :
#ifdef RS_DIRECT_CHAT #ifdef RS_DIRECT_CHAT
connect(ui->peerTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(chatfriend(QTreeWidgetItem *))); connect(ui->peerTreeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(chatfriend(QTreeWidgetItem *)));
#else #else
connect( ui->peerTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), connect( ui->peerTreeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(expandItem(QTreeWidgetItem *)) );
this, SLOT(expandItem(QTreeWidgetItem *)) );
#endif #endif
connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(groupsChanged())); connect(NotifyQt::getInstance(), SIGNAL(groupsChanged(int)), this, SLOT(groupsChanged()));
@ -1014,6 +1013,7 @@ void FriendList::insertPeers()
if (rsState == 0) { if (rsState == 0) {
sslFont.setBold(true); sslFont.setBold(true);
sslColor = mTextColorStatus[RS_STATUS_ONLINE]; sslColor = mTextColorStatus[RS_STATUS_ONLINE];
} else { } else {
sslFont = StatusDefs::font(rsState); sslFont = StatusDefs::font(rsState);
sslColor = mTextColorStatus[rsState]; sslColor = mTextColorStatus[rsState];
@ -1965,7 +1965,7 @@ bool FriendList::exportFriendlist(QString &fileName)
/** /**
* @brief helper function to show a message box * @brief helper function to show a message box
*/ */
void showXMLParsingError() static void showXMLParsingError()
{ {
// show error to user // show error to user
QMessageBox mbox; QMessageBox mbox;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,227 @@
/*******************************************************************************
* retroshare-gui/src/gui/msgs/RsFriendListModel.h *
* *
* Copyright 2019 by Cyril Soler <csoler@users.sourceforge.net> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once
#include <QModelIndex>
#include <QColor>
#include "retroshare/rsstatus.h"
#include "retroshare/rsmsgs.h"
#include "retroshare/rspeers.h"
typedef uint32_t ForumModelIndex;
// This class is the item model used by Qt to display the information
class RsFriendListModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit RsFriendListModel(QObject *parent = NULL);
~RsFriendListModel(){}
class RsNodeDetails: public RsPeerDetails {};// in the near future, there will be a specific class for Profile/Node details in replacement of RsPeerDetails
class RsProfileDetails: public RsPeerDetails {};
struct HierarchicalGroupInformation
{
RsGroupInfo group_info;
std::vector<uint32_t> child_profile_indices; // index in the array of hierarchical profiles
};
struct HierarchicalProfileInformation
{
RsProfileDetails profile_info;
std::vector<uint32_t> child_node_indices; // indices of nodes in the array of nodes.
};
struct HierarchicalNodeInformation
{
HierarchicalNodeInformation() : last_update_ts(0) {}
rstime_t last_update_ts;
RsNodeDetails node_info;
};
enum Columns {
COLUMN_THREAD_NAME = 0x00,
COLUMN_THREAD_LAST_CONTACT = 0x01,
COLUMN_THREAD_IP = 0x02,
COLUMN_THREAD_ID = 0x03,
COLUMN_THREAD_NB_COLUMNS = 0x04
};
enum Roles{ SortRole = Qt::UserRole+1,
StatusRole = Qt::UserRole+2,
UnreadRole = Qt::UserRole+3,
FilterRole = Qt::UserRole+4,
OnlineRole = Qt::UserRole+5,
TypeRole = Qt::UserRole+6
};
enum FilterType{ FILTER_TYPE_NONE = 0x00,
FILTER_TYPE_ID = 0x01,
FILTER_TYPE_NAME = 0x02
};
enum EntryType{ ENTRY_TYPE_UNKNOWN = 0x00,
ENTRY_TYPE_GROUP = 0x01,
ENTRY_TYPE_PROFILE = 0x02,
ENTRY_TYPE_NODE = 0x03
};
// This structure encodes the position of a node in the hierarchy. The type tells which of the index fields are valid.
struct EntryIndex
{
public:
EntryIndex();
EntryType type; // type of the entry (group,profile,location)
// Indices w.r.t. parent. The set of indices entirely determines the position of the entry in the hierarchy.
// An index of 0xff means "undefined"
uint16_t group_index; // index of the group in mGroups tab
uint16_t profile_index; // index of the child profile in its own group if group_index < 0xff, or in the mProfiles tab otherwise.
uint16_t node_index; // index of the child node in its own profile
EntryIndex parent() const;
EntryIndex child(int row,const std::vector<EntryIndex>& top_level) const;
uint32_t parentRow(uint32_t nb_groups) const;
};
QModelIndex root() const{ return createIndex(0,0,(void*)NULL) ;}
QModelIndex getIndexOfGroup(const RsNodeGroupId& mid) const;
static const QString FilterString ;
// This method will asynchroneously update the data
void setDisplayGroups(bool b);
bool getDisplayGroups() const { return mDisplayGroups; }
void setDisplayStatusString(bool b);
bool getDisplayStatusString() const { return mDisplayStatusString; }
EntryType getType(const QModelIndex&) const;
bool getGroupData (const QModelIndex&,RsGroupInfo &) const;
bool getProfileData(const QModelIndex&,RsProfileDetails&) const;
bool getNodeData (const QModelIndex&,RsNodeDetails &) const;
void setFilter(FilterType filter_type, const QStringList& strings) ;
// Overloaded methods from QAbstractItemModel
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex& child) const override;
Qt::ItemFlags flags(const QModelIndex& index) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
void clear() ;
/* Color definitions (for standard see qss.default) */
QColor mTextColorGroup;
QColor mTextColorStatus[RS_STATUS_COUNT];
private:
const HierarchicalGroupInformation *getGroupInfo (const EntryIndex&) const;
const HierarchicalProfileInformation *getProfileInfo(const EntryIndex&)const;
const HierarchicalNodeInformation *getNodeInfo(const EntryIndex&) const;
void checkNode(HierarchicalNodeInformation& node);
bool getPeerOnlineStatus(const EntryIndex& e) const;
std::map<RsPgpId,uint32_t>::const_iterator checkProfileIndex(const RsPgpId& pgp_id,
std::map<RsPgpId,uint32_t>& pgp_indices,
std::vector<HierarchicalProfileInformation>& mProfiles,
bool create);
QVariant sizeHintRole (const EntryIndex& e, int col) const;
QVariant displayRole (const EntryIndex& e, int col) const;
QVariant decorationRole(const EntryIndex& e, int col) const;
QVariant toolTipRole (const EntryIndex& e, int col) const;
QVariant statusRole (const EntryIndex& e, int col) const;
QVariant sortRole (const EntryIndex& e, int col) const;
QVariant fontRole (const EntryIndex& e, int col) const;
QVariant textColorRole (const EntryIndex& e, int col) const;
QVariant onlineRole (const EntryIndex& e, int col) const;
QVariant filterRole (const EntryIndex& e, int col) const;
/*!
* \brief debug_dump
* Dumps the hierarchy of posts in the terminal, to allow checking whether the internal representation is correct.
*/
public slots:
void checkInternalData(bool force);
void debug_dump() const;
signals:
void dataLoaded(); // emitted after the messages have been set. Can be used to updated the UI.
void friendListChanged(); // emitted after the messages have been set. Can be used to updated the UI.
void dataAboutToLoad();
private:
void updateInternalData();
bool passesFilter(const EntryIndex &e, int column) const;
void preMods() ;
void postMods() ;
void *getParentRef(void *ref,int& row) const;
void *getChildRef(void *ref,int row) const;
int getChildrenCount(void *ref) const;
template<uint8_t> static bool convertIndexToInternalId(const EntryIndex& e,quintptr& ref);
template<uint8_t> static bool convertInternalIdToIndex(quintptr ref, EntryIndex& e);
uint32_t updateFilterStatus(ForumModelIndex i,int column,const QStringList& strings);
QStringList mFilterStrings;
FilterType mFilterType;
bool mDisplayGroups ;
bool mDisplayStatusString ;
rstime_t mLastInternalDataUpdate;
rstime_t mLastNodeUpdate;;
// The 3 vectors below store thehierarchical information for groups, profiles and locations,
// meaning which is the child/parent of which. The actual group/profile/node data are also stored in the
// structure.
mutable std::vector<HierarchicalGroupInformation> mGroups;
mutable std::vector<HierarchicalProfileInformation> mProfiles;
mutable std::vector<HierarchicalNodeInformation> mLocations;
// The top level list contains all nodes to display, which type depends on the option to display groups or not.
// Idices in the list may be profile indices or group indices. In the former case the profile child index refers to
// the inde in the mProfiles tab, whereas in the the later case, the child index refers to the index of the profile in the
// group it belows to.
std::vector<EntryIndex> mTopLevel;
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,156 @@
/*******************************************************************************
* gui/common/NewFriendList.h *
* *
* Copyright (C) 2011, Retroshare Team <retroshare.project@gmail.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* published by the Free Software Foundation, either version 3 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 Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once
#include <set>
#include <QWidget>
#include <QTreeView>
#include "FriendListModel.h"
#include "RsAutoUpdatePage.h"
#include "retroshare/rsstatus.h"
namespace Ui {
class NewFriendList;
}
class RSTreeWidgetItemCompareRole;
class QTreeWidgetItem;
class QToolButton;
class FriendListSortFilterProxyModel;
class NewFriendList: public RsAutoUpdatePage
{
Q_OBJECT
Q_PROPERTY(QColor textColorGroup READ textColorGroup WRITE setTextColorGroup)
Q_PROPERTY(QColor textColorStatusOffline READ textColorStatusOffline WRITE setTextColorStatusOffline)
Q_PROPERTY(QColor textColorStatusAway READ textColorStatusAway WRITE setTextColorStatusAway)
Q_PROPERTY(QColor textColorStatusBusy READ textColorStatusBusy WRITE setTextColorStatusBusy)
Q_PROPERTY(QColor textColorStatusOnline READ textColorStatusOnline WRITE setTextColorStatusOnline)
Q_PROPERTY(QColor textColorStatusInactive READ textColorStatusInactive WRITE setTextColorStatusInactive)
public:
explicit NewFriendList(QWidget *parent = 0);
~NewFriendList();
// Add a tool button to the tool area
void addToolButton(QToolButton *toolButton);
void processSettings(bool load);
void setColumnVisible(int col,bool visible);
bool isColumnVisible(int col) const;
std::string getSelectedGroupId() const;
void updateDisplay() override;
QColor textColorGroup() const { return mModel->mTextColorGroup; }
QColor textColorStatusOffline() const { return mModel->mTextColorStatus[RS_STATUS_OFFLINE ]; }
QColor textColorStatusAway() const { return mModel->mTextColorStatus[RS_STATUS_AWAY ]; }
QColor textColorStatusBusy() const { return mModel->mTextColorStatus[RS_STATUS_BUSY ]; }
QColor textColorStatusOnline() const { return mModel->mTextColorStatus[RS_STATUS_ONLINE ]; }
QColor textColorStatusInactive() const { return mModel->mTextColorStatus[RS_STATUS_INACTIVE]; }
void setTextColorGroup(QColor color) { mModel->mTextColorGroup = color; }
void setTextColorStatusOffline(QColor color) { mModel->mTextColorStatus[RS_STATUS_OFFLINE ] = color; }
void setTextColorStatusAway(QColor color) { mModel->mTextColorStatus[RS_STATUS_AWAY ] = color; }
void setTextColorStatusBusy(QColor color) { mModel->mTextColorStatus[RS_STATUS_BUSY ] = color; }
void setTextColorStatusOnline(QColor color) { mModel->mTextColorStatus[RS_STATUS_ONLINE ] = color; }
void setTextColorStatusInactive(QColor color) { mModel->mTextColorStatus[RS_STATUS_INACTIVE] = color; }
public slots:
void filterItems(const QString &text);
void toggleSortByState(bool sort);
void forceUpdateDisplay();
void toggleColumnVisible();
void setShowGroups(bool show);
void setShowUnconnected(bool hidden);
void setShowState(bool show);
void headerContextMenuRequested(QPoint);
private slots:
void sortColumn(int col,Qt::SortOrder so);
protected:
void changeEvent(QEvent *e);
private:
Ui::NewFriendList *ui;
RsFriendListModel *mModel;
QAction *mActionSortByState;
void expandGroup(const RsNodeGroupId& gid);
void recursRestoreExpandedItems(const QModelIndex& index, const QString& parent_path, const std::set<QString>& exp, const std::set<QString> &sel);
void recursSaveExpandedItems(const QModelIndex& index,const QString& parent_path,std::set<QString>& exp, std::set<QString>& sel);
void saveExpandedPathsAndSelection(std::set<QString>& expanded_indexes, std::set<QString>& selected_indexes);
void restoreExpandedPathsAndSelection(const std::set<QString>& expanded_indexes, const std::set<QString>& selected_indexes);
void checkInternalData(bool force);
QModelIndex getCurrentSourceIndex() const;
bool getCurrentNode(RsFriendListModel::RsNodeDetails& prof) const;
bool getCurrentGroup(RsGroupInfo& prof) const;
bool getCurrentProfile(RsFriendListModel::RsProfileDetails& prof) const;
// Settings for peer list display
bool mShowState;
std::set<RsNodeGroupId> openGroups;
std::set<RsPgpId> openPeers;
bool getOrCreateGroup(const std::string& name, uint flag, RsNodeGroupId& id);
bool getGroupIdByName(const std::string& name, RsNodeGroupId& id);
bool importExportFriendlistFileDialog(QString &fileName, bool import);
bool exportFriendlist(QString &fileName);
bool importFriendlist(QString &fileName, bool &errorPeers, bool &errorGroups);
FriendListSortFilterProxyModel *mProxyModel ;
private slots:
void peerTreeWidgetCustomPopupMenu();
void pastePerson();
void connectNode();
void configureNode();
void configureProfile();
void chatNode();
void copyFullCertificate();
void addFriend();
void msgNode();
void msgGroup();
void msgProfile();
void recommendNode();
void removeNode();
void removeProfile();
void createNewGroup() ;
void addToGroup();
void moveToGroup();
void removeFromGroup();
void editGroup();
void removeGroup();
void exportFriendlistClicked();
void importFriendlistClicked();
};

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NewFriendList</class>
<widget class="QWidget" name="NewFriendList">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>475</width>
<height>292</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="titleBarFrame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="LineEditClear" name="filterLineEdit"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTreeView" name="peerTreeWidget">
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
<action name="actionShowOfflineFriends">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Offline Friends</string>
</property>
<property name="toolTip">
<string>Show Offline Friends</string>
</property>
</action>
<action name="actionShowState">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Status</string>
</property>
<property name="toolTip">
<string>Show status</string>
</property>
</action>
<action name="actionShowGroups">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Groups</string>
</property>
<property name="toolTip">
<string>Show groups</string>
</property>
</action>
<action name="actionExportFriendlist">
<property name="text">
<string>export friendlist</string>
</property>
<property name="toolTip">
<string>export your friendlist including groups</string>
</property>
</action>
<action name="actionImportFriendlist">
<property name="text">
<string>import friendlist</string>
</property>
<property name="toolTip">
<string>import your friendlist including groups</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>LineEditClear</class>
<extends>QLineEdit</extends>
<header location="global">gui/common/LineEditClear.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -243,7 +243,7 @@ QString StatusDefs::connectStateWithoutTransportTypeString(RsPeerDetails &detail
return stateString; return stateString;
} }
QString StatusDefs::connectStateIpString(RsPeerDetails &details) QString StatusDefs::connectStateIpString(const RsPeerDetails &details)
{ {
QString stateString = QString(""); QString stateString = QString("");

View File

@ -40,7 +40,7 @@ public:
static QString peerStateString(int peerState); static QString peerStateString(int peerState);
static QString connectStateString(RsPeerDetails &details); static QString connectStateString(RsPeerDetails &details);
static QString connectStateWithoutTransportTypeString(RsPeerDetails &details); static QString connectStateWithoutTransportTypeString(RsPeerDetails &details);
static QString connectStateIpString(RsPeerDetails &details); static QString connectStateIpString(const RsPeerDetails &details);
}; };
#endif #endif

View File

@ -750,6 +750,26 @@ void NotifyQt::notifyListChange(int list, int type)
return; return;
} }
void NotifyQt::notifyPeerConnected(const std::string& peer_id)
{
{
QMutexLocker m(&_mutex) ;
if(!_enabled)
return ;
}
emit peerConnected(QString::fromStdString(peer_id));
}
void NotifyQt::notifyPeerDisconnected(const std::string& peer_id)
{
{
QMutexLocker m(&_mutex) ;
if(!_enabled)
return ;
}
emit peerDisconnected(QString::fromStdString(peer_id));
}
void NotifyQt::notifyListPreChange(int list, int /*type*/) void NotifyQt::notifyListPreChange(int list, int /*type*/)
{ {

View File

@ -60,6 +60,8 @@ class NotifyQt: public QObject, public NotifyClient
void setNetworkDialog(NetworkDialog *c) { cDialog = c; } void setNetworkDialog(NetworkDialog *c) { cDialog = c; }
virtual void notifyPeerConnected(const std::string& /* peer_id */);
virtual void notifyPeerDisconnected(const std::string& /* peer_id */);
virtual void notifyListPreChange(int list, int type); virtual void notifyListPreChange(int list, int type);
virtual void notifyListChange(int list, int type); virtual void notifyListChange(int list, int type);
virtual void notifyErrorMsg(int list, int sev, std::string msg); virtual void notifyErrorMsg(int list, int sev, std::string msg);
@ -121,6 +123,8 @@ class NotifyQt: public QObject, public NotifyClient
// It's beneficial to send info to the GUI using signals, because signals are thread-safe // It's beneficial to send info to the GUI using signals, because signals are thread-safe
// as they get queued by Qt. // as they get queued by Qt.
// //
void peerConnected(const QString&) const ;
void peerDisconnected(const QString&) const ;
void hashingInfoChanged(const QString&) const ; void hashingInfoChanged(const QString&) const ;
void filesPreModChanged(bool) const ; void filesPreModChanged(bool) const ;
void filesPostModChanged(bool) const ; void filesPostModChanged(bool) const ;

View File

@ -156,7 +156,7 @@ MessagesDialog
qproperty-textColorInbox: rgb(49, 106, 197); qproperty-textColorInbox: rgb(49, 106, 197);
} }
FriendList NewFriendList
{ {
qproperty-textColorStatusOffline: black; qproperty-textColorStatusOffline: black;
qproperty-textColorStatusAway: gray; qproperty-textColorStatusAway: gray;

View File

@ -32,7 +32,6 @@ CrashStackTrace gCrashStackTrace;
#include "gui/FriendsDialog.h" #include "gui/FriendsDialog.h"
#include "gui/GenCertDialog.h" #include "gui/GenCertDialog.h"
#include "gui/MainWindow.h" #include "gui/MainWindow.h"
#include "gui/MessengerWindow.h"
#include "gui/NetworkDialog.h" #include "gui/NetworkDialog.h"
#include "gui/NetworkView.h" #include "gui/NetworkView.h"
#include "gui/QuickStartWizard.h" #include "gui/QuickStartWizard.h"
@ -52,6 +51,9 @@ CrashStackTrace gCrashStackTrace;
#include "util/rsdir.h" #include "util/rsdir.h"
#include "util/rstime.h" #include "util/rstime.h"
#ifdef MESSENGER_WINDOW
#include "gui/MessengerWindow.h"
#endif
#ifdef ENABLE_WEBUI #ifdef ENABLE_WEBUI
# include "gui/settings/WebuiPage.h" # include "gui/settings/WebuiPage.h"
#endif #endif

View File

@ -363,7 +363,6 @@ HEADERS += rshare.h \
gui/AboutDialog.h \ gui/AboutDialog.h \
gui/AboutWidget.h \ gui/AboutWidget.h \
gui/NetworkView.h \ gui/NetworkView.h \
gui/MessengerWindow.h \
gui/FriendsDialog.h \ gui/FriendsDialog.h \
gui/ServicePermissionDialog.h \ gui/ServicePermissionDialog.h \
gui/RemoteDirModel.h \ gui/RemoteDirModel.h \
@ -523,7 +522,8 @@ HEADERS += rshare.h \
gui/common/GroupTreeWidget.h \ gui/common/GroupTreeWidget.h \
gui/common/RSTreeView.h \ gui/common/RSTreeView.h \
gui/common/AvatarWidget.h \ gui/common/AvatarWidget.h \
gui/common/FriendList.h \ gui/common/FriendListModel.h \
gui/common/NewFriendList.h \
gui/common/FriendSelectionWidget.h \ gui/common/FriendSelectionWidget.h \
gui/common/FriendSelectionDialog.h \ gui/common/FriendSelectionDialog.h \
gui/common/HashBox.h \ gui/common/HashBox.h \
@ -621,7 +621,6 @@ FORMS += gui/StartDialog.ui \
gui/FileTransfer/BannedFilesDialog.ui \ gui/FileTransfer/BannedFilesDialog.ui \
gui/MainWindow.ui \ gui/MainWindow.ui \
gui/NetworkView.ui \ gui/NetworkView.ui \
gui/MessengerWindow.ui \
gui/FriendsDialog.ui \ gui/FriendsDialog.ui \
gui/ShareManager.ui \ gui/ShareManager.ui \
# gui/ShareDialog.ui \ # gui/ShareDialog.ui \
@ -689,7 +688,7 @@ FORMS += gui/StartDialog.ui \
gui/groups/CreateGroup.ui \ gui/groups/CreateGroup.ui \
gui/common/GroupTreeWidget.ui \ gui/common/GroupTreeWidget.ui \
gui/common/AvatarWidget.ui \ gui/common/AvatarWidget.ui \
gui/common/FriendList.ui \ gui/common/NewFriendList.ui \
gui/common/FriendSelectionWidget.ui \ gui/common/FriendSelectionWidget.ui \
gui/common/HashBox.ui \ gui/common/HashBox.ui \
gui/common/RSImageBlockWidget.ui \ gui/common/RSImageBlockWidget.ui \
@ -738,7 +737,6 @@ SOURCES += main.cpp \
gui/mainpagestack.cpp \ gui/mainpagestack.cpp \
gui/MainWindow.cpp \ gui/MainWindow.cpp \
gui/NetworkView.cpp \ gui/NetworkView.cpp \
gui/MessengerWindow.cpp \
gui/FriendsDialog.cpp \ gui/FriendsDialog.cpp \
gui/ServicePermissionDialog.cpp \ gui/ServicePermissionDialog.cpp \
gui/RemoteDirModel.cpp \ gui/RemoteDirModel.cpp \
@ -843,7 +841,8 @@ SOURCES += main.cpp \
gui/common/GroupTreeWidget.cpp \ gui/common/GroupTreeWidget.cpp \
gui/common/RSTreeView.cpp \ gui/common/RSTreeView.cpp \
gui/common/AvatarWidget.cpp \ gui/common/AvatarWidget.cpp \
gui/common/FriendList.cpp \ gui/common/FriendListModel.cpp \
gui/common/NewFriendList.cpp \
gui/common/FriendSelectionWidget.cpp \ gui/common/FriendSelectionWidget.cpp \
gui/common/FriendSelectionDialog.cpp \ gui/common/FriendSelectionDialog.cpp \
gui/common/HashBox.cpp \ gui/common/HashBox.cpp \
@ -1004,6 +1003,17 @@ unfinishedtranslations {
} }
messenger {
SOURCES += gui/MessengerWindow.cpp \
gui/common/FriendList.cpp
HEADERS += gui/MessengerWindow.h \
gui/common/FriendList.h
FORMS += gui/MessengerWindow.ui \
gui/common/FriendList.ui
DEFiNES += MESSENGER_WINDOW
}
# Shifted Qt4.4 dependancies to here. # Shifted Qt4.4 dependancies to here.
# qmake CONFIG=pluginmgr # qmake CONFIG=pluginmgr

View File

@ -140,6 +140,10 @@ rs_async_chat:CONFIG -= no_rs_async_chat
CONFIG *= direct_chat CONFIG *= direct_chat
no_direct_chat:CONFIG -= direct_chat no_direct_chat:CONFIG -= direct_chat
# To enable messemger window which has been deprecated since RetroShare 0.6.6 append
# the following assignation to qmake command line "CONFIG+=messenger"
# CONFIG *= messenger
# To disable bitdht append the following assignation to qmake command line # To disable bitdht append the following assignation to qmake command line
# "CONFIG+=no_bitdht" # "CONFIG+=no_bitdht"
CONFIG *= bitdht CONFIG *= bitdht