Enabled distant messages. These need to be switched on the config->Messages. GUI improvements needs to be done, such as properly setting peers names everywhere, but the service works. Have fun using it!

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6555 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-08-04 14:11:59 +00:00
parent d7a1d3fe97
commit 7dbc17b2a4
5 changed files with 63 additions and 54 deletions

View File

@ -46,7 +46,7 @@
#include <map>
#define DEBUG_DISTANT_MSG
#define DISABLE_DISTANT_MESSAGES
//#define DISABLE_DISTANT_MESSAGES
const int msgservicezone = 54319;

View File

@ -284,16 +284,16 @@ MessagesDialog::MessagesDialog(QWidget *parent)
#endif
QString help_str = tr(
" <h1><img width=\"32\" src=\":/images/64px_help.png\">&nbsp;&nbsp;Messages</h1> \ \
<p>Messages are like e-mail: you send/receive them from your friends when both of you \
are connected.</p> \
<p>Some additional features allow to exchange data in messages: you can recommend files to your friends, \
or recommend friends to be for other friends to streathen your network.</p> \
" <h1><img width=\"32\" src=\":/images/64px_help.png\">&nbsp;&nbsp;Messages</h1> \
<p>Messages are like <b>e-mail</b>: you send/receive them from your friends when both of you are connected.</p> \
<p>It is also possible to send messages to non friends, using tunnels. Such messages are always encrypted. It is \
recommended to cryptographically sign distant messages, as a proof of your identity, using the <img width=\"16\" src=\":/images/stock_signature_ok.png\"/> button \
in the message composer window. Distant messages are not guarrantied to arrive, since this requires the distant peer to accept them (You need yourself to switch this on in Config-Messages).</p>\
<p>Some additional features allow you to exchange data in messages: you may recommend files to your friends by pasting file links, \
or recommend friends-to-be to other friends, in order to streathen your network.</p> \
") ;
registerHelpButton(ui.helpButton,help_str) ;
}
MessagesDialog::~MessagesDialog()

View File

@ -209,8 +209,8 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags)
/* initialize friends list */
ui.friendSelectionWidget->setHeaderText(tr("Send To:"));
ui.friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_MULTI);
//ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL | FriendSelectionWidget::SHOW_NON_FRIEND_GPG );
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL );
ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL | FriendSelectionWidget::SHOW_NON_FRIEND_GPG );
//ui.friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_GROUP | FriendSelectionWidget::SHOW_SSL );
ui.friendSelectionWidget->start();
QActionGroup *grp = new QActionGroup(this);
@ -1287,6 +1287,8 @@ bool MessageComposer::sendMessage_internal(bool bDraftbox)
return false; // Don't send with no recipient
}
mi.encryption_keys = _distant_peers ;
if(ui.signMessage_CB->isChecked())
mi.msgflags |= RS_MSG_SIGNED ;
if (rsMsgs->MessageSend(mi) == false) {

View File

@ -203,6 +203,44 @@
<property name="horizontalSpacing">
<number>1</number>
</property>
<item row="0" column="12">
<widget class="QToolButton" name="imagebtn">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>167</width>
<height>167</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Add an Image</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="comboStyle">
<property name="maximumSize">
@ -496,44 +534,6 @@
</property>
</widget>
</item>
<item row="0" column="12">
<widget class="QToolButton" name="imagebtn">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>167</width>
<height>167</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Add an Image</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="9">
<widget class="QToolButton" name="codeButton">
<property name="focusPolicy">
@ -634,13 +634,20 @@
</property>
</widget>
</item>
<item row="0" column="13">
<widget class="QCheckBox" name="signMessage_CB">
<item row="0" column="15">
<widget class="QPushButton" name="signMessage_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;Check this to cryptographically sign your message. This is only recommended for distant messages, since messages for your connected friends cannot be spoofed.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Cryptographically sign message to distant peers. This is prevents intermediate peers to spoof your identity.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sign message</string>
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/stock_signature_ok.png</normaloff>:/images/stock_signature_ok.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>

View File

@ -49,7 +49,7 @@ MessagePage::MessagePage(QWidget * parent, Qt::WFlags flags)
ui.openComboBox->addItem(tr("A new tab"), RshareSettings::MSG_OPEN_TAB);
ui.openComboBox->addItem(tr("A new window"), RshareSettings::MSG_OPEN_WINDOW);
ui.encryptedMsgs_CB->setEnabled(false) ;
//ui.encryptedMsgs_CB->setEnabled(false) ;
}
MessagePage::~MessagePage()