mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 13:30:36 -04:00
Merge branch 'RetroShare:master' into profile-generation-fixes-ui
This commit is contained in:
commit
b1b58c2ef1
31 changed files with 532 additions and 428 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -36,3 +36,6 @@
|
|||
[submodule "retroshare-webui"]
|
||||
path = retroshare-webui
|
||||
url = https://github.com/RetroShare/RSNewWebUI.git
|
||||
[submodule "supportlibs/librnp"]
|
||||
path = supportlibs/librnp
|
||||
url = https://github.com/rnpgp/rnp.git
|
||||
|
|
|
@ -25,9 +25,6 @@ CONFIG += c++14
|
|||
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS += openpgpsdk
|
||||
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
||||
|
||||
rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) {
|
||||
SUBDIRS += jsonapi-generator
|
||||
jsonapi-generator.file = jsonapi-generator/src/jsonapi-generator.pro
|
||||
|
@ -36,7 +33,7 @@ rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) {
|
|||
|
||||
SUBDIRS += libbitdht
|
||||
libbitdht.file = libbitdht/src/libbitdht.pro
|
||||
libretroshare.depends += openpgpsdk libbitdht
|
||||
libretroshare.depends += libbitdht
|
||||
|
||||
SUBDIRS += libretroshare
|
||||
libretroshare.file = libretroshare/src/libretroshare.pro
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
APP="RetroShare"
|
||||
RSVERSION="0.6.7a"
|
||||
QTVERSION="Qt-5.14.1"
|
||||
QTVERSION="Qt-5.15.11"
|
||||
|
||||
# Install the 7z to create dmg archives.
|
||||
#brew list p7zip || brew install p7zip
|
||||
|
@ -21,6 +21,7 @@ rm -rf qrc
|
|||
/usr/libexec/PlistBuddy -c "Delete :CFBundleGetInfoString" retroshare.app/Contents/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $RSVERSION" retroshare.app/Contents/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string $RSVERSION" retroshare.app/Contents/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Delete :NSRequiresAquaSystemAppearance" retroshare.app/Contents/Info.plist
|
||||
|
||||
# This automatically creates retroshare.dmg
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ if errorlevel 1 goto error_env
|
|||
if not "%ParamNoupdate%"=="1" (
|
||||
:: Install needed things
|
||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S make git mingw-w64-%RsMSYS2Architecture%-toolchain mingw-w64-%RsMSYS2Architecture%-qt5 mingw-w64-%RsMSYS2Architecture%-miniupnpc mingw-w64-%RsMSYS2Architecture%-sqlcipher mingw-w64-%RsMSYS2Architecture%-cmake mingw-w64-%RsMSYS2Architecture%-rapidjson"
|
||||
:: rnp
|
||||
%EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-json-c mingw-w64-%RsMSYS2Architecture%-libbotan"
|
||||
|
||||
:: Webui
|
||||
if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen"
|
||||
|
|
|
@ -105,6 +105,7 @@ copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe"
|
|||
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
|
||||
copy "%RsBuildPath%\supportlibs\cmark\build\src\libcmark.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" copy "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" (
|
||||
copy "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" "%RsDeployPath%" %Quite%
|
||||
)
|
||||
|
|
|
@ -16,7 +16,7 @@ if "%~1"=="clean" (
|
|||
goto exit
|
||||
)
|
||||
|
||||
set MSYS2Version=20231026
|
||||
set MSYS2Version=20241208
|
||||
|
||||
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe
|
||||
set MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%
|
||||
|
|
|
@ -13,12 +13,18 @@ LIBMICROHTTPD_VERSION=0.9.75
|
|||
FFMPEG_VERSION=4.4
|
||||
RAPIDJSON_VERSION=1.1.0
|
||||
XAPIAN_VERSION=1.4.19
|
||||
#RNP_VERSION=0.17.1
|
||||
|
||||
# libaries for rnp
|
||||
JSON_C_VERSION=0.18
|
||||
BOTAN_VERSION=2.19.5
|
||||
|
||||
DOWNLOAD_PATH?=download
|
||||
BUILD_PATH=build
|
||||
LIBS_PATH?=libs
|
||||
|
||||
all: dirs zlib bzip2 miniupnpc openssl speex speexdsp libxml2 libxslt curl sqlcipher libmicrohttpd ffmpeg rapidjson xapian copylibs
|
||||
all: dirs zlib bzip2 miniupnpc openssl speex speexdsp libxml2 libxslt curl sqlcipher libmicrohttpd ffmpeg rapidjson xapian jsonc botan copylibs
|
||||
#rnp
|
||||
|
||||
download: \
|
||||
$(DOWNLOAD_PATH)/zlib-$(ZLIB_VERSION).tar.gz \
|
||||
|
@ -363,6 +369,57 @@ $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION): $(DOWNLOAD_PATH)/xapian-core-$(XAPI
|
|||
rm -r -f xapian-core-$(XAPIAN_VERSION)
|
||||
mv $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION).tmp $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION)
|
||||
|
||||
jsonc: $(BUILD_PATH)/json-c-$(JSON_C_VERSION)
|
||||
|
||||
$(BUILD_PATH)/json-c-$(JSON_C_VERSION):
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/json-c-*
|
||||
[ -d "json-c-$(JSON_C_VERSION)" ] || git clone https://github.com/json-c/json-c.git --depth=1 --branch json-c-$(JSON_C_VERSION) "json-c-$(JSON_C_VERSION)"
|
||||
# build
|
||||
mkdir -p json-c-$(JSON_C_VERSION)/build
|
||||
cd json-c-$(JSON_C_VERSION)/build && cmake .. -G"MSYS Makefiles" -Wno-dev -DCMAKE_BUILD_TYPE="release" -DBUILD_SHARED_LIBS=off -DBUILD_STATIC_LIBS=on -DBUILD_TESTING=off -DCMAKE_CXX_FLAGS="-D__MINGW_USE_VC2005_COMPAT" -DCMAKE_INSTALL_PREFIX="`pwd`/install" -DCMAKE_INSTALL_PREFIX="`pwd`/../../$(BUILD_PATH)/json-c-$(JSON_C_VERSION).tmp"
|
||||
cd json-c-$(JSON_C_VERSION)/build && make install
|
||||
# cleanup
|
||||
rm -r -f json-c-$(JSON_C_VERSION)
|
||||
mv $(BUILD_PATH)/json-c-$(JSON_C_VERSION).tmp $(BUILD_PATH)/json-c-$(JSON_C_VERSION)
|
||||
|
||||
botan: $(BUILD_PATH)/botan-$(BOTAN_VERSION)
|
||||
|
||||
$(BUILD_PATH)/botan-$(BOTAN_VERSION):
|
||||
# prepare
|
||||
pacman --needed --noconfirm -S python3
|
||||
rm -r -f $(BUILD_PATH)/botan-*
|
||||
[ -d "botan-$(BOTAN_VERSION)" ] || git clone https://github.com/randombit/botan.git --depth=1 --branch $(BOTAN_VERSION) "botan-$(BOTAN_VERSION)"
|
||||
# build
|
||||
if [ $(MSYSTEM) = "MINGW32" ] ; then cd botan-$(BOTAN_VERSION) && ./configure.py --os=mingw --cpu=x86_32 --disable-shared-library --enable-static-library --extra-cxxflags="-D__MINGW_USE_VC2005_COMPAT" --prefix="`pwd`/../$(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp" ; fi
|
||||
if [ $(MSYSTEM) = "MINGW64" ] ; then cd botan-$(BOTAN_VERSION) && ./configure.py --os=mingw --cpu=x86_64 --disable-shared-library --enable-static-library --prefix="`pwd`/../$(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp" ; fi
|
||||
cd botan-$(BOTAN_VERSION) && make install
|
||||
# cleanup
|
||||
rm -r -f botan-$(BOTAN_VERSION)
|
||||
mv $(BUILD_PATH)/botan-$(BOTAN_VERSION).tmp $(BUILD_PATH)/botan-$(BOTAN_VERSION)
|
||||
|
||||
rnp: $(BUILD_PATH)/rnp-$(RNP_VERSION)
|
||||
|
||||
$(BUILD_PATH)/rnp-$(RNP_VERSION):
|
||||
# prepare
|
||||
rm -r -f $(BUILD_PATH)/rnp-*
|
||||
[ -d "rnp-$(RNP_VERSION)" ] || git clone https://github.com/rnpgp/rnp.git --depth=1 --branch v$(RNP_VERSION) --recurse-submodules --shallow-submodules "rnp-$(RNP_VERSION)"
|
||||
# build
|
||||
mkdir -p rnp-$(RNP_VERSION)/build
|
||||
cd rnp-$(RNP_VERSION)/build && cmake .. -G"MSYS Makefiles" -Wno-dev -DCMAKE_INSTALL_PREFIX="`pwd`/install" -DBUILD_SHARED_LIBS=yes -DBUILD_TESTING=off -DCMAKE_CXX_FLAGS="-D__MINGW_USE_VC2005_COMPAT -D__STDC_FORMAT_MACROS" -DBZIP2_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/bzip2-$(BZIP2_VERSION)/include" -DBZIP2_LIBRARY_RELEASE="`pwd`/../../$(BUILD_PATH)/bzip2-$(BZIP2_VERSION)/lib/libbz2.a" -DBZIP2_LIBRARIES="`pwd`/../../$(BUILD_PATH)/bzip2-$(BZIP2_VERSION)/lib/libbz2.a" -DZLIB_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/zlib-$(ZLIB_VERSION)/include" -DZLIB_LIBRARY="`pwd`/../../$(BUILD_PATH)/zlib-$(ZLIB_VERSION)/lib/libz.a" -DJSON-C_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/json-c-$(JSON_C_VERSION)/include/json-c" -DJSON-C_LIBRARY="`pwd`/../../$(BUILD_PATH)/json-c-$(JSON_C_VERSION)/lib/libjson-c.a" -DBOTAN_INCLUDE_DIR="`pwd`/../../$(BUILD_PATH)/botan-$(BOTAN_VERSION)/include/botan-`echo $(BOTAN_VERSION) | cut -c1-1`" -DBOTAN_LIBRARY="`pwd`/../../$(BUILD_PATH)/botan-$(BOTAN_VERSION)/lib/libbotan-`echo $(BOTAN_VERSION) | cut -c1-1`.a"
|
||||
cmake --build rnp-$(RNP_VERSION)/build
|
||||
# copy files
|
||||
mkdir -p $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/include/rnp
|
||||
cp -r rnp-$(RNP_VERSION)/include/rnp/* $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/include/rnp/
|
||||
cp -r rnp-$(RNP_VERSION)/build/src/lib/rnp/* $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/include/rnp/
|
||||
mkdir -p $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/lib
|
||||
cp -r rnp-$(RNP_VERSION)/build/src/lib/librnp.dll.a $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/lib/
|
||||
mkdir -p $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/bin
|
||||
cp -r rnp-$(RNP_VERSION)/build/src/lib/librnp.dll $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp/bin/
|
||||
# cleanup
|
||||
rm -r -f rnp-$(RNP_VERSION)
|
||||
mv $(BUILD_PATH)/rnp-$(RNP_VERSION).tmp $(BUILD_PATH)/rnp-$(RNP_VERSION)
|
||||
|
||||
copylibs:
|
||||
rm -r -f $(LIBS_PATH) ; \
|
||||
mkdir -p $(LIBS_PATH) ; \
|
||||
|
|
|
@ -96,6 +96,7 @@ copy nul "%RsDeployPath%\portable" %Quite%
|
|||
echo copy binaries
|
||||
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare*.exe" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
|
||||
if exist "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" copy "%RsBuildPath%\supportlibs\librnp\Build\src\lib\librnp.dll" "%RsDeployPath%" %Quite%
|
||||
|
||||
if "%ParamService%"=="1" (
|
||||
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
|
||||
|
|
|
@ -16,13 +16,13 @@ if "%~1"=="clean" (
|
|||
goto exit
|
||||
)
|
||||
|
||||
set MSYS2Version=20231026
|
||||
set MSYS2Version=20241208
|
||||
|
||||
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe
|
||||
set MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%
|
||||
set MSYS2UnpackPath=%EnvMSYS2Path%\msys64
|
||||
set CMakeInstall=cmake-3.19.0-win32-x86.zip
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.19.0/%CMakeInstall%
|
||||
set CMakeInstall=cmake-3.31.3-windows-i386.zip
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.31.3/%CMakeInstall%
|
||||
|
||||
if exist "%MSYS2UnpackPath%\usr\bin\pacman.exe" (
|
||||
if "%~1"=="reinstall" (
|
||||
|
|
|
@ -19,9 +19,9 @@ set MinGitInstallPath=%EnvToolsPath%\MinGit
|
|||
set DoxygenInstall=doxygen-1.9.6.windows.x64.bin.zip
|
||||
set DoxygenUrl=https://github.com/doxygen/doxygen/releases/download/Release_1_9_6/%DoxygenInstall%
|
||||
set DoxygenInstallPath=%EnvToolsPath%\doxygen
|
||||
set CMakeVersion=cmake-3.19.0-win32-x86
|
||||
set CMakeVersion=cmake-3.31.3-windows-i386
|
||||
set CMakeInstall=%CMakeVersion%.zip
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.19.0/%CMakeInstall%
|
||||
set CMakeUrl=https://github.com/Kitware/CMake/releases/download/v3.31.3/%CMakeInstall%
|
||||
set CMakeInstallPath=%EnvToolsPath%\cmake
|
||||
set TorProjectUrl=https://www.torproject.org
|
||||
set TorDownloadIndexUrl=%TorProjectUrl%/download/tor
|
||||
|
|
|
@ -247,6 +247,7 @@ Section $(Section_Main) Section_Main
|
|||
|
||||
; External binaries
|
||||
File "${EXTERNAL_LIB_DIR}\bin\miniupnpc.dll"
|
||||
File "${RELEASEDIR}\supportlibs\librnp\Build\src\lib\librnp.dll"
|
||||
!if ${ARCHITECTURE} == "x86"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libcrypto-1_1.dll"
|
||||
File "${EXTERNAL_LIB_DIR}\bin\libssl-1_1.dll"
|
||||
|
|
|
@ -7,5 +7,5 @@ Exec=/usr/bin/retroshare %U
|
|||
Icon=/usr/share/pixmaps/retroshare.xpm
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Network;P2P;Feed;Chat;InstantMessaging
|
||||
Categories=Application;Network;Email;InstantMessaging;Chat;Feed;FileTransfer;P2P
|
||||
MimeType=x-scheme-handler/retroshare;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 402f32eda026c3ec3e429b5fb842e87ebd985d73
|
||||
Subproject commit 2a4df811f6bfe1904bc3956f285aa0fc891f9fd4
|
|
@ -1 +1 @@
|
|||
Subproject commit b41667912751a453e8e5d4733215a0609277a26f
|
||||
Subproject commit df542663d8bd698a8b5541fc6db07da6c59f1c3a
|
|
@ -57,10 +57,10 @@
|
|||
<item row="0" column="0">
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="leftMargin">
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
|
||||
#include "pgp/pgpkeyutil.h"
|
||||
#include "pgp/rscertificate.h"
|
||||
#ifdef USE_OPENPGPSDK
|
||||
#include "pgp/openpgpsdkhandler.h"
|
||||
#else
|
||||
#include "pgp/rnppgphandler.h"
|
||||
#endif
|
||||
|
||||
#include "friendserver.h"
|
||||
#include "friend_server/fsitem.h"
|
||||
|
@ -393,7 +397,11 @@ FriendServer::FriendServer(const std::string& base_dir,const std::string& listen
|
|||
std::string pgp_private_keyring_path = RsDirUtil::makePath(base_dir,"pgp_private_keyring") ; // not used.
|
||||
std::string pgp_trustdb_path = RsDirUtil::makePath(base_dir,"pgp_trustdb") ; // not used.
|
||||
|
||||
#ifdef USE_OPENPGPSDK
|
||||
mPgpHandler = new OpenPGPSDKHandler(pgp_public_keyring_path,pgp_private_keyring_path,pgp_trustdb_path,pgp_lock_path);
|
||||
#else
|
||||
mPgpHandler = new RNPPGPHandler(pgp_public_keyring_path,pgp_private_keyring_path,pgp_trustdb_path,pgp_lock_path);
|
||||
#endif
|
||||
|
||||
// Random bias. Should be cryptographically safe.
|
||||
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
|
@ -399,8 +399,8 @@ border-image: url(:/images/closepressed.png)
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../images.qrc"/>
|
||||
<include location="../icons.qrc"/>
|
||||
<include location="../images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="images.qrc">
|
||||
<iconset resource="icons.qrc">
|
||||
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
|
@ -132,10 +132,10 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="headerBFrame_GL">
|
||||
<property name="leftMargin">
|
||||
|
@ -401,8 +401,8 @@
|
|||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="images.qrc"/>
|
||||
<include location="icons.qrc"/>
|
||||
<include location="images.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "util/rsdebug.h"
|
||||
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsservicecontrol.h"
|
||||
|
||||
|
@ -167,7 +167,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
// This is used to grab the broadcast of changes from p3GxsCircles, which is discarded by the current dialog, since it expects data for p3Identity only.
|
||||
//mCirclesBroadcastBase = new RsGxsUpdateBroadcastBase(rsGxsCircles, this);
|
||||
//connect(mCirclesBroadcastBase, SIGNAL(fillDisplay(bool)), this, SLOT(updateCirclesDisplay(bool)));
|
||||
|
||||
|
||||
ownItem = new QTreeWidgetItem();
|
||||
ownItem->setText(RSID_COL_NICKNAME, tr("My own identities"));
|
||||
ownItem->setFont(RSID_COL_NICKNAME, ui->idTreeWidget->font());
|
||||
|
@ -198,7 +198,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDLIST, ui->idTreeWidget, false);
|
||||
mStateHelper->addClear(IDDIALOG_IDLIST, ui->idTreeWidget);
|
||||
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
//mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_PublishTS);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_Type);
|
||||
|
@ -214,7 +214,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->label_positive);
|
||||
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->label_negative);
|
||||
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
//mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_PublishTS);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_Type);
|
||||
|
@ -225,7 +225,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->overallOpinion_TF);
|
||||
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->usageStatistics_TB);
|
||||
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
//mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_Nickname);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_PublishTS);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId);
|
||||
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_Type);
|
||||
|
@ -253,7 +253,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
|
||||
connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(filterChanged(QString)));
|
||||
connect(ui->ownOpinion_CB, SIGNAL(currentIndexChanged(int)), this, SLOT(modifyReputation()));
|
||||
|
||||
|
||||
connect(ui->inviteButton, SIGNAL(clicked()), this, SLOT(sendInvite()));
|
||||
connect(ui->editButton, SIGNAL(clicked()), this, SLOT(editIdentity()));
|
||||
|
||||
|
@ -269,7 +269,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
/* Initialize splitter */
|
||||
ui->mainSplitter->setStretchFactor(0, 0);
|
||||
ui->mainSplitter->setStretchFactor(1, 1);
|
||||
|
||||
|
||||
clearPerson();
|
||||
|
||||
/* Add filter types */
|
||||
|
@ -327,18 +327,18 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
idTWHAction->setData(RSID_FILTER_BANNED);
|
||||
connect(idTWHAction, SIGNAL(toggled(bool)), this, SLOT(filterToggled(bool)));
|
||||
idTWHMenu->addAction(idTWHAction);
|
||||
|
||||
|
||||
QAction *CreateIDAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/person.png"),tr("Create new Identity"), this);
|
||||
connect(CreateIDAction, SIGNAL(triggered()), this, SLOT(addIdentity()));
|
||||
|
||||
|
||||
QAction *CreateCircleAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/circles.png"),tr("Create new circle"), this);
|
||||
connect(CreateCircleAction, SIGNAL(triggered()), this, SLOT(createExternalCircle()));
|
||||
|
||||
|
||||
QMenu *menu = new QMenu();
|
||||
menu->addAction(CreateIDAction);
|
||||
menu->addAction(CreateCircleAction);
|
||||
ui->toolButton_New->setMenu(menu);
|
||||
|
||||
|
||||
/* Add filter actions */
|
||||
QTreeWidgetItem *headerItem = ui->idTreeWidget->headerItem();
|
||||
QString headerText = headerItem->text(RSID_COL_NICKNAME);
|
||||
|
@ -361,14 +361,14 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
|
||||
ui->idTreeWidget->setColumnHidden(RSID_COL_IDTYPE, true);
|
||||
ui->idTreeWidget->setColumnHidden(RSID_COL_KEYID, true);
|
||||
|
||||
|
||||
/* Set initial column width */
|
||||
int fontWidth = QFontMetricsF(ui->idTreeWidget->font()).width("W");
|
||||
ui->idTreeWidget->setColumnWidth(RSID_COL_NICKNAME, 14 * fontWidth);
|
||||
ui->idTreeWidget->setColumnWidth(RSID_COL_KEYID, 20 * fontWidth);
|
||||
ui->idTreeWidget->setColumnWidth(RSID_COL_IDTYPE, 18 * fontWidth);
|
||||
ui->idTreeWidget->setColumnWidth(RSID_COL_VOTES, 2 * fontWidth);
|
||||
|
||||
|
||||
ui->idTreeWidget->setItemDelegate(new RSElidedItemDelegate());
|
||||
ui->idTreeWidget->setItemDelegateForColumn(
|
||||
RSID_COL_NICKNAME,
|
||||
|
@ -408,7 +408,7 @@ IdDialog::IdDialog(QWidget *parent)
|
|||
processSettings(true);
|
||||
|
||||
// circles stuff
|
||||
|
||||
|
||||
//connect(ui->treeWidget_membership, SIGNAL(itemSelectionChanged()), this, SLOT(circle_selected()));
|
||||
connect(ui->treeWidget_membership, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CircleListCustomPopupMenu(QPoint)));
|
||||
connect(ui->autoBanIdentities_CB, SIGNAL(toggled(bool)), this, SLOT(toggleAutoBanIdentities(bool)));
|
||||
|
@ -429,14 +429,23 @@ void IdDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
|
|||
switch(e->mIdentityEventCode)
|
||||
{
|
||||
case RsGxsIdentityEventCode::DELETED_IDENTITY:
|
||||
case RsGxsIdentityEventCode::NEW_IDENTITY:
|
||||
if(mId == e->mIdentityId)
|
||||
{
|
||||
mId.clear();
|
||||
updateIdentity();
|
||||
}
|
||||
updateIdList();
|
||||
break;
|
||||
|
||||
case RsGxsIdentityEventCode::NEW_IDENTITY:
|
||||
case RsGxsIdentityEventCode::UPDATED_IDENTITY:
|
||||
if (isVisible())
|
||||
{
|
||||
if(rsIdentity->isOwnId(RsGxsId(e->mIdentityId)))
|
||||
updateIdList();
|
||||
else
|
||||
updateIdTimer.start(3000); // use a timer for events not generated by local changes
|
||||
updateIdTimer.start(3000); // use a timer for events not generated by local changes which generally
|
||||
// come in large herds. Allows to group multiple changes into a single UI update.
|
||||
}
|
||||
else
|
||||
needUpdateIdsOnNextShow = true;
|
||||
|
@ -481,11 +490,11 @@ void IdDialog::clearPerson()
|
|||
{
|
||||
//QFontMetricsF f(ui->avLabel_Person->font()) ;
|
||||
|
||||
//ui->avLabel_Person->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::KeepAspectRatio,Qt::SmoothTransformation));
|
||||
ui->headerTextLabel_Person->setText(tr("People"));
|
||||
|
||||
ui->info_Frame_Invite->hide();
|
||||
ui->avatarLabel->clear();
|
||||
ui->avatarLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png"));
|
||||
|
||||
whileBlocking(ui->ownOpinion_CB)->setCurrentIndex(1);
|
||||
whileBlocking(ui->autoBanIdentities_CB)->setChecked(false);
|
||||
|
@ -507,10 +516,10 @@ void IdDialog::updateCirclesDisplay()
|
|||
{
|
||||
if(RsAutoUpdatePage::eventsLocked())
|
||||
return ;
|
||||
|
||||
|
||||
if(!isVisible())
|
||||
return ;
|
||||
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "!!Updating circles display!" << std::endl;
|
||||
#endif
|
||||
|
@ -920,16 +929,16 @@ void IdDialog::loadCircles(const std::list<RsGroupMetaData>& groupInfo)
|
|||
|
||||
bool IdDialog::getItemCircleId(QTreeWidgetItem *item,RsGxsCircleId& id)
|
||||
{
|
||||
#ifdef CIRCLE_MEMBERSHIP_CATEGORIES
|
||||
#ifdef CIRCLE_MEMBERSHIP_CATEGORIES
|
||||
if ((!item) || (!item->parent()))
|
||||
return false;
|
||||
|
||||
|
||||
QString coltext = (item->parent()->parent())? (item->parent()->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString()) : (item->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString());
|
||||
id = RsGxsCircleId( coltext.toStdString()) ;
|
||||
#else
|
||||
if(!item)
|
||||
return false;
|
||||
|
||||
|
||||
QString coltext = (item->parent())? (item->parent()->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString()) : (item->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString());
|
||||
id = RsGxsCircleId( coltext.toStdString()) ;
|
||||
#endif
|
||||
|
@ -958,19 +967,19 @@ void IdDialog::createExternalCircle()
|
|||
void IdDialog::showEditExistingCircle()
|
||||
{
|
||||
RsGxsCircleId id ;
|
||||
|
||||
|
||||
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),id))
|
||||
return ;
|
||||
|
||||
|
||||
uint32_t subscribe_flags = ui->treeWidget_membership->currentItem()->data(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole).toUInt();
|
||||
|
||||
|
||||
CreateCircleDialog dlg;
|
||||
|
||||
|
||||
dlg.editExistingId(RsGxsGroupId(id),true,!(subscribe_flags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN)) ;
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void IdDialog::grantCircleMembership()
|
||||
void IdDialog::grantCircleMembership()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
||||
|
@ -987,7 +996,7 @@ void IdDialog::grantCircleMembership()
|
|||
});
|
||||
}
|
||||
|
||||
void IdDialog::revokeCircleMembership()
|
||||
void IdDialog::revokeCircleMembership()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
||||
|
@ -1016,22 +1025,22 @@ void IdDialog::revokeCircleMembership()
|
|||
});
|
||||
}
|
||||
|
||||
void IdDialog::acceptCircleSubscription()
|
||||
void IdDialog::acceptCircleSubscription()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
||||
|
||||
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),circle_id))
|
||||
return;
|
||||
|
||||
RsGxsId own_id(qobject_cast<QAction*>(sender())->data().toString().toStdString());
|
||||
|
||||
|
||||
rsGxsCircles->requestCircleMembership(own_id,circle_id) ;
|
||||
}
|
||||
|
||||
void IdDialog::cancelCircleSubscription()
|
||||
{
|
||||
void IdDialog::cancelCircleSubscription()
|
||||
{
|
||||
RsGxsCircleId circle_id ;
|
||||
|
||||
|
||||
if(!getItemCircleId(ui->treeWidget_membership->currentItem(),circle_id))
|
||||
return;
|
||||
|
||||
|
@ -1039,14 +1048,14 @@ void IdDialog::cancelCircleSubscription()
|
|||
|
||||
rsGxsCircles->cancelCircleMembership(own_id,circle_id) ;
|
||||
}
|
||||
|
||||
|
||||
void IdDialog::CircleListCustomPopupMenu( QPoint )
|
||||
{
|
||||
QMenu contextMnu( this );
|
||||
|
||||
RsGxsCircleId circle_id ;
|
||||
QTreeWidgetItem *item = ui->treeWidget_membership->currentItem();
|
||||
|
||||
|
||||
if(!getItemCircleId(item,circle_id))
|
||||
return ;
|
||||
|
||||
|
@ -1054,7 +1063,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
RsGxsId item_id(item->data(CIRCLEGROUP_CIRCLE_COL_GROUPID,Qt::UserRole).toString().toStdString());
|
||||
bool is_circle ;
|
||||
bool am_I_circle_admin = false ;
|
||||
|
||||
|
||||
if(item_id == RsGxsId(circle_id)) // is it a circle?
|
||||
{
|
||||
uint32_t group_flags = item->data(CIRCLEGROUP_CIRCLE_COL_GROUPFLAGS, Qt::UserRole).toUInt();
|
||||
|
@ -1073,7 +1082,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
#ifdef CIRCLE_MEMBERSHIP_CATEGORIES
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << " Item is a circle item. Adding Edit/Details menu entry." << std::endl;
|
||||
#endif
|
||||
|
@ -1081,7 +1090,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
|
||||
contextMnu.addSeparator() ;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
current_gxs_id = RsGxsId(item_id);
|
||||
is_circle =false ;
|
||||
|
@ -1096,9 +1105,9 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
std::cerr << " Item is a GxsId item. Requesting flags/group id from parent: " << circle_id << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
RsGxsCircleDetails details ;
|
||||
|
||||
|
||||
if(!rsGxsCircles->getCircleDetails(circle_id,details))// grab real circle ID from parent. Make sure circle id is used correctly afterwards!
|
||||
{
|
||||
std::cerr << " (EE) cannot get circle info for ID " << circle_id << ". Not in cache?" << std::endl;
|
||||
|
@ -1135,7 +1144,7 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
ids[REMOVE].push_back(*it) ;
|
||||
else
|
||||
ids[CANCEL].push_back(*it) ;
|
||||
else
|
||||
else
|
||||
if(subscribe_flags & GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST)
|
||||
ids[ACCEPT].push_back(*it) ;
|
||||
else
|
||||
|
@ -1196,17 +1205,17 @@ void IdDialog::CircleListCustomPopupMenu( QPoint )
|
|||
contextMnu.addMenu(menu) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!is_circle && am_I_circle_admin) // I am circle admin. I can therefore revoke/accept membership
|
||||
{
|
||||
std::map<RsGxsId,uint32_t>::const_iterator it = details.mSubscriptionFlags.find(current_gxs_id) ;
|
||||
|
||||
|
||||
if(!current_gxs_id.isNull() && it != details.mSubscriptionFlags.end())
|
||||
{
|
||||
contextMnu.addSeparator() ;
|
||||
|
||||
if(it->second & GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST)
|
||||
{
|
||||
{
|
||||
QAction *action = new QAction(tr("Revoke this member"),this) ;
|
||||
action->setData(QString::fromStdString(current_gxs_id.toStdString()));
|
||||
QObject::connect(action,SIGNAL(triggered()), this, SLOT(revokeCircleMembership()));
|
||||
|
@ -1251,7 +1260,7 @@ static QString getHumanReadableDuration(uint32_t seconds)
|
|||
return QString(QObject::tr("%1 hours ago")).arg(seconds/3600) ;
|
||||
else if(seconds < 2*24*3600)
|
||||
return QString(QObject::tr("%1 day ago")).arg(seconds/86400) ;
|
||||
else
|
||||
else
|
||||
return QString(QObject::tr("%1 days ago")).arg(seconds/86400) ;
|
||||
}
|
||||
|
||||
|
@ -1283,7 +1292,7 @@ void IdDialog::processSettings(bool load)
|
|||
|
||||
// state of splitter
|
||||
Settings->setValue("splitter", ui->mainSplitter->saveState());
|
||||
|
||||
|
||||
//save expanding
|
||||
Settings->setValue("ExpandAll", allItem->isExpanded());
|
||||
Settings->setValue("ExpandContacts", contactsItem->isExpanded());
|
||||
|
@ -1330,6 +1339,7 @@ void IdDialog::updateSelection()
|
|||
void IdDialog::updateIdList()
|
||||
{
|
||||
//int accept = filter;
|
||||
std::cerr << "Updating ID list" << std::endl;
|
||||
|
||||
RsThread::async([this]()
|
||||
{
|
||||
|
@ -1476,13 +1486,13 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
|
|||
rsPeers->getGPGDetails(data.mPgpId, details);
|
||||
item->setText(RSID_COL_IDTYPE, QString::fromUtf8(details.name.c_str()));
|
||||
item->setToolTip(RSID_COL_IDTYPE,"Verified signature from node "+QString::fromStdString(data.mPgpId.toStdString())) ;
|
||||
|
||||
|
||||
|
||||
|
||||
QString tooltip = tr("Node name:")+" " + QString::fromUtf8(details.name.c_str()) + "\n";
|
||||
tooltip += tr("Node Id :")+" " + QString::fromStdString(data.mPgpId.toStdString()) ;
|
||||
item->setToolTip(RSID_COL_KEYID,tooltip) ;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
QString txt = tr("[Unknown node]");
|
||||
item->setText(RSID_COL_IDTYPE, txt);
|
||||
|
@ -1512,7 +1522,9 @@ void IdDialog::loadIdentities(const std::map<RsGxsGroupId,RsGxsIdGroup>& ids_set
|
|||
{
|
||||
auto ids_set(ids_set_const);
|
||||
|
||||
//First: Get current item to restore after
|
||||
std::cerr << "Loading ID list" << std::endl;
|
||||
|
||||
//First: Get current item to restore after
|
||||
RsGxsGroupId oldCurrentId = mIdToNavigate;
|
||||
{
|
||||
QTreeWidgetItem *oldCurrent = ui->idTreeWidget->currentItem();
|
||||
|
@ -1535,13 +1547,13 @@ void IdDialog::loadIdentities(const std::map<RsGxsGroupId,RsGxsIdGroup>& ids_set
|
|||
|
||||
RsPgpId ownPgpId = rsPeers->getGPGOwnId();
|
||||
|
||||
// Update existing and remove not existing items
|
||||
// Update existing and remove not existing items
|
||||
// Also remove items that do not have the correct parent
|
||||
|
||||
QTreeWidgetItemIterator itemIterator(ui->idTreeWidget);
|
||||
QTreeWidgetItem *item = NULL;
|
||||
|
||||
while ((item = *itemIterator) != NULL)
|
||||
while ((item = *itemIterator) != NULL)
|
||||
{
|
||||
++itemIterator;
|
||||
auto it = ids_set.find(RsGxsGroupId(item->text(RSID_COL_KEYID).toStdString())) ;
|
||||
|
@ -1589,18 +1601,18 @@ void IdDialog::loadIdentities(const std::map<RsGxsGroupId,RsGxsIdGroup>& ids_set
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* count items */
|
||||
int itemCount = contactsItem->childCount() + allItem->childCount() + ownItem->childCount();
|
||||
ui->label_count->setText( "(" + QString::number( itemCount ) + ")" );
|
||||
|
||||
|
||||
int contactsCount = contactsItem->childCount() ;
|
||||
int allCount = allItem->childCount() ;
|
||||
int ownCount = ownItem->childCount();
|
||||
|
||||
contactsItem->setText(0, tr("My contacts") + " (" + QString::number( contactsCount ) + ")" );
|
||||
allItem->setText(0, tr("All") + " (" + QString::number( allCount ) + ")" );
|
||||
ownItem->setText(0, tr("My own identities") + " (" + QString::number( ownCount ) + ")" );
|
||||
contactsItem->setText(0, tr("My contacts") + ((contactsCount>0)?" (" + QString::number( contactsCount ) + ")":"") );
|
||||
allItem->setText(0, tr("All") + ((allCount>0)?" (" + QString::number( allCount ) + ")":"") );
|
||||
ownItem->setText(0, tr("My own identities") + ((ownCount>0)?" (" + QString::number( ownCount ) + ")":"") );
|
||||
|
||||
|
||||
//Restore expanding
|
||||
|
@ -1675,7 +1687,7 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
|
|||
RsPgpId ownPgpId = rsPeers->getGPGOwnId();
|
||||
|
||||
ui->lineEdit_PublishTS->setText(QDateTime::fromMSecsSinceEpoch(qint64(1000)*data.mMeta.mPublishTs).toString(Qt::SystemLocaleShortDate));
|
||||
ui->lineEdit_Nickname->setText(QString::fromUtf8(data.mMeta.mGroupName.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE));
|
||||
//ui->lineEdit_Nickname->setText(QString::fromUtf8(data.mMeta.mGroupName.c_str()).left(RSID_MAXIMUM_NICKNAME_SIZE));
|
||||
ui->lineEdit_KeyId->setText(QString::fromStdString(data.mMeta.mGroupId.toStdString()));
|
||||
//ui->lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash.toStdString()));
|
||||
if(data.mPgpKnown)
|
||||
|
@ -1731,7 +1743,7 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
|
|||
ui->lineEdit_GpgId->show() ;
|
||||
ui->label_GpgId->show() ;
|
||||
}
|
||||
|
||||
|
||||
if(data.mPgpKnown)
|
||||
{
|
||||
ui->lineEdit_GpgName->show() ;
|
||||
|
@ -1771,7 +1783,6 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
|
|||
|
||||
if (isOwnId)
|
||||
{
|
||||
mStateHelper->setWidgetEnabled(ui->ownOpinion_CB, false);
|
||||
mStateHelper->setWidgetEnabled(ui->autoBanIdentities_CB, false);
|
||||
// ui->editIdentity->setEnabled(true);
|
||||
// ui->removeIdentity->setEnabled(true);
|
||||
|
@ -1781,8 +1792,6 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
|
|||
}
|
||||
else
|
||||
{
|
||||
// No Reputation yet!
|
||||
mStateHelper->setWidgetEnabled(ui->ownOpinion_CB, true);
|
||||
mStateHelper->setWidgetEnabled(ui->autoBanIdentities_CB, true);
|
||||
// ui->editIdentity->setEnabled(false);
|
||||
// ui->removeIdentity->setEnabled(false);
|
||||
|
@ -1826,7 +1835,7 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
|
|||
frep_string = tr("No votes from friends") ;
|
||||
|
||||
ui->neighborNodesOpinion_TF->setText(frep_string) ;
|
||||
|
||||
|
||||
ui->label_positive->setText(QString::number(info.mFriendsPositiveVotes));
|
||||
ui->label_negative->setText(QString::number(info.mFriendsNegativeVotes));
|
||||
|
||||
|
@ -2028,7 +2037,7 @@ void IdDialog::modifyReputation()
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void IdDialog::navigate(const RsGxsId& gxs_id)
|
||||
{
|
||||
#ifdef ID_DEBUG
|
||||
|
@ -2086,14 +2095,12 @@ void IdDialog::removeIdentity()
|
|||
return;
|
||||
}
|
||||
|
||||
if ((QMessageBox::question(this, tr("Really delete?"), tr("Do you really want to delete this identity?"), QMessageBox::Yes|QMessageBox::No, QMessageBox::No))== QMessageBox::Yes)
|
||||
if ((QMessageBox::question(this, tr("Really delete?"), tr("Do you really want to delete this identity?\nThis cannot be undone."), QMessageBox::Yes|QMessageBox::No, QMessageBox::No))== QMessageBox::Yes)
|
||||
{
|
||||
std::string keyId = item->text(RSID_COL_KEYID).toStdString();
|
||||
std::string keyId = item->text(RSID_COL_KEYID).toStdString();
|
||||
RsGxsId kid(keyId);
|
||||
|
||||
uint32_t dummyToken = 0;
|
||||
RsGxsIdGroup group;
|
||||
group.mMeta.mGroupId=RsGxsGroupId(keyId);
|
||||
rsIdentity->deleteIdentity(dummyToken, group);
|
||||
rsIdentity->deleteIdentity(kid);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2256,29 +2263,29 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
|
|||
if(n_is_a_contact == 0)
|
||||
contextMenu->addAction(QIcon(), tr("Add to Contacts"), this, SLOT(addtoContacts()));
|
||||
|
||||
if (n_selected_items==1)
|
||||
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
|
||||
|
||||
if(n_is_not_a_contact == 0)
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/cancel.svg"), tr("Remove from Contacts"), this, SLOT(removefromContacts()));
|
||||
|
||||
contextMenu->addSeparator();
|
||||
}
|
||||
|
||||
if(n_positive_reputations == 0) // only unban when all items are banned
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-up.png"), tr("Set positive opinion"), this, SLOT(positivePerson()));
|
||||
if (n_selected_items==1)
|
||||
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
|
||||
|
||||
if(n_neutral_reputations == 0) // only unban when all items are banned
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-neutral.png"), tr("Set neutral opinion"), this, SLOT(neutralPerson()));
|
||||
contextMenu->addSeparator();
|
||||
|
||||
if(n_negative_reputations == 0)
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-down.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
|
||||
}
|
||||
if(n_positive_reputations == 0) // only unban when all items are banned
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-up.png"), tr("Set positive opinion"), this, SLOT(positivePerson()));
|
||||
|
||||
if(n_neutral_reputations == 0) // only unban when all items are banned
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-neutral.png"), tr("Set neutral opinion"), this, SLOT(neutralPerson()));
|
||||
|
||||
if(n_negative_reputations == 0)
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/png/thumbs-down.png"), tr("Set negative opinion"), this, SLOT(negativePerson()));
|
||||
|
||||
if(one_item_owned_by_you && n_selected_items==1)
|
||||
{
|
||||
contextMenu->addSeparator();
|
||||
|
||||
contextMenu->addAction(QIcon(""),tr("Copy identity to clipboard"),this,SLOT(copyRetroshareLink())) ;
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_EDIT),tr("Edit identity"),this,SLOT(editIdentity())) ;
|
||||
contextMenu->addAction(FilesDefs::getIconFromQtResourcePath(":/icons/cancel.svg"),tr("Delete identity"),this,SLOT(removeIdentity())) ;
|
||||
}
|
||||
|
@ -2453,7 +2460,7 @@ void IdDialog::sendInvite()
|
|||
}
|
||||
|
||||
RsGxsId id(ui->lineEdit_KeyId->text().toStdString());
|
||||
|
||||
|
||||
//if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
|
||||
{
|
||||
MessageComposer::sendInvite(id,false);
|
||||
|
@ -2461,7 +2468,7 @@ void IdDialog::sendInvite()
|
|||
ui->info_Frame_Invite->show();
|
||||
ui->inviteButton->setEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -2592,4 +2599,3 @@ void IdDialog::restoreExpandedCircleItems(const std::vector<bool>& expanded_root
|
|||
restoreTopLevel(mExternalOtherCircleItem,1);
|
||||
restoreTopLevel(mMyCircleItem,2);
|
||||
}
|
||||
|
||||
|
|
|
@ -154,10 +154,10 @@
|
|||
<item>
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="toolBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
|
@ -302,14 +302,14 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>505</width>
|
||||
<height>716</height>
|
||||
<height>703</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
|
@ -334,10 +334,10 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string extracomment="Click here to change your avatar">Your Avatar</string>
|
||||
|
@ -478,6 +478,265 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="ElidedLabel" name="headerTextLabel_Person">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>22</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>People</string>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QGroupBox" name="detailsGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>299</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="topMargin">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="autoBanIdentities_CB">
|
||||
<property name="toolTip">
|
||||
<string>Auto-Ban all identities signed by the same node</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto-Ban profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="banoption_label">
|
||||
<property name="text">
|
||||
<string>Ban-option:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Type">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_LastUsed">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_KeyId">
|
||||
<property name="text">
|
||||
<string>Identity ID :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_LastUsed">
|
||||
<property name="text">
|
||||
<string>Last used:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="Line" name="line_IdInfo">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_GpgId">
|
||||
<property name="text">
|
||||
<string>Owner node ID :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_PublishTS">
|
||||
<property name="text">
|
||||
<string>Created on :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="neighborNodesOpinion_LB">
|
||||
<property name="text">
|
||||
<string>Friend votes:</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_Type">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_KeyId">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="label_YourOpinion">
|
||||
<property name="text">
|
||||
<string>Your opinion:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_GpgId">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1" rowspan="2">
|
||||
<widget class="RSComboBox" name="ownOpinion_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-family:'Sans'; font-size:9pt;">Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the difference between friend's positive and negative opinions. If not, your own opinion gives the score.</span></p><p><span style=" font-family:'Sans'; font-size:9pt;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -1, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a non negative reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 5 days).</span></p><p><span style=" font-family:'Sans'; font-size:9pt;">You can change the thresholds and the time of inactivity to delete identities in preferences -&gt; people. </span></p></body></html></string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Negative</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/thumbs-down.png</normaloff>:/icons/png/thumbs-down.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Neutral</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/thumbs-neutral.png</normaloff>:/icons/png/thumbs-neutral.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Positive</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/thumbs-up.png</normaloff>:/icons/png/thumbs-up.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="overallOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_GpgName">
|
||||
<property name="text">
|
||||
<string>Owner node name :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_GpgName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_PublishTS">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="overallOpinion_LB">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QFrame" name="info_Frame_Invite">
|
||||
<property name="sizePolicy">
|
||||
|
@ -690,276 +949,6 @@ border-image: url(:/images/closepressed.png)
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QGroupBox" name="detailsGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>299</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Identity info</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_GpgId">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_LastUsed">
|
||||
<property name="text">
|
||||
<string>Last used:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_Nickname">
|
||||
<property name="text">
|
||||
<string>Identity name :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_GpgName">
|
||||
<property name="text">
|
||||
<string>Owner node name :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Nickname">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="autoBanIdentities_CB">
|
||||
<property name="toolTip">
|
||||
<string>Auto-Ban all identities signed by the same node</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto-Ban profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_PublishTS">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" rowspan="2">
|
||||
<widget class="QLabel" name="label_YourOpinion">
|
||||
<property name="text">
|
||||
<string>Your opinion:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_Type">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_LastUsed">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="overallOpinion_LB">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overall:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_PublishTS">
|
||||
<property name="text">
|
||||
<string>Created on :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_GpgId">
|
||||
<property name="text">
|
||||
<string>Owner node ID :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="banoption_label">
|
||||
<property name="text">
|
||||
<string>Ban-option:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Average opinion of neighbor nodes about this identity. Negative is bad,</p><p>positive is good. Zero is neutral.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_KeyId">
|
||||
<property name="text">
|
||||
<string>Identity ID :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="Line" name="line_IdInfo">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_KeyId">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_Type">
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1" rowspan="2">
|
||||
<widget class="RSComboBox" name="ownOpinion_CB">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p><span style=" font-family:'Sans'; font-size:9pt;">Your own opinion about an identity rules the visibility of that identity for yourself and your friend nodes. Your own opinion is shared among friends and used to compute a reputation score: If your opinion about an identity is neutral, the reputation score is the difference between friend's positive and negative opinions. If not, your own opinion gives the score.</span></p><p><span style=" font-family:'Sans'; font-size:9pt;">The overall score is used in chat lobbies, forums and channels to decide on the actions to take for each specific identity. When the overall score is lower than -1, the identity is banned, which prevents all messages and forums/channels authored by this identity to be forwarded, both ways. Some forums also have special anti-spam flags that require a non negative reputation level, making them more sensitive to bad opinions. Banned identities gradually lose their activity and eventually disappear (after 5 days).</span></p><p><span style=" font-family:'Sans'; font-size:9pt;">You can change the thresholds and the time of inactivity to delete identities in preferences -&gt; people. </span></p></body></html></string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Negative</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/thumbs-down.png</normaloff>:/icons/png/thumbs-down.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Neutral</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/thumbs-neutral.png</normaloff>:/icons/png/thumbs-neutral.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Positive</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../icons.qrc">
|
||||
<normaloff>:/icons/png/thumbs-up.png</normaloff>:/icons/png/thumbs-up.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_GpgName">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QLineEdit" name="overallOpinion_TF">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Overall reputation score, accounting for yours and your friends'.</p><p>Negative is bad, positive is good. Zero is neutral. If the score is too low,</p><p>the identity is flagged as bad, and will be filtered out in forums, chat lobbies,</p><p>channels, etc.</p></body></html></string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="neighborNodesOpinion_LB">
|
||||
<property name="text">
|
||||
<string>Friend votes:</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="ElidedLabel" name="headerTextLabel_Person">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>22</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>People</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
|
@ -1920,7 +1920,9 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||
void RSLinkClipboard::copyLinks(const QList<RetroShareLink>& links)
|
||||
{
|
||||
QString res ;
|
||||
for (int i = 0; i < links.size(); ++i)
|
||||
if(links.size() == 1)
|
||||
res += links[0].toString();
|
||||
else for(int i = 0; i < links.size(); ++i)
|
||||
res += links[i].toString() + "\n" ;
|
||||
|
||||
QApplication::clipboard()->setText(res) ;
|
||||
|
@ -2036,4 +2038,3 @@ void RSLinkClipboard::parseText(QString text, QList<RetroShareLink> &links,Retro
|
|||
pos += rx.matchedLength();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ void StartDialog::notSecureWarning()
|
|||
QMessageBox::warning ( this, tr("Warning"), tr("The password to your SSL certificate (your node) will be stored encrypted in your Keychain. \n\n Your PGP passwd will not be stored.\n\nThis choice can be reverted in settings."), QMessageBox::Ok);
|
||||
#else
|
||||
// this handles all linux systems at once.
|
||||
QMessageBox::warning ( this, tr("Warning"), tr("The password to your SSL certificate (your node) will be stored encrypted in your Gnome Keyring. \n\n Your PGP passwd will not be stored.\n\nThis choice can be reverted in settings."), QMessageBox::Ok);
|
||||
QMessageBox::warning ( this, tr("Warning"), tr("The password to your SSL certificate (your node) will be stored encrypted in your desktop's keyring. \n\n Your PGP passwd will not be stored.\n\nThis choice can be reverted in settings."), QMessageBox::Ok);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -162,12 +162,14 @@ static QIcon createAvatar(const QPixmap &avatar, const QPixmap &overlay)
|
|||
|
||||
void RsFriendListModel::setDisplayStatusString(bool b)
|
||||
{
|
||||
preMods();
|
||||
mDisplayStatusString = b;
|
||||
postMods();
|
||||
}
|
||||
|
||||
void RsFriendListModel::setDisplayStatusIcon(bool b)
|
||||
{
|
||||
preMods();
|
||||
mDisplayStatusIcon = b;
|
||||
postMods();
|
||||
}
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
<item>
|
||||
<widget class="QFrame" name="toolBarFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="toolBarFrame_HL">
|
||||
<property name="spacing">
|
||||
|
|
|
@ -349,10 +349,10 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="toolBarFrameHLayout">
|
||||
<property name="leftMargin">
|
||||
|
@ -1400,6 +1400,11 @@ border-image: url(:/images/closepressed.png)
|
|||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>RSComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>gui/common/RSComboBox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FriendSelectionWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
|
@ -1411,21 +1416,16 @@ border-image: url(:/images/closepressed.png)
|
|||
<extends>QComboBox</extends>
|
||||
<header>gui/gxs/GxsIdChooser.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>HashBox</class>
|
||||
<extends>QScrollArea</extends>
|
||||
<header location="global">gui/common/HashBox.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>MimeTextEdit</class>
|
||||
<extends>QTextEdit</extends>
|
||||
<header location="global">gui/common/MimeTextEdit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RSComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>gui/common/RSComboBox.h</header>
|
||||
<class>HashBox</class>
|
||||
<extends>QScrollArea</extends>
|
||||
<header location="global">gui/common/HashBox.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
|
|
|
@ -1296,7 +1296,7 @@ void MessagesDialog::updateMessageSummaryList()
|
|||
/* calculating the new messages */
|
||||
|
||||
std::list<MsgInfoSummary> msgList;
|
||||
rsMail->getMessageSummaries(mMessageModel->currentBox(),msgList);
|
||||
rsMail->getMessageSummaries(Rs::Msgs::BoxName::BOX_ALL,msgList);
|
||||
|
||||
QMap<int, int> tagCount;
|
||||
|
||||
|
|
|
@ -232,23 +232,23 @@ void JsonApiPage::addTokenClicked()
|
|||
whileBlocking(ui.tokensListView)->setModel(new QStringListModel(newTk));
|
||||
}
|
||||
|
||||
void JsonApiPage::removeTokenClicked()
|
||||
{
|
||||
QString token(ui.tokenLineEdit->text());
|
||||
rsJsonApi->revokeAuthToken(token.toStdString());
|
||||
|
||||
QStringList newTk;
|
||||
|
||||
for(const auto& it : rsJsonApi->getAuthorizedTokens())
|
||||
newTk.push_back(
|
||||
QString::fromStdString(it.first) + ":" +
|
||||
QString::fromStdString(it.second) );
|
||||
|
||||
whileBlocking(ui.tokensListView)->setModel(new QStringListModel(Settings->getJsonApiAuthTokens()) );
|
||||
}
|
||||
|
||||
void JsonApiPage::removeTokenClicked()
|
||||
{
|
||||
QString token(ui.tokenLineEdit->text());
|
||||
std::string tokenStr = token.toStdString();
|
||||
rsJsonApi->revokeAuthToken(tokenStr.substr(0, tokenStr.find_first_of(":")));
|
||||
|
||||
QStringList newTk;
|
||||
|
||||
for(const auto& it : rsJsonApi->getAuthorizedTokens())
|
||||
newTk.push_back(
|
||||
QString::fromStdString(it.first) + ":" +
|
||||
QString::fromStdString(it.second) );
|
||||
|
||||
whileBlocking(ui.tokensListView)->setModel(new QStringListModel(Settings->getJsonApiAuthTokens()) );
|
||||
}
|
||||
|
||||
void JsonApiPage::tokenClicked(const QModelIndex& index)
|
||||
{
|
||||
ui.tokenLineEdit->setText(ui.tokensListView->model()->data(index).toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -228,6 +228,7 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||
connect(ui.hiddenpage_proxyPort_tor, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||
connect(ui.hiddenpage_proxyAddress_i2p, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||
connect(ui.hiddenpage_proxyPort_i2p, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||
connect(ui.hiddenpage_localPort, SIGNAL(editingFinished()),this,SLOT(saveAddresses()));
|
||||
|
||||
connect(ui.totalDownloadRate,SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
|
||||
connect(ui.totalUploadRate, SIGNAL(valueChanged(int)),this,SLOT(saveRates()));
|
||||
|
@ -1139,18 +1140,18 @@ void ServerPage::loadHiddenNode()
|
|||
ui.iconlabel_ext->hide();
|
||||
ui.textlabel_ext->hide();
|
||||
ui.extPortLabel->hide();
|
||||
|
||||
|
||||
ui.ipAddressLabel->hide();
|
||||
ui.cleanKnownIPs_PB->hide();
|
||||
|
||||
|
||||
ui.ipAddressList->hide();
|
||||
ui.allowIpDeterminationCB->hide();
|
||||
ui.IPServersLV->hide();
|
||||
|
||||
|
||||
ui.textlabel_hiddenMode->show();
|
||||
ui.iconlabel_hiddenMode->show() ;
|
||||
ui.iconlabel_hiddenMode->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/images/ledon1.png"));
|
||||
|
||||
|
||||
// CHANGE OPTIONS ON
|
||||
whileBlocking(ui.discComboBox)->removeItem(3);
|
||||
whileBlocking(ui.discComboBox)->removeItem(2);
|
||||
|
@ -1731,8 +1732,9 @@ void ServerPage::saveSam()
|
|||
new_proxyaddr = ui.hiddenpage_proxyAddress_i2p -> text().toStdString();
|
||||
new_proxyport = ui.hiddenpage_proxyPort_i2p -> value();
|
||||
|
||||
// SAMv3 has no proxy port, everything goes through the SAM port.
|
||||
if ((new_proxyaddr != orig_proxyaddr) /* || (new_proxyport != orig_proxyport) */) {
|
||||
// SAMv3 has no proxy port, everything goes through the SAM port.
|
||||
// Still need to check the proxyport for manual i2p
|
||||
if ((new_proxyaddr != orig_proxyaddr) || (new_proxyport != orig_proxyport)) {
|
||||
rsPeers->setProxyServer(RS_HIDDEN_TYPE_I2P, new_proxyaddr, new_proxyport);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,6 +182,12 @@ rs_deep_files_index_taglib:CONFIG -= no_rs_deep_files_index_taglib
|
|||
CONFIG *= no_rs_use_native_dialogs
|
||||
rs_use_native_dialogs:CONFIG -= no_rs_use_native_dialogs
|
||||
|
||||
# By default, use RNP lib for RFC4880 PGP management. If not, compilation will
|
||||
# default to openpgp-sdk, which is old and unmaintained, so probably not very secure.
|
||||
CONFIG *= rs_rnplib
|
||||
rs_no_rnplib:CONFIG -= rs_rnplib
|
||||
rs_no_rnplib:CONFIG += rs_openpgpsdk
|
||||
|
||||
# To disable broadcast discovery append the following assignation to qmake
|
||||
# command line "CONFIG+=no_rs_broadcast_discovery"
|
||||
CONFIG *= rs_broadcast_discovery
|
||||
|
@ -302,6 +308,18 @@ isEmpty(RS_THREAD_LIB):RS_THREAD_LIB = pthread
|
|||
#
|
||||
###########################################################################################################################################################
|
||||
|
||||
###########################################################################################################################################################
|
||||
#
|
||||
# V06_EXPERIMENTAL_CHANGE_001:
|
||||
#
|
||||
# What: removes issuer fingerprint from signature subpackets
|
||||
# Why: This type of subpacket is not part of RFC4880 and not recognised by OpenPGP-SDK
|
||||
# BackwardCompat: old RS before Sept.2024 will not be able to exchange keys
|
||||
# Note: Since signature subpacket 33 is part of the hashed section of the signature, this also invalidates the signature.
|
||||
# Depending on the implementation, certificates with self-signature that miss this subpacket may not be accepted.
|
||||
#
|
||||
###########################################################################################################################################################
|
||||
|
||||
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_001
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002
|
||||
|
@ -313,6 +331,7 @@ rs_v07_changes {
|
|||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_003
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_004
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_005
|
||||
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_UNNAMED
|
||||
}
|
||||
|
||||
|
@ -849,6 +868,19 @@ isEmpty(RS_UPNP_LIB) {
|
|||
}
|
||||
}
|
||||
|
||||
rs_openpgpsdk {
|
||||
SUBDIRS += openpgpsdk
|
||||
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
|
||||
libretroshare.depends += openpgpsdk
|
||||
message("Using OpenPGP-SDK for PGP")
|
||||
}
|
||||
|
||||
rs_rnplib {
|
||||
DEFINES += USE_RNP_LIB
|
||||
message("Using RNP lib for PGP")
|
||||
}
|
||||
|
||||
|
||||
equals(RS_UPNP_LIB, none):RS_UPNP_LIB=
|
||||
equals(RS_UPNP_LIB, miniupnpc):DEFINES*=RS_USE_LIBMINIUPNPC
|
||||
contains(RS_UPNP_LIB, upnp):DEFINES*=RS_USE_LIBUPNP
|
||||
|
|
1
supportlibs/librnp
Submodule
1
supportlibs/librnp
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit ec78117269461b2cdce15a085033a8c6bff6d7e3
|
Loading…
Add table
Add a link
Reference in a new issue