merged upstream/master

This commit is contained in:
csoler 2019-09-08 20:35:23 +02:00
commit 6419b03a2a
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
131 changed files with 6081 additions and 1473 deletions

View file

@ -43,6 +43,7 @@
#include "FriendsDialog.h"
#include "NetworkView.h"
#include "NetworkDialog.h"
#include "gui/common/NewFriendList.h"
#include "gui/Identity/IdDialog.h"
/* Images for Newsfeed icons */
//#define IMAGE_NEWSFEED ""
@ -73,10 +74,8 @@ FriendsDialog::FriendsDialog(QWidget *parent)
ui.chatWidget->setWelcomeMessage(msg);
ui.chatWidget->init(ChatId::makeBroadcastId(), tr("Broadcast"));
connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)),
this, SLOT(chatMessageReceived(ChatMessage)));
connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)),
this, SLOT(chatStatusReceived(ChatId,QString)));
connect(NotifyQt::getInstance(), SIGNAL(chatMessageReceived(ChatMessage)), this, SLOT(chatMessageReceived(ChatMessage)));
connect(NotifyQt::getInstance(), SIGNAL(chatStatusChanged(ChatId,QString)), this, SLOT(chatStatusReceived(ChatId,QString)));
#else // def RS_DIRECT_CHAT
ui.tabWidget->removeTab(ui.tabWidget->indexOf(ui.groupChatTab));
#endif // def RS_DIRECT_CHAT
@ -93,47 +92,15 @@ FriendsDialog::FriendsDialog(QWidget *parent)
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(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(1);
ui.tabWidget->hideCloseButton(2);
ui.tabWidget->hideCloseButton(3);
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 */
ui.splitter->setStretchFactor(0, 0);
ui.splitter->setStretchFactor(1, 1);
/*remove
QList<int> sizes;
sizes << height() << 100; // Qt calculates the right sizes
ui.splitter_2->setSizes(sizes);*/
loadmypersonalstatus();
@ -141,9 +108,9 @@ QList<int> sizes;
// load settings
RsAutoUpdatePage::lockAllEvents();
ui.friendList->setColumnVisible(FriendList::COLUMN_LAST_CONTACT, false);
ui.friendList->setColumnVisible(FriendList::COLUMN_IP, false);
ui.friendList->setColumnVisible(FriendList::COLUMN_ID, false);
ui.friendList->setColumnVisible(RsFriendListModel::COLUMN_THREAD_LAST_CONTACT, false);
ui.friendList->setColumnVisible(RsFriendListModel::COLUMN_THREAD_IP, false);
ui.friendList->setColumnVisible(RsFriendListModel::COLUMN_THREAD_ID, false);
ui.friendList->setShowGroups(true);
processSettings(true);
RsAutoUpdatePage::unlockAllEvents();