Merge pull request #662 from csoler/v0.6-ImprovedGUI

V0.6 improved gui
This commit is contained in:
csoler 2017-01-22 21:48:48 +01:00 committed by GitHub
commit 297907ef81
23 changed files with 334 additions and 89 deletions

View file

@ -431,12 +431,25 @@ unsigned short RsCertificate::loc_port_us() const
return (int)ipv4_internal_ip_and_port[4]*256 + (int)ipv4_internal_ip_and_port[5] ; return (int)ipv4_internal_ip_and_port[4]*256 + (int)ipv4_internal_ip_and_port[5] ;
} }
bool RsCertificate::cleanCertificate(const std::string& input,std::string& output,Format& format,int& error_code) bool RsCertificate::cleanCertificate(const std::string& input,std::string& output,Format& format,int& error_code,bool check_content)
{ {
if(cleanCertificate(input,output,error_code)) if(cleanCertificate(input,output,error_code))
{ {
format = RS_CERTIFICATE_RADIX ; format = RS_CERTIFICATE_RADIX ;
if(!check_content)
return true ; return true ;
try
{
RsCertificate c(input) ;
return true ;
}
catch(uint32_t err_code)
{
error_code = err_code ;
return false;
}
} }
return false ; return false ;

View file

@ -41,7 +41,7 @@ class RsCertificate
const unsigned char *pgp_key() const { return binary_pgp_key ; } const unsigned char *pgp_key() const { return binary_pgp_key ; }
size_t pgp_key_size() const { return binary_pgp_key_size ; } size_t pgp_key_size() const { return binary_pgp_key_size ; }
static bool cleanCertificate(const std::string& input,std::string& output,RsCertificate::Format& format,int& error_code) ; static bool cleanCertificate(const std::string& input, std::string& output, RsCertificate::Format& format, int& error_code, bool check_content) ;
private: private:
static bool cleanCertificate(const std::string& input,std::string& output,int&) ; // new radix format static bool cleanCertificate(const std::string& input,std::string& output,int&) ; // new radix format

View file

@ -1214,7 +1214,7 @@ bool p3Peers::cleanCertificate(const std::string &certstr, std::string &cleanCer
{ {
RsCertificate::Format format ; RsCertificate::Format format ;
return RsCertificate::cleanCertificate(certstr,cleanCert,format,error_code) ; return RsCertificate::cleanCertificate(certstr,cleanCert,format,error_code,true) ;
} }
bool p3Peers::saveCertificateToFile(const RsPeerId &id, const std::string &/*fname*/) bool p3Peers::saveCertificateToFile(const RsPeerId &id, const std::string &/*fname*/)

View file

@ -99,28 +99,28 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
QHeaderView_setSectionResizeModeColumn(header, COLUMN_SUBSCRIBED, QHeaderView::Interactive); QHeaderView_setSectionResizeModeColumn(header, COLUMN_SUBSCRIBED, QHeaderView::Interactive);
privateSubLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER); privateSubLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER);
privateSubLobbyItem->setText(COLUMN_NAME, tr("Private Subscribed Lobbies")); privateSubLobbyItem->setText(COLUMN_NAME, tr("Private Subscribed chat rooms"));
privateSubLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "1"); privateSubLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "1");
// privateLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PRIVATE)); // privateLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PRIVATE));
privateSubLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE); privateSubLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE);
ui.lobbyTreeWidget->insertTopLevelItem(0, privateSubLobbyItem); ui.lobbyTreeWidget->insertTopLevelItem(0, privateSubLobbyItem);
publicSubLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER); publicSubLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER);
publicSubLobbyItem->setText(COLUMN_NAME, tr("Public Subscribed Lobbies")); publicSubLobbyItem->setText(COLUMN_NAME, tr("Public Subscribed chat rooms"));
publicSubLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "2"); publicSubLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "2");
// publicLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PUBLIC)); // publicLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PUBLIC));
publicSubLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC); publicSubLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC);
ui.lobbyTreeWidget->insertTopLevelItem(1, publicSubLobbyItem); ui.lobbyTreeWidget->insertTopLevelItem(1, publicSubLobbyItem);
privateLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER); privateLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER);
privateLobbyItem->setText(COLUMN_NAME, tr("Private Lobbies")); privateLobbyItem->setText(COLUMN_NAME, tr("Private chat rooms"));
privateLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "3"); privateLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "3");
// privateLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PRIVATE)); // privateLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PRIVATE));
privateLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE); privateLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PRIVATE);
ui.lobbyTreeWidget->insertTopLevelItem(2, privateLobbyItem); ui.lobbyTreeWidget->insertTopLevelItem(2, privateLobbyItem);
publicLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER); publicLobbyItem = new RSTreeWidgetItem(compareRole, TYPE_FOLDER);
publicLobbyItem->setText(COLUMN_NAME, tr("Public Lobbies")); publicLobbyItem->setText(COLUMN_NAME, tr("Public chat rooms"));
publicLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "4"); publicLobbyItem->setData(COLUMN_NAME, ROLE_SORT, "4");
// publicLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PUBLIC)); // publicLobbyItem->setIcon(COLUMN_NAME, QIcon(IMAGE_PUBLIC));
publicLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC); publicLobbyItem->setData(COLUMN_DATA, ROLE_PRIVACYLEVEL, CHAT_LOBBY_PRIVACY_LEVEL_PUBLIC);
@ -171,20 +171,20 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
int S = QFontMetricsF(font()).height(); int S = QFontMetricsF(font()).height();
QString help_str = tr("\ QString help_str = tr("\
<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Chat Lobbies</h1> \ <h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Chat Rooms</h1> \
<p>Chat lobbies are distributed chat rooms, and work pretty much like IRC. \ <p>Chat rooms work pretty much like IRC. \
They allow you to talk anonymously with tons of people without the need to make friends.</p> \ They allow you to talk anonymously with tons of people without the need to make friends.</p> \
<p>A chat lobby can be public (your friends see it) or private (your friends can't see it, unless you \ <p>A chat room can be public (your friends see it) or private (your friends can't see it, unless you \
invite them with <img src=\":/images/add_24x24.png\" width=%2/>). \ invite them with <img src=\":/images/add_24x24.png\" width=%2/>). \
Once you have been invited to a private lobby, you will be able to see it when your friends \ Once you have been invited to a private room, you will be able to see it when your friends \
are using it.</p> \ are using it.</p> \
<p>The list at left shows \ <p>The list at left shows \
chat lobbies your friends are participating in. You can either \ chat lobbies your friends are participating in. You can either \
<ul> \ <ul> \
<li>Right click to create a new chat lobby</li> \ <li>Right click to create a new chat room</li> \
<li>Double click a chat lobby to enter, chat, and show it to your friends</li> \ <li>Double click a chat room to enter, chat, and show it to your friends</li> \
</ul> \ </ul> \
Note: For the chat lobbies to work properly, your computer needs be on time. So check your system clock!\ Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!\
</p> \ </p> \
" "
).arg(QString::number(2*S)).arg(QString::number(S)) ; ).arg(QString::number(2*S)).arg(QString::number(S)) ;
@ -255,7 +255,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
QMenu contextMnu(this); QMenu contextMnu(this);
if (item && item->type() == TYPE_FOLDER) { if (item && item->type() == TYPE_FOLDER) {
QAction *action = contextMnu.addAction(QIcon(IMAGE_CREATE), tr("Create chat lobby"), this, SLOT(createChatLobby())); QAction *action = contextMnu.addAction(QIcon(IMAGE_CREATE), tr("Create chat room"), this, SLOT(createChatLobby()));
action->setData(item->data(COLUMN_DATA, ROLE_PRIVACYLEVEL).toInt()); action->setData(item->data(COLUMN_DATA, ROLE_PRIVACYLEVEL).toInt());
} }
@ -265,7 +265,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
rsIdentity->getOwnIds(own_identities) ; rsIdentity->getOwnIds(own_identities) ;
if (item->data(COLUMN_DATA, ROLE_SUBSCRIBED).toBool()) if (item->data(COLUMN_DATA, ROLE_SUBSCRIBED).toBool())
contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Leave this lobby"), this, SLOT(unsubscribeItem())); contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Leave this room"), this, SLOT(unsubscribeItem()));
else else
{ {
QTreeWidgetItem *item = ui.lobbyTreeWidget->currentItem(); QTreeWidgetItem *item = ui.lobbyTreeWidget->currentItem();
@ -280,18 +280,18 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
if(own_identities.empty()) if(own_identities.empty())
{ {
if(removed) if(removed)
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Create a non anonymous identity and enter this lobby"), this, SLOT(createIdentityAndSubscribe())); contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Create a non anonymous identity and enter this room"), this, SLOT(createIdentityAndSubscribe()));
else else
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Create an identity and enter this lobby"), this, SLOT(createIdentityAndSubscribe())); contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Create an identity and enter this chat room"), this, SLOT(createIdentityAndSubscribe()));
} }
else if(own_identities.size() == 1) else if(own_identities.size() == 1)
{ {
QAction *action = contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Enter this lobby"), this, SLOT(subscribeChatLobbyAs())); QAction *action = contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Enter this chat room"), this, SLOT(subscribeChatLobbyAs()));
action->setData(QString::fromStdString((own_identities.front()).toStdString())) ; action->setData(QString::fromStdString((own_identities.front()).toStdString())) ;
} }
else else
{ {
QMenu *mnu = contextMnu.addMenu(QIcon(IMAGE_SUBSCRIBE),tr("Enter this lobby as...")) ; QMenu *mnu = contextMnu.addMenu(QIcon(IMAGE_SUBSCRIBE),tr("Enter this chat room as...")) ;
for(std::list<RsGxsId>::const_iterator it=own_identities.begin();it!=own_identities.end();++it) for(std::list<RsGxsId>::const_iterator it=own_identities.begin();it!=own_identities.end();++it)
{ {
@ -405,7 +405,7 @@ void ChatLobbyWidget::addChatPage(ChatLobbyDialog *d)
if(rsMsgs->getChatLobbyInfo(id,linfo)) if(rsMsgs->getChatLobbyInfo(id,linfo))
_lobby_infos[id].default_icon = (linfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC):QIcon(IMAGE_PRIVATE) ; _lobby_infos[id].default_icon = (linfo.lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC) ? QIcon(IMAGE_PUBLIC):QIcon(IMAGE_PRIVATE) ;
else else
std::cerr << "(EE) cannot find info for lobby " << std::hex << id << std::dec << std::endl; std::cerr << "(EE) cannot find info for room " << std::hex << id << std::dec << std::endl;
} }
} }
@ -424,7 +424,7 @@ void ChatLobbyWidget::setCurrentChatPage(ChatLobbyDialog *d)
void ChatLobbyWidget::updateDisplay() void ChatLobbyWidget::updateDisplay()
{ {
#ifdef CHAT_LOBBY_GUI_DEBUG #ifdef CHAT_LOBBY_GUI_DEBUG
std::cerr << "updating chat lobby display!" << std::endl; std::cerr << "updating chat room display!" << std::endl;
#endif #endif
std::vector<VisibleChatLobbyRecord> visibleLobbies; std::vector<VisibleChatLobbyRecord> visibleLobbies;
rsMsgs->getListOfNearbyChatLobbies(visibleLobbies); rsMsgs->getListOfNearbyChatLobbies(visibleLobbies);
@ -795,7 +795,7 @@ void ChatLobbyWidget::subscribeChatLobbyAtItem(QTreeWidgetItem *item)
if( (flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED) && !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)) if( (flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED) && !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
{ {
QMessageBox::warning(NULL,tr("Default identity is anonymous"),tr("You cannot join this lobby with your default identity, since it is anonymous and the lobby forbids it.")) ; QMessageBox::warning(NULL,tr("Default identity is anonymous"),tr("You cannot join this chat room with your default identity, since it is anonymous and the chat room forbids it.")) ;
return ; return ;
} }
} }
@ -840,12 +840,12 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id)
ui.lobbysec_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)?tr("No anonymous IDs"):tr("Anonymous IDs accepted")) ); ui.lobbysec_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)?tr("No anonymous IDs"):tr("Anonymous IDs accepted")) );
ui.lobbypeers_lineEdit->setText( QString::number((*it).total_number_of_peers) ); ui.lobbypeers_lineEdit->setText( QString::number((*it).total_number_of_peers) );
QString text = tr("You're not subscribed to this lobby; Double click-it to enter and chat.") ; QString text = tr("You're not subscribed to this chat room; Double click-it to enter and chat.") ;
if(my_ids.empty()) if(my_ids.empty())
{ {
if( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED) if( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
text += "\n\n"+tr("You will need to create a non anonymous identity in order to join this chat lobby.") ; text += "\n\n"+tr("You will need to create a non anonymous identity in order to join this chat room.") ;
else else
text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ; text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ;
} }
@ -861,7 +861,7 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id)
ui.lobbypeers_lineEdit->clear(); ui.lobbypeers_lineEdit->clear();
ui.lobbysec_lineEdit->clear(); ui.lobbysec_lineEdit->clear();
QString text = tr("No lobby selected. \nSelect lobbies at left to show details.\nDouble click lobbies to enter and chat.") ; QString text = tr("No chat room selected. \nSelect chat rooms at left to show details.\nDouble click lobbies to enter and chat.") ;
ui.lobbyInfoLabel->setText(text) ; ui.lobbyInfoLabel->setText(text) ;
} }
@ -965,7 +965,7 @@ void ChatLobbyWidget::unsubscribeItem()
void ChatLobbyWidget::unsubscribeChatLobby(ChatLobbyId id) void ChatLobbyWidget::unsubscribeChatLobby(ChatLobbyId id)
{ {
std::cerr << "Unsubscribing from chat lobby" << std::endl; std::cerr << "Unsubscribing from chat room" << std::endl;
// close the tab. // close the tab.
@ -1072,12 +1072,12 @@ void ChatLobbyWidget::readChatLobbyInvites()
for(std::list<ChatLobbyInvite>::const_iterator it(invites.begin());it!=invites.end();++it) for(std::list<ChatLobbyInvite>::const_iterator it(invites.begin());it!=invites.end();++it)
{ {
QMessageBox mb(QObject::tr("Join chat lobby"), QMessageBox mb(QObject::tr("Join chat room"),
tr("%1 invites you to chat lobby named %2").arg(QString::fromUtf8(rsPeers->getPeerName((*it).peer_id).c_str())).arg(RsHtml::plainText(it->lobby_name)), tr("%1 invites you to chat room named %2").arg(QString::fromUtf8(rsPeers->getPeerName((*it).peer_id).c_str())).arg(RsHtml::plainText(it->lobby_name)),
QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0); QMessageBox::Question, QMessageBox::Yes,QMessageBox::No, 0);
QLabel *label = new QLabel(tr("Choose an identity for this lobby:")); QLabel *label = new QLabel(tr("Choose an identity for this chat room:"));
GxsIdChooser *idchooser = new GxsIdChooser ; GxsIdChooser *idchooser = new GxsIdChooser ;
idchooser->loadIds(IDCHOOSER_ID_REQUIRED,default_id) ; idchooser->loadIds(IDCHOOSER_ID_REQUIRED,default_id) ;
@ -1112,7 +1112,7 @@ void ChatLobbyWidget::readChatLobbyInvites()
if(rsMsgs->acceptLobbyInvite((*it).lobby_id,chosen_id)) if(rsMsgs->acceptLobbyInvite((*it).lobby_id,chosen_id))
ChatDialog::chatFriend(ChatId((*it).lobby_id),true); ChatDialog::chatFriend(ChatId((*it).lobby_id),true);
else else
std::cerr << "Can't join lobby with id 0x" << std::hex << (*it).lobby_id << std::dec << std::endl; std::cerr << "Can't join chat room with id 0x" << std::hex << (*it).lobby_id << std::dec << std::endl;
} }
} }

View file

@ -35,7 +35,7 @@ public:
~ChatLobbyWidget(); ~ChatLobbyWidget();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_CHATLOBBY) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_CHATLOBBY) ; } //MainPage
virtual QString pageName() const { return tr("Chat Lobbies") ; } //MainPage virtual QString pageName() const { return tr("Chats") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent); //MainPage virtual UserNotify *getUserNotify(QObject *parent); //MainPage

View file

@ -72,7 +72,7 @@
<item> <item>
<widget class="StyledLabel" name="titleBarLabel"> <widget class="StyledLabel" name="titleBarLabel">
<property name="text"> <property name="text">
<string>Chat lobbies</string> <string>Chat rooms</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -95,7 +95,7 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset resource="icons.qrc">
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset> <normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -242,7 +242,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Lobby Name:</string> <string>Chat room Name:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -255,7 +255,7 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>Lobby Id:</string> <string>Chat room Id:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -440,7 +440,6 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="images.qrc"/>
<include location="icons.qrc"/> <include location="icons.qrc"/>
</resources> </resources>
<connections/> <connections/>

View file

@ -60,7 +60,7 @@ public:
~TransfersDialog(); ~TransfersDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_TRANSFERS) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_TRANSFERS) ; } //MainPage
virtual QString pageName() const { return tr("File sharing") ; } //MainPage virtual QString pageName() const { return tr("Files") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent); virtual UserNotify *getUserNotify(QObject *parent);

