From 6fa0d894d09c673bde086f865f89f944b7a03fda Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 16 Jan 2014 17:52:41 +0000 Subject: [PATCH] clean up SecurityItem, removed unused old stuff git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7020 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/feeds/SecurityItem.cpp | 48 --------- retroshare-gui/src/gui/feeds/SecurityItem.h | 3 - retroshare-gui/src/gui/feeds/SecurityItem.ui | 98 ++++--------------- 3 files changed, 19 insertions(+), 130 deletions(-) diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.cpp b/retroshare-gui/src/gui/feeds/SecurityItem.cpp index 6ca69b8ba..45c79d516 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.cpp +++ b/retroshare-gui/src/gui/feeds/SecurityItem.cpp @@ -50,8 +50,6 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::strin /* Invoke the Qt Designer generated object setup routine */ setupUi(this); - messageframe->setVisible(false); - sendmsgButton->setEnabled(false); quickmsgButton->hide(); chatButton->hide(); removeFriendButton->setEnabled(false); @@ -66,10 +64,6 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::strin /* specific ones */ connect( chatButton, SIGNAL( clicked( void ) ), this, SLOT( openChat ( void ) ) ); -// connect( actionNew_Message, SIGNAL( triggered( ) ), this, SLOT( sendMsg ( void ) ) ); - -// connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) ); -// connect( cancelButton, SIGNAL( clicked( ) ), this, SLOT( togglequickmessage() ) ); connect( quickmsgButton, SIGNAL( clicked( ) ), this, SLOT( sendMsg() ) ); @@ -79,9 +73,6 @@ SecurityItem::SecurityItem(FeedHolder *parent, uint32_t feedId, const std::strin connect(NotifyQt::getInstance(), SIGNAL(friendsChanged()), this, SLOT(updateItem())); - //QMenu *msgmenu = new QMenu(); - //msgmenu->addAction(actionNew_Message); - //quickmsgButton->setMenu(msgmenu); avatar->setId(mSslId, false); @@ -401,42 +392,3 @@ void SecurityItem::openChat() mParent->openChat(mGpgId); } } - -void SecurityItem::togglequickmessage() -{ - if (messageframe->isHidden()) - { - messageframe->setVisible(true); - } - else - { - messageframe->setVisible(false); - } -} - -void SecurityItem::sendMessage() -{ - /* construct a message */ - MessageInfo mi; - - mi.title = tr("Quick Message").toStdWString(); - mi.msg = quickmsgText->toHtml().toStdWString(); - mi.msgto.push_back(mGpgId); - - rsMsgs->MessageSend(mi); - - quickmsgText->clear(); - messageframe->setVisible(false); -} - -void SecurityItem::on_quickmsgText_textChanged() -{ - if (quickmsgText->toPlainText().isEmpty()) - { - sendmsgButton->setEnabled(false); - } - else - { - sendmsgButton->setEnabled(true); - } -} diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.h b/retroshare-gui/src/gui/feeds/SecurityItem.h index 993f22b4a..bb3bb2993 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.h +++ b/retroshare-gui/src/gui/feeds/SecurityItem.h @@ -57,10 +57,7 @@ private slots: void updateItem(); - void togglequickmessage(); - void sendMessage(); - void on_quickmsgText_textChanged(); private: FeedHolder *mParent; diff --git a/retroshare-gui/src/gui/feeds/SecurityItem.ui b/retroshare-gui/src/gui/feeds/SecurityItem.ui index b4952ceaa..39aceb338 100644 --- a/retroshare-gui/src/gui/feeds/SecurityItem.ui +++ b/retroshare-gui/src/gui/feeds/SecurityItem.ui @@ -6,8 +6,8 @@ 0 0 - 961 - 406 + 856 + 268 @@ -17,7 +17,7 @@ - + 0 0 @@ -74,14 +74,17 @@ + + + 0 + 0 + + - + 0 - - 0 - - + 0 @@ -98,6 +101,9 @@ 70 + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + @@ -113,7 +119,7 @@ Peer Name - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -150,16 +156,16 @@ - 10 - 75 - true + 14 + 50 + false wants to be friend with you on RetroShare - Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter true @@ -395,72 +401,6 @@ - - - - 16777215 - 130 - - - - QFrame::Box - - - QFrame::Sunken - - - - 2 - - - 0 - - - - - Qt::NoFocus - - - Cancel - - - - - - - Qt::NoFocus - - - Send - - - false - - - true - - - - - - - Qt::Horizontal - - - - 469 - 20 - - - - - - - - - - -