merged with latest upstream trunk
|
@ -269,7 +269,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
|
|||
{
|
||||
QTreeWidgetItem *item = ui.lobbyTreeWidget->currentItem();
|
||||
|
||||
ChatLobbyId id = item->data(COLUMN_DATA, ROLE_ID).toULongLong();
|
||||
//ChatLobbyId id = item->data(COLUMN_DATA, ROLE_ID).toULongLong();
|
||||
ChatLobbyFlags flags(item->data(COLUMN_DATA, ROLE_FLAGS).toUInt());
|
||||
|
||||
bool removed = false ;
|
||||
|
@ -376,7 +376,7 @@ static void updateItem(QTreeWidget *treeWidget, QTreeWidgetItem *item, ChatLobby
|
|||
+QObject::tr("Id:")+" "+QString::number(id,16) ;
|
||||
|
||||
if(lobby_flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
|
||||
tooltipstr += QObject::tr("\nSecurity: no anonymous ids") ;
|
||||
tooltipstr += QObject::tr("\nSecurity: no anonymous IDs") ;
|
||||
|
||||
item->setToolTip(0,tooltipstr) ;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ void ChatLobbyWidget::subscribeChatLobbyAs()
|
|||
return ;
|
||||
|
||||
RsGxsId gxs_id(action->data().toString().toStdString());
|
||||
uint32_t error_code ;
|
||||
//uint32_t error_code ;
|
||||
|
||||
if(rsMsgs->joinVisibleChatLobby(id,gxs_id))
|
||||
ChatDialog::chatFriend(ChatId(id),true) ;
|
||||
|
@ -795,7 +795,7 @@ void ChatLobbyWidget::subscribeChatLobbyAtItem(QTreeWidgetItem *item)
|
|||
if(!rsIdentity->getIdDetails(gxs_id,idd))
|
||||
return ;
|
||||
|
||||
if(flags & RS_CHAT_LOBBY_FLAGS_PGP_SIGNED)
|
||||
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.")) ;
|
||||
return ;
|
||||
|
@ -839,16 +839,18 @@ void ChatLobbyWidget::showBlankPage(ChatLobbyId id)
|
|||
ui.lobbyid_lineEdit->setText( QString::number((*it).lobby_id,16) );
|
||||
ui.lobbytopic_lineEdit->setText( RsHtml::plainText(it->lobby_topic) );
|
||||
ui.lobbytype_lineEdit->setText( (( (*it).lobby_flags & RS_CHAT_LOBBY_FLAGS_PUBLIC)?tr("Public"):tr("Private")) );
|
||||
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) );
|
||||
|
||||
QString text = tr("You're not subscribed to this lobby; Double click-it to enter and chat.") ;
|
||||
|
||||
if(my_ids.empty())
|
||||
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.") ;
|
||||
else
|
||||
text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ;
|
||||
if(my_ids.empty())
|
||||
{
|
||||
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.") ;
|
||||
else
|
||||
text += "\n\n"+tr("You will need to create an identity in order to join chat lobbies.") ;
|
||||
}
|
||||
|
||||
ui.lobbyInfoLabel->setText(text);
|
||||
return ;
|
||||
|
|
|
@ -717,9 +717,9 @@ void TransfersDialog::downloadListCustomPopupMenu( QPoint /*point*/ )
|
|||
}// for (int i = 0; i < lst.count(); ++i)
|
||||
}// if (!items.empty())
|
||||
|
||||
if (atLeastOne_Downloading) {
|
||||
if (atLeastOne_Waiting || atLeastOne_Downloading || atLeastOne_Queued || atLeastOne_Paused) {
|
||||
contextMnu.addMenu( &prioritySpeedMenu) ;
|
||||
}//if (atLeastOne_Downloading)
|
||||
}
|
||||
if (atLeastOne_Queued) {
|
||||
contextMnu.addMenu( &priorityQueueMenu) ;
|
||||
}//if (atLeastOne_Queued)
|
||||
|
@ -1076,6 +1076,7 @@ int TransfersDialog::addItem(int row, const FileInfo &fileInfo)
|
|||
}
|
||||
|
||||
return row;
|
||||
|
||||
}
|
||||
|
||||
int TransfersDialog::addPeerToItem(QStandardItem *dlItem, const QString& name, const QString& coreID, double dlspeed, uint32_t status, const FileProgressInfo& peerInfo)
|
||||
|
@ -1401,6 +1402,13 @@ void TransfersDialog::insertTransfers()
|
|||
}
|
||||
|
||||
ui.uploadsList->setSortingEnabled(true);
|
||||
|
||||
downloads = tr("Downloads") + " (" + QString::number(DLListModel->rowCount()) + ")";
|
||||
uploads = tr("Uploads") + " (" + QString::number(ULListModel->rowCount()) + ")" ;
|
||||
|
||||
ui.tabWidget->setTabText(0, downloads);
|
||||
ui.tabWidget_2->setTabText(0, uploads);
|
||||
|
||||
}
|
||||
|
||||
QString TransfersDialog::getPeerName(const RsPeerId& id) const
|
||||
|
|
|
@ -239,6 +239,9 @@ private:
|
|||
|
||||
/** Adds a new action to the toolbar. */
|
||||
void addAction(QAction *action, const char *slot = 0);
|
||||
|
||||
QString downloads;
|
||||
QString uploads;
|
||||
|
||||
/** Qt Designer generated object */
|
||||
Ui::TransfersDialog ui;
|
||||
|
|
|
@ -165,7 +165,7 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
|
|||
#if QT_VERSION >= 0x040700
|
||||
ui.email_input->setPlaceholderText(tr("[Optional] Visible to your friends, and friends of friends.")) ;
|
||||
ui.node_input->setPlaceholderText(tr("[Required] Examples: Home, Laptop,...")) ;
|
||||
ui.hiddenaddr_input->setPlaceholderText(tr("[Required] Examples: xa76giaf6ifda7ri63i263.onion (obtained by you from Tor)")) ;
|
||||
ui.hiddenaddr_input->setPlaceholderText(tr("[Required] Tor/I2P address - Examples: xa76giaf6ifda7ri63i263.onion (obtained by you from Tor)")) ;
|
||||
ui.name_input->setPlaceholderText(tr("[Required] Visible to your friends, and friends of friends."));
|
||||
ui.password_input->setPlaceholderText(tr("[Required] This password protects your private PGP key."));
|
||||
ui.password_input_2->setPlaceholderText(tr("[Required] Type the same password again here."));
|
||||
|
@ -458,7 +458,7 @@ void GenCertDialog::genPerson()
|
|||
/* Message Dialog */
|
||||
QMessageBox::warning(this,
|
||||
tr("Invalid hidden node"),
|
||||
tr("Please enter a valid address of the form: 31769173498.onion:7800"),
|
||||
tr("Please enter a valid address of the form: 31769173498.onion:7800 or [52 characters].b32.i2p"),
|
||||
QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>853</width>
|
||||
<height>592</height>
|
||||
<height>711</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -111,7 +111,7 @@
|
|||
</property>
|
||||
<property name="text">
|
||||
<string>You can create a new profile with this form.
|
||||
Alternatively you can use an existing profile. Just uncheck "Create a new profile"</string>
|
||||
Alternatively you can use an existing profile. Just uncheck "Create a new profile"</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -431,7 +431,7 @@ Alternatively you can use an existing profile. Just uncheck "Create a new profil
|
|||
<item>
|
||||
<widget class="QLabel" name="hiddenaddr_label">
|
||||
<property name="text">
|
||||
<string>Tor address</string>
|
||||
<string>hidden address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -593,7 +593,7 @@ anonymous, you can use a fake email.</string>
|
|||
<item>
|
||||
<widget class="QLabel" name="label_hiddenaddr2">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>This is a Tor Onion address of the form: xa76giaf6ifda7ri63i263.onion </p><p>In order to get one, you must configure Tor to create a new hidden service. If you do not yet have one, you can still go on, and make it right later in Retroshare's Options-&gt;Server-&gt;Tor configuration panel.</p></body></html></string>
|
||||
<string><html><head/><body><p>This can be a Tor Onion address of the form: xa76giaf6ifda7ri63i263.onion <br/>or an I2P address in the form: [52 characters].b32.i2p </p><p>In order to get one, you must configure either Tor or I2P to create a new hidden service / server tunnel. If you do not yet have one, you can still go on, and make it right later in Retroshare's Options-&gt;Server-&gt;Hidden Service configuration panel.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -761,6 +761,7 @@ anonymous, you can use a fake email.</string>
|
|||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>no_node_label</zorder>
|
||||
<zorder>genButton2</zorder>
|
||||
<zorder>header_label</zorder>
|
||||
<zorder>genprofileinfo_label</zorder>
|
||||
|
@ -772,17 +773,17 @@ anonymous, you can use a fake email.</string>
|
|||
<zorder>label_hiddenaddr2</zorder>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>StyledLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledLabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HeaderFrame</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>gui/common/HeaderFrame.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>StyledLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>gui/common/StyledLabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
|
|
|
@ -198,9 +198,9 @@ p, li { white-space: pre-wrap; }
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">When your friends send you a their invitations, Click to open the Add Friends window.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">When your friends send you their invitations, click to open the Add Friends window.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Cut and Paste your Friend's &quot;ID Certificates&quot; into the window and add them as friends.</span></p></body></html></string>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Paste your Friend's &quot;ID Certificates&quot; into the window and add them as friends.</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -283,7 +283,7 @@ p, li { white-space: pre-wrap; }
|
|||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Be Online at the same time, and RetroShare will automatically connect you!</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Be Online at the same time as your friends, and RetroShare will automatically connect you!</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Your client needs to find the RetroShare Network before it can make connections.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">This takes 5-30 minutes the first time you start up RetroShare</span></p>
|
||||
|
@ -368,12 +368,12 @@ p, li { white-space: pre-wrap; }
|
|||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">You can improve your Retroshare performance by opening an External Port. </span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">This will speed up connections and allow more people to connect with you </span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">This will speed up connections and allow more people to connect with you. </span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">The easiest way to do this is by enabling UPnP on your Wireless Box or Router.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">As each router is different, you need to find out your Router Model and Google for instructions.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">As each router is different, you will need to find out your Router Model and search the Internet for instructions.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">If none of this makes sense, don't worry about it Retroshare will still work.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">If none of this makes sense to you, don't worry about it Retroshare will still work.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></string>
|
||||
</property>
|
||||
|
@ -417,11 +417,11 @@ p, li { white-space: pre-wrap; }
|
|||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">Having trouble getting started with RetroShare?</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">1) look at the FAQ Wiki. This is a bit old, we trying to bring it up to date.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">1) Look at the FAQ Wiki. This is a bit old, we are trying to bring it up to date.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">2) check out the Online Forums. Ask questions and discuss features.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">2) Check out the Online Forums. Ask questions and discuss features.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">3) try the Internal RetroShare Forums </span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">3) Try the Internal RetroShare Forums </span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;"> - These come online once you are connected to friends.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt;">4) If you are still stuck. Email us.</span></p>
|
||||
|
|
|
@ -26,9 +26,11 @@
|
|||
#include "gui/common/UIStateHelper.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
#include <retroshare/rsreputations.h>
|
||||
|
||||
// Data Requests.
|
||||
#define IDDETAILSDIALOG_IDDETAILS 1
|
||||
|
||||
#define IDDETAILSDIALOG_REPLIST 2
|
||||
/******
|
||||
* #define ID_DEBUG 1
|
||||
*****/
|
||||
|
@ -51,39 +53,27 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
|
|||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->toolButton_Reputation);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingOverall);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingImplicit);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingOwn);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingPeers);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repModButton);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repMod_Accept);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repMod_Ban);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repMod_Negative);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repMod_Positive);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repMod_Custom);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->repMod_spinBox);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->ownOpinion_CB);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->overallOpinion_TF);
|
||||
mStateHelper->addWidget(IDDETAILSDIALOG_IDDETAILS, ui->neighborNodesOpinion_TF);
|
||||
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_KeyId);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingOverall);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingImplicit);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingOwn);
|
||||
mStateHelper->addLoadPlaceholder(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingPeers);
|
||||
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_KeyId);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgId);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_Type);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_LastUsed);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->lineEdit_GpgName);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingOverall);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingImplicit);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingOwn);
|
||||
mStateHelper->addClear(IDDETAILSDIALOG_IDDETAILS, ui->line_RatingPeers);
|
||||
|
||||
mStateHelper->setActive(IDDETAILSDIALOG_REPLIST, false);
|
||||
|
||||
/* Create token queue */
|
||||
mIdQueue = new TokenQueue(rsIdentity->getTokenService(), this);
|
||||
|
@ -95,9 +85,7 @@ IdDetailsDialog::IdDetailsDialog(const RsGxsGroupId& id, QWidget *parent) :
|
|||
|
||||
//connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(changeGroup()));
|
||||
connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
|
||||
// Hiding Rep Btn until that part is finished.
|
||||
ui->toolButton_Reputation->setVisible(false);
|
||||
connect(ui->ownOpinion_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(modifyReputation()));
|
||||
|
||||
requestIdDetails();
|
||||
}
|
||||
|
@ -111,6 +99,24 @@ IdDetailsDialog::~IdDetailsDialog()
|
|||
delete(mIdQueue);
|
||||
}
|
||||
|
||||
static QString getHumanReadableDuration(uint32_t seconds)
|
||||
{
|
||||
if(seconds < 60)
|
||||
return QString(QObject::tr("%1 seconds ago")).arg(seconds) ;
|
||||
else if(seconds < 120)
|
||||
return QString(QObject::tr("%1 minute ago")).arg(seconds/60) ;
|
||||
else if(seconds < 3600)
|
||||
return QString(QObject::tr("%1 minutes ago")).arg(seconds/60) ;
|
||||
else if(seconds < 7200)
|
||||
return QString(QObject::tr("%1 hour ago")).arg(seconds/3600) ;
|
||||
else if(seconds < 24*3600)
|
||||
return QString(QObject::tr("%1 hours ago")).arg(seconds/3600) ;
|
||||
else if(seconds < 2*24*3600)
|
||||
return QString(QObject::tr("%1 day ago")).arg(seconds/86400) ;
|
||||
else
|
||||
return QString(QObject::tr("%1 days ago")).arg(seconds/86400) ;
|
||||
}
|
||||
|
||||
void IdDetailsDialog::insertIdDetails(uint32_t token)
|
||||
{
|
||||
mStateHelper->setLoading(IDDETAILSDIALOG_IDDETAILS, false);
|
||||
|
@ -120,7 +126,7 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
|||
if (!rsIdentity->getGroupData(token, datavector))
|
||||
{
|
||||
mStateHelper->setActive(IDDETAILSDIALOG_IDDETAILS, false);
|
||||
mStateHelper->clear(IDDETAILSDIALOG_IDDETAILS);
|
||||
mStateHelper->clear(IDDETAILSDIALOG_REPLIST);
|
||||
|
||||
ui->lineEdit_KeyId->setText("ERROR GETTING KEY!");
|
||||
|
||||
|
@ -153,6 +159,9 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
|||
//ui->lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash.toStdString()));
|
||||
ui->lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId.toStdString()));
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
ui->lineEdit_LastUsed->setText(getHumanReadableDuration(now - data.mLastUsageTS)) ;
|
||||
|
||||
QPixmap pixmap;
|
||||
|
||||
if(data.mImage.mSize > 0 && pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG"))
|
||||
|
@ -217,82 +226,111 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
|||
}
|
||||
else
|
||||
ui->lineEdit_Type->setText(tr("Anonymous identity")) ;
|
||||
|
||||
// if (isOwnId)
|
||||
// {
|
||||
// ui->radioButton_IdYourself->setChecked(true);
|
||||
// }
|
||||
// else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
||||
// {
|
||||
// if (data.mPgpKnown)
|
||||
// {
|
||||
// if (rsPeers->isGPGAccepted(data.mPgpId))
|
||||
// {
|
||||
// ui->radioButton_IdFriend->setChecked(true);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ui->radioButton_IdFOF->setChecked(true);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ui->radioButton_IdOther->setChecked(true);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ui->radioButton_IdPseudo->setChecked(true);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
if (isOwnId)
|
||||
{
|
||||
//mStateHelper->setWidgetEnabled(ui->toolButton_Reputation, false);
|
||||
mStateHelper->setWidgetEnabled(ui->ownOpinion_CB, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// No Reputation yet!
|
||||
//mStateHelper->setWidgetEnabled(ui->toolButton_Reputation, /*true*/ false);
|
||||
mStateHelper->setWidgetEnabled(ui->ownOpinion_CB, true);
|
||||
}
|
||||
|
||||
/* now fill in the reputation information */
|
||||
ui->line_RatingOverall->setText("Overall Rating TODO");
|
||||
ui->line_RatingOwn->setText("Own Rating TODO");
|
||||
/* now fill in the reputation information */
|
||||
|
||||
#ifdef SUSPENDED
|
||||
if (data.mPgpKnown)
|
||||
{
|
||||
ui->line_RatingImplicit->setText("+50 Known PGP");
|
||||
ui->line_RatingImplicit->setText(tr("+50 Known PGP"));
|
||||
}
|
||||
else if (data.mMeta.mGroupFlags & RSGXSID_GROUPFLAG_REALID)
|
||||
{
|
||||
ui->line_RatingImplicit->setText("+10 UnKnown PGP");
|
||||
ui->line_RatingImplicit->setText(tr("+10 UnKnown PGP"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->line_RatingImplicit->setText("+5 Anon Id");
|
||||
ui->line_RatingImplicit->setText(tr("+5 Anon Id"));
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mOverallScore);
|
||||
ui->line_RatingOverall->setText(rating);
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mIdScore);
|
||||
ui->line_RatingImplicit->setText(rating);
|
||||
}
|
||||
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mOwnOpinion);
|
||||
ui->line_RatingOwn->setText(rating);
|
||||
}
|
||||
#endif
|
||||
|
||||
RsReputations::ReputationInfo info ;
|
||||
rsReputations->getReputationInfo(RsGxsId(data.mMeta.mGroupId),info) ;
|
||||
|
||||
ui->neighborNodesOpinion_TF->setText(QString::number(info.mOverallReputationScore-1.0f));
|
||||
|
||||
ui->overallOpinion_TF->setText(QString::number(info.mOverallReputationScore-1.0f) +" ("+
|
||||
((info.mAssessment == RsReputations::ASSESSMENT_OK)? tr("OK") : tr("Banned")) +")" ) ;
|
||||
|
||||
switch(info.mOwnOpinion)
|
||||
{
|
||||
QString rating = QString::number(data.mReputation.mPeerOpinion);
|
||||
ui->line_RatingPeers->setText(rating);
|
||||
case RsReputations::OPINION_NEGATIVE: ui->ownOpinion_CB->setCurrentIndex(0); break ;
|
||||
case RsReputations::OPINION_NEUTRAL : ui->ownOpinion_CB->setCurrentIndex(1); break ;
|
||||
case RsReputations::OPINION_POSITIVE: ui->ownOpinion_CB->setCurrentIndex(2); break ;
|
||||
default:
|
||||
std::cerr << "Unexpected value in own opinion: " << info.mOwnOpinion << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void IdDetailsDialog::modifyReputation()
|
||||
{
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "IdDialog::modifyReputation()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
RsGxsId id(ui->lineEdit_KeyId->text().toStdString());
|
||||
|
||||
RsReputations::Opinion op ;
|
||||
|
||||
switch(ui->ownOpinion_CB->currentIndex())
|
||||
{
|
||||
case 0: op = RsReputations::OPINION_NEGATIVE ; break ;
|
||||
case 1: op = RsReputations::OPINION_NEUTRAL ; break ;
|
||||
case 2: op = RsReputations::OPINION_POSITIVE ; break ;
|
||||
default:
|
||||
std::cerr << "Wrong value from opinion combobox. Bug??" << std::endl;
|
||||
|
||||
}
|
||||
rsReputations->setOwnOpinion(id,op) ;
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "IdDialog::modifyReputation() ID: " << id << " Mod: " << mod;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
#ifdef SUSPENDED
|
||||
// Cyril: apparently the old reputation system was in used here. It's based on GXS data exchange, and probably not
|
||||
// very efficient because of this.
|
||||
|
||||
uint32_t token;
|
||||
if (!rsIdentity->submitOpinion(token, id, false, op))
|
||||
{
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "IdDialog::modifyReputation() Error submitting Opinion";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "IdDialog::modifyReputation() queuingRequest(), token: " << token;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
// trigger refresh when finished.
|
||||
// basic / anstype are not needed.
|
||||
requestIdDetails();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void IdDetailsDialog::requestIdDetails()
|
||||
{
|
||||
mIdQueue->cancelActiveRequestTokens(IDDETAILSDIALOG_IDDETAILS);
|
||||
|
@ -318,6 +356,32 @@ void IdDetailsDialog::requestIdDetails()
|
|||
mIdQueue->requestGroupInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, IDDETAILSDIALOG_IDDETAILS);
|
||||
}
|
||||
|
||||
void IdDetailsDialog::requestRepList()
|
||||
{
|
||||
// Removing this for the moment.
|
||||
return;
|
||||
|
||||
mStateHelper->setLoading(IDDETAILSDIALOG_REPLIST, true);
|
||||
|
||||
mIdQueue->cancelActiveRequestTokens(IDDETAILSDIALOG_REPLIST);
|
||||
|
||||
std::list<RsGxsGroupId> groupIds;
|
||||
groupIds.push_back(mId);
|
||||
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
|
||||
uint32_t token;
|
||||
mIdQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, groupIds, IDDETAILSDIALOG_REPLIST);
|
||||
}
|
||||
|
||||
void IdDetailsDialog::insertRepList(uint32_t token)
|
||||
{
|
||||
Q_UNUSED(token)
|
||||
mStateHelper->setLoading(IDDETAILSDIALOG_REPLIST, false);
|
||||
mStateHelper->setActive(IDDETAILSDIALOG_REPLIST, true);
|
||||
}
|
||||
|
||||
void IdDetailsDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
||||
{
|
||||
if (queue != mIdQueue) {
|
||||
|
@ -334,7 +398,11 @@ void IdDetailsDialog::loadRequest(const TokenQueue *queue, const TokenRequest &r
|
|||
case IDDETAILSDIALOG_IDDETAILS:
|
||||
insertIdDetails(req.mToken);
|
||||
break;
|
||||
|
||||
|
||||
case IDDETAILSDIALOG_REPLIST:
|
||||
insertRepList(req.mToken);
|
||||
break;
|
||||
|
||||
default:
|
||||
std::cerr << "IdDetailsDialog::loadRequest() ERROR";
|
||||
std::cerr << std::endl;
|
||||
|
|
|
@ -46,9 +46,15 @@ public:
|
|||
/* TokenResponse */
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
|
||||
private:
|
||||
private slots:
|
||||
void modifyReputation();
|
||||
|
||||
private :
|
||||
void requestIdDetails();
|
||||
void insertIdDetails(uint32_t token);
|
||||
|
||||
void requestRepList();
|
||||
void insertRepList(uint32_t token);
|
||||
|
||||
private:
|
||||
RsGxsGroupId mId;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>698</width>
|
||||
<height>446</height>
|
||||
<height>472</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -134,7 +134,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="8" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -147,6 +147,23 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_LastUsed">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>Last used:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
|
@ -183,206 +200,131 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="reputationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Your opinion:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Neighbor nodes:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="ownOpinion_CB">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Your own opinion about an identity rules the visibility of that identity for yourself,</p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">and is shared among friends. A final score is calculated according to a formula that accounts your own opinion and your friends' opinions about someone:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> S = own_opinion * a + friends_opinion * (1-a)</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The factor 'a' depends on the type of ID. </p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- anonymous IDs: </p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- PGP-signed IDs by unknown PGP keys: a=</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">S &lt; -0.5: Posts are not stored, nor forwarded </p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">S &lt; 0.2: Posts are hidden, but still transmitted</p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">S &lt; 0.0: </p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The overall rating is computed in such a way that it is not possible for a single person to deterministically change someone's status at neighbor nodes.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Negative</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>../icons/yellow_biohazard64.png</normaloff>../icons/yellow_biohazard64.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Neutral</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Positive</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="overallOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="reputationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOverall">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Implicit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingImplicit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Opinion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOwn">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Peers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingPeers">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_Reputation">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit Reputation</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit_24.png</normaloff>:/images/edit_24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="tweakGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Tweak Opinion</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Accept">
|
||||
<property name="text">
|
||||
<string>Accept (+100)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Positive">
|
||||
<property name="text">
|
||||
<string>Positive (+10)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Negative">
|
||||
<property name="text">
|
||||
<string>Negative (-10)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Ban">
|
||||
<property name="text">
|
||||
<string>Ban (-100)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Custom">
|
||||
<property name="text">
|
||||
<string>Custom</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="repMod_spinBox">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="repModButton">
|
||||
<property name="text">
|
||||
<string>Modify</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
@ -395,7 +337,7 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="margin">
|
||||
<number>9</number>
|
||||
|
|
|
@ -1,113 +1,115 @@
|
|||
/*
|
||||
* Retroshare Identity.
|
||||
*
|
||||
* Copyright 2012-2012 by Robert Fernie.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2.1 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IDENTITYDIALOG_H
|
||||
#define IDENTITYDIALOG_H
|
||||
|
||||
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
#include "util/TokenQueue.h"
|
||||
|
||||
#define IMAGE_IDDIALOG ":/icons/friends_128.png"
|
||||
|
||||
namespace Ui {
|
||||
class IdDialog;
|
||||
}
|
||||
|
||||
class UIStateHelper;
|
||||
class QTreeWidgetItem;
|
||||
|
||||
class IdDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IdDialog(QWidget *parent = 0);
|
||||
~IdDialog();
|
||||
|
||||
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDDIALOG) ; } //MainPage
|
||||
virtual QString pageName() const { return tr("People") ; } //MainPage
|
||||
virtual QString helpText() const { return ""; } //MainPage
|
||||
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
|
||||
protected:
|
||||
virtual void updateDisplay(bool complete);
|
||||
|
||||
private slots:
|
||||
void filterComboBoxChanged();
|
||||
void filterChanged(const QString &text);
|
||||
|
||||
void addIdentity();
|
||||
void removeIdentity();
|
||||
void editIdentity();
|
||||
void chatIdentity();
|
||||
void sendMsg();
|
||||
|
||||
|
||||
void updateSelection();
|
||||
|
||||
void todo();
|
||||
void modifyReputation();
|
||||
|
||||
/** Create the context popup menu and it's submenus */
|
||||
void IdListCustomPopupMenu( QPoint point );
|
||||
|
||||
void addtoContacts();
|
||||
void removefromContacts();
|
||||
|
||||
|
||||
private:
|
||||
void processSettings(bool load);
|
||||
|
||||
void requestIdDetails();
|
||||
void insertIdDetails(uint32_t token);
|
||||
|
||||
void requestIdList();
|
||||
void requestIdData(std::list<RsGxsGroupId> &ids);
|
||||
bool fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item, const RsPgpId &ownPgpId, int accept);
|
||||
void insertIdList(uint32_t token);
|
||||
void filterIds();
|
||||
|
||||
void requestRepList();
|
||||
void insertRepList(uint32_t token);
|
||||
|
||||
void requestIdEdit(std::string &id);
|
||||
void showIdEdit(uint32_t token);
|
||||
|
||||
private:
|
||||
TokenQueue *mIdQueue;
|
||||
UIStateHelper *mStateHelper;
|
||||
|
||||
RsGxsGroupId mId;
|
||||
|
||||
QTreeWidgetItem *contactsItem;
|
||||
QTreeWidgetItem *allItem;
|
||||
|
||||
/* UI - Designer */
|
||||
Ui::IdDialog *ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
/*
|
||||
* Retroshare Identity.
|
||||
*
|
||||
* Copyright 2012-2012 by Robert Fernie.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2.1 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef IDENTITYDIALOG_H
|
||||
#define IDENTITYDIALOG_H
|
||||
|
||||
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
||||
|
||||
#include <retroshare/rsidentity.h>
|
||||
|
||||
#include "util/TokenQueue.h"
|
||||
|
||||
#define IMAGE_IDDIALOG ":/icons/friends_128.png"
|
||||
|
||||
namespace Ui {
|
||||
class IdDialog;
|
||||
}
|
||||
|
||||
class UIStateHelper;
|
||||
class QTreeWidgetItem;
|
||||
|
||||
class IdDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
IdDialog(QWidget *parent = 0);
|
||||
~IdDialog();
|
||||
|
||||
virtual QIcon iconPixmap() const { return QIcon(IMAGE_IDDIALOG) ; } //MainPage
|
||||
virtual QString pageName() const { return tr("People") ; } //MainPage
|
||||
virtual QString helpText() const { return ""; } //MainPage
|
||||
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
|
||||
protected:
|
||||
virtual void updateDisplay(bool complete);
|
||||
|
||||
private slots:
|
||||
void filterComboBoxChanged();
|
||||
void filterChanged(const QString &text);
|
||||
|
||||
void addIdentity();
|
||||
void removeIdentity();
|
||||
void editIdentity();
|
||||
void chatIdentity();
|
||||
void sendMsg();
|
||||
|
||||
|
||||
void updateSelection();
|
||||
|
||||
void todo();
|
||||
void modifyReputation();
|
||||
|
||||
/** Create the context popup menu and it's submenus */
|
||||
void IdListCustomPopupMenu( QPoint point );
|
||||
|
||||
void addtoContacts();
|
||||
void removefromContacts();
|
||||
|
||||
void banPerson();
|
||||
void unbanPerson();
|
||||
|
||||
private:
|
||||
void processSettings(bool load);
|
||||
|
||||
void requestIdDetails();
|
||||
void insertIdDetails(uint32_t token);
|
||||
|
||||
void requestIdList();
|
||||
void requestIdData(std::list<RsGxsGroupId> &ids);
|
||||
bool fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item, const RsPgpId &ownPgpId, int accept);
|
||||
void insertIdList(uint32_t token);
|
||||
void filterIds();
|
||||
|
||||
void requestRepList();
|
||||
void insertRepList(uint32_t token);
|
||||
|
||||
void requestIdEdit(std::string &id);
|
||||
void showIdEdit(uint32_t token);
|
||||
|
||||
private:
|
||||
TokenQueue *mIdQueue;
|
||||
UIStateHelper *mStateHelper;
|
||||
|
||||
QTreeWidgetItem *contactsItem;
|
||||
QTreeWidgetItem *allItem;
|
||||
|
||||
RsGxsGroupId mId;
|
||||
|
||||
/* UI - Designer */
|
||||
Ui::IdDialog *ui;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>826</width>
|
||||
<height>752</height>
|
||||
<height>630</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -20,7 +20,16 @@
|
|||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -38,7 +47,16 @@
|
|||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -73,6 +91,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_count">
|
||||
<property name="text">
|
||||
<string>()</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="titleBarSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -129,7 +154,16 @@
|
|||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -208,6 +242,14 @@
|
|||
<string>Owned by</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignLeading|AlignVCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -304,29 +346,21 @@
|
|||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Identity name :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
|
@ -334,6 +368,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Identity name :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="PgpId_LB">
|
||||
<property name="text">
|
||||
|
@ -457,7 +498,7 @@
|
|||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<height>2</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
@ -468,192 +509,140 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="reputationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOverall">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>Implicit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingImplicit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Opinion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingOwn">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Peers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="line_RatingPeers">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_Reputation">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<widget class="QGroupBox" name="reputationGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Reputation</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Edit reputation</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/edit_24.png</normaloff>:/images/edit_24.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="tweakGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Tweak Opinion</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Accept">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Accept (+100)</string>
|
||||
<string>Your opinion:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Positive">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Positive (+10)</string>
|
||||
<string>Neighbor nodes:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Negative">
|
||||
<property name="text">
|
||||
<string>Negative (-10)</string>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="ownOpinion_CB">
|
||||
<property name="toolTip">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Your own opinion about an identity rules the visibility of that identity for yourself,</p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">and is shared among friends. A final score is calculated according to a formula that accounts your own opinion and your friends' opinions about someone:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> S = own_opinion * a + friends_opinion * (1-a)</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The factor 'a' depends on the type of ID. </p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- anonymous IDs: </p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">- PGP-signed IDs by unknown PGP keys: a=</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">S &lt; -0.5: Posts are not stored, nor forwarded </p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">S &lt; 0.2: Posts are hidden, but still transmitted</p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">S &lt; 0.0: </p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The overall rating is computed in such a way that it is not possible for a single person to deterministically change someone's status at neighbor nodes.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Ban">
|
||||
<property name="text">
|
||||
<string>Ban (-100)</string>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="repMod_Custom">
|
||||
<property name="text">
|
||||
<string>Custom</string>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="text">
|
||||
<string>Negative</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>../icons/yellow_biohazard64.png</normaloff>../icons/yellow_biohazard64.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="repMod_spinBox">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="text">
|
||||
<string>Neutral</string>
|
||||
</property>
|
||||
</item>
|
||||
</layout>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Positive</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="repModButton">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="overallOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Modify</string>
|
||||
<string>Overall:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
|
@ -730,9 +719,6 @@
|
|||
<tabstop>lineEdit_KeyId</tabstop>
|
||||
<tabstop>lineEdit_GpgId</tabstop>
|
||||
<tabstop>lineEdit_GpgName</tabstop>
|
||||
<tabstop>line_RatingOverall</tabstop>
|
||||
<tabstop>line_RatingImplicit</tabstop>
|
||||
<tabstop>line_RatingOwn</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
|
|
|
@ -113,10 +113,16 @@ void IdEditDialog::changeAvatar()
|
|||
}
|
||||
}
|
||||
|
||||
void IdEditDialog::setupNewId(bool pseudo)
|
||||
void IdEditDialog::setupNewId(bool pseudo,bool enable_anon)
|
||||
{
|
||||
setWindowTitle(tr("New identity"));
|
||||
|
||||
if(pseudo && !enable_anon)
|
||||
{
|
||||
std::cerr << "IdEditDialog::setupNewId: Error. Cannot init with pseudo-anonymous id when anon ids are disabled." << std::endl;
|
||||
pseudo = false ;
|
||||
}
|
||||
|
||||
mIsNew = true;
|
||||
mGroupId.clear();
|
||||
|
||||
|
@ -139,7 +145,11 @@ void IdEditDialog::setupNewId(bool pseudo)
|
|||
|
||||
ui->frame_Tags->setHidden(true);
|
||||
ui->radioButton_GpgId->setEnabled(true);
|
||||
ui->radioButton_Pseudo->setEnabled(true);
|
||||
|
||||
if(enable_anon)
|
||||
ui->radioButton_Pseudo->setEnabled(true);
|
||||
else
|
||||
ui->radioButton_Pseudo->setEnabled(false);
|
||||
|
||||
setAvatar(QPixmap());
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
IdEditDialog(QWidget *parent = 0);
|
||||
~IdEditDialog();
|
||||
|
||||
void setupNewId(bool pseudo);
|
||||
void setupNewId(bool pseudo, bool enable_anon = true);
|
||||
void setupExistingId(const RsGxsGroupId &keyId);
|
||||
void enforceNoAnonIds() ;
|
||||
|
||||
|
|
|
@ -677,12 +677,20 @@ void MainWindow::updateTrayCombine()
|
|||
updateFriends();
|
||||
}
|
||||
|
||||
void MainWindow::toggleStatusToolTip(bool toggle){
|
||||
if(!toggle)return;
|
||||
QString tray = "RetroShare\n";
|
||||
tray += "\n" + nameAndLocation;
|
||||
trayIcon->setToolTip(tray);
|
||||
}
|
||||
|
||||
void MainWindow::updateStatus()
|
||||
{
|
||||
// This call is essential to remove locks due to QEventLoop re-entrance while asking gpg passwds. Dont' remove it!
|
||||
if(RsAutoUpdatePage::eventsLocked())
|
||||
return;
|
||||
|
||||
if(Settings->valueFromGroup("StatusBar", "DisableSysTrayToolTip", QVariant(false)).toBool())
|
||||
return;
|
||||
float downKb = 0;
|
||||
float upKb = 0;
|
||||
rsConfig->GetCurrentDataRates(downKb, upKb);
|
||||
|
|
|
@ -184,6 +184,7 @@ public slots:
|
|||
void setNewPage(int page);
|
||||
void setCompactStatusMode(bool compact);
|
||||
|
||||
void toggleStatusToolTip(bool toggle);
|
||||
protected:
|
||||
/** Default Constructor */
|
||||
MainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
|
|
|
@ -1237,8 +1237,16 @@ void MessagesDialog::insertMessages()
|
|||
else if(it->msgflags & RS_MSG_DISTANT)
|
||||
{
|
||||
item->setIcon(COLUMN_SIGNATURE, QIcon(":/images/blue_lock_open.png")) ;
|
||||
item->setToolTip(COLUMN_SIGNATURE, tr("This message comes from a distant person.")) ;
|
||||
item->setIcon(COLUMN_SUBJECT, QIcon(":/images/message-mail-read.png")) ;
|
||||
|
||||
if (msgbox == RS_MSG_INBOX )
|
||||
{
|
||||
item->setToolTip(COLUMN_SIGNATURE, tr("This message comes from a distant person.")) ;
|
||||
}
|
||||
else if (msgbox == RS_MSG_OUTBOX)
|
||||
{
|
||||
item->setToolTip(COLUMN_SIGNATURE, tr("This message goes to a distant person.")) ;
|
||||
}
|
||||
|
||||
if(it->msgflags & RS_MSG_SIGNED)
|
||||
{
|
||||
|
|
|
@ -393,6 +393,8 @@ void NetworkDialog::insertConnect()
|
|||
|
||||
/* get a link to the table */
|
||||
QTreeWidget *connectWidget = ui.connectTreeWidget;
|
||||
/* disable sorting while editing the table */
|
||||
connectWidget->setSortingEnabled(false);
|
||||
|
||||
//remove items
|
||||
int index = 0;
|
||||
|
@ -560,7 +562,10 @@ void NetworkDialog::insertConnect()
|
|||
}
|
||||
connectWidget->addTopLevelItem(self_item);
|
||||
|
||||
connectWidget->update(); /* update display */
|
||||
/* enable sorting */
|
||||
connectWidget->setSortingEnabled(true);
|
||||
/* update display */
|
||||
connectWidget->update();
|
||||
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
|
|
|
@ -183,11 +183,26 @@ void QuickStartWizard::on_pushButtonSharesExit_clicked()
|
|||
close();
|
||||
}
|
||||
|
||||
void QuickStartWizard::on_pushButtonSystemBack_clicked()
|
||||
void QuickStartWizard::on_pushButtonStyleBack_clicked()
|
||||
{
|
||||
ui.pagesWizard->setCurrentIndex(2);
|
||||
}
|
||||
|
||||
void QuickStartWizard::on_pushButtonStyleNext_clicked()
|
||||
{
|
||||
ui.pagesWizard->setCurrentIndex(4);
|
||||
}
|
||||
|
||||
void QuickStartWizard::on_pushButtonStyleExit_clicked()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
void QuickStartWizard::on_pushButtonSystemBack_clicked()
|
||||
{
|
||||
ui.pagesWizard->setCurrentIndex(3);
|
||||
}
|
||||
|
||||
void QuickStartWizard::on_pushButtonSystemFinish_clicked()
|
||||
{
|
||||
Settings->setStartMinimized(ui.checkBoxStartMinimized->isChecked());
|
||||
|
@ -390,6 +405,9 @@ QuickStartWizard::loadGeneral()
|
|||
ui.checkBoxStartMinimized->setChecked(Settings->getStartMinimized());
|
||||
ui.checkBoxQuit->setChecked(Settings->value("doQuit", false).toBool());
|
||||
|
||||
ui.rbtPageOnToolBar->setChecked(Settings->getPageButtonLoc());
|
||||
ui.rbtPageOnListItem->setChecked(!Settings->getPageButtonLoc());
|
||||
|
||||
//ui.checkBoxQuickWizard->setChecked(settings.value(QString::fromUtf8("FirstRun"), false).toBool());
|
||||
}
|
||||
|
||||
|
@ -419,6 +437,12 @@ void QuickStartWizard::loadNetwork()
|
|||
case RS_NETMODE_UDP:
|
||||
netIndex = 1;
|
||||
break;
|
||||
case RS_NETMODE_HIDDEN:
|
||||
ui.netModeLabel->hide();
|
||||
ui.netModeComboBox->hide();
|
||||
ui.discoveryLabel->hide();
|
||||
ui.discoveryComboBox->hide();
|
||||
break;
|
||||
default:
|
||||
case RS_NETMODE_UPNP:
|
||||
netIndex = 0;
|
||||
|
@ -472,6 +496,8 @@ void QuickStartWizard::saveChanges()
|
|||
|
||||
//bool saveAddr = false;
|
||||
|
||||
Settings->setPageButtonLoc(ui.rbtPageOnToolBar->isChecked());
|
||||
|
||||
|
||||
RsPeerDetails detail;
|
||||
RsPeerId ownId = rsPeers->getOwnId();
|
||||
|
|
|
@ -60,6 +60,9 @@ private Q_SLOTS:
|
|||
void on_pushButtonSharesExit_clicked();
|
||||
void on_pushButtonSharesNext_clicked();
|
||||
void on_pushButtonSharesBack_clicked();
|
||||
void on_pushButtonStyleExit_clicked();
|
||||
void on_pushButtonStyleNext_clicked();
|
||||
void on_pushButtonStyleBack_clicked();
|
||||
void on_pushButtonWelcomeExit_clicked();
|
||||
void on_pushButtonWelcomeNext_clicked();
|
||||
void on_pushButtonConnectionExit_clicked();
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>445</width>
|
||||
<width>457</width>
|
||||
<height>370</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -36,7 +36,16 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -48,11 +57,20 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QStackedWidget" name="pagesWizard">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageWelcome">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -73,7 +91,16 @@
|
|||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -188,7 +215,16 @@ p, li { white-space: pre-wrap; }
|
|||
</widget>
|
||||
<widget class="QWidget" name="pageConnection">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -291,7 +327,7 @@ p, li { white-space: pre-wrap; }
|
|||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLabel" name="netModeLabel">
|
||||
<property name="text">
|
||||
<string>Connection :</string>
|
||||
</property>
|
||||
|
@ -317,7 +353,7 @@ p, li { white-space: pre-wrap; }
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="discoveryLabel">
|
||||
<property name="text">
|
||||
<string>Discovery :</string>
|
||||
</property>
|
||||
|
@ -443,7 +479,16 @@ p, li { white-space: pre-wrap; }
|
|||
</widget>
|
||||
<widget class="QWidget" name="pageShares">
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -674,9 +719,137 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageStyle">
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="grpToolBar">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>228</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>RetroShare Page Display Style</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labelPageToolBar">
|
||||
<property name="text">
|
||||
<string>Where do you want to have the buttons for the page?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="rbtPageOnToolBar">
|
||||
<property name="text">
|
||||
<string>ToolBar View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="rbtPageOnListItem">
|
||||
<property name="text">
|
||||
<string>List View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>204</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonStyleBack">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>< Back</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonStyleNext">
|
||||
<property name="text">
|
||||
<string>Next ></string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButtonStyleExit">
|
||||
<property name="text">
|
||||
<string>Exit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageSystem">
|
||||
<layout class="QGridLayout" name="gridLayout_16">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -697,8 +870,17 @@ p, li { white-space: pre-wrap; }
|
|||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_15">
|
||||
<property name="margin">
|
||||
<number>4</number>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
|
|
|
@ -590,7 +590,7 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role == Qt::SizeHintRole)
|
||||
/*if (role == Qt::SizeHintRole)
|
||||
{
|
||||
int defw = QFontMetricsF(QWidget().font()).width(headerData(section,Qt::Horizontal,Qt::DisplayRole).toString()) ;
|
||||
int defh = QFontMetricsF(QWidget().font()).height();
|
||||
|
@ -600,7 +600,7 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int
|
|||
defw = 200/16.0*defh;
|
||||
}
|
||||
return QSize(defw, defh);
|
||||
}
|
||||
}*/
|
||||
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
|
@ -636,7 +636,7 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int
|
|||
}
|
||||
QVariant FlatStyle_RDM::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role == Qt::SizeHintRole)
|
||||
/*if (role == Qt::SizeHintRole)
|
||||
{
|
||||
int defw = QFontMetricsF(QWidget().font()).width(headerData(section,Qt::Horizontal,Qt::DisplayRole).toString()) ;
|
||||
int defh = QFontMetricsF(QWidget().font()).height();
|
||||
|
@ -646,7 +646,7 @@ QVariant FlatStyle_RDM::headerData(int section, Qt::Orientation orientation, int
|
|||
defw = defh*200/16.0;
|
||||
}
|
||||
return QSize(defw, defh);
|
||||
}
|
||||
}*/
|
||||
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
|
|
|
@ -195,7 +195,9 @@ void RetroShareLink::fromUrl(const QUrl& url)
|
|||
|
||||
if (url.scheme() != RSLINK_SCHEME) {
|
||||
/* No RetroShare-Link */
|
||||
#ifdef DEBUG_RSLINK
|
||||
std::cerr << "Not a RS link: scheme=" << url.scheme().toStdString() << std::endl;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -244,6 +244,9 @@ void SearchDialog::processSettings(bool bLoad)
|
|||
|
||||
// state of splitter
|
||||
ui.splitter->restoreState(Settings->value("Splitter").toByteArray());
|
||||
|
||||
ui._max_results_SB->setValue(Settings->value("MaxResults").toInt());
|
||||
|
||||
} else {
|
||||
// save settings
|
||||
|
||||
|
@ -252,6 +255,8 @@ void SearchDialog::processSettings(bool bLoad)
|
|||
|
||||
// state of splitter
|
||||
Settings->setValue("Splitter", ui.splitter->saveState());
|
||||
|
||||
Settings->setValue("MaxResults", ui._max_results_SB->value());
|
||||
}
|
||||
|
||||
Settings->endGroup();
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
/** Constructor */
|
||||
WikiDialog::WikiDialog(QWidget *parent)
|
||||
: MainPage(parent)
|
||||
: RsGxsUpdateBroadcastPage(rsWiki, parent)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
@ -103,11 +103,6 @@ WikiDialog::WikiDialog(QWidget *parent)
|
|||
connect(ui.groupTreeWidget, SIGNAL(treeCustomContextMenuRequested(QPoint)), this, SLOT(groupListCustomPopupMenu(QPoint)));
|
||||
connect(ui.groupTreeWidget, SIGNAL(treeItemActivated(QString)), this, SLOT(wikiGroupChanged(QString)));
|
||||
|
||||
|
||||
QTimer *timer = new QTimer(this);
|
||||
timer->connect(timer, SIGNAL(timeout()), this, SLOT(checkUpdate()));
|
||||
timer->start(1000);
|
||||
|
||||
/* setup TokenQueue */
|
||||
mWikiQueue = new TokenQueue(rsWiki->getTokenService(), this);
|
||||
|
||||
|
@ -118,8 +113,6 @@ WikiDialog::WikiDialog(QWidget *parent)
|
|||
mPopularGroups = ui.groupTreeWidget->addCategoryItem(tr("Popular Groups"), QIcon(IMAGE_FOLDERGREEN), false);
|
||||
mOtherGroups = ui.groupTreeWidget->addCategoryItem(tr("Other Groups"), QIcon(IMAGE_FOLDERYELLOW), false);
|
||||
|
||||
//Auto refresh seems not to work, temporary solution at start
|
||||
insertWikiGroups();
|
||||
}
|
||||
|
||||
WikiDialog::~WikiDialog()
|
||||
|
@ -127,20 +120,6 @@ WikiDialog::~WikiDialog()
|
|||
delete(mWikiQueue);
|
||||
}
|
||||
|
||||
void WikiDialog::checkUpdate()
|
||||
{
|
||||
/* update */
|
||||
if (!rsWiki)
|
||||
return;
|
||||
|
||||
if (rsWiki->updated())
|
||||
{
|
||||
insertWikiGroups();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void WikiDialog::OpenOrShowAddPageDialog()
|
||||
{
|
||||
RsGxsGroupId groupId = getSelectedGroup();
|
||||
|
@ -362,11 +341,6 @@ const RsGxsGroupId& WikiDialog::getSelectedGroup()
|
|||
/************************** Request / Response *************************/
|
||||
/*** Loading Main Index ***/
|
||||
|
||||
void WikiDialog::insertWikiGroups()
|
||||
{
|
||||
requestGroupMeta();
|
||||
}
|
||||
|
||||
void WikiDialog::requestGroupMeta()
|
||||
{
|
||||
std::cerr << "WikiDialog::requestGroupMeta()";
|
||||
|
@ -528,7 +502,7 @@ void WikiDialog::loadRequest(const TokenQueue *queue, const TokenRequest &req)
|
|||
|
||||
#define GXSGROUP_NEWGROUPID 1
|
||||
case GXSGROUP_NEWGROUPID:
|
||||
insertWikiGroups();
|
||||
requestGroupMeta();
|
||||
break;
|
||||
default:
|
||||
std::cerr << "WikiDialog::loadRequest() ERROR: INVALID TYPE";
|
||||
|
@ -716,3 +690,20 @@ void WikiDialog::todo()
|
|||
"<li>Auto update Group trees"
|
||||
"</ul>");
|
||||
}
|
||||
|
||||
void WikiDialog::updateDisplay(bool complete)
|
||||
{
|
||||
if (complete || !getGrpIds().empty() || !getGrpIdsMeta().empty()) {
|
||||
/* Update group list */
|
||||
requestGroupMeta();
|
||||
} else {
|
||||
/* Update all groups of changed messages */
|
||||
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> > msgIds;
|
||||
getAllMsgIds(msgIds);
|
||||
|
||||
std::map<RsGxsGroupId, std::vector<RsGxsMessageId> >::iterator msgIt;
|
||||
for (msgIt = msgIds.begin(); msgIt != msgIds.end(); ++msgIt) {
|
||||
wikiGroupChanged(QString::fromStdString(msgIt->first.toStdString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "retroshare-gui/mainpage.h"
|
||||
#include "gui/gxs/RsGxsUpdateBroadcastPage.h"
|
||||
#include "ui_WikiDialog.h"
|
||||
|
||||
#include <retroshare/rswiki.h>
|
||||
|
@ -40,7 +40,7 @@
|
|||
class WikiAddDialog;
|
||||
class WikiEditDialog;
|
||||
|
||||
class WikiDialog : public MainPage, public TokenResponse
|
||||
class WikiDialog : public RsGxsUpdateBroadcastPage, public TokenResponse
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -52,12 +52,13 @@ public:
|
|||
virtual QString pageName() const { return tr("Wiki Pages") ; } //MainPage
|
||||
virtual QString helpText() const { return ""; } //MainPage
|
||||
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
|
||||
void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
public:
|
||||
virtual void updateDisplay(bool complete);
|
||||
|
||||
private slots:
|
||||
|
||||
void checkUpdate();
|
||||
void OpenOrShowAddPageDialog();
|
||||
void OpenOrShowAddGroupDialog();
|
||||
void OpenOrShowEditDialog();
|
||||
|
@ -69,8 +70,6 @@ private slots:
|
|||
void showGroupDetails();
|
||||
void editGroupDetails();
|
||||
|
||||
void insertWikiGroups();
|
||||
|
||||
// GroupTreeWidget stuff.
|
||||
void groupListCustomPopupMenu(QPoint point);
|
||||
void subscribeToGroup();
|
||||
|
|
|
@ -733,7 +733,7 @@ void WikiEditDialog::loadBaseHistory(const uint32_t &token)
|
|||
modItem->setText(WET_COL_DATE, text);
|
||||
modItem->setData(WET_COL_DATE, WET_ROLE_SORT, sort);
|
||||
}
|
||||
modItem->setId(page.mMeta.mAuthorId, WET_COL_AUTHORID);
|
||||
modItem->setId(page.mMeta.mAuthorId, WET_COL_AUTHORID, false);
|
||||
modItem->setText(WET_COL_PAGEID, QString::fromStdString(page.mMeta.mMsgId.toStdString()));
|
||||
|
||||
ui.treeWidget_History->addTopLevelItem(modItem);
|
||||
|
@ -847,7 +847,7 @@ void WikiEditDialog::loadEditTreeData(const uint32_t &token)
|
|||
modItem->setText(WET_COL_DATE, text);
|
||||
modItem->setData(WET_COL_DATE, WET_ROLE_SORT, sort);
|
||||
}
|
||||
modItem->setId(snapshot.mMeta.mAuthorId, WET_COL_AUTHORID);
|
||||
modItem->setId(snapshot.mMeta.mAuthorId, WET_COL_AUTHORID, false);
|
||||
modItem->setText(WET_COL_PAGEID, QString::fromStdString(snapshot.mMeta.mMsgId.toStdString()));
|
||||
|
||||
/* find the parent */
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "gui/settings/RsharePeerSettings.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/FriendsDialog.h"
|
||||
#include "gui/msgs/MessageComposer.h"
|
||||
#include <gui/common/html.h>
|
||||
#include "gui/common/RSTreeWidgetItem.h"
|
||||
#include "gui/common/FriendSelectionDialog.h"
|
||||
|
@ -52,6 +53,8 @@
|
|||
#define COLUMN_ID 3
|
||||
#define COLUMN_COUNT 4
|
||||
|
||||
const static uint32_t timeToInactivity = 60 * 10; // in seconds
|
||||
|
||||
/** Default constructor */
|
||||
ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::WindowFlags flags)
|
||||
: ChatDialog(parent, flags), lobbyId(lid)
|
||||
|
@ -66,18 +69,20 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
|||
connect(ui.participantsList, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(participantsTreeWidgetDoubleClicked(QTreeWidgetItem*,int)));
|
||||
|
||||
int S = QFontMetricsF(font()).height() ;
|
||||
ui.participantsList->setIconSize(QSize(S,S));
|
||||
ui.participantsList->setIconSize(QSize(1.3*S,1.3*S));
|
||||
|
||||
ui.participantsList->setColumnCount(COLUMN_COUNT);
|
||||
ui.participantsList->setColumnWidth(COLUMN_ICON, 1.25*S);
|
||||
ui.participantsList->setColumnWidth(COLUMN_ICON, 1.4*S);
|
||||
ui.participantsList->setColumnHidden(COLUMN_ACTIVITY,true);
|
||||
ui.participantsList->setColumnHidden(COLUMN_ID,true);
|
||||
|
||||
muteAct = new QAction(QIcon(), tr("Mute participant"), this);
|
||||
distantChatAct = new QAction(QIcon(), tr("Start private chat"), this);
|
||||
muteAct = new QAction(QIcon(), tr("Mute participant"), this);
|
||||
distantChatAct = new QAction(QIcon(":/images/chat_24.png"), tr("Start private chat"), this);
|
||||
sendMessageAct = new QAction(QIcon(":/images/mail_new.png"), tr("Send Message"), this);
|
||||
|
||||
connect(muteAct, SIGNAL(triggered()), this, SLOT(changePartipationState()));
|
||||
connect(distantChatAct, SIGNAL(triggered()), this, SLOT(distantChatParticipant()));
|
||||
connect(sendMessageAct, SIGNAL(triggered()), this, SLOT(sendMessage()));
|
||||
|
||||
// Add a button to invite friends.
|
||||
//
|
||||
|
@ -170,12 +175,15 @@ void ChatLobbyDialog::participantsTreeWidgetCustomPopupMenu(QPoint)
|
|||
|
||||
QMenu contextMnu(this);
|
||||
|
||||
contextMnu.addAction(muteAct);
|
||||
contextMnu.addAction(distantChatAct);
|
||||
contextMnu.addAction(sendMessageAct);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(muteAct);
|
||||
|
||||
|
||||
muteAct->setCheckable(true);
|
||||
muteAct->setEnabled(false);
|
||||
muteAct->setChecked(false);
|
||||
muteAct->setChecked(false);
|
||||
|
||||
if (selectedItems.size())
|
||||
{
|
||||
|
@ -362,7 +370,7 @@ void ChatLobbyDialog::addChatMsg(const ChatMessage& msg)
|
|||
else
|
||||
name = QString::fromUtf8(msg.peer_alternate_nickname.c_str()) + " (" + QString::fromStdString(gxs_id.toStdString()) + ")" ;
|
||||
|
||||
ui.chatWidget->addChatMsg(msg.incoming, name, sendTime, recvTime, message, ChatWidget::MSGTYPE_NORMAL);
|
||||
ui.chatWidget->addChatMsg(msg.incoming, name, gxs_id, sendTime, recvTime, message, ChatWidget::MSGTYPE_NORMAL);
|
||||
emit messageReceived(msg.incoming, id(), sendTime, name, message) ;
|
||||
|
||||
// This is a trick to translate HTML into text.
|
||||
|
@ -425,7 +433,8 @@ void ChatLobbyDialog::updateParticipantsList()
|
|||
widgetitem = new GxsIdRSTreeWidgetItem(mParticipantCompareRole,GxsIdDetails::ICON_TYPE_AVATAR);
|
||||
widgetitem->setId(it2->first,COLUMN_NAME, true) ;
|
||||
//widgetitem->setText(COLUMN_NAME, participant);
|
||||
widgetitem->setText(COLUMN_ACTIVITY,QString::number(time(NULL)));
|
||||
// set activity time to the oast so that the peer is marked as inactive
|
||||
widgetitem->setText(COLUMN_ACTIVITY,QString::number(time(NULL) - timeToInactivity));
|
||||
widgetitem->setText(COLUMN_ID,QString::fromStdString(it2->first.toStdString()));
|
||||
|
||||
ui.participantsList->addTopLevelItem(widgetitem);
|
||||
|
@ -443,16 +452,16 @@ void ChatLobbyDialog::updateParticipantsList()
|
|||
time_t now = time(NULL);
|
||||
|
||||
if(isParticipantMuted(it2->first))
|
||||
widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_red_64.png"));
|
||||
else if (tLastAct<now-60*30)
|
||||
widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_grey_64.png"));
|
||||
else
|
||||
widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_green_64.png"));
|
||||
widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_red_128.png"));
|
||||
else if (tLastAct + timeToInactivity < now)
|
||||
widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_grey_128.png"));
|
||||
else
|
||||
widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_green_128.png"));
|
||||
|
||||
RsGxsId gxs_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, gxs_id);
|
||||
|
||||
if (RsGxsId(participant.toStdString()) == gxs_id) widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_yellow_64.png"));
|
||||
if (RsGxsId(participant.toStdString()) == gxs_id) widgetitem->setIcon(COLUMN_ICON, QIcon(":/icons/bullet_yellow_128.png"));
|
||||
|
||||
QTime qtLastAct=QTime(0,0,0).addSecs(now-tLastAct);
|
||||
widgetitem->setToolTip(COLUMN_ICON,tr("Right click to mute/unmute participants<br/>Double click to address this person<br/>")
|
||||
|
@ -571,6 +580,36 @@ void ChatLobbyDialog::distantChatParticipant()
|
|||
}
|
||||
}
|
||||
|
||||
void ChatLobbyDialog::sendMessage()
|
||||
{
|
||||
|
||||
QList<QTreeWidgetItem*> selectedItems = ui.participantsList->selectedItems();
|
||||
|
||||
if (selectedItems.isEmpty())
|
||||
return;
|
||||
|
||||
QList<QTreeWidgetItem*>::iterator item;
|
||||
for (item = selectedItems.begin(); item != selectedItems.end(); ++item) {
|
||||
|
||||
RsGxsId gxs_id ;
|
||||
dynamic_cast<GxsIdRSTreeWidgetItem*>(*item)->getId(gxs_id) ;
|
||||
|
||||
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, RsGxsId(gxs_id));
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
||||
/* window will destroy itself! */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ChatLobbyDialog::muteParticipant(const RsGxsId& nickname)
|
||||
{
|
||||
|
|
|
@ -77,6 +77,7 @@ protected slots:
|
|||
void changePartipationState();
|
||||
void distantChatParticipant();
|
||||
void participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item, int column);
|
||||
void sendMessage();
|
||||
|
||||
private:
|
||||
void updateParticipantsList();
|
||||
|
@ -101,9 +102,10 @@ private:
|
|||
/** Ignored Users in Chatlobby by nickname until we had implemented Peer Ids in ver 0.6 */
|
||||
std::set<RsGxsId> mutedParticipants;
|
||||
|
||||
QAction *muteAct;
|
||||
QAction *muteAct;
|
||||
QAction *distantChatAct;
|
||||
QWidgetAction *checkableAction;
|
||||
QAction *sendMessageAct;
|
||||
|
||||
GxsIdChooser *ownIdChooser ;
|
||||
};
|
||||
|
|
|
@ -351,11 +351,14 @@ QString ChatStyle::formatMessage(enumFormatMessage type, const QString &name, co
|
|||
Q_UNUSED(flag);
|
||||
#endif
|
||||
|
||||
QString formatMsg = style.replace("%name%", RsHtml::plainText(name))
|
||||
.replace("%date%", DateTime::formatDate(timestamp.date()))
|
||||
.replace("%time%", DateTime::formatTime(timestamp.time()))
|
||||
QString strName = RsHtml::plainText(name).prepend(QString("<a name=\"name\">")).append(QString("</a>"));
|
||||
QString strDate = DateTime::formatDate(timestamp.date()).prepend(QString("<a name=\"date\">")).append(QString("</a>"));
|
||||
QString strTime = DateTime::formatTime(timestamp.time()).prepend(QString("<a name=\"time\">")).append(QString("</a>"));
|
||||
QString formatMsg = style.replace("%name%", strName)
|
||||
.replace("%date%", strDate)
|
||||
.replace("%time%", strTime)
|
||||
#ifdef COLORED_NICKNAMES
|
||||
.replace("%color%", color.name())
|
||||
.replace("%color%", color.name())
|
||||
#endif
|
||||
.replace("%message%", messageBody ) ;
|
||||
if ( !styleOptimized.isEmpty() ) {
|
||||
|
|
|
@ -214,7 +214,7 @@ void ChatWidget::setDefaultExtraFileFlags(TransferRequestFlags fl)
|
|||
|
||||
void ChatWidget::addChatHorizontalWidget(QWidget *w)
|
||||
{
|
||||
ui->verticalLayout_2->addWidget(w) ;
|
||||
ui->vl_Plugins->addWidget(w) ;
|
||||
update() ;
|
||||
}
|
||||
|
||||
|
@ -223,9 +223,15 @@ void ChatWidget::addChatBarWidget(QWidget *w)
|
|||
ui->pluginButtonFrame->layout()->addWidget(w) ;
|
||||
}
|
||||
|
||||
void ChatWidget::addVOIPBarWidget(QWidget *w)
|
||||
void ChatWidget::addTitleBarWidget(QWidget *w)
|
||||
{
|
||||
ui->titleBarFrame->layout()->addWidget(w) ;
|
||||
ui->pluginTitleFrame->layout()->addWidget(w) ;
|
||||
}
|
||||
|
||||
void ChatWidget::hideChatText(bool hidden)
|
||||
{
|
||||
ui->frame_ChatText->setHidden(hidden); ;
|
||||
ui->searchframe->setVisible(ui->actionSearch_History->isChecked() && !hidden); ;
|
||||
}
|
||||
|
||||
RSButtonOnText* ChatWidget::getNewButtonOnTextBrowser()
|
||||
|
@ -488,10 +494,10 @@ bool ChatWidget::eventFilter(QObject *obj, QEvent *event)
|
|||
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
|
||||
if (keyEvent) {
|
||||
if (notify && keyEvent->key() == Qt::Key_Delete) {
|
||||
if (keyEvent->key() == Qt::Key_Delete) {
|
||||
// Delete key pressed
|
||||
if (ui->textBrowser->textCursor().selectedText().length() > 0) {
|
||||
if (chatType() == CHATTYPE_LOBBY) {
|
||||
if (notify && chatType() == CHATTYPE_LOBBY) {
|
||||
QRegExp rx("<a name=\"(.*)\"",Qt::CaseSensitive, QRegExp::RegExp2);
|
||||
rx.setMinimal(true);
|
||||
QString sel=ui->textBrowser->textCursor().selection().toHtml();
|
||||
|
@ -839,6 +845,13 @@ void ChatWidget::setWelcomeMessage(QString &text)
|
|||
}
|
||||
|
||||
void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime &sendTime, const QDateTime &recvTime, const QString &message, MsgType chatType)
|
||||
{
|
||||
addChatMsg(incoming, name, RsGxsId(), sendTime, recvTime, message, chatType);
|
||||
}
|
||||
|
||||
void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gxsId
|
||||
, const QDateTime &sendTime, const QDateTime &recvTime
|
||||
, const QString &message, MsgType chatType)
|
||||
{
|
||||
#ifdef CHAT_DEBUG
|
||||
std::cout << "ChatWidget::addChatMsg message : " << message.toStdString() << std::endl;
|
||||
|
@ -870,6 +883,7 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
|
|||
if (!Settings->valueFromGroup("Chat", "EnableCustomFontSize", true).toBool()) {
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_REMOVE_FONT_SIZE;
|
||||
}
|
||||
int desiredMinimumFontSize = Settings->valueFromGroup("Chat", "MinimumFontSize", 10).toInt();
|
||||
if (!Settings->valueFromGroup("Chat", "EnableBold", true).toBool()) {
|
||||
formatTextFlag |= RSHTML_FORMATTEXT_REMOVE_FONT_WEIGHT;
|
||||
}
|
||||
|
@ -893,13 +907,20 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
|
|||
formatFlag |= CHAT_FORMATMSG_SYSTEM;
|
||||
}
|
||||
|
||||
QString formattedMessage = RsHtml().formatText(ui->textBrowser->document(), message, formatTextFlag, backgroundColor, desiredContrast);
|
||||
QString formattedMessage = RsHtml().formatText(ui->textBrowser->document(), message, formatTextFlag, backgroundColor, desiredContrast, desiredMinimumFontSize);
|
||||
QDateTime dtTimestamp=incoming ? sendTime : recvTime;
|
||||
QString formatMsg = chatStyle.formatMessage(type, name, dtTimestamp, formattedMessage, formatFlag);
|
||||
QString timeStamp = dtTimestamp.toString(Qt::ISODate);
|
||||
|
||||
formatMsg.prepend(QString("<a name=\"%1\"/>").arg(timeStamp));
|
||||
//To call this anchor do: ui->textBrowser->scrollToAnchor(QString("%1_%2").arg(timeStamp).arg(name));
|
||||
//replace Date and Time anchors
|
||||
formatMsg.replace(QString("<a name=\"date\">"),QString("<a name=\"%1\">").arg(timeStamp));
|
||||
formatMsg.replace(QString("<a name=\"time\">"),QString("<a name=\"%1\">").arg(timeStamp));
|
||||
//replace Name anchors with GXS Id
|
||||
QString strGxsId = "";
|
||||
if (!gxsId.isNull())
|
||||
strGxsId = QString::fromStdString(gxsId.toStdString());
|
||||
formatMsg.replace(QString("<a name=\"name\">"),QString("<a name=\"%1\">").arg(strGxsId));
|
||||
|
||||
QTextCursor textCursor = QTextCursor(ui->textBrowser->textCursor());
|
||||
textCursor.movePosition(QTextCursor::End);
|
||||
textCursor.setBlockFormat(QTextBlockFormat ());
|
||||
|
|
|
@ -94,6 +94,7 @@ public:
|
|||
|
||||
void setWelcomeMessage(QString &text);
|
||||
void addChatMsg(bool incoming, const QString &name, const QDateTime &sendTime, const QDateTime &recvTime, const QString &message, MsgType chatType);
|
||||
void addChatMsg(bool incoming, const QString &name, const RsGxsId gxsId, const QDateTime &sendTime, const QDateTime &recvTime, const QString &message, MsgType chatType);
|
||||
void updateStatusString(const QString &statusMask, const QString &statusString, bool permanent = false);
|
||||
|
||||
void addToolsAction(QAction *action);
|
||||
|
@ -108,9 +109,8 @@ public:
|
|||
// Adds one widget in the chat bar. Used to add e.g. new buttons. The widget should be
|
||||
// small enough in size.
|
||||
void addChatBarWidget(QWidget *w) ;
|
||||
|
||||
|
||||
void addVOIPBarWidget(QWidget *w);
|
||||
void addTitleBarWidget(QWidget *w);
|
||||
void hideChatText(bool hidden);
|
||||
RSButtonOnText* getNewButtonOnTextBrowser();
|
||||
RSButtonOnText* getNewButtonOnTextBrowser(QString text);
|
||||
|
||||
|
|
|
@ -46,8 +46,11 @@ PopupDistantChatDialog::~PopupDistantChatDialog()
|
|||
PopupDistantChatDialog::PopupDistantChatDialog(QWidget *parent, Qt::WindowFlags flags)
|
||||
: PopupChatDialog(parent,flags)
|
||||
{
|
||||
_status_label = new QLabel ;
|
||||
_status_label = new QToolButton ;
|
||||
_update_timer = new QTimer ;
|
||||
|
||||
_status_label->setAutoRaise(true);
|
||||
_status_label->setIconSize(QSize(24,24));
|
||||
|
||||
_update_timer->setInterval(1000) ;
|
||||
QObject::connect(_update_timer,SIGNAL(timeout()),this,SLOT(updateDisplay())) ;
|
||||
|
@ -94,7 +97,7 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
switch(status)
|
||||
{
|
||||
case RS_DISTANT_CHAT_STATUS_UNKNOWN: //std::cerr << "Unknown hash. Error!" << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_GRY_LED)) ;
|
||||
_status_label->setIcon(QIcon(IMAGE_GRY_LED)) ;
|
||||
msg = tr("Hash Error. No tunnel.");
|
||||
_status_label->setToolTip(msg) ;
|
||||
getChatWidget()->updateStatusString("%1", msg, true);
|
||||
|
@ -102,7 +105,7 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
setPeerStatus(RS_STATUS_OFFLINE) ;
|
||||
break ;
|
||||
case RS_DISTANT_CHAT_STATUS_REMOTELY_CLOSED: std::cerr << "Chat remotely closed. " << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_RED_LED)) ;
|
||||
_status_label->setIcon(QIcon(IMAGE_RED_LED)) ;
|
||||
_status_label->setToolTip(QObject::tr("Distant peer has closed the chat")) ;
|
||||
|
||||
getChatWidget()->updateStatusString("%1", tr("The person you're talking to has deleted the secured chat tunnel. You may remove the chat window now."), true);
|
||||
|
@ -111,7 +114,7 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
|
||||
break ;
|
||||
case RS_DISTANT_CHAT_STATUS_TUNNEL_DN: //std::cerr << "Tunnel asked. Waiting for reponse. " << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_RED_LED)) ;
|
||||
_status_label->setIcon(QIcon(IMAGE_RED_LED)) ;
|
||||
msg = QObject::tr("Tunnel is pending...");
|
||||
_status_label->setToolTip(msg) ;
|
||||
getChatWidget()->updateStatusString("%1", msg, true);
|
||||
|
@ -119,7 +122,7 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
setPeerStatus(RS_STATUS_OFFLINE) ;
|
||||
break ;
|
||||
case RS_DISTANT_CHAT_STATUS_TUNNEL_OK: //std::cerr << "Tunnel is ok. " << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_YEL_LED)) ;
|
||||
_status_label->setIcon(QIcon(IMAGE_YEL_LED)) ;
|
||||
msg = QObject::tr("Secured tunnel established. Waiting for ACK...");
|
||||
_status_label->setToolTip(msg) ;
|
||||
getChatWidget()->updateStatusString("%1", msg, true);
|
||||
|
@ -127,7 +130,7 @@ void PopupDistantChatDialog::updateDisplay()
|
|||
setPeerStatus(RS_STATUS_ONLINE) ;
|
||||
break ;
|
||||
case RS_DISTANT_CHAT_STATUS_CAN_TALK: //std::cerr << "Tunnel is ok and data is transmitted." << std::endl;
|
||||
_status_label->setPixmap(QPixmap(IMAGE_GRN_LED)) ;
|
||||
_status_label->setIcon(QIcon(IMAGE_GRN_LED)) ;
|
||||
msg = QObject::tr("Secured tunnel is working. You can talk!");
|
||||
_status_label->setToolTip(msg) ;
|
||||
getChatWidget()->unblockSending();
|
||||
|
|
|
@ -49,7 +49,7 @@ class PopupDistantChatDialog: public PopupChatDialog
|
|||
private:
|
||||
QTimer *_update_timer ;
|
||||
RsGxsId _pid ;
|
||||
QLabel *_status_label ;
|
||||
QToolButton *_status_label ;
|
||||
|
||||
friend class ChatDialog;
|
||||
};
|
||||
|
|
|
@ -221,5 +221,7 @@ void ElidedLabel::mousePressEvent(QMouseEvent *ev)
|
|||
{
|
||||
if (mElided && (ev->buttons()==Qt::LeftButton) && (mRectElision.contains(ev->pos()))){
|
||||
QToolTip::showText(mapToGlobal(QPoint(0, 0)),QString("<FONT>") + mContent + QString("</FONT>"));
|
||||
return; // eat event
|
||||
}
|
||||
QLabel::mousePressEvent(ev);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
|||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_NAME, QHeaderView::Stretch);
|
||||
header->resizeSection(COLUMN_NAME, 10*S);
|
||||
QHeaderView_setSectionResizeModeColumn(header, COLUMN_POPULARITY, QHeaderView::Fixed);
|
||||
header->resizeSection(COLUMN_POPULARITY, 1.5*S);
|
||||
header->resizeSection(COLUMN_POPULARITY, 2*S);
|
||||
|
||||
/* add filter actions */
|
||||
ui->filterLineEdit->addFilter(QIcon(), tr("Title"), FILTER_NAME_INDEX , tr("Search Title"));
|
||||
|
@ -106,7 +106,7 @@ GroupTreeWidget::GroupTreeWidget(QWidget *parent) :
|
|||
/* Initialize display button */
|
||||
initDisplayMenu(ui->displayButton);
|
||||
|
||||
ui->treeWidget->setIconSize(QSize(S*1.2,S*1.2)) ;
|
||||
ui->treeWidget->setIconSize(QSize(S*1.6,S*1.6)) ;
|
||||
}
|
||||
|
||||
GroupTreeWidget::~GroupTreeWidget()
|
||||
|
|
|
@ -182,6 +182,10 @@ QString StatusDefs::connectStateString(RsPeerDetails &details)
|
|||
stateString = qApp->translate("StatusDefs", "Connected: Tor");
|
||||
isConnected = true;
|
||||
break;
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_I2P:
|
||||
stateString = qApp->translate("StatusDefs", "Connected: I2P");
|
||||
isConnected = true;
|
||||
break;
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_UNKNOWN:
|
||||
stateString = qApp->translate("StatusDefs", "Connected: Unknown");
|
||||
isConnected = true;
|
||||
|
@ -231,6 +235,7 @@ QString StatusDefs::connectStateWithoutTransportTypeString(RsPeerDetails &detail
|
|||
case RS_PEER_CONNECTSTATE_CONNECTED_TCP:
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_UDP:
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_TOR:
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_I2P:
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_UNKNOWN:
|
||||
stateString = qApp->translate("StatusDefs", "Connected");
|
||||
break;
|
||||
|
@ -258,6 +263,9 @@ QString StatusDefs::connectStateIpString(RsPeerDetails &details)
|
|||
case RS_PEER_CONNECTSTATE_CONNECTED_TOR:
|
||||
stateString += QString(details.actAsServer ? qApp->translate("StatusDefs", "Tor-in") : qApp->translate("StatusDefs", "Tor-out"));
|
||||
break;
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_I2P:
|
||||
stateString += QString(details.actAsServer ? qApp->translate("StatusDefs", "I2P-in") : qApp->translate("StatusDefs", "I2P-out"));
|
||||
break;
|
||||
case RS_PEER_CONNECTSTATE_CONNECTED_UNKNOWN:
|
||||
stateString += qApp->translate("StatusDefs", "unkown");
|
||||
break;
|
||||
|
|
|
@ -103,7 +103,21 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
|
|||
ui->requestinfolabel->hide();
|
||||
|
||||
connect(ui->acceptNoSignGPGCheckBox,SIGNAL(toggled(bool)), ui->_options_GB,SLOT(setEnabled(bool))) ;
|
||||
connect(ui->addKeyToKeyring_CB,SIGNAL(toggled(bool)), ui->acceptNoSignGPGCheckBox,SLOT(setChecked(bool))) ;
|
||||
connect(ui->addKeyToKeyring_CB,SIGNAL(toggled(bool)), ui->acceptNoSignGPGCheckBox,SLOT(setChecked(bool))) ;
|
||||
|
||||
connect(ui->gmailButton, SIGNAL(clicked()), this, SLOT(inviteGmail()));
|
||||
connect(ui->yahooButton, SIGNAL(clicked()), this, SLOT(inviteYahoo()));
|
||||
connect(ui->outlookButton, SIGNAL(clicked()), this, SLOT(inviteOutlook()));
|
||||
connect(ui->aolButton, SIGNAL(clicked()), this, SLOT(inviteAol()));
|
||||
connect(ui->yandexButton, SIGNAL(clicked()), this, SLOT(inviteYandex()));
|
||||
connect(ui->emailButton, SIGNAL(clicked()), this, SLOT(runEmailClient2()));
|
||||
|
||||
|
||||
subject = tr("RetroShare Invitation");
|
||||
body = GetStartedDialog::GetInviteText();
|
||||
|
||||
body += "\n" + GetStartedDialog::GetCutBelowText();
|
||||
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str());
|
||||
|
||||
updateStylesheet();
|
||||
}
|
||||
|
@ -351,13 +365,23 @@ void ConnectFriendWizard::initializePage(int id)
|
|||
case Page_Rsid:
|
||||
ui->RsidPage->registerField("friendRSID*", ui->friendRsidEdit);
|
||||
break;
|
||||
case Page_WebMail:
|
||||
|
||||
case Page_Email:
|
||||
{
|
||||
ui->EmailPage->registerField("addressEdit*", ui->addressEdit);
|
||||
ui->EmailPage->registerField("subjectEdit*", ui->subjectEdit);
|
||||
|
||||
ui->subjectEdit->setText(tr("RetroShare Invitation"));
|
||||
ui->inviteTextEdit->setPlainText(GetStartedDialog::GetInviteText());
|
||||
|
||||
QString body = ui->inviteTextEdit->toPlainText();
|
||||
|
||||
body += "\n" + GetStartedDialog::GetCutBelowText();
|
||||
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str());
|
||||
|
||||
ui->inviteTextEdit->setPlainText(body);
|
||||
}
|
||||
break;
|
||||
case Page_ErrorMessage:
|
||||
break;
|
||||
|
@ -488,6 +512,7 @@ void ConnectFriendWizard::initializePage(int id)
|
|||
}
|
||||
|
||||
ui->nodeEdit->setText(loc);
|
||||
ui->ipEdit->setText(QString::fromStdString(peerDetails.isHiddenNode ? peerDetails.hiddenNodeAddress : peerDetails.extAddr));
|
||||
ui->signersEdit->setPlainText(ts);
|
||||
|
||||
fillGroups(this, ui->groupComboBox, groupId);
|
||||
|
@ -730,6 +755,7 @@ int ConnectFriendWizard::nextId() const
|
|||
if (ui->certRadioButton->isChecked()) return Page_Cert;
|
||||
if (ui->foffRadioButton->isChecked()) return Page_Foff;
|
||||
if (ui->rsidRadioButton->isChecked()) return Page_Rsid;
|
||||
if (ui->webmailRadioButton->isChecked()) return Page_WebMail;
|
||||
if (ui->emailRadioButton->isChecked()) return Page_Email;
|
||||
if (ui->friendRecommendationsRadioButton->isChecked()) return Page_FriendRecommendations;
|
||||
return ConnectFriendWizard::Page_Foff;
|
||||
|
@ -738,6 +764,7 @@ int ConnectFriendWizard::nextId() const
|
|||
case Page_Rsid:
|
||||
return error ? ConnectFriendWizard::Page_Conclusion : ConnectFriendWizard::Page_ErrorMessage;
|
||||
case Page_Foff:
|
||||
case Page_WebMail:
|
||||
case Page_Email:
|
||||
case Page_ErrorMessage:
|
||||
case Page_Conclusion:
|
||||
|
@ -1205,4 +1232,34 @@ void ConnectFriendWizard::groupCurrentIndexChanged(int index)
|
|||
}
|
||||
}
|
||||
|
||||
//========================== WebMailPage ==================================
|
||||
|
||||
void ConnectFriendWizard::inviteGmail()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://mail.google.com/mail/?view=cm&fs=1&su=" + subject + "&body=" + body , QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
void ConnectFriendWizard::inviteYahoo()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("http://compose.mail.yahoo.com/?&subject=" + subject + "&body=" + body, QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
void ConnectFriendWizard::inviteOutlook()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("http://mail.live.com/mail/EditMessageLight.aspx?n=&subject=" + subject + "&body=" + body, QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
void ConnectFriendWizard::inviteAol()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("http://webmail.aol.com/Mail/ComposeMessage.aspx?&subject=" + subject + "&body=" + body, QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
void ConnectFriendWizard::inviteYandex()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://mail.yandex.com/neo2/#compose/subject=" + subject + "&body=" + body, QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
void ConnectFriendWizard::runEmailClient2()
|
||||
{
|
||||
sendMail("", subject, body );
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class ConnectFriendWizard : public QWizard
|
|||
Q_PROPERTY(QString titleColor READ titleColor WRITE setTitleColor)
|
||||
|
||||
public:
|
||||
enum Page { Page_Intro, Page_Text, Page_Cert, Page_ErrorMessage, Page_Conclusion, Page_Foff, Page_Rsid, Page_Email, Page_FriendRequest, Page_FriendRecommendations };
|
||||
enum Page { Page_Intro, Page_Text, Page_Cert, Page_ErrorMessage, Page_Conclusion, Page_Foff, Page_Rsid, Page_WebMail, Page_Email, Page_FriendRequest, Page_FriendRecommendations };
|
||||
|
||||
ConnectFriendWizard(QWidget *parent = 0);
|
||||
~ConnectFriendWizard();
|
||||
|
@ -62,6 +62,7 @@ private slots:
|
|||
void toggleSignatureState(bool doUpdate = true);
|
||||
void toggleFormatState(bool doUpdate = true);
|
||||
void runEmailClient();
|
||||
void runEmailClient2();
|
||||
void showHelpUserCert();
|
||||
void copyCert();
|
||||
void pasteCert();
|
||||
|
@ -81,6 +82,14 @@ private slots:
|
|||
|
||||
/* ConclusionPage */
|
||||
void groupCurrentIndexChanged(int index);
|
||||
|
||||
/* WebMailPage */
|
||||
void inviteGmail();
|
||||
void inviteYahoo();
|
||||
void inviteOutlook();
|
||||
void inviteAol();
|
||||
void inviteYandex();
|
||||
|
||||
|
||||
private:
|
||||
// returns the translated error string for the error code (to be found in rspeers.h)
|
||||
|
@ -109,6 +118,10 @@ private:
|
|||
|
||||
/* ConclusionPage */
|
||||
QString groupId;
|
||||
|
||||
/* WebMailPage */
|
||||
QString subject;
|
||||
QString body;
|
||||
|
||||
Ui::ConnectFriendWizard *ui;
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>691</width>
|
||||
<height>650</height>
|
||||
<height>644</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -22,7 +22,7 @@
|
|||
<string>Add a new Friend</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>This wizard will help you to connect to your friend(s) to RetroShare network.<br>These ways are possible to do this:</string>
|
||||
<string>This wizard will help you to connect to your friend(s) to RetroShare network.<br>Select how you would like to add a friend:</string>
|
||||
</property>
|
||||
<attribute name="pageId">
|
||||
<string notr="true">ConnectFriendWizard::Page_Intro</string>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="textRadioButton">
|
||||
<property name="text">
|
||||
<string>&Enter the certificate manually</string>
|
||||
<string>Enter the certificate manually</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -52,7 +52,14 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="rsidRadioButton">
|
||||
<property name="text">
|
||||
<string>&Enter RetroShare ID manually</string>
|
||||
<string>Enter RetroShare ID manually</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="webmailRadioButton">
|
||||
<property name="text">
|
||||
<string>&Send an Invitation by Web Mail Providers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -60,14 +67,14 @@
|
|||
<widget class="QRadioButton" name="emailRadioButton">
|
||||
<property name="text">
|
||||
<string>&Send an Invitation by Email
|
||||
(She/He receives an email with instructions how to to download RetroShare)</string>
|
||||
(Your friend will receive an email with instructions how to to download RetroShare)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="friendRecommendationsRadioButton">
|
||||
<property name="text">
|
||||
<string>Recommend many friends to each others</string>
|
||||
<string>Recommend many friends to each other</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -271,7 +278,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="friendCertLabel">
|
||||
<property name="text">
|
||||
<string>Please, paste your friends PGP certificate into the box below</string>
|
||||
<string>Please, paste your friend's PGP certificate into the box below</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -504,6 +511,227 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWizardPage" name="WebmalPage">
|
||||
<property name="title">
|
||||
<string>RetroShare is better with Friends </string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Invite your Friends from other Networks to RetroShare.</string>
|
||||
</property>
|
||||
<attribute name="pageId">
|
||||
<string notr="true">ConnectFriendWizard::Page_WebMail</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="gmailButton">
|
||||
<property name="text">
|
||||
<string>GMail</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/gmail.png</normaloff>:/icons/gmail.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="yahooButton">
|
||||
<property name="text">
|
||||
<string>Yahoo</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/yahoo.png</normaloff>:/icons/yahoo.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="outlookButton">
|
||||
<property name="text">
|
||||
<string>Outlook</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/outlook.png</normaloff>:/icons/outlook.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="aolButton">
|
||||
<property name="text">
|
||||
<string>AOL</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/aol.png</normaloff>:/icons/aol.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="yandexButton">
|
||||
<property name="text">
|
||||
<string>Yandex</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/yandex.png</normaloff>:/icons/yandex.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="emailButton">
|
||||
<property name="text">
|
||||
<string>Email</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/mail_128.png</normaloff>:/icons/mail_128.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>444</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="ConnectFriendPage" name="EmailPage">
|
||||
<property name="title">
|
||||
<string>Invite Friends by Email</string>
|
||||
|
@ -883,7 +1111,8 @@
|
|||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Please note that RetroShare will require excessive amounts of bandwidth, memory and CPU if you add to many friends. You can add as many friends as you like, but more than 40 will probably require too much resources.</string>
|
||||
<string>Please note that RetroShare will require excessive amounts of bandwidth, memory and CPU if you add too many friends. You can add as many friends as you like, but more than 40 will probably require too much
|
||||
resources.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -1038,21 +1267,21 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="signersLabel">
|
||||
<property name="text">
|
||||
<string>Signers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QPlainTextEdit" name="signersEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="alreadyRegisteredLabel">
|
||||
<property name="text">
|
||||
<string>This peer is already on your friend list. Adding it might just set it's ip address.</string>
|
||||
|
@ -1062,6 +1291,20 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="ipLabel">
|
||||
<property name="text">
|
||||
<string>IP-Addr:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="ipEdit">
|
||||
<property name="text">
|
||||
<string>IP-Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1338,6 +1581,7 @@
|
|||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -37,18 +37,24 @@
|
|||
#include <iostream>
|
||||
|
||||
// Control of Publish Signatures.
|
||||
#define RSGXS_GROUP_SIGN_PUBLISH_MASK 0x000000ff
|
||||
#define RSGXS_GROUP_SIGN_PUBLISH_ENCRYPTED 0x00000001
|
||||
#define RSGXS_GROUP_SIGN_PUBLISH_ALLSIGNED 0x00000002
|
||||
#define RSGXS_GROUP_SIGN_PUBLISH_THREADHEAD 0x00000004
|
||||
#define RSGXS_GROUP_SIGN_PUBLISH_NONEREQ 0x00000008
|
||||
//
|
||||
// These are now defined in rsgxsflags.h
|
||||
//
|
||||
// #define FLAG_GROUP_SIGN_PUBLISH_MASK 0x000000ff
|
||||
// #define FLAG_GROUP_SIGN_PUBLISH_ENCRYPTED 0x00000001
|
||||
// #define FLAG_GROUP_SIGN_PUBLISH_ALLSIGNED 0x00000002
|
||||
// #define FLAG_GROUP_SIGN_PUBLISH_THREADHEAD 0x00000004
|
||||
// #define FLAG_GROUP_SIGN_PUBLISH_NONEREQ 0x00000008
|
||||
|
||||
// Author Signature.
|
||||
#define RSGXS_GROUP_SIGN_AUTHOR_MASK 0x0000ff00
|
||||
#define RSGXS_GROUP_SIGN_AUTHOR_GPG 0x00000100
|
||||
#define RSGXS_GROUP_SIGN_AUTHOR_REQUIRED 0x00000200
|
||||
#define RSGXS_GROUP_SIGN_AUTHOR_IFNOPUBSIGN 0x00000400
|
||||
#define RSGXS_GROUP_SIGN_AUTHOR_NONE 0x00000800
|
||||
// // Author Signature.
|
||||
//
|
||||
// These are now defined in rsgxsflags.h
|
||||
//
|
||||
// #define FLAG_AUTHOR_AUTHENTICATION_MASK 0x0000ff00
|
||||
// #define FLAG_AUTHOR_AUTHENTICATION_NONE 0x00000000
|
||||
// #define FLAG_AUTHOR_AUTHENTICATION_GPG 0x00000100
|
||||
// #define FLAG_AUTHOR_AUTHENTICATION_REQUIRED 0x00000200
|
||||
// #define FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN 0x00000400
|
||||
|
||||
#define GXSGROUP_NEWGROUPID 1
|
||||
#define GXSGROUP_LOADGROUP 2
|
||||
|
@ -123,6 +129,10 @@ void GxsGroupDialog::init()
|
|||
|
||||
ui.groupDesc->setPlaceholderText(tr("Set a descriptive description here"));
|
||||
|
||||
ui.personal_ifnopub->hide() ;
|
||||
ui.personal_required->hide() ;
|
||||
ui.personal_required->setChecked(true) ; // this is always true
|
||||
|
||||
initMode();
|
||||
}
|
||||
|
||||
|
@ -288,7 +298,12 @@ void GxsGroupDialog::setupDefaults()
|
|||
ui.comments_no->setChecked(true);
|
||||
ui.comments_no_3->setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
ui.antiSpam_trackMessages->setChecked((bool)(mDefaultsFlags & GXS_GROUP_DEFAULTS_ANTISPAM_TRACK));
|
||||
ui.antiSpam_signedIds->setChecked((bool)(mDefaultsFlags & GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP));
|
||||
ui.antiSpam_trackMessages_2->setChecked((bool)(mDefaultsFlags & GXS_GROUP_DEFAULTS_ANTISPAM_TRACK));
|
||||
ui.antiSpam_signedIds_2->setChecked((bool)(mDefaultsFlags & GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP));
|
||||
|
||||
#ifndef RS_USE_CIRCLES
|
||||
ui.typeGroup->setEnabled(false);
|
||||
ui.typeLocal->setEnabled(false);
|
||||
|
@ -308,6 +323,9 @@ void GxsGroupDialog::setupVisibility()
|
|||
|
||||
ui.distribGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_DISTRIBUTION);
|
||||
ui.distribGroupBox_2->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_DISTRIBUTION);
|
||||
|
||||
ui.spamProtection_GB->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ANTI_SPAM);
|
||||
ui.spamProtection_GB_2->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_ANTI_SPAM);
|
||||
|
||||
ui.publishGroupBox->setVisible(mEnabledFlags & GXS_GROUP_FLAGS_PUBLISHSIGN);
|
||||
|
||||
|
@ -347,6 +365,8 @@ void GxsGroupDialog::setupReadonly()
|
|||
|
||||
ui.distribGroupBox_2->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_DISTRIBUTION));
|
||||
ui.commentGroupBox_2->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_COMMENTS));
|
||||
ui.spamProtection_GB->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_ANTI_SPAM));
|
||||
ui.spamProtection_GB_2->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_ANTI_SPAM));
|
||||
|
||||
ui.extraFrame->setEnabled(!(mReadonlyFlags & GXS_GROUP_FLAGS_EXTRA));
|
||||
#ifndef UNFINISHED
|
||||
|
@ -376,6 +396,7 @@ void GxsGroupDialog::updateFromExistingMeta(const QString &description)
|
|||
setupVisibility();
|
||||
setupReadonly();
|
||||
clearForm();
|
||||
setGroupSignFlags(mGrpMeta.mSignFlags) ;
|
||||
|
||||
/* setup name */
|
||||
ui.groupName->setText(QString::fromUtf8(mGrpMeta.mGroupName.c_str()));
|
||||
|
@ -576,54 +597,59 @@ uint32_t GxsGroupDialog::getGroupSignFlags()
|
|||
/* grab from the ui options -> */
|
||||
uint32_t signFlags = 0;
|
||||
if (ui.publish_encrypt->isChecked()) {
|
||||
signFlags |= RSGXS_GROUP_SIGN_PUBLISH_ENCRYPTED;
|
||||
signFlags |= GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_ENCRYPTED;
|
||||
} else if (ui.publish_required->isChecked()) {
|
||||
signFlags |= RSGXS_GROUP_SIGN_PUBLISH_ALLSIGNED;
|
||||
signFlags |= GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_ALLSIGNED;
|
||||
} else if (ui.publish_threads->isChecked()) {
|
||||
signFlags |= RSGXS_GROUP_SIGN_PUBLISH_THREADHEAD;
|
||||
signFlags |= GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_THREADHEAD;
|
||||
} else { // publish_open (default).
|
||||
signFlags |= RSGXS_GROUP_SIGN_PUBLISH_NONEREQ;
|
||||
signFlags |= GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_NONEREQ;
|
||||
}
|
||||
|
||||
if (ui.personal_required->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_REQUIRED;
|
||||
|
||||
if (ui.personal_ifnopub->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN;
|
||||
|
||||
// Author Signature.
|
||||
if (ui.personal_pgp->isChecked()) {
|
||||
signFlags |= RSGXS_GROUP_SIGN_AUTHOR_GPG;
|
||||
} else if (ui.personal_required->isChecked()) {
|
||||
signFlags |= RSGXS_GROUP_SIGN_AUTHOR_REQUIRED;
|
||||
} else if (ui.personal_ifnopub->isChecked()) {
|
||||
signFlags |= RSGXS_GROUP_SIGN_AUTHOR_IFNOPUBSIGN;
|
||||
} else { // shouldn't allow this one.
|
||||
signFlags |= RSGXS_GROUP_SIGN_AUTHOR_NONE;
|
||||
}
|
||||
if (ui.antiSpam_signedIds->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG;
|
||||
|
||||
if (ui.antiSpam_trackMessages->isChecked())
|
||||
signFlags |= GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES;
|
||||
|
||||
return signFlags;
|
||||
}
|
||||
|
||||
void GxsGroupDialog::setGroupSignFlags(uint32_t signFlags)
|
||||
{
|
||||
if (signFlags & RSGXS_GROUP_SIGN_PUBLISH_ENCRYPTED) {
|
||||
if (signFlags & GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_ENCRYPTED) {
|
||||
ui.publish_encrypt->setChecked(true);
|
||||
} else if (signFlags & RSGXS_GROUP_SIGN_PUBLISH_ALLSIGNED) {
|
||||
} else if (signFlags & GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_ALLSIGNED) {
|
||||
ui.publish_required->setChecked(true);
|
||||
} else if (signFlags & RSGXS_GROUP_SIGN_PUBLISH_THREADHEAD) {
|
||||
} else if (signFlags & GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_THREADHEAD) {
|
||||
ui.publish_threads->setChecked(true);
|
||||
} else if (signFlags & RSGXS_GROUP_SIGN_PUBLISH_NONEREQ) {
|
||||
} else if (signFlags & GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_NONEREQ) {
|
||||
ui.publish_open->setChecked(true);
|
||||
}
|
||||
|
||||
if (signFlags & RSGXS_GROUP_SIGN_AUTHOR_GPG) {
|
||||
ui.personal_pgp->setChecked(true);
|
||||
} else if (signFlags & RSGXS_GROUP_SIGN_AUTHOR_REQUIRED) {
|
||||
if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_REQUIRED)
|
||||
ui.personal_required->setChecked(true);
|
||||
} else if (signFlags & RSGXS_GROUP_SIGN_AUTHOR_IFNOPUBSIGN) {
|
||||
|
||||
if (signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN)
|
||||
ui.personal_ifnopub->setChecked(true);
|
||||
} else if (signFlags & RSGXS_GROUP_SIGN_AUTHOR_NONE) {
|
||||
// Its the same... but not quite.
|
||||
//ui.personal_noifpub->setChecked();
|
||||
}
|
||||
|
||||
|
||||
ui.antiSpam_trackMessages ->setChecked((bool)(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES) );
|
||||
ui.antiSpam_signedIds ->setChecked((bool)(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) );
|
||||
ui.antiSpam_trackMessages_2->setChecked((bool)(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES) );
|
||||
ui.antiSpam_signedIds_2 ->setChecked((bool)(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) );
|
||||
//ui.SignEdIds->setChecked((bool)(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG) );
|
||||
//ui.trackmessagesradioButton->setChecked((bool)(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES) );
|
||||
|
||||
/* guess at comments */
|
||||
if ((signFlags & RSGXS_GROUP_SIGN_PUBLISH_THREADHEAD) &&
|
||||
(signFlags & RSGXS_GROUP_SIGN_AUTHOR_IFNOPUBSIGN))
|
||||
if ((signFlags & GXS_SERV::FLAG_GROUP_SIGN_PUBLISH_THREADHEAD) &&
|
||||
(signFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_IFNOPUBSIGN))
|
||||
{
|
||||
ui.comments_allowed->setChecked(true);
|
||||
ui.comments_allowed_3->setChecked(true);
|
||||
|
|
|
@ -63,14 +63,14 @@ public:
|
|||
#define GXS_GROUP_FLAGS_SHAREKEYS 0x00000020
|
||||
#define GXS_GROUP_FLAGS_PERSONALSIGN 0x00000040
|
||||
#define GXS_GROUP_FLAGS_COMMENTS 0x00000080
|
||||
|
||||
#define GXS_GROUP_FLAGS_EXTRA 0x00000100
|
||||
#define GXS_GROUP_FLAGS_ANTI_SPAM 0x00000200
|
||||
|
||||
/*** Default flags are used to determine privacy of group, signatures required ***
|
||||
*** whether publish or id and whether comments are allowed or not ***/
|
||||
|
||||
#define GXS_GROUP_DEFAULTS_DISTRIB_MASK 0x0000000f
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_MASK 0x000000f0
|
||||
#define GXS_GROUP_DEFAULTS_DISTRIB_MASK 0x0000000f
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_MASK 0x000000f0
|
||||
#define GXS_GROUP_DEFAULTS_PERSONAL_MASK 0x00000f00
|
||||
#define GXS_GROUP_DEFAULTS_COMMENTS_MASK 0x0000f000
|
||||
|
||||
|
@ -78,18 +78,21 @@ public:
|
|||
#define GXS_GROUP_DEFAULTS_DISTRIB_GROUP 0x00000002
|
||||
#define GXS_GROUP_DEFAULTS_DISTRIB_LOCAL 0x00000004
|
||||
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_OPEN 0x00000010
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_OPEN 0x00000010
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_THREADS 0x00000020
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_REQUIRED 0x00000040
|
||||
#define GXS_GROUP_DEFAULTS_PUBLISH_ENCRYPTED 0x00000080
|
||||
|
||||
#define GXS_GROUP_DEFAULTS_PERSONAL_PGP 0x00000100
|
||||
#define GXS_GROUP_DEFAULTS_PERSONAL_PGP 0x00000100
|
||||
#define GXS_GROUP_DEFAULTS_PERSONAL_REQUIRED 0x00000200
|
||||
#define GXS_GROUP_DEFAULTS_PERSONAL_IFNOPUB 0x00000400
|
||||
|
||||
#define GXS_GROUP_DEFAULTS_COMMENTS_YES 0x00001000
|
||||
#define GXS_GROUP_DEFAULTS_COMMENTS_YES 0x00001000
|
||||
#define GXS_GROUP_DEFAULTS_COMMENTS_NO 0x00002000
|
||||
|
||||
#define GXS_GROUP_DEFAULTS_ANTISPAM_FAVOR_PGP 0x00100000
|
||||
#define GXS_GROUP_DEFAULTS_ANTISPAM_TRACK 0x00200000
|
||||
|
||||
/*!
|
||||
* The aim of this dialog is to be convenient to encapsulate group
|
||||
* creation code for several GXS services such forums, channels
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>685</width>
|
||||
<height>517</height>
|
||||
<width>928</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -44,19 +44,10 @@
|
|||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="createmode">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBoxLogo">
|
||||
<property name="title">
|
||||
|
@ -205,190 +196,114 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="publishGroupBox">
|
||||
<property name="title">
|
||||
<string>Publish Signatures</string>
|
||||
<item row="0" column="1" rowspan="7">
|
||||
<widget class="QDockWidget" name="contactsdockWidget">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_open">
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_threads">
|
||||
<property name="text">
|
||||
<string>New Thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_required">
|
||||
<property name="text">
|
||||
<string>Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_encrypt">
|
||||
<property name="text">
|
||||
<string>Encrypted Msgs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>524287</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>check peers you would like to share private publish key with</string>
|
||||
</property>
|
||||
<property name="floating">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="features">
|
||||
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Share Key With</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QGridLayout" name="_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="FriendSelectionWidget" name="keyShareList" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>4</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QGroupBox" name="personalGroupBox">
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Personal Signatures</string>
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_pgp">
|
||||
<property name="text">
|
||||
<string>PGP Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_required">
|
||||
<property name="text">
|
||||
<string>Signature Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_ifnopub">
|
||||
<property name="text">
|
||||
<string>If No Publish Signature</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<widget class="MimeTextEdit" name="groupDesc"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QGroupBox" name="commentGroupBox">
|
||||
<property name="title">
|
||||
<string>Comments</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_allowed">
|
||||
<property name="text">
|
||||
<string>Allow Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_no">
|
||||
<property name="text">
|
||||
<string>No Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QFrame" name="extraFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QGroupBox" name="distribGroupBox">
|
||||
<property name="sizePolicy">
|
||||
|
@ -490,125 +405,259 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<item row="3" column="0">
|
||||
<widget class="QGroupBox" name="publishGroupBox">
|
||||
<property name="title">
|
||||
<string>Description</string>
|
||||
<string>Publish Signatures</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="MimeTextEdit" name="groupDesc"/>
|
||||
<widget class="QRadioButton" name="publish_open">
|
||||
<property name="text">
|
||||
<string>Open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_threads">
|
||||
<property name="text">
|
||||
<string>New Thread</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_required">
|
||||
<property name="text">
|
||||
<string>Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="publish_encrypt">
|
||||
<property name="text">
|
||||
<string>Encrypted Msgs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="6">
|
||||
<widget class="QDockWidget" name="contactsdockWidget">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
<item row="4" column="0">
|
||||
<widget class="QGroupBox" name="personalGroupBox">
|
||||
<property name="title">
|
||||
<string>Personal Signatures</string>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_pgp">
|
||||
<property name="text">
|
||||
<string>PGP Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_required">
|
||||
<property name="text">
|
||||
<string>Signature Required</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="personal_ifnopub">
|
||||
<property name="text">
|
||||
<string>If No Publish Signature</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QGroupBox" name="commentGroupBox">
|
||||
<property name="title">
|
||||
<string>Comments</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>524287</height>
|
||||
</size>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_allowed">
|
||||
<property name="text">
|
||||
<string>Allow Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="comments_no">
|
||||
<property name="text">
|
||||
<string>No Comments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QGroupBox" name="spamProtection_GB">
|
||||
<property name="title">
|
||||
<string>Spam-protection</string>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="antiSpam_signedIds">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This makes the media increase the reputation threshold to 0.4 for anonymous ids, while keeping it to 0.0 for PGP-linked ids. Therefore, anonymous ids can still post, if their local reputation score is above that threshold.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Favor PGP-signed ids</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="antiSpam_trackMessages">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p align="justify">This feature allows Retroshare to locally keep a record of who forwarded each message to you, for the last 10 days. Although useless if alone (and already available whatsoever) this information can be used by a group of collaborative friends to easily locate the source of spams. To be used with care, since it significantly decreases the anonymity of message posts.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Keep track of posts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QFrame" name="extraFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>check peers you would like to share private publish key with</string>
|
||||
</property>
|
||||
<property name="floating">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="features">
|
||||
<set>QDockWidget::NoDockWidgetFeatures</set>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Share Key With</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QGridLayout" name="_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="FriendSelectionWidget" name="keyShareList" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>4</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="sizeIncrement">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="showmode">
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextEdit" name="descriptiontextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Info</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="_3">
|
||||
<item row="7" column="1">
|
||||
<item row="7" column="2">
|
||||
<widget class="QGroupBox" name="distribGroupBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
|
@ -717,7 +766,7 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="8" column="2">
|
||||
<widget class="QGroupBox" name="commentGroupBox_2">
|
||||
<property name="title">
|
||||
<string/>
|
||||
|
@ -775,28 +824,28 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="nameline">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="popline">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="5" column="2">
|
||||
<widget class="QLineEdit" name="IDline">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="3" column="2">
|
||||
<widget class="QLineEdit" name="lastpostline">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
|
@ -824,7 +873,7 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="postsline">
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
@ -865,29 +914,68 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="4" column="2">
|
||||
<widget class="GxsIdLabel" name="authorLabel">
|
||||
<property name="text">
|
||||
<string>GxsIdLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTextEdit" name="descriptiontextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Anti spam</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QGroupBox" name="spamProtection_GB_2">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="antiSpam_signedIds_2">
|
||||
<property name="text">
|
||||
<string>PGP-signed ids</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="antiSpam_trackMessages_2">
|
||||
<property name="text">
|
||||
<string>Track of Posts</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>718</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "gui/Identity/IdEditDialog.h"
|
||||
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QStandardItemModel>
|
||||
#include <algorithm>
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
|
@ -42,6 +43,8 @@
|
|||
#define TYPE_UNKNOWN_ID 3
|
||||
#define TYPE_CREATE_ID 4
|
||||
|
||||
#define BANNED_ICON ":/icons/yellow_biohazard64.png"
|
||||
|
||||
#define IDCHOOSER_REFRESH 1
|
||||
|
||||
//#define IDCHOOSER_DEBUG
|
||||
|
@ -138,7 +141,6 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
|||
switch (type) {
|
||||
case GXS_ID_DETAILS_TYPE_EMPTY:
|
||||
case GXS_ID_DETAILS_TYPE_FAILED:
|
||||
// icons = ;
|
||||
break;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_LOADING:
|
||||
|
@ -148,17 +150,49 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
|||
case GXS_ID_DETAILS_TYPE_DONE:
|
||||
GxsIdDetails::getIcons(details, icons);
|
||||
break;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
icons.push_back(QIcon(BANNED_ICON)) ;
|
||||
break;
|
||||
}
|
||||
|
||||
chooser->setItemData(index, QString("%1_%2").arg((type == GXS_ID_DETAILS_TYPE_DONE) ? TYPE_FOUND_ID : TYPE_UNKNOWN_ID).arg(text), ROLE_SORT);
|
||||
chooser->setItemData(index, (type == GXS_ID_DETAILS_TYPE_DONE) ? TYPE_FOUND_ID : TYPE_UNKNOWN_ID, ROLE_TYPE);
|
||||
chooser->setItemIcon(index, icons.empty() ? QIcon() : icons[0]);
|
||||
|
||||
std::cerr << "ID=" << details.mId << ", chooser->flags()=" << chooser->flags() << ", flags=" << details.mFlags ;
|
||||
|
||||
if((chooser->flags() & IDCHOOSER_NON_ANONYMOUS) && !(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED))
|
||||
{
|
||||
std::cerr << " - disabling ID - entry = " << index << std::endl;
|
||||
chooser->setEntryEnabled(index,false) ;
|
||||
}
|
||||
std::cerr << std::endl;
|
||||
|
||||
chooser->model()->sort(0);
|
||||
|
||||
chooser->blockSignals(false) ;
|
||||
}
|
||||
|
||||
void GxsIdChooser::setEntryEnabled(int indx,bool enabled)
|
||||
{
|
||||
bool disable = !enabled ;
|
||||
|
||||
QSortFilterProxyModel* model = qobject_cast<QSortFilterProxyModel*>(QComboBox::model());
|
||||
//QStandardItem* item = model->item(index);
|
||||
|
||||
QModelIndex ii = model->index(indx,0);
|
||||
|
||||
// visually disable by greying out - works only if combobox has been painted already and palette returns the wanted color
|
||||
//model->setFlags(ii,disable ? (model->flags(ii) & ~(Qt::ItemIsSelectable|Qt::ItemIsEnabled)) : (Qt::ItemIsSelectable|Qt::ItemIsEnabled));
|
||||
|
||||
uint32_t v = enabled?(1|32):(0);
|
||||
|
||||
// clear item data in order to use default color
|
||||
//model->setData(ii,disable ? (QComboBox::palette().color(QPalette::Disabled, QPalette::Text)) : QVariant(), Qt::TextColorRole);
|
||||
model->setData(ii,QVariant(v),Qt::UserRole-1) ;
|
||||
}
|
||||
|
||||
void GxsIdChooser::loadPrivateIds()
|
||||
{
|
||||
if (mFirstLoad) {
|
||||
|
@ -217,6 +251,8 @@ void GxsIdChooser::loadPrivateIds()
|
|||
addItem(QIcon(":/images/identity/identity_create_32.png"), str, id);
|
||||
setItemData(count() - 1, QString("%1_%2").arg(TYPE_CREATE_ID).arg(str), ROLE_SORT);
|
||||
setItemData(count() - 1, TYPE_CREATE_ID, ROLE_TYPE);
|
||||
|
||||
|
||||
}
|
||||
setDefaultItem();
|
||||
emit idsLoaded();
|
||||
|
@ -299,7 +335,7 @@ void GxsIdChooser::indexActivated(int index)
|
|||
int type = itemData(index, ROLE_TYPE).toInt();
|
||||
if (type == TYPE_CREATE_ID) {
|
||||
IdEditDialog dlg(this);
|
||||
dlg.setupNewId(false);
|
||||
dlg.setupNewId(false, !(mFlags & IDCHOOSER_NON_ANONYMOUS));
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
setDefaultId(RsGxsId(dlg.groupId()));
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ class RsGxsUpdateBroadcastBase;
|
|||
#define IDCHOOSER_ID_REQUIRED 0x0001
|
||||
#define IDCHOOSER_ANON_DEFAULT 0x0002
|
||||
#define IDCHOOSER_NO_CREATE 0x0004
|
||||
#define IDCHOOSER_NON_ANONYMOUS 0x0008
|
||||
|
||||
class GxsIdChooser : public QComboBox
|
||||
{
|
||||
|
@ -48,6 +49,7 @@ public:
|
|||
virtual ~GxsIdChooser();
|
||||
|
||||
void setFlags(uint32_t flags) ;
|
||||
uint32_t flags() const { return mFlags ; }
|
||||
|
||||
enum ChosenId_Ret {None, KnowId, UnKnowId, NoId} ;
|
||||
void loadIds(uint32_t chooserFlags, const RsGxsId &defId);
|
||||
|
@ -56,6 +58,7 @@ public:
|
|||
bool setChosenId(const RsGxsId &gxsId);
|
||||
ChosenId_Ret getChosenId(RsGxsId &gxsId);
|
||||
|
||||
void setEntryEnabled(int index, bool enabled);
|
||||
signals:
|
||||
// emitted after first load of own ids
|
||||
void idsLoaded();
|
||||
|
@ -71,13 +74,13 @@ private slots:
|
|||
|
||||
private:
|
||||
void loadPrivateIds();
|
||||
void setDefaultItem();
|
||||
void setDefaultItem();
|
||||
|
||||
uint32_t mFlags;
|
||||
RsGxsId mDefaultId;
|
||||
bool mFirstLoad;
|
||||
|
||||
RsGxsUpdateBroadcastBase *mBase;
|
||||
RsGxsUpdateBroadcastBase *mBase;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <math.h>
|
||||
#include "GxsIdDetails.h"
|
||||
#include "retroshare-gui/RsAutoUpdatePage.h"
|
||||
#include "retroshare/rsreputations.h"
|
||||
|
||||
#include <retroshare/rspeers.h>
|
||||
|
||||
|
@ -40,6 +41,7 @@
|
|||
#define IMAGE_PGPKNOWN ":/images/contact.png"
|
||||
#define IMAGE_PGPUNKNOWN ":/images/tags/pgp-unknown.png"
|
||||
#define IMAGE_ANON ":/images/tags/anon.png"
|
||||
#define IMAGE_BANNED ":/icons/yellow_biohazard64.png"
|
||||
|
||||
#define IMAGE_DEV_AMBASSADOR ":/images/tags/dev-ambassador.png"
|
||||
#define IMAGE_DEV_CONTRIBUTOR ":/images/tags/vote_down.png"
|
||||
|
@ -821,6 +823,9 @@ QString GxsIdDetails::getNameForType(GxsIdDetailsType type, const RsIdentityDeta
|
|||
case GXS_ID_DETAILS_TYPE_DONE:
|
||||
return getName(details);
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
return tr("[Banned]") ;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_FAILED:
|
||||
return getFailedText(details.mId);
|
||||
}
|
||||
|
@ -873,7 +878,10 @@ bool GxsIdDetails::MakeIdDesc(const RsGxsId &id, bool doIcons, QString &str, QLi
|
|||
|
||||
QString GxsIdDetails::getName(const RsIdentityDetails &details)
|
||||
{
|
||||
QString name = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE);
|
||||
if(rsReputations->isIdentityBanned(details.mId))
|
||||
return tr("[Banned]") ;
|
||||
|
||||
QString name = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE);
|
||||
|
||||
std::list<RsRecognTag>::const_iterator it;
|
||||
for (it = details.mRecognTags.begin(); it != details.mRecognTags.end(); ++it)
|
||||
|
@ -887,9 +895,18 @@ QString GxsIdDetails::getName(const RsIdentityDetails &details)
|
|||
QString GxsIdDetails::getComment(const RsIdentityDetails &details)
|
||||
{
|
||||
QString comment;
|
||||
QString nickname ;
|
||||
|
||||
QString nickname = details.mNickname.empty()?tr("[Unknown]"):QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE) ;
|
||||
bool banned = rsReputations->isIdentityBanned(details.mId) ;
|
||||
|
||||
if(details.mNickname.empty())
|
||||
nickname = tr("[Unknown]") ;
|
||||
else if(banned)
|
||||
nickname = tr("[Banned]") ;
|
||||
else
|
||||
nickname = QString::fromUtf8(details.mNickname.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE) ;
|
||||
|
||||
|
||||
comment = QString("%1:%2<br/>%3:%4").arg(QApplication::translate("GxsIdDetails", "Identity name"),
|
||||
nickname,
|
||||
QApplication::translate("GxsIdDetails", "Identity Id"),
|
||||
|
@ -903,7 +920,8 @@ QString nickname = details.mNickname.empty()?tr("[Unknown]"):QString::fromUtf8(d
|
|||
{
|
||||
/* look up real name */
|
||||
std::string authorName = rsPeers->getGPGName(details.mPgpId);
|
||||
comment += QString("%1 [%2]").arg(QString::fromUtf8(authorName.c_str()), QString::fromStdString(details.mPgpId.toStdString()));
|
||||
|
||||
comment += QString("%1 [%2]").arg(QString::fromUtf8(authorName.c_str()), QString::fromStdString(details.mPgpId.toStdString()));
|
||||
}
|
||||
else
|
||||
comment += QApplication::translate("GxsIdDetails", "unknown Key");
|
||||
|
@ -918,6 +936,13 @@ void GxsIdDetails::getIcons(const RsIdentityDetails &details, QList<QIcon> &icon
|
|||
{
|
||||
QPixmap pix ;
|
||||
|
||||
if(rsReputations->isIdentityBanned(details.mId))
|
||||
{
|
||||
icons.clear() ;
|
||||
icons.push_back(QIcon(IMAGE_BANNED)) ;
|
||||
return ;
|
||||
}
|
||||
|
||||
if(icon_types & ICON_TYPE_AVATAR)
|
||||
{
|
||||
if(details.mAvatar.mSize == 0 || !pix.loadFromData(details.mAvatar.mData, details.mAvatar.mSize, "PNG"))
|
||||
|
|
|
@ -39,7 +39,8 @@ enum GxsIdDetailsType
|
|||
GXS_ID_DETAILS_TYPE_EMPTY,
|
||||
GXS_ID_DETAILS_TYPE_LOADING,
|
||||
GXS_ID_DETAILS_TYPE_DONE,
|
||||
GXS_ID_DETAILS_TYPE_FAILED
|
||||
GXS_ID_DETAILS_TYPE_FAILED,
|
||||
GXS_ID_DETAILS_TYPE_BANNED
|
||||
};
|
||||
|
||||
typedef void (*GxsIdDetailsCallbackFunction)(GxsIdDetailsType type, const RsIdentityDetails &details, QObject *object, const QVariant &data);
|
||||
|
@ -49,10 +50,11 @@ class GxsIdDetails : public QObject
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const int ICON_TYPE_AVATAR = 0x0001 ;
|
||||
static const int ICON_TYPE_PGP = 0x0002 ;
|
||||
static const int ICON_TYPE_RECOGN = 0x0004 ;
|
||||
static const int ICON_TYPE_ALL = 0x0007 ;
|
||||
static const int ICON_TYPE_AVATAR = 0x0001 ;
|
||||
static const int ICON_TYPE_PGP = 0x0002 ;
|
||||
static const int ICON_TYPE_RECOGN = 0x0004 ;
|
||||
static const int ICON_TYPE_ALL = 0x0007 ;
|
||||
static const int ICON_TYPE_REDACTED= 0x0008 ;
|
||||
|
||||
GxsIdDetails();
|
||||
virtual ~GxsIdDetails();
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include "GxsIdTreeWidgetItem.h"
|
||||
#include "GxsIdDetails.h"
|
||||
#include "util/HandleRichText.h"
|
||||
#include "retroshare/rsreputations.h"
|
||||
|
||||
#define BANNED_IMAGE ":/icons/yellow_biohazard64.png"
|
||||
|
||||
/** Constructor */
|
||||
GxsIdRSTreeWidgetItem::GxsIdRSTreeWidgetItem(const RSTreeWidgetItemCompareRole *compareRole, uint32_t icon_mask,QTreeWidget *parent)
|
||||
|
@ -71,6 +74,10 @@ static void fillGxsIdRSTreeWidgetItemCallback(GxsIdDetailsType type, const RsIde
|
|||
GxsIdDetails::getIcons(details, icons, item->iconTypeMask());
|
||||
item->processResult(true);
|
||||
break;
|
||||
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
icons.push_back(QIcon("BANNED_IMAGE")) ;
|
||||
break ;
|
||||
}
|
||||
|
||||
int column = item->idColumn();
|
||||
|
@ -81,7 +88,7 @@ static void fillGxsIdRSTreeWidgetItemCallback(GxsIdDetailsType type, const RsIde
|
|||
|
||||
QPixmap combinedPixmap;
|
||||
if (!icons.empty()) {
|
||||
GxsIdDetails::GenerateCombinedPixmap(combinedPixmap, icons, QFontMetricsF(item->font(item->idColumn())).height()*1.1);
|
||||
GxsIdDetails::GenerateCombinedPixmap(combinedPixmap, icons, QFontMetricsF(item->font(item->idColumn())).height()*1.4);
|
||||
}
|
||||
item->setData(column, Qt::DecorationRole, combinedPixmap);
|
||||
item->setAvatar(details.mAvatar);
|
||||
|
@ -139,28 +146,30 @@ void GxsIdRSTreeWidgetItem::setAvatar(const RsGxsImage &avatar)
|
|||
|
||||
QVariant GxsIdRSTreeWidgetItem::data(int column, int role) const
|
||||
{
|
||||
if (column == idColumn()) {
|
||||
switch (role) {
|
||||
case Qt::ToolTipRole:
|
||||
{
|
||||
QString t = RSTreeWidgetItem::data(column, role).toString();
|
||||
if (column == idColumn())
|
||||
{
|
||||
if (role == Qt::ToolTipRole)
|
||||
{
|
||||
QString t = RSTreeWidgetItem::data(column, role).toString();
|
||||
QImage pix;
|
||||
|
||||
QImage pix;
|
||||
if (mAvatar.mSize == 0 || !pix.loadFromData(mAvatar.mData, mAvatar.mSize, "PNG")) {
|
||||
pix = GxsIdDetails::makeDefaultIcon(mId);
|
||||
}
|
||||
if(mId.isNull())
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
else if(rsReputations->isIdentityBanned(mId))
|
||||
pix = QImage(BANNED_IMAGE) ;
|
||||
else if (mAvatar.mSize == 0 || !pix.loadFromData(mAvatar.mData, mAvatar.mSize, "PNG"))
|
||||
pix = GxsIdDetails::makeDefaultIcon(mId);
|
||||
|
||||
int S = QFontMetricsF(font(column)).height();
|
||||
int S = QFontMetricsF(font(column)).height();
|
||||
|
||||
QString embeddedImage;
|
||||
if (RsHtml::makeEmbeddedImage(pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, 8*S * 8*S)) {
|
||||
t = "<table><tr><td>" + embeddedImage + "</td><td>" + t + "</td></table>";
|
||||
}
|
||||
QString embeddedImage;
|
||||
if (RsHtml::makeEmbeddedImage(pix.scaled(QSize(4*S,4*S), Qt::KeepAspectRatio, Qt::SmoothTransformation), embeddedImage, 8*S * 8*S)) {
|
||||
t = "<table><tr><td>" + embeddedImage + "</td><td>" + t + "</td></table>";
|
||||
}
|
||||
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
return RSTreeWidgetItem::data(column, role);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,9 @@ void CreateGxsForumMsg::newMsg()
|
|||
mForumMetaLoaded = false;
|
||||
|
||||
/* fill in the available OwnIds for signing */
|
||||
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||
std::cerr << "Initing ID chooser. Sign flags = " << std::hex << mForumMeta.mSignFlags << std::dec << std::endl;
|
||||
|
||||
ui.idChooser->loadIds(IDCHOOSER_ID_REQUIRED, RsGxsId());
|
||||
|
||||
if (mForumId.isNull()) {
|
||||
mStateHelper->setActive(CREATEGXSFORUMMSG_FORUMINFO, false);
|
||||
|
@ -203,6 +205,13 @@ void CreateGxsForumMsg::loadFormInformation()
|
|||
std::cerr << "CreateGxsForumMsg::loadMsgInformation() Data Available!";
|
||||
std::cerr << std::endl;
|
||||
|
||||
std::cerr << "CreateGxsForumMsg::loadMsgInformation() using signFlags=" << std::hex << mForumMeta.mSignFlags << std::dec << std::endl;
|
||||
|
||||
if(mForumMeta.mSignFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_GPG)
|
||||
ui.idChooser->setFlags(IDCHOOSER_ID_REQUIRED | IDCHOOSER_NON_ANONYMOUS) ;
|
||||
else
|
||||
ui.idChooser->setFlags(IDCHOOSER_ID_REQUIRED) ;
|
||||
|
||||
QString name = QString::fromUtf8(mForumMeta.mGroupName.c_str());
|
||||
QString subj;
|
||||
if (!mParentId.isNull())
|
||||
|
@ -251,7 +260,7 @@ void CreateGxsForumMsg::loadFormInformation()
|
|||
ui.signBox->setEnabled(true);
|
||||
}
|
||||
|
||||
ui.forumMessage->setText("");
|
||||
//ui.forumMessage->setText("");
|
||||
}
|
||||
|
||||
void CreateGxsForumMsg::createMsg()
|
||||
|
@ -497,3 +506,8 @@ void CreateGxsForumMsg::loadRequest(const TokenQueue *queue, const TokenRequest
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CreateGxsForumMsg::insertPastedText(QString msg)
|
||||
{
|
||||
ui.forumMessage->append(msg);
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
|
||||
void newMsg(); /* cleanup */
|
||||
virtual void loadRequest(const TokenQueue *queue, const TokenRequest &req);
|
||||
void insertPastedText(QString msg) ;
|
||||
|
||||
private slots:
|
||||
void fileHashingFinished(QList<HashedFile> hashedFiles);
|
||||
|
|
|
@ -33,6 +33,7 @@ const uint32_t ForumCreateEnabledFlags = (
|
|||
GXS_GROUP_FLAGS_DISTRIBUTION |
|
||||
// GXS_GROUP_FLAGS_PUBLISHSIGN |
|
||||
GXS_GROUP_FLAGS_SHAREKEYS |
|
||||
GXS_GROUP_FLAGS_ANTI_SPAM |
|
||||
// GXS_GROUP_FLAGS_PERSONALSIGN |
|
||||
// GXS_GROUP_FLAGS_COMMENTS |
|
||||
0);
|
||||
|
@ -46,7 +47,7 @@ const uint32_t ForumCreateDefaultsFlags = ( GXS_GROUP_DEFAULTS_DISTRIB_PUBLIC
|
|||
//GXS_GROUP_DEFAULTS_PUBLISH_REQUIRED |
|
||||
//GXS_GROUP_DEFAULTS_PUBLISH_ENCRYPTED |
|
||||
|
||||
//GXS_GROUP_DEFAULTS_PERSONAL_GPG |
|
||||
//GXS_GROUP_DEFAULTS_PERSONAL_PGP |
|
||||
GXS_GROUP_DEFAULTS_PERSONAL_REQUIRED |
|
||||
//GXS_GROUP_DEFAULTS_PERSONAL_IFNOPUB |
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
#include "util/QtVersion.h"
|
||||
|
||||
#include <retroshare/rsgxsforums.h>
|
||||
#include <retroshare/rsgrouter.h>
|
||||
#include <retroshare/rsreputations.h>
|
||||
#include <retroshare/rspeers.h>
|
||||
// These should be in retroshare/ folder.
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
|
@ -57,6 +59,7 @@
|
|||
#define IMAGE_DOWNLOAD ":/images/start.png"
|
||||
#define IMAGE_DOWNLOADALL ":/images/startall.png"
|
||||
#define IMAGE_COPYLINK ":/images/copyrslink.png"
|
||||
#define IMAGE_BIOHAZARD ":/icons/yellow_biohazard64.png"
|
||||
|
||||
#define VIEW_LAST_POST 0
|
||||
#define VIEW_THREADED 1
|
||||
|
@ -94,6 +97,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
|||
mTokenTypeInsertThreads = nextTokenType();
|
||||
mTokenTypeMessageData = nextTokenType();
|
||||
mTokenTypeReplyMessage = nextTokenType();
|
||||
mTokenTypeReplyForumMessage = nextTokenType();
|
||||
|
||||
setUpdateWhenInvisible(true);
|
||||
|
||||
|
@ -134,7 +138,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget
|
|||
|
||||
ui->subscribeToolButton->hide() ;
|
||||
connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
|
||||
connect(ui->newmessageButton, SIGNAL(clicked()), this, SLOT(createmessage()));
|
||||
connect(ui->newmessageButton, SIGNAL(clicked()), this, SLOT(replytoforummessage()));
|
||||
connect(ui->newthreadButton, SIGNAL(clicked()), this, SLOT(createthread()));
|
||||
|
||||
connect(ui->threadTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(changedThread()));
|
||||
|
@ -401,11 +405,15 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
|||
QMenu contextMnu(this);
|
||||
|
||||
QAction *replyAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr("Reply"), &contextMnu);
|
||||
connect(replyAct, SIGNAL(triggered()), this, SLOT(createmessage()));
|
||||
connect(replyAct, SIGNAL(triggered()), this, SLOT(replytoforummessage()));
|
||||
|
||||
QAction *replyauthorAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr("Reply with private message"), &contextMnu);
|
||||
connect(replyauthorAct, SIGNAL(triggered()), this, SLOT(replytomessage()));
|
||||
|
||||
QAction *flagasbadAct = new QAction(QIcon(IMAGE_BIOHAZARD), tr("Ban this author"), &contextMnu);
|
||||
flagasbadAct->setToolTip(tr("This will block/hide messages from this person, and notify neighbor nodes.")) ;
|
||||
connect(flagasbadAct, SIGNAL(triggered()), this, SLOT(flagpersonasbad()));
|
||||
|
||||
QAction *newthreadAct = new QAction(QIcon(IMAGE_MESSAGE), tr("Start New Thread"), &contextMnu);
|
||||
newthreadAct->setEnabled (IS_GROUP_SUBSCRIBED(mSubscribeFlags));
|
||||
connect(newthreadAct , SIGNAL(triggered()), this, SLOT(createthread()));
|
||||
|
@ -484,6 +492,8 @@ void GxsForumThreadWidget::threadListCustomPopupMenu(QPoint /*point*/)
|
|||
contextMnu.addAction(expandAll);
|
||||
contextMnu.addAction(collapseAll);
|
||||
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(flagasbadAct);
|
||||
contextMnu.addSeparator();
|
||||
contextMnu.addAction(replyauthorAct);
|
||||
|
||||
|
@ -539,6 +549,17 @@ void GxsForumThreadWidget::changedThread()
|
|||
mThreadId = RsGxsMessageId(item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString());
|
||||
}
|
||||
|
||||
// Show info about who passed on this message.
|
||||
if(mForumGroup.mMeta.mSignFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES)
|
||||
{
|
||||
RsPeerId providerId ;
|
||||
std::string msgId = item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString();
|
||||
RsGxsMessageId mid(msgId) ;
|
||||
|
||||
if(rsGRouter->getTrackingInfo(mid,providerId) && !providerId.isNull() )
|
||||
item->setToolTip(COLUMN_THREAD_TITLE,tr("This message was obtained from %1").arg(QString::fromUtf8(rsPeers->getPeerName(providerId).c_str())));
|
||||
}
|
||||
|
||||
if (mFillThread) {
|
||||
return;
|
||||
}
|
||||
|
@ -725,6 +746,9 @@ void GxsForumThreadWidget::insertGroupData()
|
|||
case GXS_ID_DETAILS_TYPE_LOADING:
|
||||
author = GxsIdDetails::getLoadingText(details.mId);
|
||||
break;
|
||||
case GXS_ID_DETAILS_TYPE_BANNED:
|
||||
author = tr("[Banned]") ;
|
||||
break ;
|
||||
case GXS_ID_DETAILS_TYPE_DONE:
|
||||
author = GxsIdDetails::getName(details);
|
||||
break;
|
||||
|
@ -733,12 +757,26 @@ void GxsForumThreadWidget::insertGroupData()
|
|||
const RsGxsForumGroup& group = tw->mForumGroup;
|
||||
|
||||
tw->mSubscribeFlags = group.mMeta.mSubscribeFlags;
|
||||
tw->mSignFlags = group.mMeta.mSignFlags;
|
||||
tw->ui->forumName->setText(QString::fromUtf8(group.mMeta.mGroupName.c_str()));
|
||||
|
||||
QString anti_spam_features1 ;
|
||||
if(IS_GROUP_PGP_AUTHED(tw->mSignFlags)) anti_spam_features1 = tr("Anonymous IDs reputation threshold set to 0.4");
|
||||
|
||||
QString anti_spam_features2 ;
|
||||
if(IS_GROUP_MESSAGE_TRACKING(tw->mSignFlags)) anti_spam_features2 = tr("Message routing info kept for 10 days");
|
||||
|
||||
tw->mForumDescription = QString("<b>%1: \t</b>%2<br/>").arg(tr("Forum name"), QString::fromUtf8( group.mMeta.mGroupName.c_str()));
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Subscribers")).arg(group.mMeta.mPop);
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Posts (at neighbor nodes)")).arg(group.mMeta.mVisibleMsgCount);
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Author"), author);
|
||||
|
||||
if(!anti_spam_features1.isNull())
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Anti-spam")).arg(anti_spam_features1);
|
||||
|
||||
if(!anti_spam_features2.isNull())
|
||||
tw->mForumDescription += QString("<b>%1: \t</b>%2<br/>").arg(tr("Anti-spam")).arg(anti_spam_features2);
|
||||
|
||||
tw->mForumDescription += QString("<b>%1: </b><br/><br/>%2").arg(tr("Description"), QString::fromUtf8(group.mDescription.c_str()));
|
||||
|
||||
tw->ui->subscribeToolButton->setSubscribed(IS_GROUP_SUBSCRIBED(tw->mSubscribeFlags));
|
||||
|
@ -886,12 +924,21 @@ void GxsForumThreadWidget::fillThreadStatus(QString text)
|
|||
|
||||
QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForumMsg &msg, bool useChildTS, uint32_t filterColumn)
|
||||
{
|
||||
GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(mThreadCompareRole,GxsIdDetails::ICON_TYPE_ALL);
|
||||
// Early check for a message that should be hidden because its author
|
||||
// is flagged with a bad reputation
|
||||
|
||||
|
||||
bool redacted = rsReputations->isIdentityBanned(msg.mMeta.mAuthorId) ;
|
||||
|
||||
GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(mThreadCompareRole,GxsIdDetails::ICON_TYPE_ALL || (redacted?(GxsIdDetails::ICON_TYPE_REDACTED):0));
|
||||
item->moveToThread(ui->threadTreeWidget->thread());
|
||||
|
||||
QString text;
|
||||
|
||||
item->setText(COLUMN_THREAD_TITLE, QString::fromUtf8(msg.mMeta.mMsgName.c_str()));
|
||||
if(redacted)
|
||||
item->setText(COLUMN_THREAD_TITLE, tr("[ ... Redacted message ... ]"));
|
||||
else
|
||||
item->setText(COLUMN_THREAD_TITLE, QString::fromUtf8(msg.mMeta.mMsgName.c_str()));
|
||||
|
||||
QDateTime qtime;
|
||||
QString sort;
|
||||
|
@ -916,6 +963,7 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum
|
|||
|
||||
// Set later with GxsIdRSTreeWidgetItem::setId
|
||||
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_AUTHOR, QString::fromStdString(msg.mMeta.mAuthorId.toStdString()));
|
||||
|
||||
//#TODO
|
||||
#if 0
|
||||
text = QString::fromUtf8(authorName.c_str());
|
||||
|
@ -961,18 +1009,20 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum
|
|||
}
|
||||
#endif
|
||||
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_STATUS, msg.mMeta.mMsgStatus);
|
||||
|
||||
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_MISSING, false);
|
||||
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
QTreeWidgetItem *GxsForumThreadWidget::generateMissingItem(const RsGxsMessageId &msgId)
|
||||
{
|
||||
GxsIdRSTreeWidgetItem *item = new GxsIdRSTreeWidgetItem(mThreadCompareRole,GxsIdDetails::ICON_TYPE_ALL);
|
||||
|
||||
item->setText(COLUMN_THREAD_TITLE, tr("[ ... Missing Message ... ]"));
|
||||
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID, QString::fromStdString(msgId.toStdString()));
|
||||
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_MISSING, true);
|
||||
|
||||
item->setId(RsGxsId(), COLUMN_THREAD_AUTHOR, false); // fixed up columnId()
|
||||
|
||||
return item;
|
||||
}
|
||||
|
@ -1301,6 +1351,8 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg)
|
|||
return;
|
||||
}
|
||||
|
||||
bool redacted = rsReputations->isIdentityBanned(msg.mMeta.mAuthorId) ;
|
||||
|
||||
mStateHelper->setActive(mTokenTypeMessageData, true);
|
||||
|
||||
QTreeWidgetItem *item = ui->threadTreeWidget->currentItem();
|
||||
|
@ -1334,9 +1386,20 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg)
|
|||
ui->by_text_label->show() ;
|
||||
ui->by_label->show() ;
|
||||
|
||||
QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
|
||||
|
||||
if(redacted)
|
||||
{
|
||||
QString extraTxt = tr("<p><font color=\"#ff0000\"><b>The author of this message (with ID %1) is banned.</b>").arg(QString::fromStdString(msg.mMeta.mAuthorId.toStdString())) ;
|
||||
extraTxt += tr("<UL><li><b><font color=\"#ff0000\">Messages from this author are not forwarded. </font></b></li>") ;
|
||||
extraTxt += tr("<li><b><font color=\"#ff0000\">Messages from this author are replaced by this text. </font></b></li></ul>") ;
|
||||
extraTxt += tr("<p><b><font color=\"#ff0000\">You can force the visibility and forwarding of messages by setting a different opinion for that Id in People's tab.</font></b></p>") ;
|
||||
|
||||
ui->postText->setHtml(extraTxt);
|
||||
}
|
||||
else
|
||||
{
|
||||
QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS);
|
||||
ui->postText->setHtml(extraTxt);
|
||||
}
|
||||
//ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str()));
|
||||
}
|
||||
|
||||
|
@ -1685,6 +1748,34 @@ static QString buildReplyHeader(const RsMsgMetaData &meta)
|
|||
return header;
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::flagpersonasbad()
|
||||
{
|
||||
// no need to use the token system for that, since we just need to find out the author's name, which is in the item.
|
||||
|
||||
if (groupId().isNull() || mThreadId.isNull()) {
|
||||
QMessageBox::information(this, tr("RetroShare"),tr("You cant reply to a non-existant Message"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Message ... then complete replyMessageData().
|
||||
RsGxsGrpMsgIdPair postId = std::make_pair(groupId(), mThreadId);
|
||||
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumThreadWidget::requestMsgData_BanAuthor(" << postId.first << "," << postId.second << ")";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
GxsMsgReq msgIds;
|
||||
std::vector<RsGxsMessageId> &vect = msgIds[postId.first];
|
||||
vect.push_back(postId.second);
|
||||
|
||||
uint32_t token;
|
||||
mTokenQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, mTokenTypeBanAuthor);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::replytomessage()
|
||||
{
|
||||
if (groupId().isNull() || mThreadId.isNull()) {
|
||||
|
@ -1697,6 +1788,18 @@ void GxsForumThreadWidget::replytomessage()
|
|||
requestMsgData_ReplyMessage(postId);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::replytoforummessage()
|
||||
{
|
||||
if (groupId().isNull() || mThreadId.isNull()) {
|
||||
QMessageBox::information(this, tr("RetroShare"),tr("You cant reply to a non-existant Message"));
|
||||
return;
|
||||
}
|
||||
|
||||
// Get Message ... then complete replyMessageData().
|
||||
RsGxsGrpMsgIdPair postId = std::make_pair(groupId(), mThreadId);
|
||||
requestMsgData_ReplyForumMessage(postId);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::replyMessageData(const RsGxsForumMsg &msg)
|
||||
{
|
||||
if ((msg.mMeta.mGroupId != groupId()) || (msg.mMeta.mMsgId != mThreadId))
|
||||
|
@ -1725,6 +1828,34 @@ void GxsForumThreadWidget::replyMessageData(const RsGxsForumMsg &msg)
|
|||
}
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::replyForumMessageData(const RsGxsForumMsg &msg)
|
||||
{
|
||||
if ((msg.mMeta.mGroupId != groupId()) || (msg.mMeta.mMsgId != mThreadId))
|
||||
{
|
||||
std::cerr << "GxsForumThreadWidget::replyMessageData() ERROR Message Ids have changed!";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!msg.mMeta.mAuthorId.isNull())
|
||||
{
|
||||
CreateGxsForumMsg *cfm = new CreateGxsForumMsg(groupId(), mThreadId);
|
||||
QTextDocument doc ;
|
||||
// doc.setHtml(QString::fromUtf8(msg.mMsg.c_str()) );
|
||||
// std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
RsHtml::makeQuotedText(ui->postText);
|
||||
|
||||
cfm->insertPastedText(RsHtml::makeQuotedText(ui->postText)) ;
|
||||
cfm->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("RetroShare"),tr("You cant reply to an Anonymous Author"));
|
||||
}
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::changedViewBox()
|
||||
{
|
||||
if (mInProcessSettings) {
|
||||
|
@ -1800,6 +1931,7 @@ bool GxsForumThreadWidget::filterItem(QTreeWidgetItem *item, const QString &text
|
|||
void GxsForumThreadWidget::requestGroupData()
|
||||
{
|
||||
mSubscribeFlags = 0;
|
||||
mSignFlags = 0;
|
||||
mForumDescription.clear();
|
||||
|
||||
mTokenQueue->cancelActiveRequestTokens(mTokenTypeGroupData);
|
||||
|
@ -1940,6 +2072,24 @@ void GxsForumThreadWidget::requestMsgData_ReplyMessage(const RsGxsGrpMsgIdPair &
|
|||
mTokenQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, mTokenTypeReplyMessage);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::requestMsgData_ReplyForumMessage(const RsGxsGrpMsgIdPair &msgId)
|
||||
{
|
||||
RsTokReqOptions opts;
|
||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumThreadWidget::requestMsgData_ReplyMessage(" << msgId.first << "," << msgId.second << ")";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
GxsMsgReq msgIds;
|
||||
std::vector<RsGxsMessageId> &vect = msgIds[msgId.first];
|
||||
vect.push_back(msgId.second);
|
||||
|
||||
uint32_t token;
|
||||
mTokenQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgIds, mTokenTypeReplyForumMessage);
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
|
@ -1956,7 +2106,6 @@ void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
|||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
replyMessageData(msgs[0]);
|
||||
}
|
||||
else
|
||||
|
@ -1966,6 +2115,63 @@ void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
|
|||
}
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::loadMsgData_ReplyForumMessage(const uint32_t &token)
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
std::vector<RsGxsForumMsg> msgs;
|
||||
if (rsGxsForums->getMsgData(token, msgs))
|
||||
{
|
||||
if (msgs.size() != 1)
|
||||
{
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage() ERROR Wrong number of answers";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
replyForumMessageData(msgs[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage() ERROR Missing Message Data...";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::loadMsgData_BanAuthor(const uint32_t &token)
|
||||
{
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_BanAuthor()";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
std::vector<RsGxsForumMsg> msgs;
|
||||
if (rsGxsForums->getMsgData(token, msgs))
|
||||
{
|
||||
if (msgs.size() != 1)
|
||||
{
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage() ERROR Wrong number of answers";
|
||||
std::cerr << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
std::cerr << " banning author id " << msgs[0].mMeta.mAuthorId << std::endl;
|
||||
rsReputations->setOwnOpinion(msgs[0].mMeta.mAuthorId,RsReputations::OPINION_NEGATIVE) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage() ERROR Missing Message Data...";
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
updateDisplay(true) ;
|
||||
|
||||
// we should also update the icons so that they changed to the icon for banned peers.
|
||||
|
||||
std::cerr << __PRETTY_FUNCTION__ << ": need to implement the update of GxsTreeWidgetItems icons too." << std::endl;
|
||||
}
|
||||
/*********************** **** **** **** ***********************/
|
||||
/*********************** **** **** **** ***********************/
|
||||
|
||||
|
@ -1993,6 +2199,16 @@ void GxsForumThreadWidget::loadRequest(const TokenQueue *queue, const TokenReque
|
|||
loadMsgData_ReplyMessage(req.mToken);
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.mUserType == mTokenTypeReplyForumMessage) {
|
||||
loadMsgData_ReplyForumMessage(req.mToken);
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.mUserType == mTokenTypeBanAuthor) {
|
||||
loadMsgData_BanAuthor(req.mToken);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
GxsMessageFrameWidget::loadRequest(queue, req);
|
||||
|
|
|
@ -66,7 +66,7 @@ protected:
|
|||
|
||||
/* GxsMessageFrameWidget */
|
||||
virtual void setAllMessagesReadDo(bool read, uint32_t &token);
|
||||
|
||||
|
||||
private slots:
|
||||
/** Create the context popup menu and it's submenus */
|
||||
void threadListCustomPopupMenu(QPoint point);
|
||||
|
@ -75,7 +75,13 @@ private slots:
|
|||
void clickedThread (QTreeWidgetItem *item, int column);
|
||||
|
||||
void replytomessage();
|
||||
void replytoforummessage();
|
||||
|
||||
void replyMessageData(const RsGxsForumMsg &msg);
|
||||
void replyForumMessageData(const RsGxsForumMsg &msg);
|
||||
|
||||
|
||||
|
||||
|
||||
//void print();
|
||||
//void printpreview();
|
||||
|
@ -101,6 +107,7 @@ private slots:
|
|||
void downloadAllFiles();
|
||||
|
||||
void changedViewBox();
|
||||
void flagpersonasbad();
|
||||
|
||||
void filterColumnChanged(int column);
|
||||
void filterItems(const QString &text);
|
||||
|
@ -140,6 +147,10 @@ private:
|
|||
void loadMessageData(const uint32_t &token);
|
||||
void requestMsgData_ReplyMessage(const RsGxsGrpMsgIdPair &msgId);
|
||||
void loadMsgData_ReplyMessage(const uint32_t &token);
|
||||
|
||||
void requestMsgData_ReplyForumMessage(const RsGxsGrpMsgIdPair &msgId);
|
||||
void loadMsgData_ReplyForumMessage(const uint32_t &token);
|
||||
void loadMsgData_BanAuthor(const uint32_t &token);
|
||||
|
||||
private:
|
||||
RsGxsGroupId mLastForumID;
|
||||
|
@ -147,6 +158,7 @@ private:
|
|||
RsGxsForumGroup mForumGroup;
|
||||
QString mForumDescription;
|
||||
int mSubscribeFlags;
|
||||
int mSignFlags;
|
||||
bool mInProcessSettings;
|
||||
bool mInMsgAsReadUnread;
|
||||
int mLastViewType;
|
||||
|
@ -159,6 +171,8 @@ private:
|
|||
uint32_t mTokenTypeInsertThreads;
|
||||
uint32_t mTokenTypeMessageData;
|
||||
uint32_t mTokenTypeReplyMessage;
|
||||
uint32_t mTokenTypeReplyForumMessage;
|
||||
uint32_t mTokenTypeBanAuthor;
|
||||
|
||||
/* Color definitions (for standard see qss.default) */
|
||||
QColor mTextColorRead;
|
||||
|
@ -170,7 +184,7 @@ private:
|
|||
RsGxsMessageId mNavigatePendingMsgId;
|
||||
QList<RsGxsMessageId> mIgnoredMsgId;
|
||||
|
||||
Ui::GxsForumThreadWidget *ui;
|
||||
Ui::GxsForumThreadWidget *ui;
|
||||
};
|
||||
|
||||
#endif // GXSFORUMTHREADWIDGET_H
|
||||
|
|
|
@ -178,8 +178,9 @@ void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo,
|
|||
groupItemInfo.description = descriptionIt.value();
|
||||
}
|
||||
|
||||
if (IS_GROUP_ADMIN(groupInfo.mSubscribeFlags)) {
|
||||
groupItemInfo.icon = QIcon(":images/konv_message2.png");
|
||||
}
|
||||
if (IS_GROUP_ADMIN(groupInfo.mSubscribeFlags))
|
||||
groupItemInfo.icon = QIcon(":images/konv_message2.png");
|
||||
else if ((IS_GROUP_PGP_AUTHED(groupInfo.mSignFlags)) || (IS_GROUP_MESSAGE_TRACKING(groupInfo.mSignFlags)) )
|
||||
groupItemInfo.icon = QIcon(":images/konv_message3.png");
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<td><img src="qrc:/images/help/addfriendkey.png"/></td>
|
||||
|
||||
<p>
|
||||
When your friends send you a their invitations, Click to open the Add Friends window.
|
||||
When your friends send you their invitations, click to open the Add Friends window.
|
||||
|
||||
Cut and Paste your Friend's "ID Certificates" into the window and add them as friends.
|
||||
</p>
|
||||
|
|
|
@ -35,9 +35,9 @@ Trust settings and Signing
|
|||
<h3>Trust Settings</h3>
|
||||
<td><img src="qrc:/images/trustsettings.png"/></td>
|
||||
<p>
|
||||
The trust settings refers to the gnupg web of trust mecanism. <br>
|
||||
The trust settings refers to the GnuPG web of trust mechanism. <br>
|
||||
This trust means how you trust your friends when he is signing other PGP keys. <br>
|
||||
If you set your trust to "full", it means that when your friend sign a key, this key will be shown as validated by the web of trust in the network view.</p>
|
||||
If you set your trust to "full", it means that when your friend signs a key, this key will be shown as validated by the web of trust in the network view.</p>
|
||||
|
||||
|
||||
<a name="signing"/>
|
||||
|
@ -45,8 +45,8 @@ If you set your trust to "full", it means that when your friend sign a key, this
|
|||
<p>
|
||||
|
||||
You should sign a key when you are sure that the person who claims ownership on this key is the real owner of the key. <br>
|
||||
When you are sure that the name of the key owner is the real name of the emmitter of this key, you may sign it to confirm it. <br>
|
||||
Signing the key will be public unless public discovery is not setted. This means you friends can check if you did sign someone's key.</i>
|
||||
When you are sure that the name of the key owner is the real name of the emitter of this key, you may sign it to confirm it. <br>
|
||||
Signing the key will be public unless public discovery is not set. This means your friends can check if you did sign someone's key.</i>
|
||||
</p>
|
||||
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<file>icons/blank_green_128.png</file>
|
||||
<file>icons/browsable_blue_128.png</file>
|
||||
<file>icons/browsable_green_128.png</file>
|
||||
<file>icons/bullet_green_64.png</file>
|
||||
<file>icons/bullet_grey_64.png</file>
|
||||
<file>icons/bullet_red_64.png</file>
|
||||
<file>icons/bullet_yellow_64.png</file>
|
||||
<file>icons/bullet_green_128.png</file>
|
||||
<file>icons/bullet_grey_128.png</file>
|
||||
<file>icons/bullet_red_128.png</file>
|
||||
<file>icons/bullet_yellow_128.png</file>
|
||||
<file>icons/channels_128.png</file>
|
||||
<file>icons/channels_red_128.png</file>
|
||||
<file>icons/chat_128.png</file>
|
||||
|
@ -60,5 +60,14 @@
|
|||
<file>icons/user-busy_64.png</file>
|
||||
<file>icons/user-offline_64.png</file>
|
||||
<file>icons/user-online_64.png</file>
|
||||
<file>icons/yellow_biohazard64.png</file>
|
||||
<file>icons/gmail.png</file>
|
||||
<file>icons/yahoo.png</file>
|
||||
<file>icons/outlook.png</file>
|
||||
<file>icons/aol.png</file>
|
||||
<file>icons/yandex.png</file>
|
||||
<file>icons/tor-on.png</file>
|
||||
<file>icons/tor-logo.png</file>
|
||||
<file>icons/tor-off.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
retroshare-gui/src/gui/icons/aol.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
retroshare-gui/src/gui/icons/bullet_green_128.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.9 KiB |
BIN
retroshare-gui/src/gui/icons/bullet_grey_128.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 6.9 KiB |
BIN
retroshare-gui/src/gui/icons/bullet_red_128.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.9 KiB |
BIN
retroshare-gui/src/gui/icons/bullet_yellow_128.png
Normal file
After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.4 KiB |
BIN
retroshare-gui/src/gui/icons/gmail.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
retroshare-gui/src/gui/icons/outlook.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
retroshare-gui/src/gui/icons/tor-logo.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
retroshare-gui/src/gui/icons/tor-off.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
retroshare-gui/src/gui/icons/tor-on.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
retroshare-gui/src/gui/icons/tor-starting.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
retroshare-gui/src/gui/icons/tor-stopping.png
Normal file
After Width: | Height: | Size: 6.5 KiB |
BIN
retroshare-gui/src/gui/icons/yahoo.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
retroshare-gui/src/gui/icons/yandex.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
retroshare-gui/src/gui/icons/yellow_biohazard64.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
|
@ -316,6 +316,7 @@
|
|||
<file>images/konversation16.png</file>
|
||||
<file>images/konversation128.png</file>
|
||||
<file>images/konv_message2.png</file>
|
||||
<file>images/konv_message3.png</file>
|
||||
<file>images/konv_message64.png</file>
|
||||
<file>images/konversation64.png</file>
|
||||
<file>images/forums_new.png</file>
|
||||
|
|
BIN
retroshare-gui/src/gui/images/konv_message3.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 7.8 KiB |
|
@ -253,9 +253,9 @@ PopupChatWindow QToolBar#chattoolBar{
|
|||
|
||||
/* Messages */
|
||||
|
||||
MessageComposer > QToolBar#toolBar {
|
||||
MessageComposer QToolBar#toolBar {
|
||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #9BDBF9, stop:1 #1592CD);
|
||||
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
MessagesDialog QFrame#folderFrame, MessagesDialog QFrame#quickViewFrame {
|
||||
|
|
|
@ -45,6 +45,7 @@ AppearancePage::AppearancePage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.checkBoxHideSoundStatus, SIGNAL(toggled(bool)), pMainWindow->soundStatusInstance(), SLOT(setHidden(bool)));
|
||||
connect(ui.checkBoxHideToasterDisable, SIGNAL(toggled(bool)), pMainWindow->toasterDisableInstance(), SLOT(setHidden(bool)));
|
||||
connect(ui.checkBoxShowSystrayOnStatus, SIGNAL(toggled(bool)), pMainWindow->sysTrayStatusInstance(), SLOT(setVisible(bool)));
|
||||
connect(ui.checkBoxDisableSysTrayToolTip, SIGNAL(toggled(bool)), pMainWindow, SLOT(toggleStatusToolTip(bool)));
|
||||
|
||||
/* Populate combo boxes */
|
||||
foreach (QString code, LanguageSupport::languageCodes()) {
|
||||
|
@ -142,6 +143,8 @@ bool AppearancePage::save(QString &errmsg)
|
|||
Settings->setValueToGroup("StatusBar", "HideSound", QVariant(ui.checkBoxHideSoundStatus->isChecked()));
|
||||
Settings->setValueToGroup("StatusBar", "HideToaster", QVariant(ui.checkBoxHideToasterDisable->isChecked()));
|
||||
Settings->setValueToGroup("StatusBar", "ShowSysTrayOnStatusBar", QVariant(ui.checkBoxShowSystrayOnStatus->isChecked()));
|
||||
Settings->setValueToGroup("StatusBar", "DisableSysTrayToolTip", QVariant(ui.checkBoxDisableSysTrayToolTip->isChecked()));
|
||||
MainWindow::getInstance()->toggleStatusToolTip(ui.checkBoxDisableSysTrayToolTip->isChecked());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -228,6 +231,7 @@ void AppearancePage::load()
|
|||
ui.checkBoxHideSoundStatus->setChecked(Settings->valueFromGroup("StatusBar", "HideSound", QVariant(false)).toBool());
|
||||
ui.checkBoxHideToasterDisable->setChecked(Settings->valueFromGroup("StatusBar", "HideToaster", QVariant(false)).toBool());
|
||||
ui.checkBoxShowSystrayOnStatus->setChecked(Settings->valueFromGroup("StatusBar", "ShowSysTrayOnStatusBar", QVariant(false)).toBool());
|
||||
ui.checkBoxDisableSysTrayToolTip->setChecked(Settings->valueFromGroup("StatusBar", "DisableSysTrayToolTip", QVariant(false)).toBool());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,16 @@
|
|||
<enum>Qt::NoContextMenu</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
@ -199,7 +208,16 @@
|
|||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -212,7 +230,7 @@
|
|||
<item>
|
||||
<widget class="QRadioButton" name="rbtActionOnListItem">
|
||||
<property name="text">
|
||||
<string>On List Item</string>
|
||||
<string>On List Ite&m</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -248,7 +266,16 @@
|
|||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -461,6 +488,13 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxDisableSysTrayToolTip">
|
||||
<property name="text">
|
||||
<string>Disable SysTray ToolTip</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
@ -110,6 +110,43 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hl_minimumFontSize">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="minimumFontSizeLabel">
|
||||
<property name="text">
|
||||
<string>Minimum font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hs_minimumFontSize">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="minimumFontSize">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>64</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_enableBold">
|
||||
<property name="text">
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <iostream>
|
||||
|
||||
#include <QDialog>
|
||||
#include <QFileInfo>
|
||||
|
||||
#include "PluginsPage.h"
|
||||
#include "PluginItem.h"
|
||||
|
@ -55,25 +56,32 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
rsPlugins->getPluginStatus(i,status,file_name,file_hash,svn_revision,error_string) ;
|
||||
|
||||
QString status_string ;
|
||||
QString short_status_string;
|
||||
|
||||
switch(status)
|
||||
{
|
||||
case PLUGIN_STATUS_REJECTED_HASH: status_string = tr("Hash rejected. Enable it manually and restart, if you need.") ;
|
||||
case PLUGIN_STATUS_REJECTED_HASH: status_string = tr("Plugin disabled. Click the enable button and restart Retroshare") ;
|
||||
short_status_string = tr("[disabled]");
|
||||
break ;
|
||||
|
||||
case PLUGIN_STATUS_MISSING_API: status_string = tr("No API number supplied. Please read plugin development manual.") ;
|
||||
short_status_string = tr("[loading problem]");
|
||||
break ;
|
||||
|
||||
case PLUGIN_STATUS_MISSING_SVN: status_string = tr("No SVN number supplied. Please read plugin development manual.") ;
|
||||
short_status_string = tr("[loading problem]");
|
||||
break ;
|
||||
|
||||
case PLUGIN_STATUS_DLOPEN_ERROR: status_string = tr("Loading error.") ;
|
||||
short_status_string = tr("[loading problem]");
|
||||
break ;
|
||||
|
||||
case PLUGIN_STATUS_MISSING_SYMBOL:status_string = tr("Missing symbol. Wrong version?") ;
|
||||
short_status_string = tr("[loading problem]");
|
||||
break ;
|
||||
|
||||
case PLUGIN_STATUS_NULL_PLUGIN: status_string = tr("No plugin object") ;
|
||||
short_status_string = tr("[loading problem]");
|
||||
break ;
|
||||
|
||||
case PLUGIN_STATUS_LOADED: status_string = tr("Plugins is loaded.") ;
|
||||
|
@ -84,9 +92,9 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
|
||||
QIcon plugin_icon(":images/disabled_plugin_48.png") ;
|
||||
RsPlugin *plugin = rsPlugins->plugin(i) ;
|
||||
QString pluginTitle = tr("Title unavailable") ;
|
||||
QString pluginDescription = tr("Description unavailable") ;
|
||||
QString pluginVersion = tr("Unknown version");
|
||||
QString pluginTitle = QFileInfo(QString::fromStdString(file_name)).fileName();
|
||||
QString pluginDescription = status_string;
|
||||
QString pluginVersion = short_status_string;
|
||||
|
||||
if(plugin!=NULL)
|
||||
{
|
||||
|
@ -114,7 +122,7 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
|
||||
|
||||
if(plugin == NULL || plugin->qt_config_panel() == NULL)
|
||||
item->_configure_PB->setEnabled(false) ;
|
||||
item->_configure_PB->hide() ;
|
||||
|
||||
|
||||
if(plugin != NULL){
|
||||
|
@ -123,6 +131,7 @@ PluginsPage::PluginsPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
}else{
|
||||
item->enableButton->show();
|
||||
item->disableButton->hide();
|
||||
item->_about_PB->hide();
|
||||
}
|
||||
|
||||
//if(rsPlugins->getAllowAllPlugins())
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Loaded plugins</string>
|
||||
<string>Plugins</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="margin">
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
//#define SERVER_DEBUG 1
|
||||
|
||||
ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
||||
: ConfigPage(parent, flags), mIsHiddenNode(false)
|
||||
: ConfigPage(parent, flags), mIsHiddenNode(false), mHiddenType(RS_HIDDEN_TYPE_NONE)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
@ -61,7 +61,7 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect( ui.netModeComboBox, SIGNAL( activated ( int ) ), this, SLOT( toggleUPnP( ) ) );
|
||||
connect( ui.allowIpDeterminationCB, SIGNAL( toggled( bool ) ), this, SLOT( toggleIpDetermination(bool) ) );
|
||||
connect( ui.cleanKnownIPs_PB, SIGNAL( clicked( ) ), this, SLOT( clearKnownAddressList() ) );
|
||||
connect( ui.testIncomingTor_PB, SIGNAL( clicked( ) ), this, SLOT( updateTorInProxyIndicator() ) );
|
||||
connect( ui.testIncoming_PB, SIGNAL( clicked( ) ), this, SLOT( updateInProxyIndicator() ) );
|
||||
|
||||
manager = NULL ;
|
||||
|
||||
|
@ -105,7 +105,7 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
for(std::list<std::string>::const_iterator it(ip_servers.begin());it!=ip_servers.end();++it)
|
||||
ui.IPServersLV->addItem(QString::fromStdString(*it)) ;
|
||||
|
||||
ui.torpage_incoming->setVisible(false);
|
||||
ui.hiddenpage_incoming->setVisible(false);
|
||||
|
||||
#ifdef SERVER_DEBUG
|
||||
std::cerr << "ServerPage::ServerPage() called";
|
||||
|
@ -218,6 +218,7 @@ void ServerPage::load()
|
|||
|
||||
if (mIsHiddenNode)
|
||||
{
|
||||
mHiddenType = detail.hiddenType;
|
||||
ui.tabWidget->setTabEnabled(1,false) ;
|
||||
loadHiddenNode();
|
||||
return;
|
||||
|
@ -226,7 +227,12 @@ void ServerPage::load()
|
|||
loadFilteredIps() ;
|
||||
|
||||
ui.netModeComboBox->show() ;
|
||||
ui.textlabel_upnp->show();
|
||||
ui.iconlabel_upnp->show();
|
||||
ui.label_nat->show();
|
||||
|
||||
ui.hiddenMode_LB->hide() ;
|
||||
ui.iconlabel_hiddenMode->hide() ;
|
||||
|
||||
/* set net mode */
|
||||
int netIndex = 0;
|
||||
|
@ -302,15 +308,20 @@ void ServerPage::load()
|
|||
for(std::list<std::string>::const_iterator it(detail.ipAddressList.begin());it!=detail.ipAddressList.end();++it)
|
||||
ui.ipAddressList->addItem(QString::fromStdString(*it));
|
||||
|
||||
/* TOR PAGE SETTINGS - only Proxy (outgoing) */
|
||||
/* HIDDEN PAGE SETTINGS - only Proxy (outgoing) */
|
||||
std::string proxyaddr;
|
||||
uint16_t proxyport;
|
||||
uint32_t status ;
|
||||
rsPeers->getProxyServer(proxyaddr, proxyport, status);
|
||||
ui.torpage_proxyAddress -> setText(QString::fromStdString(proxyaddr));
|
||||
ui.torpage_proxyPort -> setValue(proxyport);
|
||||
// Tor
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_TOR, proxyaddr, proxyport, status);
|
||||
ui.hiddenpage_proxyAddress_tor -> setText(QString::fromStdString(proxyaddr));
|
||||
ui.hiddenpage_proxyPort_tor -> setValue(proxyport);
|
||||
// I2P
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, proxyaddr, proxyport, status);
|
||||
ui.hiddenpage_proxyAddress_i2p -> setText(QString::fromStdString(proxyaddr));
|
||||
ui.hiddenpage_proxyPort_i2p -> setValue(proxyport);
|
||||
|
||||
updateTorOutProxyIndicator();
|
||||
updateOutProxyIndicator();
|
||||
}
|
||||
|
||||
void ServerPage::toggleAutoIncludeFriends(bool b)
|
||||
|
@ -697,7 +708,7 @@ void ServerPage::updateStatus()
|
|||
ui.iconlabel_ext->setPixmap(QPixmap(":/images/ledoff1.png"));
|
||||
|
||||
// check for Tor
|
||||
updateTorOutProxyIndicator();
|
||||
updateOutProxyIndicator();
|
||||
}
|
||||
|
||||
void ServerPage::toggleUPnP()
|
||||
|
@ -807,17 +818,29 @@ void ServerPage::saveAddresses()
|
|||
rsConfig->SetMaxDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
|
||||
|
||||
// HANDLE PROXY SERVER.
|
||||
std::string orig_proxyaddr;
|
||||
uint16_t orig_proxyport;
|
||||
uint32_t status ;
|
||||
rsPeers->getProxyServer(orig_proxyaddr, orig_proxyport,status);
|
||||
std::string orig_proxyaddr, new_proxyaddr;
|
||||
uint16_t orig_proxyport, new_proxyport;
|
||||
uint32_t status ;
|
||||
// Tor
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_TOR, orig_proxyaddr, orig_proxyport,status);
|
||||
|
||||
std::string new_proxyaddr = ui.torpage_proxyAddress -> text().toStdString();
|
||||
uint16_t new_proxyport = ui.torpage_proxyPort -> value();
|
||||
new_proxyaddr = ui.hiddenpage_proxyAddress_tor -> text().toStdString();
|
||||
new_proxyport = ui.hiddenpage_proxyPort_tor -> value();
|
||||
|
||||
if ((new_proxyaddr != orig_proxyaddr) || (new_proxyport != orig_proxyport))
|
||||
{
|
||||
rsPeers->setProxyServer(new_proxyaddr, new_proxyport);
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_TOR, new_proxyaddr, new_proxyport);
|
||||
}
|
||||
|
||||
// I2P
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, orig_proxyaddr, orig_proxyport,status);
|
||||
|
||||
new_proxyaddr = ui.hiddenpage_proxyAddress_i2p -> text().toStdString();
|
||||
new_proxyport = ui.hiddenpage_proxyPort_i2p -> value();
|
||||
|
||||
if ((new_proxyaddr != orig_proxyaddr) || (new_proxyport != orig_proxyport))
|
||||
{
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_I2P, new_proxyaddr, new_proxyport);
|
||||
}
|
||||
|
||||
load();
|
||||
|
@ -861,7 +884,13 @@ void ServerPage::loadHiddenNode()
|
|||
// FIXED.
|
||||
//ui.netModeComboBox->setCurrentIndex(3);
|
||||
ui.netModeComboBox->hide();
|
||||
ui.textlabel_upnp->hide();
|
||||
ui.iconlabel_upnp->hide();
|
||||
ui.label_nat->hide();
|
||||
|
||||
ui.hiddenMode_LB->show();
|
||||
ui.iconlabel_hiddenMode->show() ;
|
||||
ui.iconlabel_hiddenMode->setPixmap(QPixmap(":/images/ledon1.png"));
|
||||
|
||||
// CHANGE OPTIONS ON
|
||||
ui.discComboBox->removeItem(3);
|
||||
|
@ -893,7 +922,7 @@ void ServerPage::loadHiddenNode()
|
|||
ui.label_dynDNS->setVisible(false);
|
||||
ui.dynDNS ->setVisible(false);
|
||||
|
||||
ui.torpage_incoming->setVisible(true);
|
||||
ui.hiddenpage_incoming->setVisible(true);
|
||||
|
||||
/* Addresses must be set here - otherwise can't edit it */
|
||||
/* set local address */
|
||||
|
@ -901,7 +930,7 @@ void ServerPage::loadHiddenNode()
|
|||
ui.localPort -> setValue(detail.localPort);
|
||||
/* set the server address */
|
||||
|
||||
ui.extAddress->setText(tr("Hidden - See Tor Config"));
|
||||
ui.extAddress->setText(tr("Hidden - See Config"));
|
||||
|
||||
ui.showDiscStatusBar->setChecked(Settings->getStatusBarFlags() & STATUSBAR_DISC);
|
||||
ui.showDiscStatusBar->hide() ; // hidden because not functional at the moment.
|
||||
|
@ -924,32 +953,64 @@ void ServerPage::loadHiddenNode()
|
|||
/* TOR PAGE SETTINGS */
|
||||
|
||||
/* set local address */
|
||||
ui.torpage_localAddress->setEnabled(false);
|
||||
ui.torpage_localAddress->setText(QString::fromStdString(detail.localAddr));
|
||||
ui.torpage_localPort -> setValue(detail.localPort);
|
||||
ui.hiddenpage_localAddress->setEnabled(false);
|
||||
ui.hiddenpage_localAddress->setText(QString::fromStdString(detail.localAddr));
|
||||
ui.hiddenpage_localPort -> setValue(detail.localPort);
|
||||
|
||||
/* set the server address */
|
||||
ui.torpage_onionAddress->setText(QString::fromStdString(detail.hiddenNodeAddress));
|
||||
ui.torpage_onionPort -> setValue(detail.hiddenNodePort);
|
||||
ui.hiddenpage_serviceAddress->setText(QString::fromStdString(detail.hiddenNodeAddress));
|
||||
ui.hiddenpage_servicePort -> setValue(detail.hiddenNodePort);
|
||||
/* in I2P there is no port - there is only the address */
|
||||
ui.hiddenpage_servicePort->setEnabled(detail.hiddenType != RS_HIDDEN_TYPE_I2P);
|
||||
|
||||
/* out proxy settings */
|
||||
std::string proxyaddr;
|
||||
uint16_t proxyport;
|
||||
uint32_t proxy_state_flags;
|
||||
rsPeers->getProxyServer(proxyaddr, proxyport, proxy_state_flags);
|
||||
ui.torpage_proxyAddress -> setText(QString::fromStdString(proxyaddr));
|
||||
ui.torpage_proxyPort -> setValue(proxyport);
|
||||
uint16_t proxyport;
|
||||
uint32_t status ;
|
||||
// Tor
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_TOR, proxyaddr, proxyport, status);
|
||||
ui.hiddenpage_proxyAddress_tor -> setText(QString::fromStdString(proxyaddr));
|
||||
ui.hiddenpage_proxyPort_tor -> setValue(proxyport);
|
||||
// I2P
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, proxyaddr, proxyport, status);
|
||||
ui.hiddenpage_proxyAddress_i2p -> setText(QString::fromStdString(proxyaddr));
|
||||
ui.hiddenpage_proxyPort_i2p -> setValue(proxyport);
|
||||
|
||||
updateTorOutProxyIndicator();
|
||||
updateOutProxyIndicator();
|
||||
|
||||
QString expected = "HiddenServiceDir </your/path/to/hidden/directory/service>\n";
|
||||
expected += "HiddenServicePort ";
|
||||
expected += QString::number(detail.hiddenNodePort);
|
||||
expected += " ";
|
||||
expected += QString::fromStdString(detail.localAddr);
|
||||
expected += ":";
|
||||
expected += QString::number(detail.localPort);
|
||||
QString expected = "";
|
||||
switch (mHiddenType) {
|
||||
case RS_HIDDEN_TYPE_I2P:
|
||||
ui.l_serviceAddress->setText(tr("I2P Address"));
|
||||
ui.l_incomingTestResult->setText(tr("I2P incoming ok"));
|
||||
|
||||
ui.torpage_configuration->setPlainText(expected);
|
||||
expected += "http://127.0.0.1:7657/i2ptunnelmgr - I2P Hidden Services\n";
|
||||
expected += tr("Points at: ");
|
||||
expected += QString::fromStdString(detail.localAddr);
|
||||
expected += ":";
|
||||
expected += QString::number(detail.localPort);
|
||||
break;
|
||||
case RS_HIDDEN_TYPE_TOR:
|
||||
ui.l_serviceAddress->setText(tr("Onion Address"));
|
||||
ui.l_incomingTestResult->setText(tr("Tor incoming ok"));
|
||||
|
||||
expected += "HiddenServiceDir </your/path/to/hidden/directory/service>\n";
|
||||
expected += "HiddenServicePort ";
|
||||
expected += QString::number(detail.hiddenNodePort);
|
||||
expected += " ";
|
||||
expected += QString::fromStdString(detail.localAddr);
|
||||
expected += ":";
|
||||
expected += QString::number(detail.localPort);
|
||||
break;
|
||||
default:
|
||||
ui.l_serviceAddress->setText(tr("Service Address"));
|
||||
ui.l_incomingTestResult->setText(tr("incoming ok"));
|
||||
|
||||
expected += "Please fill in a service address";
|
||||
|
||||
break;
|
||||
}
|
||||
ui.hiddenpage_configuration->setPlainText(expected);
|
||||
}
|
||||
|
||||
/** Loads the settings for this page */
|
||||
|
@ -1005,7 +1066,7 @@ void ServerPage::updateStatusHiddenNode()
|
|||
|
||||
#endif
|
||||
|
||||
updateTorOutProxyIndicator();
|
||||
updateOutProxyIndicator();
|
||||
}
|
||||
|
||||
void ServerPage::saveAddressesHiddenNode()
|
||||
|
@ -1036,41 +1097,54 @@ void ServerPage::saveAddressesHiddenNode()
|
|||
if ((vs_disc != detail.vs_disc) || (vs_dht != detail.vs_dht))
|
||||
rsPeers->setVisState(ownId, vs_disc, vs_dht);
|
||||
|
||||
if (detail.localPort != ui.torpage_localPort->value())
|
||||
if (detail.localPort != ui.hiddenpage_localPort->value())
|
||||
{
|
||||
// Set Local Address - force to 127.0.0.1
|
||||
rsPeers->setLocalAddress(ownId, "127.0.0.1", ui.torpage_localPort->value());
|
||||
rsPeers->setLocalAddress(ownId, "127.0.0.1", ui.hiddenpage_localPort->value());
|
||||
}
|
||||
|
||||
std::string hiddenAddr = ui.torpage_onionAddress->text().toStdString();
|
||||
uint16_t hiddenPort = ui.torpage_onionPort->value();
|
||||
std::string hiddenAddr = ui.hiddenpage_serviceAddress->text().toStdString();
|
||||
uint16_t hiddenPort = ui.hiddenpage_servicePort->value();
|
||||
if ((hiddenAddr != detail.hiddenNodeAddress) || (hiddenPort != detail.hiddenNodePort))
|
||||
{
|
||||
rsPeers->setHiddenNode(ownId, hiddenAddr, hiddenPort);
|
||||
}
|
||||
|
||||
// HANDLE PROXY SERVER.
|
||||
std::string orig_proxyaddr;
|
||||
uint16_t orig_proxyport;
|
||||
uint32_t state_flags ;
|
||||
rsPeers->getProxyServer(orig_proxyaddr, orig_proxyport,state_flags);
|
||||
std::string orig_proxyaddr,new_proxyaddr;
|
||||
uint16_t orig_proxyport, new_proxyport;
|
||||
uint32_t status ;
|
||||
// Tor
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_TOR, orig_proxyaddr, orig_proxyport,status);
|
||||
|
||||
std::string new_proxyaddr = ui.torpage_proxyAddress -> text().toStdString();
|
||||
uint16_t new_proxyport = ui.torpage_proxyPort -> value();
|
||||
new_proxyaddr = ui.hiddenpage_proxyAddress_tor -> text().toStdString();
|
||||
new_proxyport = ui.hiddenpage_proxyPort_tor -> value();
|
||||
|
||||
if ((new_proxyaddr != orig_proxyaddr) || (new_proxyport != orig_proxyport))
|
||||
{
|
||||
rsPeers->setProxyServer(new_proxyaddr, new_proxyport);
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_TOR, new_proxyaddr, new_proxyport);
|
||||
}
|
||||
|
||||
// I2P
|
||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, orig_proxyaddr, orig_proxyport,status);
|
||||
|
||||
new_proxyaddr = ui.hiddenpage_proxyAddress_i2p -> text().toStdString();
|
||||
new_proxyport = ui.hiddenpage_proxyPort_i2p -> value();
|
||||
|
||||
if ((new_proxyaddr != orig_proxyaddr) || (new_proxyport != orig_proxyport))
|
||||
{
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_I2P, new_proxyaddr, new_proxyport);
|
||||
}
|
||||
|
||||
rsConfig->SetMaxDataRates( ui.totalDownloadRate->value(), ui.totalUploadRate->value() );
|
||||
load();
|
||||
}
|
||||
void ServerPage::updateTorOutProxyIndicator()
|
||||
void ServerPage::updateOutProxyIndicator()
|
||||
{
|
||||
QTcpSocket socket ;
|
||||
socket.connectToHost(ui.torpage_proxyAddress->text(),ui.torpage_proxyPort->text().toInt());
|
||||
|
||||
// Tor
|
||||
socket.connectToHost(ui.hiddenpage_proxyAddress_tor->text(),ui.hiddenpage_proxyPort_tor->text().toInt());
|
||||
if(socket.waitForConnected(500))
|
||||
{
|
||||
socket.disconnectFromHost();
|
||||
|
@ -1082,25 +1156,23 @@ void ServerPage::updateTorOutProxyIndicator()
|
|||
ui.iconlabel_tor_outgoing->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_tor_outgoing->setToolTip(tr("Tor proxy is not enabled")) ;
|
||||
}
|
||||
}
|
||||
void ServerPage::updateLocInProxyIndicator()
|
||||
{
|
||||
QTcpSocket socket ;
|
||||
socket.connectToHost(ui.torpage_localAddress->text(),ui.torpage_localPort->text().toInt());
|
||||
|
||||
if(socket.waitForConnected(1000))
|
||||
{
|
||||
socket.disconnectFromHost();
|
||||
ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_OK)) ;
|
||||
ui.iconlabel_tor_incoming->setToolTip(tr("You are reachable through Tor.")) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_tor_incoming->setToolTip(tr("Tor proxy is not enabled or broken.\nAre you running a Tor hidden service?\nCheck your ports!")) ;
|
||||
}
|
||||
// I2P
|
||||
socket.connectToHost(ui.hiddenpage_proxyAddress_i2p->text(),ui.hiddenpage_proxyPort_i2p->text().toInt());
|
||||
if(socket.waitForConnected(500))
|
||||
{
|
||||
socket.disconnectFromHost();
|
||||
ui.iconlabel_i2p_outgoing->setPixmap(QPixmap(ICON_STATUS_OK)) ;
|
||||
ui.iconlabel_i2p_outgoing->setToolTip(tr("Proxy seems to work.")) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.iconlabel_i2p_outgoing->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_i2p_outgoing->setToolTip(tr("I2P proxy is not enabled")) ;
|
||||
}
|
||||
}
|
||||
void ServerPage::updateTorInProxyIndicator()
|
||||
|
||||
void ServerPage::updateInProxyIndicator()
|
||||
{
|
||||
// need to find a proper way to do this
|
||||
|
||||
|
@ -1113,21 +1185,31 @@ void ServerPage::updateTorInProxyIndicator()
|
|||
QNetworkProxy proxy ;
|
||||
|
||||
proxy.setType(QNetworkProxy::Socks5Proxy);
|
||||
proxy.setHostName(ui.torpage_proxyAddress->text());
|
||||
proxy.setPort(ui.torpage_proxyPort->text().toInt());
|
||||
switch (mHiddenType) {
|
||||
case RS_HIDDEN_TYPE_I2P:
|
||||
proxy.setHostName(ui.hiddenpage_proxyAddress_i2p->text());
|
||||
proxy.setPort(ui.hiddenpage_proxyPort_i2p->text().toInt());
|
||||
break;
|
||||
case RS_HIDDEN_TYPE_TOR:
|
||||
proxy.setHostName(ui.hiddenpage_proxyAddress_tor->text());
|
||||
proxy.setPort(ui.hiddenpage_proxyPort_tor->text().toInt());
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
proxy.setCapabilities(QNetworkProxy::HostNameLookupCapability | proxy.capabilities()) ;
|
||||
|
||||
//ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(":/loader/circleball-16.gif")) ;
|
||||
QMovie *movie = new QMovie(":/images/loader/circleball-16.gif");
|
||||
ui.iconlabel_tor_incoming->setMovie(movie);
|
||||
movie->start() ;
|
||||
//ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(":/loader/circleball-16.gif")) ;
|
||||
QMovie *movie = new QMovie(":/images/loader/circleball-16.gif");
|
||||
ui.iconlabel_service_incoming->setMovie(movie);
|
||||
movie->start() ;
|
||||
|
||||
QNetworkProxy::setApplicationProxy(proxy) ;
|
||||
|
||||
QUrl url("https://"+ui.torpage_onionAddress->text() + ":" + ui.torpage_onionPort->text()) ;
|
||||
QUrl url("https://"+ui.hiddenpage_serviceAddress->text() + ":" + ui.hiddenpage_servicePort->text()) ;
|
||||
|
||||
std::cerr << "Setting proxy hostname+port to " << std::dec << ui.torpage_proxyAddress->text().toStdString() << ":" << ui.torpage_proxyPort->text().toInt() << std::endl;
|
||||
std::cerr << "Setting proxy hostname+port to " << std::dec << ui.hiddenpage_proxyAddress_tor->text().toStdString() << ":" << ui.hiddenpage_proxyPort_tor->text().toInt() << std::endl;
|
||||
std::cerr << "Connecting to " << url.toString().toStdString() << std::endl;
|
||||
|
||||
connect(manager, SIGNAL(finished(QNetworkReply*)),this,SLOT(handleNetworkReply(QNetworkReply*))) ;
|
||||
|
@ -1143,8 +1225,8 @@ void ServerPage::handleNetworkReply(QNetworkReply *reply)
|
|||
if(reply->isOpen() && error == QNetworkReply::SslHandshakeFailedError)
|
||||
{
|
||||
std::cerr <<"Connected!" << std::endl;
|
||||
ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_OK)) ;
|
||||
ui.iconlabel_tor_incoming->setToolTip(tr("You are reachable through Tor.")) ;
|
||||
ui.iconlabel_service_incoming->setPixmap(QPixmap(ICON_STATUS_OK)) ;
|
||||
ui.iconlabel_service_incoming->setToolTip(tr("You are reachable through the hidden service.")) ;
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(ICON_STATUS_OK)) ;
|
||||
}
|
||||
else
|
||||
|
@ -1152,8 +1234,8 @@ void ServerPage::handleNetworkReply(QNetworkReply *reply)
|
|||
std::cerr <<"Failed!" << std::endl;
|
||||
|
||||
//ui.testIncomingTor_PB->setIcon(QIcon(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_tor_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_tor_incoming->setToolTip(tr("Tor proxy is not enabled or broken.\nAre you running a Tor hidden service?\nCheck your ports!")) ;
|
||||
ui.iconlabel_service_incoming->setPixmap(QPixmap(ICON_STATUS_UNKNOWN)) ;
|
||||
ui.iconlabel_service_incoming->setToolTip(tr("The proxy is not enabled or broken.\nAre all services up and running fine??\nAlso check your ports!")) ;
|
||||
}
|
||||
|
||||
reply->close();
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <retroshare-gui/configpage.h>
|
||||
#include "ui_ServerPage.h"
|
||||
#include "RsAutoUpdatePage.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
class QNetworkReply;
|
||||
class QNetworkAccessManager;
|
||||
|
@ -52,6 +53,7 @@ public slots:
|
|||
void updateStatus();
|
||||
|
||||
private slots:
|
||||
// ban list
|
||||
void updateSelectedBlackListIP(int row, int, int, int);
|
||||
void updateSelectedWhiteListIP(int row,int,int,int);
|
||||
void addIpRangeToBlackList();
|
||||
|
@ -69,25 +71,27 @@ private slots:
|
|||
void ipFilterContextMenu(const QPoint &);
|
||||
void ipWhiteListContextMenu(const QPoint &point);
|
||||
void removeBannedIp();
|
||||
|
||||
// server
|
||||
void saveAddresses();
|
||||
void toggleUPnP();
|
||||
void toggleIpDetermination(bool) ;
|
||||
void toggleTunnelConnection(bool) ;
|
||||
void clearKnownAddressList() ;
|
||||
void handleNetworkReply(QNetworkReply *reply);
|
||||
void updateTorInProxyIndicator();
|
||||
void updateInProxyIndicator();
|
||||
|
||||
private:
|
||||
|
||||
// Alternative Versions for HiddenNode Mode.
|
||||
// ban list
|
||||
void addPeerToIPTable(QTableWidget *table, int row, const BanListPeer &blp);
|
||||
bool removeCurrentRowFromBlackList(sockaddr_storage& collected_addr,int& masked_bytes);
|
||||
bool removeCurrentRowFromWhiteList(sockaddr_storage &collected_addr, int &masked_bytes);
|
||||
|
||||
// Alternative Versions for HiddenNode Mode.
|
||||
void loadHiddenNode();
|
||||
void updateStatusHiddenNode();
|
||||
void saveAddressesHiddenNode();
|
||||
void updateTorOutProxyIndicator();
|
||||
void updateLocInProxyIndicator();
|
||||
void updateOutProxyIndicator();
|
||||
void loadFilteredIps() ;
|
||||
|
||||
Ui::ServerPage ui;
|
||||
|
@ -95,6 +99,7 @@ private:
|
|||
QNetworkAccessManager *manager ;
|
||||
|
||||
bool mIsHiddenNode;
|
||||
uint32_t mHiddenType;
|
||||
};
|
||||
|
||||
#endif // !SERVERPAGE_H
|
||||
|
|
|
@ -6,12 +6,21 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>722</width>
|
||||
<height>650</height>
|
||||
<width>724</width>
|
||||
<height>568</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -23,104 +32,36 @@
|
|||
<attribute name="title">
|
||||
<string>Network Configuration</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QComboBox" name="netModeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic (UPnP)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Firewalled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Manually Forwarded Port</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="hiddenMode_LB">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This Retroshare node is running in &quot;Hidden Mode&quot;. That means it can only be reached though the Tor network.</p><p>As such, some network options are disabled.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>[Hidden mode]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="discComboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The DHT allows you to answer connection requests from your friends using BitTorrent's DHT. It greatly improves the connectivity. No information is actually stored in the DHT. It is only used as a proxy system to get in touch with other Retroshare nodes.</p><p>The Discovery service sends node name and ids of your trusted contacts to connected peers, to help them choose new friends. The friendship is never automatic however, and both peers still need to trust each other to allow connection. </p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Public: DHT & Discovery</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Private: Discovery Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Inverted: DHT Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dark Net: None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_netmode">
|
||||
<property name="text">
|
||||
<string>Network Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_nat">
|
||||
<property name="text">
|
||||
<string>Nat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
|
@ -142,6 +83,32 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download limit (KB/s) </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upload limit (KB/s) </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -149,17 +116,42 @@
|
|||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QSpinBox" name="totalDownloadRate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This download limit covers the whole application. However, in some situations, such as when transfering many small files at once, the estimated bandwidth becomes unreliable and the total value reported by Retroshare might exceed that limit. </p></body></html></string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>kB/s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLineEdit" name="localAddress"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Port:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="localPort">
|
||||
<property name="toolTip">
|
||||
<string>Acceptable ports range from 10 to 65535. Normally Ports below 1024 are reserved by your system.</string>
|
||||
|
@ -175,17 +167,17 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLineEdit" name="extAddress"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Port:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<item row="3" column="2">
|
||||
<widget class="QSpinBox" name="extPort">
|
||||
<property name="toolTip">
|
||||
<string>Acceptable ports range from 10 to 65535. Normally ports below 1024 are reserved by your system.</string>
|
||||
|
@ -201,114 +193,232 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLineEdit" name="dynDNS"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="_4">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QComboBox" name="netModeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Automatic (UPnP)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Firewalled</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Manually Forwarded Port</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_netLimited">
|
||||
<property name="maximumSize">
|
||||
<widget class="QComboBox" name="discComboBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabel_netLimited">
|
||||
<property name="text">
|
||||
<string>Local network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="_6">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_ext">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabel_ext">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The bullet turns green as soon as Retroshare manages to get your own IP from the websites listed below, if you enabled that action. Retroshare will also use other means to find out your own IP.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>External ip address finder</string>
|
||||
<string><html><head/><body><p>The DHT allows you to answer connection requests from your friends using BitTorrent's DHT. It greatly improves the connectivity. No information is actually stored in the DHT. It is only used as a proxy system to get in touch with other Retroshare nodes.</p><p>The Discovery service sends node name and ids of your trusted contacts to connected peers, to help them choose new friends. The friendship is never automatic however, and both peers still need to trust each other to allow connection. </p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Public: DHT & Discovery</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Private: Discovery Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Inverted: DHT Only</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dark Net: None</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="_5">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_upnp">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
<item row="3" column="3">
|
||||
<layout class="QGridLayout" name="_6">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_ext">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabel_ext">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The bullet turns green as soon as Retroshare manages to get your own IP from the websites listed below, if you enabled that action. Retroshare will also use other means to find out your own IP.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>External ip address finder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<layout class="QGridLayout" name="_4">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_netLimited">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabel_netLimited">
|
||||
<property name="text">
|
||||
<string>Local network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QSpinBox" name="totalUploadRate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The upload limit covers the entire software. Too small an upload limit might eventually block low priority services (forums, channels). A minimum recommended value is 50KB/s. </p></body></html></string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>kB/s</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabel_upnp">
|
||||
<property name="text">
|
||||
<string>UPnP</string>
|
||||
<item row="1" column="3">
|
||||
<layout class="QGridLayout" name="_5">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</widget>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_upnp">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="textlabel_upnp">
|
||||
<property name="text">
|
||||
<string>UPnP</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<layout class="QGridLayout" name="_7">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="iconlabel_hiddenMode">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="hiddenMode_LB">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The bullet turns green as soon as Retroshare manages to get your own IP from the websites listed below, if you enabled that action. Retroshare will also use other means to find out your own IP.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>[Hidden mode]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -316,7 +426,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
|
@ -350,7 +460,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QListWidget" name="ipAddressList">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
|
@ -360,14 +470,14 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="showDiscStatusBar">
|
||||
<property name="text">
|
||||
<string>Show Discovery information in statusbar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="allowIpDeterminationCB">
|
||||
<property name="toolTip">
|
||||
<string>If you uncheck this, RetroShare can only determine your IP
|
||||
|
@ -383,7 +493,7 @@ behind a firewall or a VPN.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QListWidget" name="IPServersLV">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||
|
@ -396,107 +506,12 @@ behind a firewall or a VPN.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Download limit (KB/s) </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="totalDownloadRate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This download limit covers the whole application. However, in some situations, such as when transfering many small files at once, the estimated bandwidth becomes unreliable and the total value reported by Retroshare might exceed that limit. </p></body></html></string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>kB/s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Upload limit (KB/s) </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="totalUploadRate">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The upload limit covers the entire software. Too small an upload limit might eventually block low priority services (forums, channels). A minimum recommended value is 50KB/s. </p></body></html></string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string>kB/s</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>showDiscStatusBar</zorder>
|
||||
<zorder>allowIpDeterminationCB</zorder>
|
||||
<zorder>IPServersLV</zorder>
|
||||
<zorder>ipAddressList</zorder>
|
||||
<zorder></zorder>
|
||||
<zorder></zorder>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
|
@ -515,7 +530,7 @@ behind a firewall or a VPN.</string>
|
|||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabWidgetPage1" native="true">
|
||||
<widget class="QWidget" name="tabWidgetPage1">
|
||||
<attribute name="title">
|
||||
<string>IP blacklist</string>
|
||||
</attribute>
|
||||
|
@ -756,15 +771,15 @@ behind a firewall or a VPN.</string>
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="TorTAB">
|
||||
<widget class="QWidget" name="HiddenTAB">
|
||||
<attribute name="title">
|
||||
<string>Tor Configuration</string>
|
||||
<string>Hidden Service Configuration</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="torpage_outgoing">
|
||||
<property name="title">
|
||||
<string>Outgoing Tor Connections</string>
|
||||
<string>Outgoing Connections</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
|
@ -779,10 +794,10 @@ behind a firewall or a VPN.</string>
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="torpage_proxyAddress"/>
|
||||
<widget class="QLineEdit" name="hiddenpage_proxyAddress_tor"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="torpage_proxyPort">
|
||||
<widget class="QSpinBox" name="hiddenpage_proxyPort_tor">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
|
@ -822,16 +837,71 @@ behind a firewall or a VPN.</string>
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_17">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>I2P Socks Proxy</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hiddenpage_proxyAddress_i2p"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="hiddenpage_proxyPort_i2p">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_18">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconlabel_i2p_outgoing">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../images.qrc">:/images/ledoff1.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>I2P outgoing Okay</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>100</height>
|
||||
<height>145</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
<enum>Qt::ScrollBarAsNeeded</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
|
@ -839,8 +909,11 @@ behind a firewall or a VPN.</string>
|
|||
<property name="plainText">
|
||||
<string>Tor Socks Proxy default: 127.0.0.1:9050. Set in torrc config and update here.
|
||||
|
||||
You can connect to Hidden Nodes, even if you
|
||||
are running a standard Node, so why not setup Tor? </string>
|
||||
I2P Socks Proxy: see http://127.0.0.1:7657/i2ptunnelmgr for setting up a client tunnel:
|
||||
Tunnel Wizard -> Client Tunnel -> SOCKS 4/4a/5 -> enter a name -> leave 'Outproxies' empty -> enter port (memorize!) [you may also want to set the reachability to 127.0.0.1] -> check 'Auto Start' -> finish!
|
||||
Now enter the address (e.g. 127.0.0.1) and the port you've picked before for the I2P Proxy.
|
||||
|
||||
You can connect to Hidden Nodes, even if you are running a standard Node, so why not setup Tor and/or I2P?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -848,7 +921,7 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="torpage_incoming">
|
||||
<widget class="QGroupBox" name="hiddenpage_incoming">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -856,13 +929,13 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Incoming Tor Connections</string>
|
||||
<string>Incoming Service Connections</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="torpage_localPort">
|
||||
<widget class="QSpinBox" name="hiddenpage_localPort">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
|
@ -874,9 +947,9 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
<item row="0" column="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="testIncomingTor_PB">
|
||||
<widget class="QPushButton" name="testIncoming_PB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This button simulates a SSL connection to your Tor address using the Tor proxy. If your Tor node is reachable, it should cause a SSL handshake error, which RS will interpret as a valid connection state. This operation might also cause several "security warning" about connections from your local host IP (127.0.0.1) in the News Feed if you enabled it,</p></body></html></string>
|
||||
<string><html><head/><body><p>This button simulates a SSL connection to your hidden address using the corresponding proxy. If your hidden node is reachable, it should cause a SSL handshake error, which RS will interpret as a valid connection state. This operation might also cause several &quot;security warning&quot; about connections from your local host IP (127.0.0.1) in the News Feed if you enabled it,</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Test</string>
|
||||
|
@ -886,7 +959,7 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
</layout>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="torpage_onionPort">
|
||||
<widget class="QSpinBox" name="hiddenpage_servicePort">
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
|
@ -896,9 +969,9 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<widget class="QLabel" name="l_serviceAddress">
|
||||
<property name="text">
|
||||
<string>Onion Address</string>
|
||||
<string>Service Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -910,23 +983,23 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="torpage_onionAddress">
|
||||
<widget class="QLineEdit" name="hiddenpage_serviceAddress">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is your onion address. It should look like <span style=" font-weight:600;">[something].onion. </span>If you configured a hidden service with Tor, the onion address is generated automatically by Tor. You can get it in e.g. <span style=" font-weight:600;">/var/lib/tor/[service name]/hostname</span></p></body></html></string>
|
||||
<string><html><head/><body><p>This is your hidden address. It should look like <span style=" font-weight:600;">[something].onion</span> or <span style=" font-weight:600;">[something].b32.i2p. </span>If you configured a hidden service with Tor, the onion address is generated automatically by Tor. You can get it in e.g. <span style=" font-weight:600;">/var/lib/tor/[service name]/hostname</span>. For I2P: Setup a server tunnel ( http://127.0.0.1:7657/i2ptunnelmgr ) and copy it's base32 address when it is started (should end with .b32.i2p)</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="torpage_localAddress">
|
||||
<widget class="QLineEdit" name="hiddenpage_localAddress">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>This is the local address to which the Tor hidden service points at your localhost. Most of the time, <span style=" font-weight:600;">127.0.0.1</span> is the right answer.</p></body></html></string>
|
||||
<string><html><head/><body><p>This is the local address to which the hidden service points at your localhost. Most of the time, <span style=" font-weight:600;">127.0.0.1</span> is the right answer.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconlabel_tor_incoming">
|
||||
<widget class="QLabel" name="iconlabel_service_incoming">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16</width>
|
||||
|
@ -942,9 +1015,9 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_16">
|
||||
<widget class="QLabel" name="l_incomingTestResult">
|
||||
<property name="text">
|
||||
<string>Tor incoming ok</string>
|
||||
<string>incoming ok</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -957,12 +1030,12 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
<item>
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Expected torrc Port Configuration:</string>
|
||||
<string>Expected Configuration:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="torpage_configuration">
|
||||
<widget class="QPlainTextEdit" name="hiddenpage_configuration">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
|
@ -988,8 +1061,7 @@ are running a standard Node, so why not setup Tor? </string>
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>HiddenServiceDir </your/path/to/hidden/directory/service>
|
||||
HiddenServicePort 9191 127.0.0.1:9191</string>
|
||||
<string>Please fill in a service address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1013,12 +1085,14 @@ HiddenServicePort 9191 127.0.0.1:9191</string>
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>To Receive Connections, you must first setup a Tor Hidden Service.
|
||||
See Tor documentation for HOWTO details.
|
||||
<string>To Receive Connections, you must first setup a Tor/I2P Hidden Service.
|
||||
For Tor: See torrc and documentation for HOWTO details.
|
||||
For I2P: See http://127.0.0.1:7657/i2ptunnelmgr for setting up a server tunnel:
|
||||
Tunnel Wizard -> Server Tunnel -> Standard -> enter a name -> enter the address and port your RS is using (see Local Address above) -> check 'Auto Start' -> finish!
|
||||
|
||||
Once this is done, paste the Onion Address in the box above.
|
||||
This is your external address on the Tor network.
|
||||
Finally make sure that the Ports match the Tor configuration.
|
||||
Once this is done, paste the Onion/I2P (Base32) Address in the box above.
|
||||
This is your external address on the Tor/I2P network.
|
||||
Finally make sure that the Ports match the configuration.
|
||||
|
||||
If you have issues connecting over Tor check the Tor logs too.</string>
|
||||
</property>
|
||||
|
@ -1047,8 +1121,6 @@ If you have issues connecting over Tor check the Tor logs too.</string>
|
|||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>netModeComboBox</tabstop>
|
||||
<tabstop>discComboBox</tabstop>
|
||||
<tabstop>localAddress</tabstop>
|
||||
<tabstop>localPort</tabstop>
|
||||
<tabstop>extAddress</tabstop>
|
||||
|
|
|
@ -46,12 +46,12 @@ ServicePermissionsPage::ServicePermissionsPage(QWidget * parent, Qt::WindowFlags
|
|||
QString ServicePermissionsPage::helpText() const
|
||||
{
|
||||
return tr("<h1><img width=\"24\" src=\":/icons/help_64.png\"> Permissions</h1> \
|
||||
<p>Permissions allow you to control which services are available to which friends</p>\
|
||||
<p>Permissions allow you to control which services are available to which friends.</p>\
|
||||
<p>Each interruptor shows two lights, indicating whether you or your friend has enabled\
|
||||
that service. Both needs to be ON (showing <img height=20 src=\":/images/switch11.png\"/>) to\
|
||||
that service. Both need to be ON (showing <img height=20 src=\":/images/switch11.png\"/>) to\
|
||||
let information transfer for a specific service/friend combination.</p>\
|
||||
<p>For each service, the global switch <img height=20 src=\":/images/global_switch_on.png\"> / <img height=20 src=\":/images/global_switch_off.png\">\
|
||||
allow to turn a service ON/OFF for all friends at once.</p>\
|
||||
allows you to turn a service ON/OFF for all friends at once.</p>\
|
||||
<p>Be very careful: Some services depend on each other. For instance turning turtle OFF will also\
|
||||
stop all anonymous transfer, distant chat and distant messaging.</p>");
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ void WebuiPage::load()
|
|||
QString WebuiPage::helpText() const
|
||||
{
|
||||
return tr("<h1><img width=\"24\" src=\":/icons/help_64.png\"> Webinterface</h1> \
|
||||
<p>The webinterface allows to control Retroshare from the browser. Multiple devices can share control over one Retroshare instance. So you could start a conversation on a tablet computer and later use a desktop computer to continue it.</p>\
|
||||
<p>The webinterface allows you to control Retroshare from the browser. Multiple devices can share control over one Retroshare instance. So you could start a conversation on a tablet computer and later use a desktop computer to continue it.</p>\
|
||||
<p>Warning: don't expose the webinterface to the internet, because there is no access control and no encryption. If you want to use the webinterface over the internet, use a SSH tunnel or a proxy to secure the connection.</p>");
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include <QStyleFactory>
|
||||
|
@ -237,26 +238,32 @@ void RshareSettings::setToolButtonStyle(Qt::ToolButtonStyle style)
|
|||
}
|
||||
}
|
||||
|
||||
int RshareSettings::computeBestIconSize(int n_sizes,int *sizes,int recommended_size)
|
||||
{
|
||||
float default_size = QFontMetricsF(QWidget().font()).height()/16.0 * recommended_size ;
|
||||
float closest_ratio_dist = 10000.0f ;
|
||||
int best_default_size = sizes[0] ;
|
||||
|
||||
for(int i=0;i<n_sizes;++i)
|
||||
{
|
||||
float ratio = default_size / sizes[i] ;
|
||||
|
||||
if(fabsf(ratio - 1.0f) < closest_ratio_dist)
|
||||
{
|
||||
closest_ratio_dist = fabsf(ratio-1.0f) ;
|
||||
best_default_size = sizes[i] ;
|
||||
}
|
||||
}
|
||||
|
||||
return best_default_size ;
|
||||
}
|
||||
|
||||
/** Gets the tool button's size.*/
|
||||
int RshareSettings::getToolButtonSize()
|
||||
{
|
||||
int intValue=value(SETTING_TOOLBUTTONSIZE, 24).toInt();
|
||||
switch (intValue)
|
||||
{
|
||||
case 8:
|
||||
return 8;
|
||||
case 16:
|
||||
return 16;
|
||||
case 24:
|
||||
default:
|
||||
return 24;
|
||||
case 32:
|
||||
return 32;
|
||||
case 64:
|
||||
return 64 ;
|
||||
case 128:
|
||||
return 128 ;
|
||||
}
|
||||
static int sizes[6] = { 8,16,24,32,64,128 } ;
|
||||
|
||||
return value(SETTING_TOOLBUTTONSIZE, computeBestIconSize(6,sizes,24)).toInt();
|
||||
}
|
||||
|
||||
/** Sets the tool button's size.*/
|
||||
|
@ -289,23 +296,9 @@ void RshareSettings::setToolButtonSize(int size)
|
|||
/** Gets the list item icon's size.*/
|
||||
int RshareSettings::getListItemIconSize()
|
||||
{
|
||||
int intValue=value(SETTING_LISTITEMICONSIZE, 24).toInt();
|
||||
switch (intValue)
|
||||
{
|
||||
case 8:
|
||||
return 8;
|
||||
case 16:
|
||||
return 16;
|
||||
case 24:
|
||||
default:
|
||||
return 24;
|
||||
case 32:
|
||||
return 32;
|
||||
case 64:
|
||||
return 64;
|
||||
case 128:
|
||||
return 128;
|
||||
}
|
||||
static int sizes[6] = { 8,16,24,32,64,128 } ;
|
||||
|
||||
return value(SETTING_LISTITEMICONSIZE, computeBestIconSize(6,sizes,24)).toInt();
|
||||
}
|
||||
|
||||
/** Sets the list item icon's size.*/
|
||||
|
|
|
@ -315,6 +315,9 @@ public:
|
|||
|
||||
bool getWebinterfaceAllowAllIps();
|
||||
void setWebinterfaceAllowAllIps(bool allow_all);
|
||||
|
||||
// proxy function that computes the best icon size among sizes passed as array, to match the recommended size on screen.
|
||||
int computeBestIconSize(int n_sizes, int *sizes, int recommended_size);
|
||||
|
||||
protected:
|
||||
/** Default constructor. */
|
||||
|
@ -323,7 +326,7 @@ protected:
|
|||
void initSettings();
|
||||
|
||||
/* member for fast access */
|
||||
int m_maxTimeBeforeIdle;
|
||||
int m_maxTimeBeforeIdle;
|
||||
};
|
||||
|
||||
// the one and only global settings object
|
||||
|
|
|
@ -23,7 +23,16 @@
|
|||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -187,6 +196,18 @@
|
|||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
|
|
|
@ -6,14 +6,17 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1597</width>
|
||||
<height>811</height>
|
||||
<width>812</width>
|
||||
<height>349</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BWGraph" name="bwgraph_BW">
|
||||
<property name="frameShape">
|
||||
|
@ -44,7 +47,17 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="friend_CB"/>
|
||||
<widget class="QComboBox" name="friend_CB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
|
@ -75,7 +88,17 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="service_CB"/>
|
||||
<widget class="QComboBox" name="service_CB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
|
@ -94,7 +117,7 @@
|
|||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>726</width>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1447</width>
|
||||
<height>911</height>
|
||||
<height>471</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -89,7 +89,14 @@
|
|||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="BandwidthStatsWidget" name="widget" native="true"/>
|
||||
<widget class="BandwidthStatsWidget" name="widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -23,8 +23,10 @@
|
|||
#include "ui_DhtWindow.h"
|
||||
#include "util/QtVersion.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QMenu>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
@ -51,6 +53,7 @@ DhtWindow::DhtWindow(QWidget *parent)
|
|||
|
||||
connect( ui.filterLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterItems(QString)));
|
||||
connect( ui.filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterColumnChanged(int)));
|
||||
connect( ui.dhtTreeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(DHTCustomPopupMenu(QPoint)));
|
||||
|
||||
/* add filter actions */
|
||||
ui.filterLineEdit->addFilter(QIcon(), tr("IP"), DTW_COL_IPADDR, tr("Search IP"));
|
||||
|
@ -62,6 +65,22 @@ DhtWindow::~DhtWindow()
|
|||
|
||||
}
|
||||
|
||||
void DhtWindow::DHTCustomPopupMenu( QPoint )
|
||||
{
|
||||
QMenu contextMnu( this );
|
||||
|
||||
QTreeWidgetItem *item = ui.dhtTreeWidget->currentItem();
|
||||
if (item) {
|
||||
|
||||
QString Ip = item->text(DTW_COL_IPADDR);
|
||||
|
||||
contextMnu.addAction(QIcon(), tr("Copy %1 to clipboard").arg(Ip), this, SLOT(copyIP()));
|
||||
|
||||
}
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void DhtWindow::updateDisplay()
|
||||
{
|
||||
/* do nothing if locked, or not visible */
|
||||
|
@ -494,6 +513,9 @@ void DhtWindow::updateNetPeers()
|
|||
ui.label_direct->setText(QString::number(nDirectPeers));
|
||||
ui.label_proxy->setText(QString::number(nProxyPeers));
|
||||
ui.label_relay->setText(QString::number(nRelayPeers));
|
||||
|
||||
ui.tabWidget_2->setTabText(1, tr("Peers") + " (" + QString::number(ui.peerTreeWidget->topLevelItemCount()) + ")" );
|
||||
|
||||
|
||||
//peerSummaryLabel->setText(connstr);
|
||||
}
|
||||
|
@ -582,6 +604,9 @@ void DhtWindow::updateRelays()
|
|||
item -> setData(RTW_COL_BANDWIDTH, Qt::DisplayRole, bandwidthstr);
|
||||
|
||||
}
|
||||
|
||||
ui.tabWidget_2->setTabText(2, tr("Relays") + " (" + QString::number(ui.relayTreeWidget->topLevelItemCount()) + ")" );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -673,8 +698,12 @@ void DhtWindow::updateDhtPeers()
|
|||
|
||||
if (ui.filterLineEdit->text().isEmpty() == false) {
|
||||
filterItems(ui.filterLineEdit->text());
|
||||
}
|
||||
|
||||
ui.tabWidget_2->setTabText(0, tr("DHT") + " (" + QString::number(ui.dhtTreeWidget->topLevelItemCount()) + ")" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -753,3 +782,19 @@ bool DhtWindow::filterItem(QTreeWidgetItem *item, const QString &text, int filte
|
|||
return (visible || visibleChildCount);
|
||||
}
|
||||
|
||||
void DhtWindow::copyIP()
|
||||
{
|
||||
QTreeWidgetItem *item = ui.dhtTreeWidget->currentItem();
|
||||
if (!item)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QString Ip = item->text(DTW_COL_IPADDR);
|
||||
|
||||
QApplication::clipboard()->setText(Ip, QClipboard::Clipboard);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -44,7 +44,11 @@ public slots:
|
|||
|
||||
void filterColumnChanged(int);
|
||||
void filterItems(const QString &text);
|
||||
|
||||
|
||||
private slots:
|
||||
/** Create the context popup menu and it's submenus */
|
||||
void DHTCustomPopupMenu( QPoint point );
|
||||
void copyIP();
|
||||
|
||||
protected:
|
||||
//void changeEvent(QEvent *e);
|
||||
|
|