mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-11 23:05:49 -05:00
Distant messages GUI code. Now the GUI can receive/send/decrypt distant messages. Since the protocols are not finalized, the GUI is disabled, to avoid later crashes
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6549 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a570f66e79
commit
3f86a707b7
11 changed files with 259 additions and 62 deletions
|
|
@ -25,9 +25,7 @@
|
|||
|
||||
#include "MessagePage.h"
|
||||
#include "gui/common/TagDefs.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "NewTag.h"
|
||||
|
||||
MessagePage::MessagePage(QWidget * parent, Qt::WFlags flags)
|
||||
|
|
@ -41,6 +39,7 @@ MessagePage::MessagePage(QWidget * parent, Qt::WFlags flags)
|
|||
connect (ui.editpushButton, SIGNAL(clicked(bool)), this, SLOT (editTag()));
|
||||
connect (ui.deletepushButton, SIGNAL(clicked(bool)), this, SLOT (deleteTag()));
|
||||
connect (ui.defaultTagButton, SIGNAL(clicked(bool)), this, SLOT (defaultTag()));
|
||||
connect (ui.encryptedMsgs_CB, SIGNAL(toggled(bool)), this, SLOT (toggleEnableEncryptedDistantMsgs(bool)));
|
||||
|
||||
connect (ui.tags_listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(currentRowChangedTag(int)));
|
||||
|
||||
|
|
@ -49,6 +48,8 @@ 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) ;
|
||||
}
|
||||
|
||||
MessagePage::~MessagePage()
|
||||
|
|
@ -56,6 +57,11 @@ MessagePage::~MessagePage()
|
|||
delete(m_pTags);
|
||||
}
|
||||
|
||||
void MessagePage::toggleEnableEncryptedDistantMsgs(bool b)
|
||||
{
|
||||
rsMsgs->enableDistantMessaging(b) ;
|
||||
}
|
||||
|
||||
/** Saves the changes on this page */
|
||||
bool
|
||||
MessagePage::save(QString &/*errmsg*/)
|
||||
|
|
@ -91,6 +97,7 @@ MessagePage::load()
|
|||
ui.setMsgToReadOnActivate->setChecked(Settings->getMsgSetToReadOnActivate());
|
||||
ui.openComboBox->setCurrentIndex(ui.openComboBox->findData(Settings->getMsgOpen()));
|
||||
|
||||
ui.encryptedMsgs_CB->setChecked(rsMsgs->distantMessagingEnabled()) ;
|
||||
// fill items
|
||||
rsMsgs->getMessageTagTypes(*m_pTags);
|
||||
fillTags();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ private slots:
|
|||
void defaultTag();
|
||||
|
||||
void currentRowChangedTag(int row);
|
||||
void toggleEnableEncryptedDistantMsgs(bool) ;
|
||||
|
||||
private:
|
||||
void fillTags();
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>423</width>
|
||||
<height>340</height>
|
||||
<width>500</width>
|
||||
<height>485</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Reading</string>
|
||||
|
|
@ -47,7 +47,33 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Distant messages:</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="justify">The link below allows people in the network to send encrypted messages to you, using tunnels. To do that, they need your public PGP key, which they will get using the Retroshare discovery system. </p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="encryptedMsgs_CB">
|
||||
<property name="text">
|
||||
<string>Accept encrypted distant messages from everyone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Tags</string>
|
||||
|
|
@ -60,6 +86,22 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="6">
|
||||
<widget class="QListWidget" name="tags_listWidget"/>
|
||||
</item>
|
||||
|
|
@ -104,22 +146,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue