Merge pull request #2745 from csoler/v0.6-BugFixing_30

removed question before sending invite, since the request is not in auto mode
This commit is contained in:
csoler 2023-06-24 20:49:22 +02:00 committed by GitHub
commit a75133d554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 8 deletions

View File

@ -2244,6 +2244,10 @@ void TransfersDialog::chunkStreaming()
} }
void TransfersDialog::chunkRandom() void TransfersDialog::chunkRandom()
{ {
#ifdef WINDOWS_SYS
if(QMessageBox::Yes != QMessageBox::warning(nullptr,tr("Warning"),tr("On Windows systems, writing in the middle of large empty files may hang the software for several seconds. Do you want to use this option anyway?"),QMessageBox::Yes,QMessageBox::No))
return;
#endif
setChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ; setChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
} }
void TransfersDialog::chunkProgressive() void TransfersDialog::chunkProgressive()

View File

@ -905,10 +905,8 @@ void MessageWidget::sendInvite()
if(mi.from.type()!=MsgAddress::MSG_ADDRESS_TYPE_RSGXSID) if(mi.from.type()!=MsgAddress::MSG_ADDRESS_TYPE_RSGXSID)
return; return;
if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Cancel))== QMessageBox::Yes) //if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want to send an invite with your Certificate?"),QMessageBox::Yes, QMessageBox::No))== QMessageBox::Yes)
{ MessageComposer::sendInvite(mi.from.toGxsId(),false);
MessageComposer::sendInvite(mi.from.toGxsId(),false);
}
} }
void MessageWidget::setToolbarButtonStyle(Qt::ToolButtonStyle style) void MessageWidget::setToolbarButtonStyle(Qt::ToolButtonStyle style)

View File

@ -30,6 +30,7 @@
#include "retroshare/rspeers.h" #include "retroshare/rspeers.h"
#include <QCheckBox> #include <QCheckBox>
#include <QMessageBox>
#include <QToolTip> #include <QToolTip>
#include <iostream> #include <iostream>
@ -214,11 +215,19 @@ void TransferPage::updateDefaultStrategy(int i)
case 0: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_STREAMING) ; case 0: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_STREAMING) ;
break ; break ;
case 2: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ; case 2:
break ; #ifdef WINDOWS_SYS
if(QMessageBox::Yes != QMessageBox::warning(nullptr,tr("Warning"),tr("On Windows systems, randomly writing in the middle of large empty files may hang the software for several seconds. Do you want to use this option anyway?"),QMessageBox::Yes,QMessageBox::No))
{
ui._defaultStrategy_CB->setCurrentIndex(0);
return;
}
#endif
rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_RANDOM) ;
break ;
case 1: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE) ; case 1: rsFiles->setDefaultChunkStrategy(FileChunksInfo::CHUNK_STRATEGY_PROGRESSIVE) ;
break ; break ;
default: ; default: ;
} }
} }

View File

@ -30,7 +30,7 @@
<item> <item>
<widget class="QPushButton" name="editShareButton"> <widget class="QPushButton" name="editShareButton">
<property name="text"> <property name="text">
<string>Edit Share</string> <string>Configure shared directories</string>
</property> </property>
</widget> </widget>
</item> </item>