View file

@ -57,7 +57,7 @@ public:
~FriendsDialog (); ~FriendsDialog ();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_NETWORK) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_NETWORK) ; } //MainPage
virtual QString pageName() const { return tr("Network") ; } //MainPage virtual QString pageName() const { return tr("Friends") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent); virtual UserNotify *getUserNotify(QObject *parent);

View file

@ -25,6 +25,7 @@
#include "gui/notifyqt.h" #include "gui/notifyqt.h"
#include "gui/msgs/MessageComposer.h" #include "gui/msgs/MessageComposer.h"
#include "gui/connect/ConnectFriendWizard.h" #include "gui/connect/ConnectFriendWizard.h"
#include "gui/connect/FriendRecommendDialog.h"
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
#include <QUrlQuery> #include <QUrlQuery>
@ -60,10 +61,14 @@ HomePage::HomePage(QWidget *parent) :
QAction *SendAction = new QAction(QIcon(),tr("Send via Email"), this); QAction *SendAction = new QAction(QIcon(),tr("Send via Email"), this);
connect(SendAction, SIGNAL(triggered()), this, SLOT(runEmailClient())); connect(SendAction, SIGNAL(triggered()), this, SLOT(runEmailClient()));
QAction *RecAction = new QAction(QIcon(),tr("Recommend friends to each others"), this);
connect(RecAction, SIGNAL(triggered()), this, SLOT(recommendFriends()));
QMenu *menu = new QMenu(); QMenu *menu = new QMenu();
menu->addAction(CopyAction); menu->addAction(CopyAction);
menu->addAction(SaveAction); menu->addAction(SaveAction);
menu->addAction(SendAction); menu->addAction(SendAction);
menu->addAction(RecAction);
ui->shareButton->setMenu(menu); ui->shareButton->setMenu(menu);
@ -109,6 +114,11 @@ static void sendMail(QString sAddress, QString sSubject, QString sBody)
QDesktopServices::openUrl (url); QDesktopServices::openUrl (url);
} }
void HomePage::recommendFriends()
{
FriendRecommendDialog::showIt() ;
}
void HomePage::runEmailClient() void HomePage::runEmailClient()
{ {
sendMail("", tr("RetroShare Invite"), ui->userCertEdit->toPlainText()); sendMail("", tr("RetroShare Invite"), ui->userCertEdit->toPlainText());

View file

@ -53,6 +53,7 @@ private slots:
void runEmailClient(); void runEmailClient();
void copyCert(); void copyCert();
void saveCert(); void saveCert();
void recommendFriends();
void addFriend(); void addFriend();
private: private:

View file

@ -344,28 +344,24 @@ void MainWindow::initStackedPage()
addPage(homePage = new HomePage(ui->stackPages), grp, NULL); addPage(homePage = new HomePage(ui->stackPages), grp, NULL);
addPage(newsFeed = new NewsFeed(ui->stackPages), grp, &notify);
addPage(friendsDialog = new FriendsDialog(ui->stackPages), grp, &notify);
#ifdef RS_USE_NEW_PEOPLE_DIALOG
PeopleDialog *peopleDialog = NULL;
addPage(peopleDialog = new PeopleDialog(ui->stackPages), grp, &notify);
#endif
addPage(idDialog = new IdDialog(ui->stackPages), grp, &notify);
//#ifdef RS_USE_CIRCLES //#ifdef RS_USE_CIRCLES
// CirclesDialog *circlesDialog = NULL; // CirclesDialog *circlesDialog = NULL;
// addPage(circlesDialog = new CirclesDialog(ui->stackPages), grp, &notify); // addPage(circlesDialog = new CirclesDialog(ui->stackPages), grp, &notify);
//#endif //#endif
addPage(friendsDialog = new FriendsDialog(ui->stackPages), grp, &notify);
addPage(transfersDialog = new TransfersDialog(ui->stackPages), grp, &notify);
addPage(chatLobbyDialog = new ChatLobbyWidget(ui->stackPages), grp, &notify); addPage(chatLobbyDialog = new ChatLobbyWidget(ui->stackPages), grp, &notify);
addPage(messagesDialog = new MessagesDialog(ui->stackPages), grp, &notify); addPage(transfersDialog = new TransfersDialog(ui->stackPages), grp, &notify);
addPage(gxschannelDialog = new GxsChannelDialog(ui->stackPages), grp, &notify); addPage(gxschannelDialog = new GxsChannelDialog(ui->stackPages), grp, &notify);
addPage(gxsforumDialog = new GxsForumsDialog(ui->stackPages), grp, &notify); addPage(gxsforumDialog = new GxsForumsDialog(ui->stackPages), grp, &notify);
addPage(messagesDialog = new MessagesDialog(ui->stackPages), grp, &notify);
addPage(postedDialog = new PostedDialog(ui->stackPages), grp, &notify); addPage(postedDialog = new PostedDialog(ui->stackPages), grp, &notify);
addPage(idDialog = new IdDialog(ui->stackPages), grp, &notify);
#ifdef RS_USE_NEW_PEOPLE_DIALOG
PeopleDialog *peopleDialog = NULL;
addPage(peopleDialog = new PeopleDialog(ui->stackPages), grp, &notify);
#endif
addPage(newsFeed = new NewsFeed(ui->stackPages), grp, &notify);
#ifdef RS_USE_WIKI #ifdef RS_USE_WIKI
WikiDialog *wikiDialog = NULL; WikiDialog *wikiDialog = NULL;
addPage(wikiDialog = new WikiDialog(ui->stackPages), grp, &notify); addPage(wikiDialog = new WikiDialog(ui->stackPages), grp, &notify);
@ -430,7 +426,8 @@ void MainWindow::initStackedPage()
#endif #endif
/** Add icon on Action bar */ /** Add icon on Action bar */
addAction(new QAction(QIcon(IMAGE_ADDFRIEND), tr("Add"), ui->toolBarAction), &MainWindow::addFriend, SLOT(addFriend())); // I remove add a friend because it's in HOME ghibli
//addAction(new QAction(QIcon(IMAGE_ADDFRIEND), tr("Add"), ui->toolBarAction), &MainWindow::addFriend, SLOT(addFriend()));
//addAction(new QAction(QIcon(IMAGE_NEWRSCOLLECTION), tr("New"), ui->toolBarAction), &MainWindow::newRsCollection, SLOT(newRsCollection())); //addAction(new QAction(QIcon(IMAGE_NEWRSCOLLECTION), tr("New"), ui->toolBarAction), &MainWindow::newRsCollection, SLOT(newRsCollection()));
addAction(new QAction(QIcon(IMAGE_PREFERENCES), tr("Options"), ui->toolBarAction), &MainWindow::showSettings, SLOT(showSettings())); addAction(new QAction(QIcon(IMAGE_PREFERENCES), tr("Options"), ui->toolBarAction), &MainWindow::showSettings, SLOT(showSettings()));
addAction(new QAction(QIcon(IMAGE_ABOUT), tr("About"), ui->toolBarAction), &MainWindow::showabout, SLOT(showabout())); addAction(new QAction(QIcon(IMAGE_ABOUT), tr("About"), ui->toolBarAction), &MainWindow::showabout, SLOT(showabout()));

View file

@ -45,7 +45,7 @@ public:
~MessagesDialog(); ~MessagesDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_MESSAGES) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_MESSAGES) ; } //MainPage
virtual QString pageName() const { return tr("Messages") ; } //MainPage virtual QString pageName() const { return tr("Mail") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent); virtual UserNotify *getUserNotify(QObject *parent);

View file

@ -49,7 +49,7 @@ public:
virtual ~NewsFeed(); virtual ~NewsFeed();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_NEWSFEED) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_NEWSFEED) ; } //MainPage
virtual QString pageName() const { return tr("News feed") ; } //MainPage virtual QString pageName() const { return tr("Log") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent); virtual UserNotify *getUserNotify(QObject *parent);

View file

@ -39,7 +39,7 @@ public:
~PostedDialog(); ~PostedDialog();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_POSTED) ; } //MainPage virtual QIcon iconPixmap() const { return QIcon(IMAGE_POSTED) ; } //MainPage
virtual QString pageName() const { return tr("Posted") ; } //MainPage virtual QString pageName() const { return tr("Links") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage virtual QString helpText() const { return ""; } //MainPage
virtual UserNotify *getUserNotify(QObject *parent); virtual UserNotify *getUserNotify(QObject *parent);

View file

@ -178,7 +178,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
unsubscribeButton->setMaximumSize(QSize(2.4*S,2.4*S)) ; unsubscribeButton->setMaximumSize(QSize(2.4*S,2.4*S)) ;
unsubscribeButton->setText(QString()) ; unsubscribeButton->setText(QString()) ;
unsubscribeButton->setAutoRaise(true) ; unsubscribeButton->setAutoRaise(true) ;
unsubscribeButton->setToolTip(tr("Leave this lobby (Unsubscribe)")); unsubscribeButton->setToolTip(tr("Leave this chat room (Unsubscribe)"));
{ {
QIcon icon ; QIcon icon ;
@ -314,7 +314,7 @@ void ChatLobbyDialog::init()
{ {
title = QString::fromUtf8(linfo.lobby_name.c_str()); title = QString::fromUtf8(linfo.lobby_name.c_str());
QString msg = tr("Welcome to lobby %1").arg(RsHtml::plainText(linfo.lobby_name)); QString msg = tr("Welcome to chat room %1").arg(RsHtml::plainText(linfo.lobby_name));
_lobby_name = QString::fromUtf8(linfo.lobby_name.c_str()) ; _lobby_name = QString::fromUtf8(linfo.lobby_name.c_str()) ;
if (!linfo.lobby_topic.empty()) { if (!linfo.lobby_topic.empty()) {
msg += "\n" + tr("Topic: %1").arg(RsHtml::plainText(linfo.lobby_topic)); msg += "\n" + tr("Topic: %1").arg(RsHtml::plainText(linfo.lobby_topic));
@ -480,9 +480,9 @@ void ChatLobbyDialog::addChatMsg(const ChatMessage& msg)
QString notifyMsg = name + ": " + editor.toPlainText(); QString notifyMsg = name + ": " + editor.toPlainText();
if(notifyMsg.length() > 30) if(notifyMsg.length() > 30)
MainWindow::displayLobbySystrayMsg(tr("Lobby chat") + ": " + _lobby_name, notifyMsg.left(30) + QString("...")); MainWindow::displayLobbySystrayMsg(tr("Room chat") + ": " + _lobby_name, notifyMsg.left(30) + QString("..."));
else else
MainWindow::displayLobbySystrayMsg(tr("Lobby chat") + ": " + _lobby_name, notifyMsg); MainWindow::displayLobbySystrayMsg(tr("Room chat") + ": " + _lobby_name, notifyMsg);
} }
// also update peer list. // also update peer list.
@ -790,12 +790,12 @@ void ChatLobbyDialog::displayLobbyEvent(int event_type, const RsGxsId& gxs_id, c
{ {
case RS_CHAT_LOBBY_EVENT_PEER_LEFT: case RS_CHAT_LOBBY_EVENT_PEER_LEFT:
qsParticipant=gxs_id; qsParticipant=gxs_id;
ui.chatWidget->addChatMsg(true, tr("Lobby management"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("%1 has left the lobby.").arg(RsHtml::plainText(name)), ChatWidget::MSGTYPE_SYSTEM); ui.chatWidget->addChatMsg(true, tr("Lobby management"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("%1 has left the room.").arg(RsHtml::plainText(name)), ChatWidget::MSGTYPE_SYSTEM);
emit peerLeft(id()) ; emit peerLeft(id()) ;
break; break;
case RS_CHAT_LOBBY_EVENT_PEER_JOINED: case RS_CHAT_LOBBY_EVENT_PEER_JOINED:
qsParticipant=gxs_id; qsParticipant=gxs_id;
ui.chatWidget->addChatMsg(true, tr("Lobby management"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("%1 joined the lobby.").arg(RsHtml::plainText(name)), ChatWidget::MSGTYPE_SYSTEM); ui.chatWidget->addChatMsg(true, tr("Lobby management"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("%1 joined the room.").arg(RsHtml::plainText(name)), ChatWidget::MSGTYPE_SYSTEM);
emit peerJoined(id()) ; emit peerJoined(id()) ;
break; break;
case RS_CHAT_LOBBY_EVENT_PEER_STATUS: case RS_CHAT_LOBBY_EVENT_PEER_STATUS:
@ -827,10 +827,10 @@ void ChatLobbyDialog::displayLobbyEvent(int event_type, const RsGxsId& gxs_id, c
} }
break; break;
case RS_CHAT_LOBBY_EVENT_KEEP_ALIVE: case RS_CHAT_LOBBY_EVENT_KEEP_ALIVE:
//std::cerr << "Received keep alive packet from " << nickname.toStdString() << " in lobby " << getPeerId() << std::endl; //std::cerr << "Received keep alive packet from " << nickname.toStdString() << " in chat room " << getPeerId() << std::endl;
break; break;
default: default:
std::cerr << "ChatLobbyDialog::displayLobbyEvent() Unhandled lobby event type " << event_type << std::endl; std::cerr << "ChatLobbyDialog::displayLobbyEvent() Unhandled chat room event type " << event_type << std::endl;
} }
if (!qsParticipant.isNull()) if (!qsParticipant.isNull())
@ -854,7 +854,7 @@ bool ChatLobbyDialog::canClose()
} }
*/ */
if (QMessageBox::Yes == QMessageBox::question(this, tr("Unsubscribe to lobby"), tr("Do you want to unsubscribe to this chat lobby?"), QMessageBox::Yes | QMessageBox::No)) { if (QMessageBox::Yes == QMessageBox::question(this, tr("Unsubscribe from chat room"), tr("Do you want to unsubscribe to this chat room?"), QMessageBox::Yes | QMessageBox::No)) {
return true; return true;
} }

View file

@ -33,7 +33,7 @@
ChatLobbyUserNotify::ChatLobbyUserNotify(QObject *parent) : ChatLobbyUserNotify::ChatLobbyUserNotify(QObject *parent) :
UserNotify(parent) UserNotify(parent)
{ {
_name = tr("Chat Lobbies"); _name = tr("Chats");
_group = "ChatLobby"; _group = "ChatLobby";
_bCheckForNickName = Settings->valueFromGroup(_group, "CheckForNickName", true).toBool(); _bCheckForNickName = Settings->valueFromGroup(_group, "CheckForNickName", true).toBool();

View file

@ -40,7 +40,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int pr
ui->setupUi(this); ui->setupUi(this);
ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/chat-lobbies.png")); ui->headerFrame->setHeaderImage(QPixmap(":/icons/png/chat-lobbies.png"));
ui->headerFrame->setHeaderText(tr("Create Chat Lobby")); ui->headerFrame->setHeaderText(tr("Create Chat Room"));
RsGxsId default_identity ; RsGxsId default_identity ;
rsMsgs->getDefaultIdentityForChatLobby(default_identity) ; rsMsgs->getDefaultIdentityForChatLobby(default_identity) ;
@ -48,7 +48,7 @@ CreateLobbyDialog::CreateLobbyDialog(const std::set<RsPeerId>& peer_list, int pr
ui->idChooser_CB->loadIds(IDCHOOSER_ID_REQUIRED, default_identity); ui->idChooser_CB->loadIds(IDCHOOSER_ID_REQUIRED, default_identity);
#if QT_VERSION >= 0x040700 #if QT_VERSION >= 0x040700
ui->lobbyName_LE->setPlaceholderText(tr("Put a sensible lobby name here")); ui->lobbyName_LE->setPlaceholderText(tr("Put a sensible chat room name here"));
ui->lobbyTopic_LE->setPlaceholderText(tr("Set a descriptive topic here")); ui->lobbyTopic_LE->setPlaceholderText(tr("Set a descriptive topic here"));
#endif #endif
@ -149,7 +149,7 @@ void CreateLobbyDialog::createLobby()
ChatLobbyId id = rsMsgs->createChatLobby(lobby_name,gxs_id, lobby_topic, shareList, lobby_flags); ChatLobbyId id = rsMsgs->createChatLobby(lobby_name,gxs_id, lobby_topic, shareList, lobby_flags);
std::cerr << "gui: Created chat lobby " << std::hex << id << std::dec << std::endl ; std::cerr << "gui: Created chat room " << std::hex << id << std::dec << std::endl ;
// open chat window !! // open chat window !!
ChatDialog::chatFriend(ChatId(id)) ; ChatDialog::chatFriend(ChatId(id)) ;

View file

@ -962,13 +962,14 @@ void ConnectFriendWizard::friendCertChanged()
void ConnectFriendWizard::cleanFriendCert() void ConnectFriendWizard::cleanFriendCert()
{ {
bool certValid = false; bool certValid = false;
QString errorMsg; QString errorMsg ;
std::string cert = ui->friendCertEdit->toPlainText().toUtf8().constData(); std::string cert = ui->friendCertEdit->toPlainText().toUtf8().constData();
if (cert.empty()) { if (cert.empty()) {
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png")); ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png"));
ui->friendCertCleanLabel->setToolTip(""); ui->friendCertCleanLabel->setToolTip("");
ui->friendCertCleanLabel->setStyleSheet(""); ui->friendCertCleanLabel->setStyleSheet("");
errorMsg = tr("");
} else { } else {
std::string cleanCert; std::string cleanCert;
@ -984,23 +985,27 @@ void ConnectFriendWizard::cleanFriendCert()
ui->friendCertCleanLabel->setStyleSheet(""); ui->friendCertCleanLabel->setStyleSheet("");
connect(ui->friendCertEdit, SIGNAL(textChanged()), this, SLOT(friendCertChanged())); connect(ui->friendCertEdit, SIGNAL(textChanged()), this, SLOT(friendCertChanged()));
} }
errorMsg = tr("Certificate appears to be valid");
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/accepted16.png"));
} else { } else {
if (error_code > 0) { if (error_code > 0) {
switch (error_code) { switch (error_code) {
case RS_PEER_CERT_CLEANING_CODE_NO_BEGIN_TAG: case CERTIFICATE_PARSING_ERROR_CHECKSUM_ERROR :
errorMsg = tr("No or misspelled BEGIN tag found") ; case CERTIFICATE_PARSING_ERROR_WRONG_VERSION :
break ; case CERTIFICATE_PARSING_ERROR_SIZE_ERROR :
case RS_PEER_CERT_CLEANING_CODE_NO_END_TAG: case CERTIFICATE_PARSING_ERROR_INVALID_LOCATION_ID :
errorMsg = tr("No or misspelled END tag found") ; case CERTIFICATE_PARSING_ERROR_INVALID_EXTERNAL_IP :
break ; case CERTIFICATE_PARSING_ERROR_INVALID_LOCAL_IP :
case RS_PEER_CERT_CLEANING_CODE_NO_CHECKSUM: case CERTIFICATE_PARSING_ERROR_INVALID_CHECKSUM_SECTION :
errorMsg = tr("No checksum found (the last 5 chars should be separated by a '=' char), or no newline after tag line (e.g. line beginning with Version:)") ; case CERTIFICATE_PARSING_ERROR_UNKNOWN_SECTION_PTAG :
break ; case CERTIFICATE_PARSING_ERROR_MISSING_CHECKSUM :
default: default:
errorMsg = tr("Fake certificate: take any real certificate, and replace some of the letters randomly") ; errorMsg = tr("Not a valid Retroshare certificate!") ;
ui->friendCertCleanLabel->setStyleSheet("QLabel#friendCertCleanLabel {border: 2px solid red; border-radius: 6px;}"); ui->friendCertCleanLabel->setStyleSheet("QLabel#friendCertCleanLabel {border: 2px solid red; border-radius: 6px;}");
} }
} }
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png"));
} }
} }

View file

@ -0,0 +1,77 @@
#include <QMessageBox>
#include "FriendRecommendDialog.h"
#include "gui/msgs/MessageComposer.h"
FriendRecommendDialog::FriendRecommendDialog(QWidget *parent)
: QDialog(parent), ui(new Ui::FriendRecommendDialog)
{
ui->setupUi(this) ;
}
FriendRecommendDialog::~FriendRecommendDialog()
{
}
void FriendRecommendDialog::load()
{
ui->frec_recommendList->setHeaderText(tr("Recommend friends"));
ui->frec_recommendList->setModus(FriendSelectionWidget::MODUS_CHECK);
ui->frec_recommendList->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL);
ui->frec_recommendList->start();
ui->frec_toList->setHeaderText(tr("To"));
ui->frec_toList->setModus(FriendSelectionWidget::MODUS_CHECK);
ui->frec_toList->start();
ui->frec_messageEdit->setText(MessageComposer::recommendMessage());
}
void FriendRecommendDialog::showIt()
{
FriendRecommendDialog *dialog = instance();
dialog->load();
dialog->show();
dialog->raise();
dialog->activateWindow();
}
FriendRecommendDialog *FriendRecommendDialog::instance()
{
static FriendRecommendDialog *d = NULL ;
if(d == NULL)
d = new FriendRecommendDialog(NULL);
return d;
}
void FriendRecommendDialog::accept()
{
std::set<RsPeerId> recommendIds;
ui->frec_recommendList->selectedIds<RsPeerId,FriendSelectionWidget::IDTYPE_SSL>(recommendIds, false);
if (recommendIds.empty()) {
QMessageBox::warning(this, "RetroShare", tr("Please select at least one friend for recommendation."), QMessageBox::Ok, QMessageBox::Ok);
return ;
}
std::set<RsPeerId> toIds;
ui->frec_toList->selectedIds<RsPeerId,FriendSelectionWidget::IDTYPE_SSL>(toIds, false);
if (toIds.empty()) {
QMessageBox::warning(this, "RetroShare", tr("Please select at least one friend as recipient."), QMessageBox::Ok, QMessageBox::Ok);
return ;
}
std::set<RsPeerId>::iterator toId;
for (toId = toIds.begin(); toId != toIds.end(); ++toId) {
MessageComposer::recommendFriend(recommendIds, *toId, ui->frec_messageEdit->toHtml(), true);
}
QDialog::accept() ;
QMessageBox::information(NULL,tr("Recommendation messages sent!"),tr("A recommendation message was sent to each of the chosen friends!")) ;
}

View file

@ -0,0 +1,22 @@
#pragma once
#include <QDialog>
#include "ui_FriendRecommendDialog.h"
class FriendRecommendDialog: public QDialog
{
public:
FriendRecommendDialog(QWidget *parent) ;
virtual ~FriendRecommendDialog() ;
static void showIt();
private:
static FriendRecommendDialog *instance();
virtual void accept() ;
void load();
Ui::FriendRecommendDialog *ui;
};

View file

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FriendRecommendDialog</class>
<widget class="QDialog" name="FriendRecommendDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1398</width>
<height>774</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="FriendSelectionWidget" name="frec_recommendList" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="FriendSelectionWidget" name="frec_toList" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="frec_label">
<property name="text">
<string>Message:</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="frec_messageEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
<zorder>buttonBox</zorder>
<zorder>frec_label</zorder>
<zorder>frec_messageEdit</zorder>
<zorder>layoutWidget</zorder>
<zorder>frec_recommendList</zorder>
</widget>
<customwidgets>
<customwidget>
<class>FriendSelectionWidget</class>
<extends>QWidget</extends>
<header>gui/common/FriendSelectionWidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>FriendRecommendDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>FriendRecommendDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View file

@ -47,7 +47,7 @@
<item> <item>
<widget class="QCheckBox" name="notify_Peers"> <widget class="QCheckBox" name="notify_Peers">
<property name="text"> <property name="text">
<string>Friend Connect</string> <string>Friend Connected</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -68,7 +68,7 @@
<item> <item>
<widget class="QCheckBox" name="notify_Posted"> <widget class="QCheckBox" name="notify_Posted">
<property name="text"> <property name="text">
<string>Posted</string> <string>Links</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -82,14 +82,14 @@
<item> <item>
<widget class="QCheckBox" name="notify_Messages"> <widget class="QCheckBox" name="notify_Messages">
<property name="text"> <property name="text">
<string>Messages</string> <string>Mails</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="notify_Chat"> <widget class="QCheckBox" name="notify_Chat">
<property name="text"> <property name="text">
<string>Chat</string> <string>Chats</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -242,7 +242,7 @@
<item> <item>
<widget class="QCheckBox" name="popup_ChatLobby"> <widget class="QCheckBox" name="popup_ChatLobby">
<property name="text"> <property name="text">
<string>Chat Lobby</string> <string>Chat Room</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -414,7 +414,7 @@
<item> <item>
<widget class="QCheckBox" name="systray_ChatLobby"> <widget class="QCheckBox" name="systray_ChatLobby">
<property name="text"> <property name="text">
<string>Chat lobbies</string> <string>Chat rooms</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -438,7 +438,7 @@
</widget> </widget>
<widget class="QWidget" name="tabChatLobbies"> <widget class="QWidget" name="tabChatLobbies">
<attribute name="title"> <attribute name="title">
<string>Chat Lobbies</string> <string>Chat Rooms</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="tabChatLobbiesVLayout"> <layout class="QVBoxLayout" name="tabChatLobbiesVLayout">
<item> <item>

View file

@ -425,6 +425,7 @@ HEADERS += rshare.h \
gui/chat/ChatLobbyUserNotify.h \ gui/chat/ChatLobbyUserNotify.h \
gui/connect/ConfCertDialog.h \ gui/connect/ConfCertDialog.h \
gui/connect/PGPKeyDialog.h \ gui/connect/PGPKeyDialog.h \
gui/connect/FriendRecommendDialog.h \
gui/msgs/MessageInterface.h \ gui/msgs/MessageInterface.h \
gui/msgs/MessageComposer.h \ gui/msgs/MessageComposer.h \
gui/msgs/MessageWindow.h \ gui/msgs/MessageWindow.h \
@ -616,6 +617,7 @@ FORMS += gui/StartDialog.ui \
gui/connect/PGPKeyDialog.ui \ gui/connect/PGPKeyDialog.ui \
gui/connect/ConnectFriendWizard.ui \ gui/connect/ConnectFriendWizard.ui \
gui/connect/ConnectProgressDialog.ui \ gui/connect/ConnectProgressDialog.ui \
gui/connect/FriendRecommendDialog.ui \
gui/msgs/MessageComposer.ui \ gui/msgs/MessageComposer.ui \
gui/msgs/MessageWindow.ui\ gui/msgs/MessageWindow.ui\
gui/msgs/MessageWidget.ui\ gui/msgs/MessageWidget.ui\
@ -903,6 +905,7 @@ SOURCES += main.cpp \
gui/feeds/NewsFeedUserNotify.cpp \ gui/feeds/NewsFeedUserNotify.cpp \
gui/connect/ConnectFriendWizard.cpp \ gui/connect/ConnectFriendWizard.cpp \
gui/connect/ConnectProgressDialog.cpp \ gui/connect/ConnectProgressDialog.cpp \
gui/connect/FriendRecommendDialog.cpp \
gui/groups/CreateGroup.cpp \ gui/groups/CreateGroup.cpp \
gui/GetStartedDialog.cpp \ gui/GetStartedDialog.cpp \
gui/statistics/BandwidthGraphWindow.cpp \ gui/statistics/BandwidthGraphWindow.cpp \