mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-24 15:05:35 -04:00
Merge pull request #653 from RetroPooh/master
chatlobby option to disable sending typing notifications; friend connect wizard minor tweaks
This commit is contained in:
commit
ca5fa7afa8
9 changed files with 213 additions and 104 deletions
|
@ -1088,7 +1088,7 @@ void ChatWidget::updateStatusTyping()
|
||||||
#ifdef ONLY_FOR_LINGUIST
|
#ifdef ONLY_FOR_LINGUIST
|
||||||
tr("is typing...");
|
tr("is typing...");
|
||||||
#endif
|
#endif
|
||||||
|
if(!Settings->getChatDoNotSendIsTyping())
|
||||||
rsMsgs->sendStatusString(chatId, "is typing...");
|
rsMsgs->sendStatusString(chatId, "is typing...");
|
||||||
lastStatusSendTime = time(NULL) ;
|
lastStatusSendTime = time(NULL) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
#include <retroshare/rsiface.h>
|
#include <retroshare/rsiface.h>
|
||||||
#include <retroshare/rsbanlist.h>
|
#include <retroshare/rsbanlist.h>
|
||||||
|
#include <retroshare/rsconfig.h>
|
||||||
|
|
||||||
#include "ConnectProgressDialog.h"
|
#include "ConnectProgressDialog.h"
|
||||||
#include "gui/GetStartedDialog.h"
|
#include "gui/GetStartedDialog.h"
|
||||||
|
@ -113,7 +114,7 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
|
||||||
connect(ui->aolButton, SIGNAL(clicked()), this, SLOT(inviteAol()));
|
connect(ui->aolButton, SIGNAL(clicked()), this, SLOT(inviteAol()));
|
||||||
connect(ui->yandexButton, SIGNAL(clicked()), this, SLOT(inviteYandex()));
|
connect(ui->yandexButton, SIGNAL(clicked()), this, SLOT(inviteYandex()));
|
||||||
connect(ui->emailButton, SIGNAL(clicked()), this, SLOT(runEmailClient2()));
|
connect(ui->emailButton, SIGNAL(clicked()), this, SLOT(runEmailClient2()));
|
||||||
|
connect(ui->toggleadvancedButton, SIGNAL(clicked()), this, SLOT(toggleAdvanced()));
|
||||||
|
|
||||||
subject = tr("RetroShare Invitation");
|
subject = tr("RetroShare Invitation");
|
||||||
body = GetStartedDialog::GetInviteText();
|
body = GetStartedDialog::GetInviteText();
|
||||||
|
@ -121,7 +122,28 @@ ConnectFriendWizard::ConnectFriendWizard(QWidget *parent) :
|
||||||
body += "\n" + GetStartedDialog::GetCutBelowText();
|
body += "\n" + GetStartedDialog::GetCutBelowText();
|
||||||
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str());
|
body += "\n\n" + QString::fromUtf8(rsPeers->GetRetroshareInvite(false).c_str());
|
||||||
|
|
||||||
ui->userFrame->hide();
|
std::string advsetting;
|
||||||
|
if(rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
|
||||||
|
{
|
||||||
|
ui->toggleadvancedButton->setVisible(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->userFrame->hide(); // certificates page - top half with own cert and it's functions
|
||||||
|
|
||||||
|
ui->horizontalLayout_13->hide(); // Advanced options - key sign, whitelist, direct source ...
|
||||||
|
AdvancedVisible=false;
|
||||||
|
|
||||||
|
ui->emailLabel->hide(); // is it ever used?
|
||||||
|
ui->emailEdit->hide();
|
||||||
|
ui->trustLabel->hide();
|
||||||
|
ui->trustEdit->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int onlineCount = 0, friendCount = 0;
|
||||||
|
rsPeers->getPeerCount (&friendCount, &onlineCount, false);
|
||||||
|
if(friendCount<30)
|
||||||
|
ui->makefriend_infolabel->hide();
|
||||||
|
|
||||||
updateStylesheet();
|
updateStylesheet();
|
||||||
}
|
}
|
||||||
|
@ -1280,3 +1302,19 @@ void ConnectFriendWizard::runEmailClient2()
|
||||||
{
|
{
|
||||||
sendMail("", subject, body );
|
sendMail("", subject, body );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConnectFriendWizard::toggleAdvanced()
|
||||||
|
{
|
||||||
|
if(AdvancedVisible)
|
||||||
|
{
|
||||||
|
ui->horizontalLayout_13->hide();
|
||||||
|
ui->toggleadvancedButton->setText("Show advanced options");
|
||||||
|
AdvancedVisible=false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->horizontalLayout_13->show();
|
||||||
|
ui->toggleadvancedButton->setText("Hide advanced options");
|
||||||
|
AdvancedVisible=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -90,12 +90,14 @@ private slots:
|
||||||
void inviteAol();
|
void inviteAol();
|
||||||
void inviteYandex();
|
void inviteYandex();
|
||||||
|
|
||||||
|
void toggleAdvanced();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// returns the translated error string for the error code (to be found in rspeers.h)
|
// returns the translated error string for the error code (to be found in rspeers.h)
|
||||||
QString getErrorString(uint32_t) ;
|
QString getErrorString(uint32_t) ;
|
||||||
void updateStylesheet();
|
void updateStylesheet();
|
||||||
void setTitleText(QWizardPage *page, const QString &title);
|
void setTitleText(QWizardPage *page, const QString &title);
|
||||||
|
bool AdvancedVisible;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool error;
|
bool error;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>691</width>
|
<width>620</width>
|
||||||
<height>533</height>
|
<height>530</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -1264,6 +1264,9 @@ resources.</string>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="QPlainTextEdit" name="signersEdit">
|
<widget class="QPlainTextEdit" name="signersEdit">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p><span style=" font-size:10pt;">Signing a friend's key is a way to express your trust into this friend, to your other friends. The signatures below cryptographically attest that owners of the listed keys recognise the current PGP key as authentic.</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1297,7 +1300,18 @@ resources.</string>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
<widget class="QPushButton" name="toggleadvancedButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Advanced options</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="horizontalLayout_13">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_18">
|
<layout class="QVBoxLayout" name="verticalLayout_18">
|
||||||
<item>
|
<item>
|
||||||
|
@ -1309,6 +1323,9 @@ resources.</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="signGPGCheckBox">
|
<widget class="QCheckBox" name="signGPGCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p><span style=" font-size:10pt;">Signing a friend's key is a way to express your trust into this friend, to your other friends. It helps them to decide whether to allow connections from that key based on your own trust. Signing a key is absolutely optional and cannot be undone, so do it wisely.</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Authenticate friend (Sign PGP Key)</string>
|
<string>Authenticate friend (Sign PGP Key)</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1361,6 +1378,9 @@ resources.</string>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="_direct_transfer_CB_2">
|
<widget class="QCheckBox" name="_direct_transfer_CB_2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p align="justify">Retroshare periodically checks your friend lists for browsable files matching your transfers, to establish a direct transfer. In this case, your friend knows you're downloading the file.</p><p align="justify">To prevent this behavior for this friend only, uncheck this box. You can still perform a direct transfer if you explicitly ask for it, by e.g. downloading from your friend's file list. This setting is applied to all locations of the same node.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Can be used as direct source</string>
|
<string>Can be used as direct source</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1368,6 +1388,9 @@ resources.</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="_allow_push_CB_2">
|
<widget class="QCheckBox" name="_allow_push_CB_2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>This option allows you to automatically download a file that is recommended in an message coming from this node. This can be used for instance to send files between your own nodes. Applied to all locations of the same node.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Auto-download recommended files</string>
|
<string>Auto-download recommended files</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1375,6 +1398,9 @@ resources.</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="_require_WL_CB_2">
|
<widget class="QCheckBox" name="_require_WL_CB_2">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Peers that have this option cannot connect if their connection address is not in the whitelist. This protects you from traffic forwarding attacks. When used, rejected peers will be reported by &quot;security feed items&quot; in the News Feed section. From there, you can whitelist/blacklist their IP. Applies to all locations of the same node.</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Require whitelist clearance to connect</string>
|
<string>Require whitelist clearance to connect</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1399,6 +1425,7 @@ resources.</string>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="StyledLabel" name="requestinfolabel">
|
<widget class="StyledLabel" name="requestinfolabel">
|
||||||
|
@ -1480,6 +1507,19 @@ resources.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWizardPage" name="FriendRecommendationsPage">
|
<widget class="QWizardPage" name="FriendRecommendationsPage">
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "gui/chat/ChatDialog.h"
|
#include "gui/chat/ChatDialog.h"
|
||||||
#include "gui/notifyqt.h"
|
#include "gui/notifyqt.h"
|
||||||
#include "rsharesettings.h"
|
#include "rsharesettings.h"
|
||||||
|
#include <retroshare/rsconfig.h>
|
||||||
|
|
||||||
#include <retroshare/rshistory.h>
|
#include <retroshare/rshistory.h>
|
||||||
#include <retroshare/rsmsgs.h>
|
#include <retroshare/rsmsgs.h>
|
||||||
|
@ -131,6 +132,7 @@ ChatPage::save(QString &/*errmsg*/)
|
||||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||||
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
|
Settings->setChatSendAsPlainTextByDef(ui.sendAsPlainTextByDef->isChecked());
|
||||||
Settings->setChatLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
|
Settings->setChatLoadEmbeddedImages(ui.loadEmbeddedImages->isChecked());
|
||||||
|
Settings->setChatDoNotSendIsTyping(ui.DontSendTyping->isChecked());
|
||||||
|
|
||||||
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
||||||
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
||||||
|
@ -240,6 +242,13 @@ ChatPage::load()
|
||||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||||
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
|
ui.sendAsPlainTextByDef->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||||
ui.loadEmbeddedImages->setChecked(Settings->getChatLoadEmbeddedImages());
|
ui.loadEmbeddedImages->setChecked(Settings->getChatLoadEmbeddedImages());
|
||||||
|
ui.DontSendTyping->setChecked(Settings->getChatDoNotSendIsTyping());
|
||||||
|
|
||||||
|
std::string advsetting;
|
||||||
|
if(rsConfig->getConfigurationOption(RS_CONFIG_ADVANCED, advsetting) && (advsetting == "YES"))
|
||||||
|
{ }
|
||||||
|
else
|
||||||
|
ui.DontSendTyping->hide();
|
||||||
|
|
||||||
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
||||||
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
||||||
|
|
|
@ -271,6 +271,13 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="DontSendTyping">
|
||||||
|
<property name="text">
|
||||||
|
<string>Do not send typing notifications</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabNetConf">
|
<widget class="QWidget" name="tabNetConf">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
|
@ -514,6 +514,16 @@ void RshareSettings::setChatSendMessageWithCtrlReturn(bool bValue)
|
||||||
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
|
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RshareSettings::getChatDoNotSendIsTyping()
|
||||||
|
{
|
||||||
|
return valueFromGroup("Chat", "DoNotSendIsTyping", false).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RshareSettings::setChatDoNotSendIsTyping(bool bValue)
|
||||||
|
{
|
||||||
|
setValueToGroup("Chat", "DoNotSendIsTyping", bValue);
|
||||||
|
}
|
||||||
|
|
||||||
bool RshareSettings::getChatSendAsPlainTextByDef()
|
bool RshareSettings::getChatSendAsPlainTextByDef()
|
||||||
{
|
{
|
||||||
return valueFromGroup("Chat", "SendAsPlainTextByDef", false).toBool();
|
return valueFromGroup("Chat", "SendAsPlainTextByDef", false).toBool();
|
||||||
|
|
|
@ -210,6 +210,9 @@ public:
|
||||||
bool getChatSendMessageWithCtrlReturn();
|
bool getChatSendMessageWithCtrlReturn();
|
||||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||||
|
|
||||||
|
bool getChatDoNotSendIsTyping();
|
||||||
|
void setChatDoNotSendIsTyping(bool bValue);
|
||||||
|
|
||||||
bool getChatSendAsPlainTextByDef();
|
bool getChatSendAsPlainTextByDef();
|
||||||
void setChatSendAsPlainTextByDef(bool bValue);
|
void setChatSendAsPlainTextByDef(bool bValue);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue