mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-25 23:45:49 -04:00
Merge branch 'master' into v0.6-BugFixing_20
This commit is contained in:
commit
8f9d99a232
18 changed files with 186 additions and 52 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -32,3 +32,6 @@
|
||||||
path = libretroshare
|
path = libretroshare
|
||||||
url = ../libretroshare
|
url = ../libretroshare
|
||||||
branch = master
|
branch = master
|
||||||
|
[submodule "retroshare-webui"]
|
||||||
|
path = retroshare-webui
|
||||||
|
url = git@github.com:Retroshare/RSNewWebUI
|
||||||
|
|
|
@ -68,6 +68,13 @@ retroshare_plugins {
|
||||||
plugins.target = plugins
|
plugins.target = plugins
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rs_webui {
|
||||||
|
SUBDIRS += retroshare-webui
|
||||||
|
retroshare-webui.file = retroshare-webui/webui.pro
|
||||||
|
retroshare-webui.target = rs_webui
|
||||||
|
retroshare-webui.depends = retroshare_gui
|
||||||
|
}
|
||||||
|
|
||||||
wikipoos {
|
wikipoos {
|
||||||
SUBDIRS += pegmarkdown
|
SUBDIRS += pegmarkdown
|
||||||
pegmarkdown.file = supportlibs/pegmarkdown/pegmarkdown.pro
|
pegmarkdown.file = supportlibs/pegmarkdown/pegmarkdown.pro
|
||||||
|
|
|
@ -358,7 +358,7 @@ void CreateCircleDialog::addMember(const QString& keyId, const QString& idtype,
|
||||||
|
|
||||||
tree->addTopLevelItem(member);
|
tree->addTopLevelItem(member);
|
||||||
|
|
||||||
ui.members_groupBox->setTitle( tr("Invited Members") + " (" + QString::number(ui.treeWidget_membership->topLevelItemCount()) + ")" );
|
updateMembership();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Maybe we can use RsGxsCircleGroup instead of RsGxsCircleDetails ??? (TODO)**/
|
/** Maybe we can use RsGxsCircleGroup instead of RsGxsCircleDetails ??? (TODO)**/
|
||||||
|
@ -413,6 +413,8 @@ void CreateCircleDialog::removeMember()
|
||||||
|
|
||||||
// does this just work? (TODO)
|
// does this just work? (TODO)
|
||||||
delete(item);
|
delete(item);
|
||||||
|
|
||||||
|
updateMembership();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateCircleDialog::createCircle()
|
void CreateCircleDialog::createCircle()
|
||||||
|
@ -952,3 +954,8 @@ void CreateCircleDialog::MembershipListCustomPopupMenu( QPoint )
|
||||||
contextMnu.exec(QCursor::pos());
|
contextMnu.exec(QCursor::pos());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateCircleDialog::updateMembership()
|
||||||
|
{
|
||||||
|
ui.members_groupBox->setTitle( tr("Invited Members") + " (" + QString::number(ui.treeWidget_membership->topLevelItemCount()) + ")" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ private slots:
|
||||||
void filterChanged(const QString &text);
|
void filterChanged(const QString &text);
|
||||||
void createNewGxsId();
|
void createNewGxsId();
|
||||||
void idTypeChanged();
|
void idTypeChanged();
|
||||||
|
void updateMembership();
|
||||||
|
|
||||||
/** Create the context popup menu and it's submenus */
|
/** Create the context popup menu and it's submenus */
|
||||||
void IdListCustomPopupMenu( QPoint point );
|
void IdListCustomPopupMenu( QPoint point );
|
||||||
|
|
|
@ -1628,6 +1628,11 @@ NATStatus *MainWindow::natstatusInstance()
|
||||||
return natstatus;
|
return natstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::torstatusReset()
|
||||||
|
{
|
||||||
|
if(torstatus != nullptr)
|
||||||
|
torstatus->reset();
|
||||||
|
}
|
||||||
DHTStatus *MainWindow::dhtstatusInstance()
|
DHTStatus *MainWindow::dhtstatusInstance()
|
||||||
{
|
{
|
||||||
return dhtstatus;
|
return dhtstatus;
|
||||||
|
|
|
@ -187,6 +187,7 @@ public:
|
||||||
RSComboBox *statusComboBoxInstance();
|
RSComboBox *statusComboBoxInstance();
|
||||||
PeerStatus *peerstatusInstance();
|
PeerStatus *peerstatusInstance();
|
||||||
NATStatus *natstatusInstance();
|
NATStatus *natstatusInstance();
|
||||||
|
void torstatusReset();
|
||||||
DHTStatus *dhtstatusInstance();
|
DHTStatus *dhtstatusInstance();
|
||||||
HashingStatus *hashingstatusInstance();
|
HashingStatus *hashingstatusInstance();
|
||||||
DiscStatus *discstatusInstance();
|
DiscStatus *discstatusInstance();
|
||||||
|
|
|
@ -29,10 +29,10 @@ PulseMessage::PulseMessage(QWidget *parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image1, SIGNAL(clicked()), this, SLOT(viewPictureOne()));
|
||||||
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image2, SIGNAL(clicked()), this, SLOT(viewPictureTwo()));
|
||||||
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image3, SIGNAL(clicked()), this, SLOT(viewPictureThree()));
|
||||||
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPicture()));
|
connect(label_image4, SIGNAL(clicked()), this, SLOT(viewPictureFour()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PulseMessage::setup(RsWirePulseSPtr pulse)
|
void PulseMessage::setup(RsWirePulseSPtr pulse)
|
||||||
|
@ -148,7 +148,7 @@ void PulseMessage::setRefImageCount(uint32_t count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PulseMessage::viewPicture()
|
void PulseMessage::viewPictureOne()
|
||||||
{
|
{
|
||||||
PhotoView *photoView = new PhotoView(this);
|
PhotoView *photoView = new PhotoView(this);
|
||||||
|
|
||||||
|
@ -159,6 +159,22 @@ void PulseMessage::viewPicture()
|
||||||
photoView->setPixmap(pixmap);
|
photoView->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||||
|
|
||||||
|
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||||
|
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||||
|
photoView->setTime(timestamp);
|
||||||
|
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||||
|
|
||||||
|
photoView->show();
|
||||||
|
|
||||||
|
/* window will destroy itself! */
|
||||||
|
}
|
||||||
|
|
||||||
|
void PulseMessage::viewPictureTwo()
|
||||||
|
{
|
||||||
|
PhotoView *photoView = new PhotoView(this);
|
||||||
|
|
||||||
if (!mPulse->mImage2.empty()) {
|
if (!mPulse->mImage2.empty()) {
|
||||||
// install image.
|
// install image.
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
@ -166,6 +182,22 @@ void PulseMessage::viewPicture()
|
||||||
photoView->setPixmap(pixmap);
|
photoView->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||||
|
|
||||||
|
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||||
|
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||||
|
photoView->setTime(timestamp);
|
||||||
|
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||||
|
|
||||||
|
photoView->show();
|
||||||
|
|
||||||
|
/* window will destroy itself! */
|
||||||
|
}
|
||||||
|
|
||||||
|
void PulseMessage::viewPictureThree()
|
||||||
|
{
|
||||||
|
PhotoView *photoView = new PhotoView(this);
|
||||||
|
|
||||||
if (!mPulse->mImage3.empty()) {
|
if (!mPulse->mImage3.empty()) {
|
||||||
// install image.
|
// install image.
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
@ -173,6 +205,22 @@ void PulseMessage::viewPicture()
|
||||||
photoView->setPixmap(pixmap);
|
photoView->setPixmap(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString timestamp = misc::timeRelativeToNow(mPulse->mRefPublishTs);
|
||||||
|
|
||||||
|
photoView->setTitle(QString::fromStdString(mPulse->mPulseText));
|
||||||
|
photoView->setGroupNameString(QString::fromStdString(mPulse->mRefGroupName));
|
||||||
|
photoView->setTime(timestamp);
|
||||||
|
//photoView->setGroupId(mPulse->mRefGroupId);
|
||||||
|
|
||||||
|
photoView->show();
|
||||||
|
|
||||||
|
/* window will destroy itself! */
|
||||||
|
}
|
||||||
|
|
||||||
|
void PulseMessage::viewPictureFour()
|
||||||
|
{
|
||||||
|
PhotoView *photoView = new PhotoView(this);
|
||||||
|
|
||||||
if (!mPulse->mImage4.empty()) {
|
if (!mPulse->mImage4.empty()) {
|
||||||
// install image.
|
// install image.
|
||||||
QPixmap pixmap;
|
QPixmap pixmap;
|
||||||
|
|
|
@ -37,7 +37,10 @@ public:
|
||||||
void setRefImageCount(uint32_t count);
|
void setRefImageCount(uint32_t count);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void viewPicture();
|
void viewPictureOne();
|
||||||
|
void viewPictureTwo();
|
||||||
|
void viewPictureThree();
|
||||||
|
void viewPictureFour();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RsWirePulseSPtr mPulse;
|
RsWirePulseSPtr mPulse;
|
||||||
|
|
|
@ -51,7 +51,7 @@ static QHash<QString, QPixmap> iconcache;
|
||||||
void Emoticons::load()
|
void Emoticons::load()
|
||||||
{
|
{
|
||||||
loadSmiley();
|
loadSmiley();
|
||||||
filters << "*.png" << "*.jpg" << "*.gif" << "*.webp";
|
filters << "*.png" << "*.jpg" << "*.jpeg" << "*.gif" << "*.webp";
|
||||||
stickerFolders << (QString::fromStdString(RsAccounts::AccountDirectory()) + "/stickers"); //under account, unique for user
|
stickerFolders << (QString::fromStdString(RsAccounts::AccountDirectory()) + "/stickers"); //under account, unique for user
|
||||||
stickerFolders << (QString::fromStdString(RsAccounts::ConfigDirectory()) + "/stickers"); //under .retroshare, shared between users
|
stickerFolders << (QString::fromStdString(RsAccounts::ConfigDirectory()) + "/stickers"); //under .retroshare, shared between users
|
||||||
stickerFolders << (QString::fromStdString(RsAccounts::systemDataDirectory()) + "/stickers"); //exe's folder, shipped with RS
|
stickerFolders << (QString::fromStdString(RsAccounts::systemDataDirectory()) + "/stickers"); //exe's folder, shipped with RS
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
#include "retroshare/rsfiles.h"
|
#include "retroshare/rsfiles.h"
|
||||||
|
|
||||||
GxsChannelFilesStatusWidget::GxsChannelFilesStatusWidget(const RsGxsFile &file, QWidget *parent) :
|
GxsChannelFilesStatusWidget::GxsChannelFilesStatusWidget(const RsGxsFile &file, QWidget *parent,bool used_as_editor) :
|
||||||
QWidget(parent), mFile(file), ui(new Ui::GxsChannelFilesStatusWidget)
|
QWidget(parent), mFile(file), mUsedAsEditor(used_as_editor),ui(new Ui::GxsChannelFilesStatusWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -306,6 +306,11 @@ void GxsChannelFilesStatusWidget::resume()
|
||||||
|
|
||||||
void GxsChannelFilesStatusWidget::cancel()
|
void GxsChannelFilesStatusWidget::cancel()
|
||||||
{
|
{
|
||||||
|
// When QMessgeBox asks for cancel confirmtion, this makes the widget lose focus => since it is an editor widget,
|
||||||
|
// it gets destroyed by the parent list widget => subsequent code after the QMessageBox runs over a deleted object => crash
|
||||||
|
// In summary: no QMessageBox here when the Status widget is used as an editor.
|
||||||
|
|
||||||
|
if(!mUsedAsEditor)
|
||||||
if ((QMessageBox::question(this, "", tr("Are you sure that you want to cancel and delete the file?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No)) == QMessageBox::No) {
|
if ((QMessageBox::question(this, "", tr("Are you sure that you want to cancel and delete the file?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No)) == QMessageBox::No) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -327,7 +332,11 @@ void GxsChannelFilesStatusWidget::openFolder()
|
||||||
QDir dir = QFileInfo(QString::fromUtf8(fileInfo.path.c_str())).absoluteDir();
|
QDir dir = QFileInfo(QString::fromUtf8(fileInfo.path.c_str())).absoluteDir();
|
||||||
if (dir.exists()) {
|
if (dir.exists()) {
|
||||||
if (!RsUrlHandler::openUrl(QUrl::fromLocalFile(dir.absolutePath()))) {
|
if (!RsUrlHandler::openUrl(QUrl::fromLocalFile(dir.absolutePath()))) {
|
||||||
|
if(!mUsedAsEditor)
|
||||||
QMessageBox::warning(this, "", QString("%1 %2").arg(tr("Can't open folder"), dir.absolutePath()));
|
QMessageBox::warning(this, "", QString("%1 %2").arg(tr("Can't open folder"), dir.absolutePath()));
|
||||||
|
else
|
||||||
|
RsErr() << "Can't open folder " << dir.absolutePath().toStdString() ;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,8 +356,12 @@ void GxsChannelFilesStatusWidget::openFile()
|
||||||
std::cerr << "GxsChannelFilesStatusWidget(): can't open file " << fileInfo.path << std::endl;
|
std::cerr << "GxsChannelFilesStatusWidget(): can't open file " << fileInfo.path << std::endl;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
if(!mUsedAsEditor)
|
||||||
QMessageBox::information(this, tr("Play File"),
|
QMessageBox::information(this, tr("Play File"),
|
||||||
tr("File %1 does not exist at location.").arg(fileInfo.path.c_str()));
|
tr("File %1 does not exist at location.").arg(fileInfo.path.c_str()));
|
||||||
|
else
|
||||||
|
RsErr() << "File " << fileInfo.path << " does not exist at location." ;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,10 @@ class GxsChannelFilesStatusWidget : public QWidget
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit GxsChannelFilesStatusWidget(const RsGxsFile &file, QWidget *parent = 0);
|
explicit GxsChannelFilesStatusWidget(const RsGxsFile &file, QWidget *parent = 0,bool used_as_editor=false);
|
||||||
~GxsChannelFilesStatusWidget();
|
~GxsChannelFilesStatusWidget();
|
||||||
|
|
||||||
|
bool usedAsEditor() const { return mUsedAsEditor; }
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void onButtonClick();
|
void onButtonClick();
|
||||||
|
@ -73,6 +74,8 @@ private:
|
||||||
uint64_t mSize;
|
uint64_t mSize;
|
||||||
uint64_t mDivisor;
|
uint64_t mDivisor;
|
||||||
|
|
||||||
|
bool mUsedAsEditor;
|
||||||
|
|
||||||
Ui::GxsChannelFilesStatusWidget *ui;
|
Ui::GxsChannelFilesStatusWidget *ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,7 @@ void RsGxsChannelPostFilesModel::setFilter(const QStringList& strings, uint32_t&
|
||||||
{
|
{
|
||||||
preMods();
|
preMods();
|
||||||
|
|
||||||
initEmptyHierarchy();
|
mFilteredFiles.clear();
|
||||||
|
|
||||||
if(strings.empty())
|
if(strings.empty())
|
||||||
{
|
{
|
||||||
|
@ -317,8 +317,6 @@ void RsGxsChannelPostFilesModel::setFilter(const QStringList& strings, uint32_t&
|
||||||
}
|
}
|
||||||
count = mFilteredFiles.size();
|
count = mFilteredFiles.size();
|
||||||
|
|
||||||
std::cerr << "After filtering: " << count << " posts remain." << std::endl;
|
|
||||||
|
|
||||||
if (rowCount()>0)
|
if (rowCount()>0)
|
||||||
{
|
{
|
||||||
beginInsertRows(QModelIndex(),0,rowCount()-1);
|
beginInsertRows(QModelIndex(),0,rowCount()-1);
|
||||||
|
|
|
@ -284,8 +284,10 @@ QWidget *ChannelPostFilesDelegate::createEditor(QWidget *parent, const QStyleOpt
|
||||||
|
|
||||||
if(index.column() == RsGxsChannelPostFilesModel::COLUMN_FILES_FILE)
|
if(index.column() == RsGxsChannelPostFilesModel::COLUMN_FILES_FILE)
|
||||||
{
|
{
|
||||||
GxsChannelFilesStatusWidget* w = new GxsChannelFilesStatusWidget(file,parent);
|
GxsChannelFilesStatusWidget* w = new GxsChannelFilesStatusWidget(file,parent,true);
|
||||||
|
w->setFocusPolicy(Qt::StrongFocus);
|
||||||
connect(w,SIGNAL(onButtonClick()),this->parent(),SLOT(updateDAll_PB()));
|
connect(w,SIGNAL(onButtonClick()),this->parent(),SLOT(updateDAll_PB()));
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -416,6 +418,8 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||||
connect(ui->postsTree->selectionModel(),SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),this,SLOT(showPostDetails()));
|
connect(ui->postsTree->selectionModel(),SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),this,SLOT(showPostDetails()));
|
||||||
connect(ui->postsTree,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(postContextMenu(const QPoint&)));
|
connect(ui->postsTree,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(postContextMenu(const QPoint&)));
|
||||||
|
|
||||||
|
connect(ui->channel_TW,SIGNAL(currentChanged(int)),this,SLOT(currentTabChanged(int)));
|
||||||
|
|
||||||
connect(mChannelPostsModel,SIGNAL(channelPostsLoaded()),this,SLOT(postChannelPostLoad()));
|
connect(mChannelPostsModel,SIGNAL(channelPostsLoaded()),this,SLOT(postChannelPostLoad()));
|
||||||
|
|
||||||
ui->postName_LB->hide();
|
ui->postName_LB->hide();
|
||||||
|
@ -501,6 +505,22 @@ GxsChannelPostsWidgetWithModel::GxsChannelPostsWidgetWithModel(const RsGxsGroupI
|
||||||
}, mEventHandlerId, RsEventType::GXS_CHANNELS );
|
}, mEventHandlerId, RsEventType::GXS_CHANNELS );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GxsChannelPostsWidgetWithModel::currentTabChanged(int t)
|
||||||
|
{
|
||||||
|
switch(t)
|
||||||
|
{
|
||||||
|
case CHANNEL_TABS_DETAILS:
|
||||||
|
case CHANNEL_TABS_FILES:
|
||||||
|
ui->showUnread_TB->setHidden(true);
|
||||||
|
ui->viewType_TB->setHidden(true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CHANNEL_TABS_POSTS:
|
||||||
|
ui->showUnread_TB->setHidden(false);
|
||||||
|
ui->viewType_TB->setHidden(false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
void GxsChannelPostsWidgetWithModel::updateZoomFactor(bool zoom_or_unzoom)
|
void GxsChannelPostsWidgetWithModel::updateZoomFactor(bool zoom_or_unzoom)
|
||||||
{
|
{
|
||||||
mChannelPostsDelegate->zoom(zoom_or_unzoom);
|
mChannelPostsDelegate->zoom(zoom_or_unzoom);
|
||||||
|
|
|
@ -160,6 +160,7 @@ private slots:
|
||||||
void markMessageUnread();
|
void markMessageUnread();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
void currentTabChanged(int t);
|
||||||
void sortColumnFiles(int col,Qt::SortOrder so);
|
void sortColumnFiles(int col,Qt::SortOrder so);
|
||||||
void sortColumnPostFiles(int col,Qt::SortOrder so);
|
void sortColumnPostFiles(int col,Qt::SortOrder so);
|
||||||
void updateCommentsCount(int n);
|
void updateCommentsCount(int n);
|
||||||
|
|
|
@ -387,12 +387,11 @@ void RsMessageModel::setFilter(FilterType filter_type, const QStringList& string
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
preMods();
|
|
||||||
|
|
||||||
mFilterType = filter_type;
|
mFilterType = filter_type;
|
||||||
mFilterStrings = strings;
|
mFilterStrings = strings;
|
||||||
|
|
||||||
postMods();
|
if(rowCount() > 0)
|
||||||
|
emit dataChanged(createIndex(0,0),createIndex(rowCount()-1,RsMessageModel::columnCount()-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant RsMessageModel::toolTipRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
QVariant RsMessageModel::toolTipRole(const Rs::Msgs::MsgInfoSummary& fmpe,int column) const
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "ServerPage.h"
|
#include "ServerPage.h"
|
||||||
|
|
||||||
#include <gui/notifyqt.h>
|
#include <gui/notifyqt.h>
|
||||||
|
#include "gui/MainWindow.h"
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
#include "rsharesettings.h"
|
#include "rsharesettings.h"
|
||||||
#include "util/i2pcommon.h"
|
#include "util/i2pcommon.h"
|
||||||
|
@ -1366,6 +1367,7 @@ void ServerPage::saveAddressesHiddenNode()
|
||||||
|
|
||||||
void ServerPage::updateOutProxyIndicator()
|
void ServerPage::updateOutProxyIndicator()
|
||||||
{
|
{
|
||||||
|
MainWindow::getInstance()->torstatusReset();
|
||||||
QTcpSocket socket ;
|
QTcpSocket socket ;
|
||||||
|
|
||||||
// Tor
|
// Tor
|
||||||
|
@ -1382,6 +1384,8 @@ void ServerPage::updateOutProxyIndicator()
|
||||||
ui.iconlabel_tor_outgoing->setToolTip(tr("Tor proxy is not enabled")) ;
|
ui.iconlabel_tor_outgoing->setToolTip(tr("Tor proxy is not enabled")) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mHiddenType == RS_HIDDEN_TYPE_I2P && mSamSettings.enable)
|
||||||
|
{
|
||||||
// I2P - SAM
|
// I2P - SAM
|
||||||
// Note: there is only "the SAM port", there is no additional proxy port!
|
// Note: there is only "the SAM port", there is no additional proxy port!
|
||||||
samStatus ss;
|
samStatus ss;
|
||||||
|
@ -1397,7 +1401,22 @@ void ServerPage::updateOutProxyIndicator()
|
||||||
ui.iconlabel_i2p_outgoing->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ICON_STATUS_UNKNOWN)) ;
|
ui.iconlabel_i2p_outgoing->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ICON_STATUS_UNKNOWN)) ;
|
||||||
ui.iconlabel_i2p_outgoing->setToolTip(tr("I2P proxy is not enabled")) ;
|
ui.iconlabel_i2p_outgoing->setToolTip(tr("I2P proxy is not enabled")) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
socket.connectToHost(ui.hiddenpage_proxyAddress_i2p->text(),ui.hiddenpage_proxyPort_i2p->text().toInt());
|
||||||
|
if(socket.waitForConnected(500))
|
||||||
|
{
|
||||||
|
socket.disconnectFromHost();
|
||||||
|
ui.iconlabel_i2p_outgoing->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ICON_STATUS_OK)) ;
|
||||||
|
ui.iconlabel_i2p_outgoing->setToolTip(tr("Proxy seems to work.")) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui.iconlabel_i2p_outgoing->setPixmap(FilesDefs::getPixmapFromQtResourcePath(ICON_STATUS_UNKNOWN)) ;
|
||||||
|
ui.iconlabel_i2p_outgoing->setToolTip(tr("I2P proxy is not enabled")) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
socket.connectToHost(ui.hiddenpage_proxyAddress_i2p_2->text(), 7656);
|
socket.connectToHost(ui.hiddenpage_proxyAddress_i2p_2->text(), 7656);
|
||||||
if(true == (mSamAccessible = socket.waitForConnected(1000)))
|
if(true == (mSamAccessible = socket.waitForConnected(1000)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,7 +168,7 @@ void TorStatus::getTorStatus()
|
||||||
torstatusLabel->setToolTip( text + tr("Tor proxy is not available"));
|
torstatusLabel->setToolTip( text + tr("Tor proxy is not available"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(hiddentype == RS_HIDDEN_TYPE_I2P)
|
else if(hiddentype == RS_HIDDEN_TYPE_I2P)
|
||||||
{
|
{
|
||||||
statusTor->setText("<strong>" + tr("I2P") + ":</strong>");
|
statusTor->setText("<strong>" + tr("I2P") + ":</strong>");
|
||||||
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, proxyaddr, proxyport, status);
|
rsPeers->getProxyServer(RS_HIDDEN_TYPE_I2P, proxyaddr, proxyport, status);
|
||||||
|
@ -185,6 +185,11 @@ void TorStatus::getTorStatus()
|
||||||
torstatusLabel->setToolTip( text + tr("i2p proxy is not available"));
|
torstatusLabel->setToolTip( text + tr("i2p proxy is not available"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
torstatusLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/tile_inactive_48.png").scaledToHeight(S,Qt::SmoothTransformation));
|
||||||
|
torstatusLabel->setToolTip(tr("No tor configuration"));
|
||||||
|
}
|
||||||
_updated = true;
|
_updated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1
retroshare-webui
Submodule
1
retroshare-webui
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a593b9c808f90cce7d47a5de86c207ef8675945f
|
Loading…
Add table
Add a link
Reference in a new issue