mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
- Deleted AddFriendDialog, InviteDialog and AddFriendWizard files. They are not used in current version, so it was beter not to keep them. We can always restore them, if any need.
- Removed "Invite friend" button from main window. - Also changed some comments to the wizard code. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1102 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
afcc1d76d2
commit
b3f433b5f2
@ -174,9 +174,9 @@ HEADERS += rshare.h \
|
||||
gui/chat/PopupChatDialog.h \
|
||||
gui/connect/ConnectDialog.h \
|
||||
gui/connect/ConfCertDialog.h \
|
||||
gui/connect/InviteDialog.h \
|
||||
gui/connect/AddFriendDialog.h \
|
||||
gui/connect/AddFriendWizard.h \
|
||||
# gui/connect/InviteDialog.h \
|
||||
# gui/connect/AddFriendDialog.h \
|
||||
# gui/connect/AddFriendWizard.h \
|
||||
gui/library/FindWindow.h \
|
||||
gui/msgs/ChanMsgDialog.h \
|
||||
gui/msgs/ChanCreateDialog.h \
|
||||
@ -285,9 +285,9 @@ FORMS += gui/ChatDialog.ui \
|
||||
gui/chat/PopupChatDialog.ui \
|
||||
gui/connect/ConnectDialog.ui \
|
||||
gui/connect/ConfCertDialog.ui \
|
||||
gui/connect/InviteDialog.ui \
|
||||
gui/connect/AddFriendDialog.ui \
|
||||
gui/connect/AddFriendWizard.ui \
|
||||
# gui/connect/InviteDialog.ui \
|
||||
# gui/connect/AddFriendDialog.ui \
|
||||
# gui/connect/AddFriendWizard.ui \
|
||||
gui/msgs/ChanMsgDialog.ui \
|
||||
gui/msgs/ChanCreateDialog.ui \
|
||||
gui/Preferences/CryptographyDialog.ui \
|
||||
@ -401,9 +401,9 @@ SOURCES += main.cpp \
|
||||
gui/chat/PopupChatDialog.cpp \
|
||||
gui/connect/ConnectDialog.cpp \
|
||||
gui/connect/ConfCertDialog.cpp \
|
||||
gui/connect/InviteDialog.cpp \
|
||||
gui/connect/AddFriendDialog.cpp \
|
||||
gui/connect/AddFriendWizard.cpp \
|
||||
# gui/connect/InviteDialog.cpp \
|
||||
# gui/connect/AddFriendDialog.cpp \
|
||||
# gui/connect/AddFriendWizard.cpp \
|
||||
gui/msgs/ChanMsgDialog.cpp \
|
||||
gui/msgs/ChanCreateDialog.cpp \
|
||||
gui/Preferences/configpagestack.cpp \
|
||||
|
@ -37,8 +37,8 @@
|
||||
|
||||
#include "rsiface/rsiface.h"
|
||||
|
||||
#include "gui/connect/InviteDialog.h"
|
||||
#include "gui/connect/AddFriendDialog.h"
|
||||
//#include "gui/connect/InviteDialog.h"
|
||||
//#include "gui/connect/AddFriendDialog.h"
|
||||
|
||||
#include "LinksDialog.h"
|
||||
#include "GamesDialog.h"
|
||||
|
@ -61,8 +61,8 @@
|
||||
#include "rsiface/rspeers.h"
|
||||
#include "rsiface/rsfiles.h"
|
||||
|
||||
#include "gui/connect/InviteDialog.h"
|
||||
#include "gui/connect/AddFriendDialog.h"
|
||||
//#include "gui/connect/InviteDialog.h"
|
||||
//#include "gui/connect/AddFriendDialog.h"
|
||||
#include "gui/connect/ConnectFriendWizard.h"
|
||||
|
||||
#include <sstream>
|
||||
@ -98,7 +98,7 @@
|
||||
#define IMAGE_PHOTO ":/images/lphoto.png"
|
||||
#define IMAGE_SMPLAYER ":/images/smplayer_icon32.png"
|
||||
#define IMAGE_ADDFRIEND ":/images/add-friend24.png"
|
||||
#define IMAGE_INVITEFRIEND ":/images/invite-friend24.png"
|
||||
//#define IMAGE_INVITEFRIEND ":/images/invite-friend24.png"
|
||||
#define IMAGE_ADDSHARE ":/images/directoryadd_24x24_shadow.png"
|
||||
#define IMAGE_OPTIONS ":/images/settings.png"
|
||||
#define IMAGE_QUIT ":/images/exit_24x24.png"
|
||||
@ -150,7 +150,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
|
||||
/** Left Side ToolBar**/
|
||||
connect(ui.actionAdd_Friend, SIGNAL(triggered() ), this , SLOT( addFriend() ) );
|
||||
connect(ui.actionInvite_Friend, SIGNAL(triggered() ), this , SLOT( inviteFriend() ) );
|
||||
// connect(ui.actionInvite_Friend, SIGNAL(triggered() ), this , SLOT( inviteFriend() ) );
|
||||
connect(ui.actionAdd_Share, SIGNAL(triggered() ), this , SLOT( openShareManager() ) );
|
||||
connect(ui.actionOptions, SIGNAL(triggered()), this, SLOT( showPreferencesWindow()) );
|
||||
connect(ui.actionMessenger, SIGNAL(triggered()), this, SLOT( showMessengerWindow()) );
|
||||
@ -494,41 +494,18 @@ void MainWindow::showWindow(Page page)
|
||||
/** Add a Friend ShortCut */
|
||||
void MainWindow::addFriend()
|
||||
{
|
||||
/* call load Certificate */
|
||||
#if 0
|
||||
std::string id;
|
||||
if (connectionsDialog)
|
||||
{
|
||||
id = connectionsDialog->loadneighbour();
|
||||
}
|
||||
ConnectFriendWizard* connwiz = new ConnectFriendWizard(this);
|
||||
|
||||
/* call make Friend */
|
||||
if (id != "")
|
||||
{
|
||||
connectionsDialog->showpeerdetails(id);
|
||||
}
|
||||
virtual int NeighLoadPEMString(std::string pem, std::string &id) = 0;
|
||||
#else
|
||||
/*
|
||||
static AddFriendDialog *addDialog =
|
||||
new AddFriendDialog(networkDialog, this);
|
||||
// set widget to be deleted after close
|
||||
connwiz->setAttribute( Qt::WA_DeleteOnClose, true);
|
||||
|
||||
std::string invite = "";
|
||||
addDialog->setInfo(invite);
|
||||
addDialog->show();
|
||||
*/
|
||||
|
||||
static ConnectFriendWizard* connwiz = new ConnectFriendWizard(this);
|
||||
connwiz->restart();
|
||||
|
||||
connwiz->show();
|
||||
|
||||
//delete connwiz;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/** Add a Friend ShortCut */
|
||||
void MainWindow::inviteFriend()
|
||||
/*void MainWindow::inviteFriend()
|
||||
{
|
||||
static InviteDialog *inviteDialog = new InviteDialog(this);
|
||||
|
||||
@ -538,7 +515,7 @@ void MainWindow::inviteFriend()
|
||||
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
/** Add a Share */
|
||||
void MainWindow::addSharedDirectory()
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ private slots:
|
||||
|
||||
/** Toolbar fns. */
|
||||
void addFriend();
|
||||
void inviteFriend();
|
||||
//void inviteFriend();
|
||||
void addSharedDirectory();
|
||||
void showMessengerWindow();
|
||||
void showApplWindow();
|
||||
|
@ -495,16 +495,7 @@
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget" >
|
||||
<layout class="QGridLayout" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -1038,7 +1029,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="allowedAreas" >
|
||||
<set>Qt::BottomToolBarArea|Qt::LeftToolBarArea|Qt::NoToolBarArea|Qt::RightToolBarArea</set>
|
||||
<set>Qt::BottomToolBarArea|Qt::LeftToolBarArea|Qt::RightToolBarArea</set>
|
||||
</property>
|
||||
<property name="iconSize" >
|
||||
<size>
|
||||
@ -1070,7 +1061,6 @@
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<addaction name="actionAdd_Friend" />
|
||||
<addaction name="actionInvite_Friend" />
|
||||
<addaction name="actionAdd_Share" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="separator" />
|
||||
@ -1087,23 +1077,17 @@
|
||||
</widget>
|
||||
<action name="actionAdd_Friend" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/add-friend24.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/add-friend24.png</normaloff>:/images/add-friend24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Add Friend</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionInvite_Friend" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/invite-friend24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Invite Friend</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAdd_Share" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/add-share24.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Add Share</string>
|
||||
@ -1111,7 +1095,8 @@
|
||||
</action>
|
||||
<action name="actionOptions" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/kcmsystem24.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/kcmsystem24.png</normaloff>:/images/kcmsystem24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Options</string>
|
||||
@ -1119,7 +1104,8 @@
|
||||
</action>
|
||||
<action name="actionQuit" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/exit_24x24.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/exit_24x24.png</normaloff>:/images/exit_24x24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Quit</string>
|
||||
@ -1130,7 +1116,8 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/highlight.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
@ -1141,7 +1128,8 @@
|
||||
</action>
|
||||
<action name="actionSMPlayer" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/smplayer_icon32.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/smplayer_icon32.png</normaloff>:/images/smplayer_icon32.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>SMPlayer</string>
|
||||
@ -1149,7 +1137,8 @@
|
||||
</action>
|
||||
<action name="actionMessenger" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/kdmconfig.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/kdmconfig.png</normaloff>:/images/kdmconfig.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Messenger</string>
|
||||
@ -1157,7 +1146,8 @@
|
||||
</action>
|
||||
<action name="actionAbout" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/informations_24x24.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/informations_24x24.png</normaloff>:/images/informations_24x24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>About</string>
|
||||
@ -1165,7 +1155,8 @@
|
||||
</action>
|
||||
<action name="actionSettings" >
|
||||
<property name="icon" >
|
||||
<iconset resource="images.qrc" >:/images/settings.png</iconset>
|
||||
<iconset resource="images.qrc" >
|
||||
<normaloff>:/images/settings.png</normaloff>:/images/settings.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Settings</string>
|
||||
|
@ -37,8 +37,10 @@
|
||||
#include "util/PixmapMerging.h"
|
||||
#include "LogoBar.h"
|
||||
#include "util/Widget.h"
|
||||
#include "gui/connect/InviteDialog.h"
|
||||
#include "gui/connect/AddFriendDialog.h"
|
||||
//#include "gui/connect/InviteDialog.h"
|
||||
//#include "gui/connect/AddFriendDialog.h"
|
||||
#include "gui/connect/ConnectFriendWizard.h"
|
||||
|
||||
#include "MessagesPopupDialog.h"
|
||||
#include "ShareManager.h"
|
||||
|
||||
@ -522,13 +524,21 @@ void MessengerWindow::addFriend2()
|
||||
}
|
||||
virtual int NeighLoadPEMString(std::string pem, std::string &id) = 0;
|
||||
#else
|
||||
|
||||
/*
|
||||
static AddFriendDialog *addDialog2 =
|
||||
new AddFriendDialog(networkDialog2, this);
|
||||
|
||||
std::string invite = "";
|
||||
addDialog2->setInfo(invite);
|
||||
addDialog2->show();
|
||||
*/
|
||||
ConnectFriendWizard* connwiz = new ConnectFriendWizard(this);
|
||||
|
||||
// set widget to be deleted after close
|
||||
connwiz->setAttribute( Qt::WA_DeleteOnClose, true);
|
||||
|
||||
|
||||
connwiz->show();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -63,11 +63,13 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent)
|
||||
setWizardStyle(ModernStyle);
|
||||
#endif
|
||||
|
||||
setOption(HaveHelpButton, true);
|
||||
connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
|
||||
// at this moment I don't know, what information should be in help
|
||||
// setOption(HaveHelpButton, true);
|
||||
// connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));
|
||||
|
||||
setPixmap(QWizard::LogoPixmap,
|
||||
QPixmap(":/images/connect/connectFriendLogo.png"));
|
||||
// we have no good pictures for watermarks
|
||||
// setPixmap(QWizard::WatermarkPixmap,
|
||||
// QPixmap(":/images/connectFriendWatermark.png"));
|
||||
setPixmap(QWizard::BannerPixmap,
|
||||
@ -75,55 +77,6 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent)
|
||||
|
||||
setWindowTitle(tr("Connect Friend Wizard"));
|
||||
|
||||
// setDefaultProperty("QTextEdit", "plainText", "textChanged");
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//!
|
||||
void ConnectFriendWizard::showHelp()
|
||||
{
|
||||
// static QString lastHelpMessage;
|
||||
|
||||
QString message = "Sorry, help wasn't implemented :(";
|
||||
/*
|
||||
switch (currentId()) {
|
||||
case Page_Intro:
|
||||
message = tr("The decision you make here will affect which page you "
|
||||
"get to see next.");
|
||||
break;
|
||||
//! [10] //! [11]
|
||||
case Page_Evaluate:
|
||||
message = tr("Make sure to provide a valid email address, such as "
|
||||
"toni.buddenbrook@example.de.");
|
||||
break;
|
||||
case Page_Register:
|
||||
message = tr("If you don't provide an upgrade key, you will be "
|
||||
"asked to fill in your details.");
|
||||
break;
|
||||
case Page_Details:
|
||||
message = tr("Make sure to provide a valid email address, such as "
|
||||
"thomas.gradgrind@example.co.uk.");
|
||||
break;
|
||||
case Page_Conclusion:
|
||||
message = tr("You must accept the terms and conditions of the "
|
||||
"license to proceed.");
|
||||
break;
|
||||
//! [12] //! [13]
|
||||
default:
|
||||
message = tr("This help is likely not to be of any help.");
|
||||
}
|
||||
//! [12]
|
||||
|
||||
if (lastHelpMessage == message)
|
||||
message = tr("Sorry, I already gave what help I could. "
|
||||
"Maybe you should try asking a human?");
|
||||
*/
|
||||
//! [14]
|
||||
QMessageBox::information(this, tr("Connect Friend Wizard Help"), message);
|
||||
//! [14]
|
||||
|
||||
// lastHelpMessage = message;
|
||||
//! [15]
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
@ -158,8 +111,6 @@ IntroPage::IntroPage(QWidget *parent)
|
||||
setSubTitle(tr("This wizard will help you to connect your friend "
|
||||
"to RetroShare network. There are two possible ways "
|
||||
"to do this:")) ;
|
||||
//topLabel = new QLabel(;
|
||||
//topLabel->setWordWrap(true);
|
||||
|
||||
textRadioButton = new QRadioButton(tr("&Enter the certificate manually"));
|
||||
certRadioButton = new QRadioButton(tr("&Use *.pqi files with "
|
||||
@ -167,7 +118,6 @@ IntroPage::IntroPage(QWidget *parent)
|
||||
textRadioButton->setChecked(true);
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout;
|
||||
//layout->addWidget(topLabel);
|
||||
layout->addWidget(textRadioButton);
|
||||
layout->addWidget(certRadioButton);
|
||||
setLayout(layout);
|
||||
@ -592,15 +542,6 @@ ConclusionPage::initializePage()
|
||||
break;
|
||||
}
|
||||
|
||||
// std::ostringstream out;
|
||||
|
||||
// std::list<std::string>::iterator it;
|
||||
// for(it = detail.signers.begin(); it != detail.signers.end(); it++)
|
||||
// {
|
||||
// out << rsPeers->getPeerName(*it) << " <" << *it << ">";
|
||||
// out << std::endl;
|
||||
// }
|
||||
|
||||
QString ts;
|
||||
std::list<std::string>::iterator it;
|
||||
for(it = detail.signers.begin(); it != detail.signers.end(); it++)
|
||||
@ -612,10 +553,6 @@ ConclusionPage::initializePage()
|
||||
ts.append( "\n" );
|
||||
}
|
||||
|
||||
|
||||
/* setup the gui */
|
||||
//--- setInfo(detail.name, trustString, detail.org,
|
||||
//--- detail.location, detail.email, out.str());
|
||||
nameEdit->setText( QString::fromStdString( detail.name ) ) ;
|
||||
trustEdit->setText(QString::fromStdString( trustString ) ) ;
|
||||
orgEdit->setText(QString::fromStdString( detail.org ) );
|
||||
@ -623,17 +560,9 @@ ConclusionPage::initializePage()
|
||||
countryEdit->setText( QString::fromStdString( detail.email ) );
|
||||
signersEdit->setPlainText( ts );
|
||||
|
||||
//setAuthCode(id, detail.authcode);
|
||||
authCodeEdit->setText( QString::fromStdString(detail.authcode) );
|
||||
}
|
||||
//
|
||||
//============================================================================
|
||||
//
|
||||
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
@ -16,10 +16,17 @@ class QGridLayout;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
//! A wizard for adding friends. Based on standard QWizard component
|
||||
|
||||
//! The process of adding friends follows this scheme:
|
||||
//! /-> Use text certificates \ /-> errorpage(if went wrong)
|
||||
//! intro -| |-> ->
|
||||
//! \-> Use *.pqi files / \-> fill peer details
|
||||
//!
|
||||
//! So, there are five possible pages in this wizard.
|
||||
|
||||
class ConnectFriendWizard : public QWizard
|
||||
{
|
||||
//
|
||||
{//
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -32,12 +39,11 @@ public:
|
||||
void accept();
|
||||
|
||||
private slots:
|
||||
void showHelp();
|
||||
//!
|
||||
// void showHelp(); // we'll have to implement it in future
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
//!
|
||||
//! Introduction page for "Add friend" wizard.
|
||||
class IntroPage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -54,7 +60,7 @@ private:
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
//!
|
||||
//! Text page (for exchnging text certificates) for "Add friend" wizard.
|
||||
class TextPage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -91,7 +97,7 @@ private slots:
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
//!
|
||||
//! A page for exchanging *.pqi files, for "Add friend" wizard.
|
||||
class CertificatePage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -121,7 +127,7 @@ private slots:
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
|
||||
//! Page for displaying error messages (for "Add friend" wizard).
|
||||
class ErrorMessagePage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -137,7 +143,10 @@ private:
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
//!
|
||||
//! Page for filling peer details in "Add friend" wizard.
|
||||
|
||||
//! Warning: This page duplicates functionality of the ConnectDialo class (and
|
||||
//! also some pieces of code). TODO: remove this duplication
|
||||
class ConclusionPage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -147,7 +156,6 @@ public:
|
||||
|
||||
void initializePage();
|
||||
int nextId() const;
|
||||
// void setVisible(bool visible);
|
||||
|
||||
private slots:
|
||||
// void printButtonClicked();
|
||||
|
Loading…
Reference in New Issue
Block a user