diff --git a/.gitmodules b/.gitmodules
index 7692f4556..9a68ca0cb 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -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
diff --git a/RetroShare.pro b/RetroShare.pro
index 944e8204e..4972fe2ab 100644
--- a/RetroShare.pro
+++ b/RetroShare.pro
@@ -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
diff --git a/build_scripts/OSX/makeOSXPackage.sh b/build_scripts/OSX/makeOSXPackage.sh
index 24808d487..8f9700ed0 100644
--- a/build_scripts/OSX/makeOSXPackage.sh
+++ b/build_scripts/OSX/makeOSXPackage.sh
@@ -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
diff --git a/build_scripts/Windows-msys2/build/build.bat b/build_scripts/Windows-msys2/build/build.bat
index 4fdaff09f..bf68f3e20 100644
--- a/build_scripts/Windows-msys2/build/build.bat
+++ b/build_scripts/Windows-msys2/build/build.bat
@@ -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"
diff --git a/build_scripts/Windows-msys2/build/pack.bat b/build_scripts/Windows-msys2/build/pack.bat
index 313da7479..a898832f7 100644
--- a/build_scripts/Windows-msys2/build/pack.bat
+++ b/build_scripts/Windows-msys2/build/pack.bat
@@ -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%
)
diff --git a/build_scripts/Windows-msys2/env/tools/prepare-msys2.bat b/build_scripts/Windows-msys2/env/tools/prepare-msys2.bat
index eaeba1482..cea1df073 100644
--- a/build_scripts/Windows-msys2/env/tools/prepare-msys2.bat
+++ b/build_scripts/Windows-msys2/env/tools/prepare-msys2.bat
@@ -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%
diff --git a/build_scripts/Windows/build-libs/Makefile b/build_scripts/Windows/build-libs/Makefile
index 0075770cd..534356914 100644
--- a/build_scripts/Windows/build-libs/Makefile
+++ b/build_scripts/Windows/build-libs/Makefile
@@ -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) ; \
diff --git a/build_scripts/Windows/build/pack.bat b/build_scripts/Windows/build/pack.bat
index 1c844efa0..ff347babf 100644
--- a/build_scripts/Windows/build/pack.bat
+++ b/build_scripts/Windows/build/pack.bat
@@ -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%
diff --git a/build_scripts/Windows/env/tools/prepare-msys2.bat b/build_scripts/Windows/env/tools/prepare-msys2.bat
index 25f00ac30..ba2f12ce6 100644
--- a/build_scripts/Windows/env/tools/prepare-msys2.bat
+++ b/build_scripts/Windows/env/tools/prepare-msys2.bat
@@ -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" (
diff --git a/build_scripts/Windows/env/tools/prepare-tools.bat b/build_scripts/Windows/env/tools/prepare-tools.bat
index 88549faed..f088acfa8 100644
--- a/build_scripts/Windows/env/tools/prepare-tools.bat
+++ b/build_scripts/Windows/env/tools/prepare-tools.bat
@@ -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
diff --git a/build_scripts/Windows/installer/retroshare-Qt5.nsi b/build_scripts/Windows/installer/retroshare-Qt5.nsi
index 63c81bbcc..c7a5b9554 100644
--- a/build_scripts/Windows/installer/retroshare-Qt5.nsi
+++ b/build_scripts/Windows/installer/retroshare-Qt5.nsi
@@ -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"
diff --git a/data/retroshare.desktop b/data/retroshare.desktop
index efc73dd6b..2cfe1f12e 100644
--- a/data/retroshare.desktop
+++ b/data/retroshare.desktop
@@ -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;
diff --git a/libretroshare b/libretroshare
index 402f32eda..2a4df811f 160000
--- a/libretroshare
+++ b/libretroshare
@@ -1 +1 @@
-Subproject commit 402f32eda026c3ec3e429b5fb842e87ebd985d73
+Subproject commit 2a4df811f6bfe1904bc3956f285aa0fc891f9fd4
diff --git a/openpgpsdk b/openpgpsdk
index b41667912..df542663d 160000
--- a/openpgpsdk
+++ b/openpgpsdk
@@ -1 +1 @@
-Subproject commit b41667912751a453e8e5d4733215a0609277a26f
+Subproject commit df542663d8bd698a8b5541fc6db07da6c59f1c3a
diff --git a/plugins/FeedReader/gui/FeedReaderDialog.ui b/plugins/FeedReader/gui/FeedReaderDialog.ui
index b6b004d69..440bb7736 100644
--- a/plugins/FeedReader/gui/FeedReaderDialog.ui
+++ b/plugins/FeedReader/gui/FeedReaderDialog.ui
@@ -57,10 +57,10 @@
-
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
diff --git a/retroshare-friendserver/src/friendserver.cc b/retroshare-friendserver/src/friendserver.cc
index 19c286256..3c80bba83 100644
--- a/retroshare-friendserver/src/friendserver.cc
+++ b/retroshare-friendserver/src/friendserver.cc
@@ -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.
diff --git a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui
index cd79340dd..4c8f8c38b 100644
--- a/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui
+++ b/retroshare-gui/src/gui/FileTransfer/SharedFilesDialog.ui
@@ -23,10 +23,10 @@
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
@@ -399,8 +399,8 @@ border-image: url(:/images/closepressed.png)
-
+
diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui
index 02408e382..a8e8217fc 100644
--- a/retroshare-gui/src/gui/FriendsDialog.ui
+++ b/retroshare-gui/src/gui/FriendsDialog.ui
@@ -102,7 +102,7 @@
Qt::NoFocus
-
+
:/icons/help_64.png:/icons/help_64.png
@@ -132,10 +132,10 @@
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
@@ -401,8 +401,8 @@
-
+
diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp
index 4793ff613..032acaa2d 100644
--- a/retroshare-gui/src/gui/Identity/IdDialog.cpp
+++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp
@@ -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 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& 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(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::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& 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& 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& 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& expanded_root
restoreTopLevel(mExternalOtherCircleItem,1);
restoreTopLevel(mMyCircleItem,2);
}
-
diff --git a/retroshare-gui/src/gui/Identity/IdDialog.ui b/retroshare-gui/src/gui/Identity/IdDialog.ui
index 1c504f8fc..ee28522e3 100644
--- a/retroshare-gui/src/gui/Identity/IdDialog.ui
+++ b/retroshare-gui/src/gui/Identity/IdDialog.ui
@@ -154,10 +154,10 @@
-
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
@@ -302,14 +302,14 @@
0
0
505
- 716
+ 703
-
-
+
-
- 0
+ 3
-
@@ -334,10 +334,10 @@
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
Your Avatar
@@ -478,6 +478,265 @@
+ -
+
+
+
+ 22
+
+
+
+ People
+
+
+ Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 299
+
+
+
+
+
+
+
+ 9
+
+
-
+
+
+ Auto-Ban all identities signed by the same node
+
+
+ Auto-Ban profile
+
+
+
+ -
+
+
+ <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>
+
+
+ true
+
+
+
+ -
+
+
+ Ban-option:
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+ Identity ID :
+
+
+
+ -
+
+
+ Last used:
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ Owner node ID :
+
+
+
+ -
+
+
+ Created on :
+
+
+
+ -
+
+
+ Friend votes:
+
+
+ true
+
+
+
+ -
+
+
+ Type:
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ Your opinion:
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 1
+
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ <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 -> people. </span></p></body></html>
+
+
+
+ 22
+ 22
+
+
+
-
+
+ Negative
+
+
+
+ :/icons/png/thumbs-down.png:/icons/png/thumbs-down.png
+
+
+ -
+
+ Neutral
+
+
+
+ :/icons/png/thumbs-neutral.png:/icons/png/thumbs-neutral.png
+
+
+ -
+
+ Positive
+
+
+
+ :/icons/png/thumbs-up.png:/icons/png/thumbs-up.png
+
+
+
+
+ -
+
+
+ <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>
+
+
+ true
+
+
+
+ -
+
+
+ Owner node name :
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Overall:
+
+
+
+
+
+
-
@@ -690,276 +949,6 @@ border-image: url(:/images/closepressed.png)
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 299
-
-
-
- Identity info
-
-
-
-
-
-
- true
-
-
- true
-
-
-
- -
-
-
- Last used:
-
-
-
- -
-
-
- Identity name :
-
-
-
- -
-
-
- Owner node name :
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- Auto-Ban all identities signed by the same node
-
-
- Auto-Ban profile
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
- Your opinion:
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
- true
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- Overall:
-
-
-
- -
-
-
- Created on :
-
-
-
- -
-
-
- Owner node ID :
-
-
-
- -
-
-
- Ban-option:
-
-
-
- -
-
-
- <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>
-
-
- true
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 1
-
-
-
-
- -
-
-
- Identity ID :
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- Type:
-
-
-
- -
-
-
- <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 -> people. </span></p></body></html>
-
-
-
- 22
- 22
-
-
-
-
-
- Negative
-
-
-
- :/icons/png/thumbs-down.png:/icons/png/thumbs-down.png
-
-
- -
-
- Neutral
-
-
-
- :/icons/png/thumbs-neutral.png:/icons/png/thumbs-neutral.png
-
-
- -
-
- Positive
-
-
-
- :/icons/png/thumbs-up.png:/icons/png/thumbs-up.png
-
-
-
-
- -
-
-
- true
-
-
- true
-
-
-
- -
-
-
- <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>
-
-
- true
-
-
-
- -
-
-
- Friend votes:
-
-
- true
-
-
-
-
-
-
- -
-
-
-
- 22
-
-
-
- People
-
-
-
diff --git a/retroshare-gui/src/gui/RetroShareLink.cpp b/retroshare-gui/src/gui/RetroShareLink.cpp
index fd3571e7e..0001cd9bc 100644
--- a/retroshare-gui/src/gui/RetroShareLink.cpp
+++ b/retroshare-gui/src/gui/RetroShareLink.cpp
@@ -1920,7 +1920,9 @@ static void processList(const QStringList &list, const QString &textSingular, co
void RSLinkClipboard::copyLinks(const QList& 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 &links,Retro
pos += rx.matchedLength();
}
}
-
diff --git a/retroshare-gui/src/gui/StartDialog.cpp b/retroshare-gui/src/gui/StartDialog.cpp
index bc98527da..237d1bb83 100644
--- a/retroshare-gui/src/gui/StartDialog.cpp
+++ b/retroshare-gui/src/gui/StartDialog.cpp
@@ -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
}
diff --git a/retroshare-gui/src/gui/common/FriendListModel.cpp b/retroshare-gui/src/gui/common/FriendListModel.cpp
index 35cefa7ac..9ea271f86 100644
--- a/retroshare-gui/src/gui/common/FriendListModel.cpp
+++ b/retroshare-gui/src/gui/common/FriendListModel.cpp
@@ -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();
}
diff --git a/retroshare-gui/src/gui/common/GroupTreeWidget.ui b/retroshare-gui/src/gui/common/GroupTreeWidget.ui
index d3e0a14a5..029d71fb9 100644
--- a/retroshare-gui/src/gui/common/GroupTreeWidget.ui
+++ b/retroshare-gui/src/gui/common/GroupTreeWidget.ui
@@ -35,10 +35,10 @@
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
diff --git a/retroshare-gui/src/gui/common/NewFriendList.ui b/retroshare-gui/src/gui/common/NewFriendList.ui
index f41d88a8b..4bd4dfdc6 100644
--- a/retroshare-gui/src/gui/common/NewFriendList.ui
+++ b/retroshare-gui/src/gui/common/NewFriendList.ui
@@ -29,10 +29,10 @@
-
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.ui b/retroshare-gui/src/gui/msgs/MessageComposer.ui
index 9b5e8605c..a5ff266d4 100644
--- a/retroshare-gui/src/gui/msgs/MessageComposer.ui
+++ b/retroshare-gui/src/gui/msgs/MessageComposer.ui
@@ -349,10 +349,10 @@
- QFrame::Box
+ QFrame::StyledPanel
- QFrame::Sunken
+ QFrame::Raised
@@ -1400,6 +1400,11 @@ border-image: url(:/images/closepressed.png)
+
+ RSComboBox
+ QComboBox
+
+
FriendSelectionWidget
QWidget
@@ -1411,21 +1416,16 @@ border-image: url(:/images/closepressed.png)
QComboBox
-
- HashBox
- QScrollArea
-
- 1
-
MimeTextEdit
QTextEdit
gui/common/MimeTextEdit.h
- RSComboBox
- QComboBox
-
+ HashBox
+ QScrollArea
+
+ 1
diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp
index be9eedf6b..85611b585 100644
--- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp
+++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp
@@ -1296,7 +1296,7 @@ void MessagesDialog::updateMessageSummaryList()
/* calculating the new messages */
std::list msgList;
- rsMail->getMessageSummaries(mMessageModel->currentBox(),msgList);
+ rsMail->getMessageSummaries(Rs::Msgs::BoxName::BOX_ALL,msgList);
QMap tagCount;
diff --git a/retroshare-gui/src/gui/settings/JsonApiPage.cc b/retroshare-gui/src/gui/settings/JsonApiPage.cc
index 2b7f25d80..ace092e0c 100644
--- a/retroshare-gui/src/gui/settings/JsonApiPage.cc
+++ b/retroshare-gui/src/gui/settings/JsonApiPage.cc
@@ -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());
}
-
diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp
index adb1d655c..be2404bc8 100755
--- a/retroshare-gui/src/gui/settings/ServerPage.cpp
+++ b/retroshare-gui/src/gui/settings/ServerPage.cpp
@@ -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);
}
}
diff --git a/retroshare.pri b/retroshare.pri
index 7858f67f6..22bf11d3f 100644
--- a/retroshare.pri
+++ b/retroshare.pri
@@ -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
diff --git a/supportlibs/librnp b/supportlibs/librnp
new file mode 160000
index 000000000..ec7811726
--- /dev/null
+++ b/supportlibs/librnp
@@ -0,0 +1 @@
+Subproject commit ec78117269461b2cdce15a085033a8c6bff6d7e3