From c074d3abc3f78547abf711c7f930afb49d2d1bd5 Mon Sep 17 00:00:00 2001 From: defnax Date: Wed, 24 Sep 2014 14:58:05 +0000 Subject: [PATCH] Removed Add Friend Button from Friends Dialog Removed Distant Chat page from Settings git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7556 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/FriendsDialog.cpp | 6 +- retroshare-gui/src/gui/settings/ChatPage.cpp | 34 -- retroshare-gui/src/gui/settings/ChatPage.h | 2 - retroshare-gui/src/gui/settings/ChatPage.ui | 391 ++++++++----------- 4 files changed, 167 insertions(+), 266 deletions(-) diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index b42792500..6c1ae8929 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.cpp @@ -90,7 +90,7 @@ FriendsDialog::FriendsDialog(QWidget *parent) connect( ui.actionSet_your_Avatar, SIGNAL(triggered()), this, SLOT(getAvatar())); connect( ui.actionSet_your_Personal_Message, SIGNAL(triggered()), this, SLOT(statusmessage())); connect( ui.addfileButton, SIGNAL(clicked() ), this , SLOT(addExtraFile())); - connect( ui.actionAdd_Friend, SIGNAL(triggered()), this, SLOT(addFriend())); + //connect( ui.actionAdd_Friend, SIGNAL(triggered()), this, SLOT(addFriend())); ui.avatar->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatar->setOwnId(); @@ -179,11 +179,11 @@ FriendsDialog::FriendsDialog(QWidget *parent) // // ui.menutoolButton->setMenu(menu); - QToolButton *addFriendButton = new QToolButton(this); + /*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); + ui.friendList->addToolButton(addFriendButton);*/ setAcceptDrops(true); ui.lineEdit->setAcceptDrops(false); diff --git a/retroshare-gui/src/gui/settings/ChatPage.cpp b/retroshare-gui/src/gui/settings/ChatPage.cpp index 7b3630696..131f1e2ae 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.cpp +++ b/retroshare-gui/src/gui/settings/ChatPage.cpp @@ -105,7 +105,6 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags) ui.minimumContrast->hide(); #endif - connect(ui._collected_contacts_LW, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(collectedContacts_customPopupMenu(QPoint))); /* Hide platform specific features */ #ifdef Q_WS_WIN @@ -113,39 +112,6 @@ ChatPage::ChatPage(QWidget * parent, Qt::WindowFlags flags) #endif } -void ChatPage::collectedContacts_customPopupMenu(QPoint p) -{ - // items: chat with this person, copy to clipboard, delete - std::cerr << "In custom popup menu" << std::endl; - - QListWidgetItem *item = ui._collected_contacts_LW->itemAt(p) ; - - if(item == NULL) - return ; - - QList selected = ui._collected_contacts_LW->selectedItems() ; - - QMenu contextMnu( this ); - - if(selected.size() == 1) - contextMnu.addAction( QIcon(IMAGE_CHAT_OPEN), tr("Open secured chat tunnel"), this, SLOT(collectedInvite_openDistantChat()) ) ; - - contextMnu.exec(QCursor::pos()); -} - -void ChatPage::collectedInvite_openDistantChat() -{ - QList selected = ui._collected_contacts_LW->selectedItems() ; - - RsGxsId gxs_id( (*selected.begin())->data(Qt::UserRole).toString().toStdString() ); - - std::cerr << "Openning secured chat tunnel for virtual peer id " << gxs_id << ". Please wait..." << std::endl; - uint32_t error_code ; - - if(!rsMsgs->initiateDistantChatConnexion(gxs_id,error_code)) - QMessageBox::critical(NULL,tr("Can't open distant chat"),tr("Cannot open distant chat. Error code=")+QString::number(error_code)) ; -} - /** Saves the changes on this page */ bool ChatPage::save(QString &/*errmsg*/) diff --git a/retroshare-gui/src/gui/settings/ChatPage.h b/retroshare-gui/src/gui/settings/ChatPage.h index f35252eb9..5d4527412 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.h +++ b/retroshare-gui/src/gui/settings/ChatPage.h @@ -56,8 +56,6 @@ class ChatPage : public ConfigPage void on_cbSearch_WithoutLimit_toggled(bool); void on_btSearch_FoundColor_clicked(); - void collectedContacts_customPopupMenu(QPoint) ; - void collectedInvite_openDistantChat() ; private: void setPreviewMessages(QString &stylePath, QString styleVariant, QTextBrowser *textBrowser); diff --git a/retroshare-gui/src/gui/settings/ChatPage.ui b/retroshare-gui/src/gui/settings/ChatPage.ui index 6bdf481f1..797fe6653 100644 --- a/retroshare-gui/src/gui/settings/ChatPage.ui +++ b/retroshare-gui/src/gui/settings/ChatPage.ui @@ -14,7 +14,7 @@ - 1 + 0 @@ -298,169 +298,169 @@ - - - - - - Search by default - - - - 2 - - - 2 - - - 0 - - - 0 - - - 0 - - - - - - - Number of char to start search - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 100 - - - - - - - - - Case sensitive - - - - - - - Whole Words - - - - - - - Move to cursor - - - - - - - Color All Text Found - - - - - - - - - Number of found text coloring - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 1000 - - - - - - - - - - - Color of found text - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 24 - 24 - - - - - 24 - 24 - - - - Choose color of found text - - - - - - - - - - - - Qt::Vertical + + + + + + Search by default + + + + 2 + + + 2 + + + 0 + + + 0 + + + 0 + + + + + + + Number of char to start search + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 100 + + + + + + + + + Case sensitive + + + + + + + Whole Words + + + + + + + Move to cursor + + + + + + + Color All Text Found + + + + + + + + + Number of found text coloring + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 1000 + + + + + + + + + + + Color of found text + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 24 + 24 + + + + + 24 + 24 + + + + Choose color of found text + + + + + + + + + + + + Qt::Vertical @@ -474,69 +474,6 @@ - - - Distant chat - - - - - - - 0 - 0 - - - - <html><head/><body><p align="justify">Retroshare allows you to anonymously chat to nearby people beyond your friends in the network, using encrypted tunnels. In your personal invites list you keep chat links for people to contact you. In the &quot;collected contacts&quot; list, you keep such chat links that people sent you to contact them.</p></body></html> - - - Qt::RichText - - - true - - - true - - - - - - - - 0 - 0 - - - - People around you can chat to - - - - - - - 0 - 0 - - - - - 0 - 100 - - - - Qt::CustomContextMenu - - - - - - - - History