Merge branch 'RetroShare:master' into fileuploadstatsv2

This commit is contained in:
defnax 2025-01-03 22:37:51 +01:00 committed by GitHub
commit 34d1dcecf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 986 additions and 786 deletions

3
.gitmodules vendored
View file

@ -36,3 +36,6 @@
[submodule "retroshare-webui"] [submodule "retroshare-webui"]
path = retroshare-webui path = retroshare-webui
url = https://github.com/RetroShare/RSNewWebUI.git url = https://github.com/RetroShare/RSNewWebUI.git
[submodule "supportlibs/librnp"]
path = supportlibs/librnp
url = https://github.com/rnpgp/rnp.git

View file

@ -25,9 +25,6 @@ CONFIG += c++14
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS += openpgpsdk
openpgpsdk.file = openpgpsdk/src/openpgpsdk.pro
rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) { rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) {
SUBDIRS += jsonapi-generator SUBDIRS += jsonapi-generator
jsonapi-generator.file = jsonapi-generator/src/jsonapi-generator.pro jsonapi-generator.file = jsonapi-generator/src/jsonapi-generator.pro
@ -36,7 +33,7 @@ rs_jsonapi:isEmpty(JSONAPI_GENERATOR_EXE) {
SUBDIRS += libbitdht SUBDIRS += libbitdht
libbitdht.file = libbitdht/src/libbitdht.pro libbitdht.file = libbitdht/src/libbitdht.pro
libretroshare.depends += openpgpsdk libbitdht libretroshare.depends += libbitdht
SUBDIRS += libretroshare SUBDIRS += libretroshare
libretroshare.file = libretroshare/src/libretroshare.pro libretroshare.file = libretroshare/src/libretroshare.pro

View file

@ -2,7 +2,7 @@
APP="RetroShare" APP="RetroShare"
RSVERSION="0.6.7a" RSVERSION="0.6.7a"
QTVERSION="Qt-5.14.1" QTVERSION="Qt-5.15.11"
# Install the 7z to create dmg archives. # Install the 7z to create dmg archives.
#brew list p7zip || brew install p7zip #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 "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 :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 "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 # This automatically creates retroshare.dmg

View file

@ -18,6 +18,8 @@ if errorlevel 1 goto error_env
if not "%ParamNoupdate%"=="1" ( if not "%ParamNoupdate%"=="1" (
:: Install needed things :: 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" %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 :: Webui
if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen" if "%ParamWebui%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-doxygen"

View file

@ -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%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
copy "%RsBuildPath%\supportlibs\cmark\build\src\libcmark.dll" "%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%\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" ( if exist "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" (
copy "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" "%RsDeployPath%" %Quite% copy "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" "%RsDeployPath%" %Quite%
) )

View file

@ -16,7 +16,7 @@ if "%~1"=="clean" (
goto exit goto exit
) )
set MSYS2Version=20231026 set MSYS2Version=20241208
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe 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 MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%

View file

@ -13,12 +13,18 @@ LIBMICROHTTPD_VERSION=0.9.75
FFMPEG_VERSION=4.4 FFMPEG_VERSION=4.4
RAPIDJSON_VERSION=1.1.0 RAPIDJSON_VERSION=1.1.0
XAPIAN_VERSION=1.4.19 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 DOWNLOAD_PATH?=download
BUILD_PATH=build BUILD_PATH=build
LIBS_PATH?=libs 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: \
$(DOWNLOAD_PATH)/zlib-$(ZLIB_VERSION).tar.gz \ $(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) rm -r -f xapian-core-$(XAPIAN_VERSION)
mv $(BUILD_PATH)/xapian-core-$(XAPIAN_VERSION).tmp $(BUILD_PATH)/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: copylibs:
rm -r -f $(LIBS_PATH) ; \ rm -r -f $(LIBS_PATH) ; \
mkdir -p $(LIBS_PATH) ; \ mkdir -p $(LIBS_PATH) ; \

View file

@ -96,6 +96,7 @@ copy nul "%RsDeployPath%\portable" %Quite%
echo copy binaries echo copy binaries
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare*.exe" "%RsDeployPath%" %Quite% 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%\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" ( if "%ParamService%"=="1" (
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite% copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%

View file

@ -16,13 +16,13 @@ if "%~1"=="clean" (
goto exit goto exit
) )
set MSYS2Version=20231026 set MSYS2Version=20241208
set MSYS2Install=msys2-base-x86_64-%MSYS2Version%.sfx.exe 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 MSYS2Url=https://github.com/msys2/msys2-installer/releases/download/%MSYS2Version:~0,4%-%MSYS2Version:~4,2%-%MSYS2Version:~6,2%/%MSYS2Install%
set MSYS2UnpackPath=%EnvMSYS2Path%\msys64 set MSYS2UnpackPath=%EnvMSYS2Path%\msys64
set CMakeInstall=cmake-3.19.0-win32-x86.zip set CMakeInstall=cmake-3.31.3-windows-i386.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%
if exist "%MSYS2UnpackPath%\usr\bin\pacman.exe" ( if exist "%MSYS2UnpackPath%\usr\bin\pacman.exe" (
if "%~1"=="reinstall" ( if "%~1"=="reinstall" (

View file

@ -19,9 +19,9 @@ set MinGitInstallPath=%EnvToolsPath%\MinGit
set DoxygenInstall=doxygen-1.9.6.windows.x64.bin.zip 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 DoxygenUrl=https://github.com/doxygen/doxygen/releases/download/Release_1_9_6/%DoxygenInstall%
set DoxygenInstallPath=%EnvToolsPath%\doxygen 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 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 CMakeInstallPath=%EnvToolsPath%\cmake
set TorProjectUrl=https://www.torproject.org set TorProjectUrl=https://www.torproject.org
set TorDownloadIndexUrl=%TorProjectUrl%/download/tor set TorDownloadIndexUrl=%TorProjectUrl%/download/tor

View file

@ -247,6 +247,7 @@ Section $(Section_Main) Section_Main
; External binaries ; External binaries
File "${EXTERNAL_LIB_DIR}\bin\miniupnpc.dll" File "${EXTERNAL_LIB_DIR}\bin\miniupnpc.dll"
File "${RELEASEDIR}\supportlibs\librnp\Build\src\lib\librnp.dll"
!if ${ARCHITECTURE} == "x86" !if ${ARCHITECTURE} == "x86"
File "${EXTERNAL_LIB_DIR}\bin\libcrypto-1_1.dll" File "${EXTERNAL_LIB_DIR}\bin\libcrypto-1_1.dll"
File "${EXTERNAL_LIB_DIR}\bin\libssl-1_1.dll" File "${EXTERNAL_LIB_DIR}\bin\libssl-1_1.dll"

View file

@ -7,5 +7,5 @@ Exec=/usr/bin/retroshare %U
Icon=/usr/share/pixmaps/retroshare.xpm Icon=/usr/share/pixmaps/retroshare.xpm
Terminal=false Terminal=false
Type=Application Type=Application
Categories=Application;Network;P2P;Feed;Chat;InstantMessaging Categories=Application;Network;Email;InstantMessaging;Chat;Feed;FileTransfer;P2P
MimeType=x-scheme-handler/retroshare; MimeType=x-scheme-handler/retroshare;

@ -1 +1 @@
Subproject commit 402f32eda026c3ec3e429b5fb842e87ebd985d73 Subproject commit 2a4df811f6bfe1904bc3956f285aa0fc891f9fd4

@ -1 +1 @@
Subproject commit b41667912751a453e8e5d4733215a0609277a26f Subproject commit df542663d8bd698a8b5541fc6db07da6c59f1c3a

View file

@ -57,10 +57,10 @@
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="toolBarFrame"> <widget class="QFrame" name="toolBarFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="leftMargin"> <property name="leftMargin">

View file

@ -8,7 +8,11 @@
#include "pgp/pgpkeyutil.h" #include "pgp/pgpkeyutil.h"
#include "pgp/rscertificate.h" #include "pgp/rscertificate.h"
#ifdef USE_OPENPGPSDK
#include "pgp/openpgpsdkhandler.h" #include "pgp/openpgpsdkhandler.h"
#else
#include "pgp/rnppgphandler.h"
#endif
#include "friendserver.h" #include "friendserver.h"
#include "friend_server/fsitem.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_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. 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); 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. // Random bias. Should be cryptographically safe.

View file

@ -23,10 +23,10 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin"> <property name="leftMargin">
@ -399,8 +399,8 @@ border-image: url(:/images/closepressed.png)
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../images.qrc"/>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
<include location="../images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -102,7 +102,7 @@
<enum>Qt::NoFocus</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset resource="icons.qrc">
<normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset> <normaloff>:/icons/help_64.png</normaloff>:/icons/help_64.png</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
@ -132,10 +132,10 @@
<string notr="true"/> <string notr="true"/>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="headerBFrame_GL"> <layout class="QGridLayout" name="headerBFrame_GL">
<property name="leftMargin"> <property name="leftMargin">
@ -401,8 +401,8 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="images.qrc"/>
<include location="icons.qrc"/> <include location="icons.qrc"/>
<include location="images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -198,7 +198,7 @@ IdDialog::IdDialog(QWidget *parent)
mStateHelper->addLoadPlaceholder(IDDIALOG_IDLIST, ui->idTreeWidget, false); mStateHelper->addLoadPlaceholder(IDDIALOG_IDLIST, ui->idTreeWidget, false);
mStateHelper->addClear(IDDIALOG_IDLIST, ui->idTreeWidget); 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_PublishTS);
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId); mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId);
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->lineEdit_Type); 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_positive);
mStateHelper->addWidget(IDDIALOG_IDDETAILS, ui->label_negative); 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_PublishTS);
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId); mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId);
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->lineEdit_Type); 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->overallOpinion_TF);
mStateHelper->addLoadPlaceholder(IDDIALOG_IDDETAILS, ui->usageStatistics_TB); 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_PublishTS);
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId); mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_KeyId);
mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_Type); mStateHelper->addClear(IDDIALOG_IDDETAILS, ui->lineEdit_Type);
@ -429,6 +429,14 @@ void IdDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
switch(e->mIdentityEventCode) switch(e->mIdentityEventCode)
{ {
case RsGxsIdentityEventCode::DELETED_IDENTITY: case RsGxsIdentityEventCode::DELETED_IDENTITY:
if(mId == e->mIdentityId)
{
mId.clear();
updateIdentity();
}
updateIdList();
break;
case RsGxsIdentityEventCode::NEW_IDENTITY: case RsGxsIdentityEventCode::NEW_IDENTITY:
case RsGxsIdentityEventCode::UPDATED_IDENTITY: case RsGxsIdentityEventCode::UPDATED_IDENTITY:
if (isVisible()) if (isVisible())
@ -436,7 +444,8 @@ void IdDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
if(rsIdentity->isOwnId(RsGxsId(e->mIdentityId))) if(rsIdentity->isOwnId(RsGxsId(e->mIdentityId)))
updateIdList(); updateIdList();
else 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 else
needUpdateIdsOnNextShow = true; needUpdateIdsOnNextShow = true;
@ -479,13 +488,13 @@ void IdDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> event)
void IdDialog::clearPerson() void IdDialog::clearPerson()
{ {
QFontMetricsF f(ui->avLabel_Person->font()) ; //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->headerTextLabel_Person->setText(tr("People"));
ui->info_Frame_Invite->hide(); ui->info_Frame_Invite->hide();
ui->avatarLabel->clear(); ui->avatarLabel->clear();
ui->avatarLabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/png/people.png"));
whileBlocking(ui->ownOpinion_CB)->setCurrentIndex(1); whileBlocking(ui->ownOpinion_CB)->setCurrentIndex(1);
whileBlocking(ui->autoBanIdentities_CB)->setChecked(false); whileBlocking(ui->autoBanIdentities_CB)->setChecked(false);
@ -1330,6 +1339,7 @@ void IdDialog::updateSelection()
void IdDialog::updateIdList() void IdDialog::updateIdList()
{ {
//int accept = filter; //int accept = filter;
std::cerr << "Updating ID list" << std::endl;
RsThread::async([this]() RsThread::async([this]()
{ {
@ -1512,6 +1522,8 @@ void IdDialog::loadIdentities(const std::map<RsGxsGroupId,RsGxsIdGroup>& ids_set
{ {
auto ids_set(ids_set_const); auto ids_set(ids_set_const);
std::cerr << "Loading ID list" << std::endl;
//First: Get current item to restore after //First: Get current item to restore after
RsGxsGroupId oldCurrentId = mIdToNavigate; RsGxsGroupId oldCurrentId = mIdToNavigate;
{ {
@ -1598,9 +1610,9 @@ void IdDialog::loadIdentities(const std::map<RsGxsGroupId,RsGxsIdGroup>& ids_set
int allCount = allItem->childCount() ; int allCount = allItem->childCount() ;
int ownCount = ownItem->childCount(); int ownCount = ownItem->childCount();
contactsItem->setText(0, tr("My contacts") + " (" + QString::number( contactsCount ) + ")" ); contactsItem->setText(0, tr("My contacts") + ((contactsCount>0)?" (" + QString::number( contactsCount ) + ")":"") );
allItem->setText(0, tr("All") + " (" + QString::number( allCount ) + ")" ); allItem->setText(0, tr("All") + ((allCount>0)?" (" + QString::number( allCount ) + ")":"") );
ownItem->setText(0, tr("My own identities") + " (" + QString::number( ownCount ) + ")" ); ownItem->setText(0, tr("My own identities") + ((ownCount>0)?" (" + QString::number( ownCount ) + ")":"") );
//Restore expanding //Restore expanding
@ -1675,7 +1687,7 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
RsPgpId ownPgpId = rsPeers->getGPGOwnId(); RsPgpId ownPgpId = rsPeers->getGPGOwnId();
ui->lineEdit_PublishTS->setText(QDateTime::fromMSecsSinceEpoch(qint64(1000)*data.mMeta.mPublishTs).toString(Qt::SystemLocaleShortDate)); 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_KeyId->setText(QString::fromStdString(data.mMeta.mGroupId.toStdString()));
//ui->lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash.toStdString())); //ui->lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash.toStdString()));
if(data.mPgpKnown) if(data.mPgpKnown)
@ -1701,8 +1713,8 @@ void IdDialog::loadIdentity(RsGxsIdGroup data)
//ui->avLabel_Person->setPixmap(pixmap); //ui->avLabel_Person->setPixmap(pixmap);
//ui->avatarLabel->setPixmap(pixmap); //ui->avatarLabel->setPixmap(pixmap);
QFontMetricsF f(ui->avLabel_Person->font()) ; //QFontMetricsF f(ui->avLabel_Person->font()) ;
ui->avLabel_Person->setPixmap(pixmap.scaled(f.height()*4,f.height()*4,Qt::KeepAspectRatio,Qt::SmoothTransformation)); //ui->avLabel_Person->setPixmap(pixmap.scaled(f.height()*4,f.height()*4,Qt::KeepAspectRatio,Qt::SmoothTransformation));
ui->avatarLabel->setPixmap(pixmap.scaled(ui->inviteButton->width(),ui->inviteButton->width(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); ui->avatarLabel->setPixmap(pixmap.scaled(ui->inviteButton->width(),ui->inviteButton->width(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
ui->avatarLabel->setScaledContents(true); ui->avatarLabel->setScaledContents(true);
@ -2086,14 +2098,12 @@ void IdDialog::removeIdentity()
return; 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; rsIdentity->deleteIdentity(kid);
RsGxsIdGroup group;
group.mMeta.mGroupId=RsGxsGroupId(keyId);
rsIdentity->deleteIdentity(dummyToken, group);
} }
} }

View file

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>878</width>
<height>584</height> <height>584</height>
</rect> </rect>
</property> </property>
@ -154,10 +154,10 @@
<item> <item>
<widget class="QFrame" name="toolBarFrame"> <widget class="QFrame" name="toolBarFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="toolBarFrameHLayout"> <layout class="QHBoxLayout" name="toolBarFrameHLayout">
<property name="leftMargin"> <property name="leftMargin">
@ -301,32 +301,184 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>466</width> <width>505</width>
<height>738</height> <height>703</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="scrollAreaWidgetContentsVLayout"> <layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>3</number>
</property>
<item> <item>
<widget class="QFrame" name="headerBFramePerson"> <layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="0">
<widget class="QLabel" name="avatarLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="headerBFramePersonGLayout"> <property name="text">
<property name="horizontalSpacing"> <string extracomment="Click here to change your avatar">Your Avatar</string>
<number>12</number>
</property> </property>
<item row="0" column="3"> <property name="scaledContents">
<layout class="QVBoxLayout" name="headerFramePersonVLayout"> <bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="editButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Edit Identity</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="inviteButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Send Invite</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="avatarOpinionHLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item>
<widget class="QLabel" name="label_PosIcon">
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/png/thumbs-up.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_positive">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="toolTip">
<string>Positive votes</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_Opinion">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_NegIcon">
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/png/thumbs-down.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_negative">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="toolTip">
<string>Negative votes</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="avatarVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>118</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="ElidedLabel" name="headerTextLabel_Person"> <widget class="ElidedLabel" name="headerTextLabel_Person">
<property name="font"> <property name="font">
<font> <font>
@ -336,9 +488,256 @@
<property name="text"> <property name="text">
<string>People</string> <string>People</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Average opinion of neighbor nodes about this identity. Negative is bad,&lt;/p&gt;&lt;p&gt;positive is good. Zero is neutral.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;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).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;You can change the thresholds and the time of inactivity to delete identities in preferences -&amp;gt; people. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<item> <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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Overall reputation score, accounting for yours and your friends'.&lt;/p&gt;&lt;p&gt;Negative is bad, positive is good. Zero is neutral. If the score is too low,&lt;/p&gt;&lt;p&gt;the identity is flagged as bad, and will be filtered out in forums, chat lobbies,&lt;/p&gt;&lt;p&gt;channels, etc.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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"> <widget class="QFrame" name="info_Frame_Invite">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
@ -525,484 +924,7 @@ border-image: url(:/images/closepressed.png)
</layout> </layout>
</widget> </widget>
</item> </item>
</layout> <item row="3" column="0" colspan="2">
</item>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="avLabel_Person">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>1000</width>
<height>1000</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="detailsGroupBox">
<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="13" column="0">
<widget class="QLabel" name="neighborNodesOpinion_LB">
<property name="text">
<string>Friend votes:</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="2">
<widget class="Line" name="line_IdInfo">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</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="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="6" column="0">
<widget class="QLabel" name="label_LastUsed">
<property name="text">
<string>Last used:</string>
</property>
</widget>
</item>
<item row="12" 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="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="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="14" column="1">
<widget class="QLineEdit" name="overallOpinion_TF">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Overall reputation score, accounting for yours and your friends'.&lt;/p&gt;&lt;p&gt;Negative is bad, positive is good. Zero is neutral. If the score is too low,&lt;/p&gt;&lt;p&gt;the identity is flagged as bad, and will be filtered out in forums, chat lobbies,&lt;/p&gt;&lt;p&gt;channels, etc.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0" rowspan="2">
<widget class="QLabel" name="label_YourOpinion">
<property name="text">
<string>Your opinion:</string>
</property>
</widget>
</item>
<item row="14" 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="0" column="0">
<widget class="QLabel" name="label_Nickname">
<property name="text">
<string>Identity name :</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_KeyId">
<property name="text">
<string>Identity ID :</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QLineEdit" name="neighborNodesOpinion_TF">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Average opinion of neighbor nodes about this identity. Negative is bad,&lt;/p&gt;&lt;p&gt;positive is good. Zero is neutral.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="readOnly">
<bool>true</bool>
</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="2" column="0">
<widget class="QLabel" name="label_Type">
<property name="text">
<string>Type:</string>
</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="15" 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="3" 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_GpgName">
<property name="text">
<string>Owner node name :</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="banoption_label">
<property name="text">
<string>Ban-option:</string>
</property>
</widget>
</item>
<item row="10" column="1" rowspan="2">
<widget class="RSComboBox" name="ownOpinion_CB">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;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.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;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).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans'; font-size:9pt;&quot;&gt;You can change the thresholds and the time of inactivity to delete identities in preferences -&amp;gt; people. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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="0" column="2" rowspan="15">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="QLabel" name="avatarLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="text">
<string extracomment="Click here to change your avatar">Your Avatar</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="editButton">
<property name="text">
<string>Edit Identity</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="inviteButton">
<property name="text">
<string>Send Invite</string>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>128</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0" rowspan="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>128</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="avatarOpinionHLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item>
<widget class="QLabel" name="label_PosIcon">
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/png/thumbs-up.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_positive">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="toolTip">
<string>Positive votes</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_Opinion">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_NegIcon">
<property name="maximumSize">
<size>
<width>34</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../icons.qrc">:/icons/png/thumbs-down.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_negative">
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="toolTip">
<string>Negative votes</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="avatarVSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>118</width>
<height>17</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="usageStatisticsGBox"> <widget class="QGroupBox" name="usageStatisticsGBox">
<property name="title"> <property name="title">
<string>Usage statistics</string> <string>Usage statistics</string>
@ -1014,7 +936,7 @@ border-image: url(:/images/closepressed.png)
</layout> </layout>
</widget> </widget>
</item> </item>
<item> <item row="4" column="0">
<spacer name="scrollAreaWidgetContentsVSpacer"> <spacer name="scrollAreaWidgetContentsVSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@ -1028,9 +950,6 @@ border-image: url(:/images/closepressed.png)
</spacer> </spacer>
</item> </item>
</layout> </layout>
<zorder>detailsGroupBox</zorder>
<zorder>usageStatisticsGBox</zorder>
<zorder>headerBFramePerson</zorder>
</widget> </widget>
</widget> </widget>
</item> </item>

View file

@ -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); 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 #else
// this handles all linux systems at once. // 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
#endif #endif
} }

View file

@ -54,7 +54,9 @@ bool AvatarDefs::getAvatarFromSslId(const RsPeerId& sslId, QPixmap &avatar, cons
/* get avatar */ /* get avatar */
rsMsgs->getAvatarData(RsPeerId(sslId), data, size); rsMsgs->getAvatarData(RsPeerId(sslId), data, size);
if (size == 0) { if (size == 0) {
if (!defaultImage.isEmpty()) {
avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage); avatar = FilesDefs::getPixmapFromQtResourcePath(defaultImage);
}
return false; return false;
} }

View file

@ -65,7 +65,7 @@ static const uint32_t NODE_DETAILS_UPDATE_DELAY = 5; // update each node every 5
RsFriendListModel::RsFriendListModel(QObject *parent) RsFriendListModel::RsFriendListModel(QObject *parent)
: QAbstractItemModel(parent) : QAbstractItemModel(parent)
, mDisplayGroups(true), mDisplayStatusString(true) , mDisplayGroups(true), mDisplayStatusString(true), mDisplayStatusIcon (false)
, mLastInternalDataUpdate(0), mLastNodeUpdate(0) , mLastInternalDataUpdate(0), mLastNodeUpdate(0)
{ {
mFilterStrings.clear(); mFilterStrings.clear();
@ -141,13 +141,39 @@ template<> bool RsFriendListModel::convertInternalIdToIndex<8>(quintptr ref,Entr
return true; return true;
} }
static QIcon createAvatar(const QPixmap &avatar, const QPixmap &overlay)
{
int avatarWidth = avatar.width();
int avatarHeight = avatar.height();
QPixmap pixmap(avatar);
int overlaySize = (avatarWidth > avatarHeight) ? (avatarWidth/2.5) : (avatarHeight/2.5);
int overlayX = avatarWidth - overlaySize;
int overlayY = avatarHeight - overlaySize;
QPainter painter(&pixmap);
painter.drawPixmap(overlayX, overlayY, overlaySize, overlaySize, overlay);
QIcon icon;
icon.addPixmap(pixmap);
return icon;
}
void RsFriendListModel::setDisplayStatusString(bool b) void RsFriendListModel::setDisplayStatusString(bool b)
{ {
preMods();
mDisplayStatusString = b; mDisplayStatusString = b;
postMods(); postMods();
} }
void RsFriendListModel::setDisplayStatusIcon(bool b)
{
preMods();
mDisplayStatusIcon = b;
postMods();
}
void RsFriendListModel::setDisplayGroups(bool b) void RsFriendListModel::setDisplayGroups(bool b)
{ {
mDisplayGroups = b; mDisplayGroups = b;
@ -414,16 +440,27 @@ QVariant RsFriendListModel::textColorRole(const EntryIndex& fmpe,int column) con
switch(fmpe.type) switch(fmpe.type)
{ {
case ENTRY_TYPE_GROUP: return QVariant(QBrush(mTextColorGroup)); case ENTRY_TYPE_GROUP: return QVariant(QBrush(mTextColorGroup));
case ENTRY_TYPE_PROFILE: case ENTRY_TYPE_PROFILE: return QVariant(QBrush(mTextColorStatus[onlineRole(fmpe,column).toInt()]));
case ENTRY_TYPE_NODE: return QVariant(QBrush(mTextColorStatus[onlineRole(fmpe,column).toInt()])); case ENTRY_TYPE_NODE: return QVariant(QBrush(mTextColorStatus[statusRole(fmpe,column).toInt()]));
default: default:
return QVariant(); return QVariant();
} }
} }
QVariant RsFriendListModel::statusRole(const EntryIndex& /*fmpe*/,int /*column*/) const // statusRole returns the status (e.g. RS_STATUS_BUSY). It is used only to change the font color
QVariant RsFriendListModel::statusRole(const EntryIndex& fmpe,int /*column*/) const
{ {
return QVariant();//fmpe.mMsgStatus); const HierarchicalNodeInformation *node = getNodeInfo(fmpe);
if(node)
{
StatusInfo status;
rsStatus->getStatus(node->node_info.id, status);
return QVariant(status.status);
}
return QVariant();
} }
bool RsFriendListModel::passesFilter(const EntryIndex& e,int /*column*/) const bool RsFriendListModel::passesFilter(const EntryIndex& e,int /*column*/) const
@ -548,6 +585,9 @@ QVariant RsFriendListModel::sortRole(const EntryIndex& entry,int column) const
} }
} }
// Only returns two values: RS_STATUS_ONLINE, or RS_STATUS_OFFLINE. This is used to decide on text font (bold)
// and whether profiles have children or not when offline nodes are shown.
QVariant RsFriendListModel::onlineRole(const EntryIndex& e, int /*col*/) const QVariant RsFriendListModel::onlineRole(const EntryIndex& e, int /*col*/) const
{ {
switch(e.type) switch(e.type)
@ -585,13 +625,10 @@ QVariant RsFriendListModel::onlineRole(const EntryIndex& e, int /*col*/) const
{ {
const HierarchicalNodeInformation *node = getNodeInfo(e); const HierarchicalNodeInformation *node = getNodeInfo(e);
if(node) if(node && bool(node->node_info.state & RS_PEER_STATE_CONNECTED))
{ return QVariant(RS_STATUS_ONLINE);
StatusInfo status; else
rsStatus->getStatus(node->node_info.id, status); return QVariant(RS_STATUS_OFFLINE);
return QVariant(status.status);
}
} }
} }
return QVariant(RS_STATUS_OFFLINE); return QVariant(RS_STATUS_OFFLINE);
@ -626,12 +663,6 @@ QVariant RsFriendListModel::fontRole(const EntryIndex& e, int col) const
} }
} }
class AutoEndel
{
public:
~AutoEndel() { std::cerr << std::endl;}
};
QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const
{ {
#ifdef DEBUG_MODEL_INDEX #ifdef DEBUG_MODEL_INDEX
@ -750,7 +781,7 @@ QVariant RsFriendListModel::displayRole(const EntryIndex& e, int col) const
else else
{ {
return QVariant(QString::fromUtf8(node->node_info.location.c_str())+"\n" return QVariant(QString::fromUtf8(node->node_info.location.c_str())+"\n"
+ "(" + StatusDefs::name(onlineRole(e,col).toInt()) + ")"); + "(" + StatusDefs::name(statusRole(e,col).toInt()) + ")");
} }
else else
return QVariant(QString::fromUtf8(node->node_info.location.c_str())); return QVariant(QString::fromUtf8(node->node_info.location.c_str()));
@ -869,6 +900,69 @@ bool RsFriendListModel::getPeerOnlineStatus(const EntryIndex& e) const
return (noded && (noded->node_info.state & RS_PEER_STATE_CONNECTED)); return (noded && (noded->node_info.state & RS_PEER_STATE_CONNECTED));
} }
const RsFriendListModel::HierarchicalNodeInformation *RsFriendListModel::getBestNodeInformation(const HierarchicalProfileInformation *profileInfo, uint32_t *status) const
{
if (status) {
*status = RS_STATUS_OFFLINE;
}
if (!profileInfo) {
return NULL;
}
const RsFriendListModel::HierarchicalNodeInformation *bestNodeInformation = NULL;
int bestStatusIndex = 0;
/* Find the best status */
for (uint32_t i = 0; i < profileInfo->child_node_indices.size(); ++i) {
const RsFriendListModel::HierarchicalNodeInformation &nodeInformation = mLocations[profileInfo->child_node_indices[i]];
StatusInfo statusInfo;
rsStatus->getStatus(nodeInformation.node_info.id, statusInfo);
int statusIndex = 0;
switch (statusInfo.status) {
case RS_STATUS_OFFLINE:
statusIndex = 1;
break;
case RS_STATUS_INACTIVE:
statusIndex = 2;
break;
case RS_STATUS_AWAY:
statusIndex = 3;
break;
case RS_STATUS_BUSY:
statusIndex = 4;
break;
case RS_STATUS_ONLINE:
statusIndex = 5;
break;
default:
std::cerr << "FriendListModel: Unknown status " << statusInfo.status << std::endl;
}
if (bestStatusIndex == 0 || statusIndex > bestStatusIndex) {
/* first status or better status */
bestStatusIndex = statusIndex;
bestNodeInformation = &nodeInformation;
if (status) {
*status = statusInfo.status;
}
}
}
if (bestStatusIndex == 0) {
return NULL;
}
return bestNodeInformation;
}
QVariant RsFriendListModel::decorationRole(const EntryIndex& entry,int col) const QVariant RsFriendListModel::decorationRole(const EntryIndex& entry,int col) const
{ {
if(col > 0) if(col > 0)
@ -902,13 +996,42 @@ QVariant RsFriendListModel::decorationRole(const EntryIndex& entry,int col) cons
{ {
if(!isProfileExpanded(entry)) if(!isProfileExpanded(entry))
{ {
QPixmap sslAvatar = FilesDefs::getPixmapFromQtResourcePath(AVATAR_DEFAULT_IMAGE); QPixmap sslAvatar;
bool foundAvatar = false;
const HierarchicalProfileInformation *hn = getProfileInfo(entry); const HierarchicalProfileInformation *hn = getProfileInfo(entry);
uint32_t status = RS_STATUS_OFFLINE;
const HierarchicalNodeInformation *bestNodeInformation = NULL;
for(uint32_t i=0;i<hn->child_node_indices.size();++i) if (mDisplayStatusIcon) {
if(AvatarDefs::getAvatarFromSslId(RsPeerId(mLocations[hn->child_node_indices[i]].node_info.id.toStdString()), sslAvatar)) bestNodeInformation = getBestNodeInformation(hn, &status);
return QVariant(QIcon(sslAvatar)); if (bestNodeInformation) {
if (AvatarDefs::getAvatarFromSslId(RsPeerId(bestNodeInformation->node_info.id.toStdString()), sslAvatar, "")) {
/* Use avatar from best node */
foundAvatar = true;
}
}
}
if (!foundAvatar) {
/* Use first available avatar */
for(uint32_t i=0;i<hn->child_node_indices.size();++i) {
if(AvatarDefs::getAvatarFromSslId(RsPeerId(mLocations[hn->child_node_indices[i]].node_info.id.toStdString()), sslAvatar, "")) {
foundAvatar = true;
break;
}
}
}
if (!foundAvatar || sslAvatar.isNull()) {
sslAvatar = FilesDefs::getPixmapFromQtResourcePath(AVATAR_DEFAULT_IMAGE);
}
if (mDisplayStatusIcon) {
if (bestNodeInformation) {
QPixmap sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(status));
return QVariant(QIcon(createAvatar(sslAvatar, sslOverlayIcon)));
}
}
return QVariant(QIcon(sslAvatar)); return QVariant(QIcon(sslAvatar));
} }
@ -925,6 +1048,10 @@ QVariant RsFriendListModel::decorationRole(const EntryIndex& entry,int col) cons
QPixmap sslAvatar; QPixmap sslAvatar;
AvatarDefs::getAvatarFromSslId(RsPeerId(hn->node_info.id.toStdString()), sslAvatar); AvatarDefs::getAvatarFromSslId(RsPeerId(hn->node_info.id.toStdString()), sslAvatar);
if (mDisplayStatusIcon) {
QPixmap sslOverlayIcon = FilesDefs::getPixmapFromQtResourcePath(StatusDefs::imageStatus(statusRole(entry, col).toInt()));
return QVariant(QIcon(createAvatar(sslAvatar, sslOverlayIcon)));
}
return QVariant(QIcon(sslAvatar)); return QVariant(QIcon(sslAvatar));
} }

View file

@ -129,6 +129,10 @@ public:
void setDisplayStatusString(bool b); void setDisplayStatusString(bool b);
bool getDisplayStatusString() const { return mDisplayStatusString; } bool getDisplayStatusString() const { return mDisplayStatusString; }
void setDisplayStatusIcon(bool b);
bool getDisplayStatusIcon() const { return mDisplayStatusIcon; }
EntryType getType(const QModelIndex&) const; EntryType getType(const QModelIndex&) const;
@ -219,11 +223,14 @@ private:
uint32_t updateFilterStatus(ForumModelIndex i,int column,const QStringList& strings); uint32_t updateFilterStatus(ForumModelIndex i,int column,const QStringList& strings);
const HierarchicalNodeInformation *getBestNodeInformation(const HierarchicalProfileInformation *profileInfo, uint32_t *status = NULL) const;
QStringList mFilterStrings; QStringList mFilterStrings;
FilterType mFilterType; FilterType mFilterType;
bool mDisplayGroups ; bool mDisplayGroups ;
bool mDisplayStatusString ; bool mDisplayStatusString ;
bool mDisplayStatusIcon ;
rstime_t mLastInternalDataUpdate; rstime_t mLastInternalDataUpdate;
rstime_t mLastNodeUpdate;; rstime_t mLastNodeUpdate;;

View file

@ -35,10 +35,10 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin"> <property name="leftMargin">

View file

@ -54,6 +54,7 @@
#include "gui/chat/ChatUserNotify.h" #include "gui/chat/ChatUserNotify.h"
#include "gui/connect/ConnectProgressDialog.h" #include "gui/connect/ConnectProgressDialog.h"
#include "gui/common/ElidedLabel.h" #include "gui/common/ElidedLabel.h"
#include "gui/notifyqt.h"
#include "NewFriendList.h" #include "NewFriendList.h"
#include "ui_NewFriendList.h" #include "ui_NewFriendList.h"
@ -202,6 +203,9 @@ NewFriendList::NewFriendList(QWidget */*parent*/) : /* RsAutoUpdatePage(5000,par
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_peer, RsEventType::PEER_CONNECTION ); rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_peer, RsEventType::PEER_CONNECTION );
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_gssp, RsEventType::GOSSIP_DISCOVERY ); rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> e) { handleEvent(e); }, mEventHandlerId_gssp, RsEventType::GOSSIP_DISCOVERY );
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewAvatar(QString)), this, SLOT(forceUpdateDisplay()));
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(QString,int)), this, SLOT(forceUpdateDisplay()));
mModel = new RsFriendListModel(ui->peerTreeWidget); mModel = new RsFriendListModel(ui->peerTreeWidget);
mProxyModel = new FriendListSortFilterProxyModel(ui->peerTreeWidget->header(),this); mProxyModel = new FriendListSortFilterProxyModel(ui->peerTreeWidget->header(),this);
@ -261,6 +265,7 @@ NewFriendList::NewFriendList(QWidget */*parent*/) : /* RsAutoUpdatePage(5000,par
connect(ui->actionShowOfflineFriends, SIGNAL(triggered(bool)), this, SLOT(setShowUnconnected(bool))); connect(ui->actionShowOfflineFriends, SIGNAL(triggered(bool)), this, SLOT(setShowUnconnected(bool)));
connect(ui->actionShowState, SIGNAL(triggered(bool)), this, SLOT(setShowState(bool)) ); connect(ui->actionShowState, SIGNAL(triggered(bool)), this, SLOT(setShowState(bool)) );
connect(ui->actionShowStateIcon, SIGNAL(triggered(bool)), this, SLOT(setShowStateIcon(bool)) );
connect(ui->actionShowGroups, SIGNAL(triggered(bool)), this, SLOT(setShowGroups(bool)) ); connect(ui->actionShowGroups, SIGNAL(triggered(bool)), this, SLOT(setShowGroups(bool)) );
connect(ui->actionExportFriendlist, SIGNAL(triggered()) , this, SLOT(exportFriendlistClicked())); connect(ui->actionExportFriendlist, SIGNAL(triggered()) , this, SLOT(exportFriendlistClicked()));
connect(ui->actionImportFriendlist, SIGNAL(triggered()) , this, SLOT(importFriendlistClicked())); connect(ui->actionImportFriendlist, SIGNAL(triggered()) , this, SLOT(importFriendlistClicked()));
@ -341,10 +346,12 @@ void NewFriendList::headerContextMenuRequested(QPoint /*p*/)
displayMenu.addAction(ui->actionShowOfflineFriends); displayMenu.addAction(ui->actionShowOfflineFriends);
displayMenu.addAction(ui->actionShowState); displayMenu.addAction(ui->actionShowState);
displayMenu.addAction(ui->actionShowStateIcon);
displayMenu.addAction(ui->actionShowGroups); displayMenu.addAction(ui->actionShowGroups);
ui->actionShowOfflineFriends->setChecked(mProxyModel->showOfflineNodes()); ui->actionShowOfflineFriends->setChecked(mProxyModel->showOfflineNodes());
ui->actionShowState->setChecked(mModel->getDisplayStatusString()); ui->actionShowState->setChecked(mModel->getDisplayStatusString());
ui->actionShowStateIcon->setChecked(mModel->getDisplayStatusIcon());
ui->actionShowGroups->setChecked(mModel->getDisplayGroups()); ui->actionShowGroups->setChecked(mModel->getDisplayGroups());
QHeaderView *header = ui->peerTreeWidget->header(); QHeaderView *header = ui->peerTreeWidget->header();
@ -505,6 +512,8 @@ void NewFriendList::processSettings(bool load)
mModel->setDisplayStatusString(Settings->value("showState", mModel->getDisplayStatusString()).toBool()); mModel->setDisplayStatusString(Settings->value("showState", mModel->getDisplayStatusString()).toBool());
mModel->setDisplayGroups(Settings->value("showGroups", mModel->getDisplayGroups()).toBool()); mModel->setDisplayGroups(Settings->value("showGroups", mModel->getDisplayGroups()).toBool());
mModel->setDisplayStatusIcon(Settings->value("showStateIcon", mModel->getDisplayStatusIcon()).toBool());
setColumnVisible(RsFriendListModel::COLUMN_THREAD_IP,Settings->value("showIP", isColumnVisible(RsFriendListModel::COLUMN_THREAD_IP)).toBool()); setColumnVisible(RsFriendListModel::COLUMN_THREAD_IP,Settings->value("showIP", isColumnVisible(RsFriendListModel::COLUMN_THREAD_IP)).toBool());
setColumnVisible(RsFriendListModel::COLUMN_THREAD_ID,Settings->value("showID", isColumnVisible(RsFriendListModel::COLUMN_THREAD_ID)).toBool()); setColumnVisible(RsFriendListModel::COLUMN_THREAD_ID,Settings->value("showID", isColumnVisible(RsFriendListModel::COLUMN_THREAD_ID)).toBool());
@ -528,6 +537,8 @@ void NewFriendList::processSettings(bool load)
Settings->setValue("hideUnconnected", !mProxyModel->showOfflineNodes()); Settings->setValue("hideUnconnected", !mProxyModel->showOfflineNodes());
Settings->setValue("showState", mModel->getDisplayStatusString()); Settings->setValue("showState", mModel->getDisplayStatusString());
Settings->setValue("showGroups", mModel->getDisplayGroups()); Settings->setValue("showGroups", mModel->getDisplayGroups());
Settings->setValue("showStateIcon", mModel->getDisplayStatusIcon());
Settings->setValue("showIP",isColumnVisible(RsFriendListModel::COLUMN_THREAD_IP)); Settings->setValue("showIP",isColumnVisible(RsFriendListModel::COLUMN_THREAD_IP));
Settings->setValue("showID",isColumnVisible(RsFriendListModel::COLUMN_THREAD_ID)); Settings->setValue("showID",isColumnVisible(RsFriendListModel::COLUMN_THREAD_ID));
@ -1643,6 +1654,12 @@ void NewFriendList::setShowState(bool show)
processSettings(false); processSettings(false);
} }
void NewFriendList::setShowStateIcon(bool show)
{
applyWhileKeepingTree([show,this]() { mModel->setDisplayStatusIcon(show) ; });
processSettings(false);
}
void NewFriendList::setShowGroups(bool show) void NewFriendList::setShowGroups(bool show)
{ {
applyWhileKeepingTree([show,this]() { mModel->setDisplayGroups(show) ; }); applyWhileKeepingTree([show,this]() { mModel->setDisplayGroups(show) ; });

View file

@ -87,6 +87,7 @@ public slots:
void setShowGroups(bool show); void setShowGroups(bool show);
void setShowUnconnected(bool hidden); void setShowUnconnected(bool hidden);
void setShowState(bool show); void setShowState(bool show);
void setShowStateIcon(bool show);
void headerContextMenuRequested(QPoint); void headerContextMenuRequested(QPoint);
void exportFriendlistClicked(); void exportFriendlistClicked();

View file

@ -29,10 +29,10 @@
<item> <item>
<widget class="QFrame" name="toolBarFrame"> <widget class="QFrame" name="toolBarFrame">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="toolBarFrame_HL"> <layout class="QHBoxLayout" name="toolBarFrame_HL">
<property name="spacing"> <property name="spacing">
@ -124,6 +124,17 @@
<string>import your friendlist including groups</string> <string>import your friendlist including groups</string>
</property> </property>
</action> </action>
<action name="actionShowStateIcon">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Status icons</string>
</property>
<property name="toolTip">
<string>Show status icons</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

View file

@ -349,10 +349,10 @@
</size> </size>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" name="toolBarFrameHLayout"> <layout class="QHBoxLayout" name="toolBarFrameHLayout">
<property name="leftMargin"> <property name="leftMargin">
@ -1400,6 +1400,11 @@ border-image: url(:/images/closepressed.png)
</action> </action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget>
<class>RSComboBox</class>
<extends>QComboBox</extends>
<header>gui/common/RSComboBox.h</header>
</customwidget>
<customwidget> <customwidget>
<class>FriendSelectionWidget</class> <class>FriendSelectionWidget</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -1411,21 +1416,16 @@ border-image: url(:/images/closepressed.png)
<extends>QComboBox</extends> <extends>QComboBox</extends>
<header>gui/gxs/GxsIdChooser.h</header> <header>gui/gxs/GxsIdChooser.h</header>
</customwidget> </customwidget>
<customwidget>
<class>HashBox</class>
<extends>QScrollArea</extends>
<header location="global">gui/common/HashBox.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>MimeTextEdit</class> <class>MimeTextEdit</class>
<extends>QTextEdit</extends> <extends>QTextEdit</extends>
<header location="global">gui/common/MimeTextEdit.h</header> <header location="global">gui/common/MimeTextEdit.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>RSComboBox</class> <class>HashBox</class>
<extends>QComboBox</extends> <extends>QScrollArea</extends>
<header>gui/common/RSComboBox.h</header> <header location="global">gui/common/HashBox.h</header>
<container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>

View file

@ -1296,7 +1296,7 @@ void MessagesDialog::updateMessageSummaryList()
/* calculating the new messages */ /* calculating the new messages */
std::list<MsgInfoSummary> msgList; std::list<MsgInfoSummary> msgList;
rsMail->getMessageSummaries(mMessageModel->currentBox(),msgList); rsMail->getMessageSummaries(Rs::Msgs::BoxName::BOX_ALL,msgList);
QMap<int, int> tagCount; QMap<int, int> tagCount;

View file

@ -352,9 +352,9 @@ NewFriendList
{ {
qproperty-textColorStatusOffline: black; qproperty-textColorStatusOffline: black;
qproperty-textColorStatusAway: gray; qproperty-textColorStatusAway: gray;
qproperty-textColorStatusBusy: gray; qproperty-textColorStatusBusy: darkred;
qproperty-textColorStatusOnline: darkGreen; qproperty-textColorStatusOnline: darkGreen;
qproperty-textColorStatusInactive: gray; qproperty-textColorStatusInactive: orange;
qproperty-textColorGroup: rgb(123, 123, 123); qproperty-textColorGroup: rgb(123, 123, 123);
} }

View file

@ -11022,32 +11022,32 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+123"/> <location line="+123"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copy your RetroShare ID to clipboard&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copy your RetroShare ID to clipboard&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copia tu ID de RetroShare al portapapeles&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location line="+165"/> <location line="+165"/>
<source>Add friend</source> <source>Add friend</source>
<translation type="unfinished"></translation> <translation>Agregar amigo</translation>
</message> </message>
<message> <message>
<location line="+27"/> <location line="+27"/>
<source>Did you receive a Retroshare ID from a friend?</source> <source>Did you receive a Retroshare ID from a friend?</source>
<translation type="unfinished"></translation> <translation>¿Recibiste una identificación de Retroshare de una amiga?</translation>
</message> </message>
<message> <message>
<location line="+85"/> <location line="+85"/>
<source>Do you need help with Retroshare?</source> <source>Do you need help with Retroshare?</source>
<translation type="unfinished"></translation> <translation>¿Necesitas ayuda con Retroshare?</translation>
</message> </message>
<message> <message>
<location line="-254"/> <location line="-254"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Share your RetroShare ID&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Share your RetroShare ID&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Comparte tu ID de RetroShare&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location line="-63"/> <location line="-63"/>
<source>This is your Retroshare ID. Copy and share with your friends!</source> <source>This is your Retroshare ID. Copy and share with your friends!</source>
<translation type="unfinished"></translation> <translation>Este es tu ID de Retroshare. ¡Cópialo y compártelo con tus amigos!</translation>
</message> </message>
<message> <message>
<location line="+10"/> <location line="+10"/>
@ -11096,7 +11096,7 @@ de código abierto, multi-sistema, privada y segura.</translation>
<message> <message>
<location line="+6"/> <location line="+6"/>
<source>Copy your Retroshare ID to Clipboard</source> <source>Copy your Retroshare ID to Clipboard</source>
<translation type="unfinished"></translation> <translation>Copia tu ID de Retroshare al portapapeles</translation>
</message> </message>
<message> <message>
<location line="+21"/> <location line="+21"/>
@ -11173,7 +11173,7 @@ new short format</source>
<message> <message>
<location filename="../gui/HomePage.h" line="+46"/> <location filename="../gui/HomePage.h" line="+46"/>
<source>Home</source> <source>Home</source>
<translation>Página principal</translation> <translation>Casa</translation>
</message> </message>
</context> </context>
<context> <context>
@ -11516,12 +11516,12 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="-291"/> <location line="-291"/>
<source>Created on :</source> <source>Created on :</source>
<translation type="unfinished"></translation> <translation>Creado el :</translation>
</message> </message>
<message> <message>
<location line="-64"/> <location line="-64"/>
<source>Auto-Ban profile</source> <source>Auto-Ban profile</source>
<translation type="unfinished"></translation> <translation>Perfil de prohibición automática</translation>
</message> </message>
<message> <message>
<location line="+150"/> <location line="+150"/>
@ -11531,7 +11531,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+84"/> <location line="+84"/>
<source>Edit Identity</source> <source>Edit Identity</source>
<translation type="unfinished"></translation> <translation>Editar identidad</translation>
</message> </message>
<message> <message>
<location line="+151"/> <location line="+151"/>
@ -11591,12 +11591,12 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="-407"/> <location line="-407"/>
<source>Owner node ID :</source> <source>Owner node ID :</source>
<translation>Identificación del nodo propietario :</translation> <translation>Identificación del nodo:</translation>
</message> </message>
<message> <message>
<location line="-58"/> <location line="-58"/>
<source>Identity name :</source> <source>Identity name :</source>
<translation>Nombre de la identidad :</translation> <translation>Nombre de identidad:</translation>
</message> </message>
<message> <message>
<location line="-587"/> <location line="-587"/>

View file

@ -1527,12 +1527,12 @@ into the image, so as to
<message> <message>
<location line="+75"/> <location line="+75"/>
<source>Redock to Main window</source> <source>Redock to Main window</source>
<translation type="unfinished"></translation> <translation>Перезакрепить в главном окне</translation>
</message> </message>
<message> <message>
<location line="+15"/> <location line="+15"/>
<source>Undock to a new window</source> <source>Undock to a new window</source>
<translation type="unfinished"></translation> <translation>Открепить в новом окне</translation>
</message> </message>
</context> </context>
<context> <context>
@ -10717,17 +10717,17 @@ This message is missing. You should receive it later.</source>
<message> <message>
<location filename="../gui/statusbar/hashingstatus.cpp" line="+78"/> <location filename="../gui/statusbar/hashingstatus.cpp" line="+78"/>
<source>Examining shared files...</source> <source>Examining shared files...</source>
<translation type="unfinished">Проверка файлов, открытых к доступу...</translation> <translation>Проверка файлов, открытых к доступу...</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Hashing file</source> <source>Hashing file</source>
<translation type="unfinished">Хеширование файла</translation> <translation>Хеширование файла</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Saving file index...</source> <source>Saving file index...</source>
<translation type="unfinished">Сохранение списка файлов...</translation> <translation>Сохранение списка файлов...</translation>
</message> </message>
</context> </context>
<context> <context>
@ -11025,32 +11025,32 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+123"/> <location line="+123"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copy your RetroShare ID to clipboard&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Copy your RetroShare ID to clipboard&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Скопируйте свой идентификатор RetroShare в буфер обмена&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location line="+165"/> <location line="+165"/>
<source>Add friend</source> <source>Add friend</source>
<translation type="unfinished"></translation> <translation>Добавить узел</translation>
</message> </message>
<message> <message>
<location line="+27"/> <location line="+27"/>
<source>Did you receive a Retroshare ID from a friend?</source> <source>Did you receive a Retroshare ID from a friend?</source>
<translation type="unfinished"></translation> <translation>Вы получили идентификатор Retroshare от друга?</translation>
</message> </message>
<message> <message>
<location line="+85"/> <location line="+85"/>
<source>Do you need help with Retroshare?</source> <source>Do you need help with Retroshare?</source>
<translation type="unfinished"></translation> <translation>Вам нужна помощь с Retroshare?</translation>
</message> </message>
<message> <message>
<location line="-254"/> <location line="-254"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Share your RetroShare ID&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Share your RetroShare ID&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Поделитесь своим идентификатором RetroShare&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location line="-63"/> <location line="-63"/>
<source>This is your Retroshare ID. Copy and share with your friends!</source> <source>This is your Retroshare ID. Copy and share with your friends!</source>
<translation type="unfinished"></translation> <translation>Это ваш Retroshare ID. Скопируйте и поделитесь с друзьями!</translation>
</message> </message>
<message> <message>
<location line="+10"/> <location line="+10"/>
@ -11120,7 +11120,7 @@ private and secure decentralized communication platform.
<message> <message>
<location line="+6"/> <location line="+6"/>
<source>Include all IPs history</source> <source>Include all IPs history</source>
<translation type="unfinished"></translation> <translation>Включить историю всех IP-адресов</translation>
</message> </message>
<message> <message>
<location line="+12"/> <location line="+12"/>
@ -11130,12 +11130,12 @@ private and secure decentralized communication platform.
<message> <message>
<location line="+70"/> <location line="+70"/>
<source>Include all your known IPs</source> <source>Include all your known IPs</source>
<translation type="unfinished"></translation> <translation>Включите все ваши известные IP-адреса</translation>
</message> </message>
<message> <message>
<location line="-109"/> <location line="-109"/>
<source>Use old certificate format</source> <source>Use old certificate format</source>
<translation type="unfinished"></translation> <translation>Использовать старый формат сертификата</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
@ -11147,7 +11147,7 @@ new short format</source>
<message> <message>
<location line="+99"/> <location line="+99"/>
<source>Use new (short) certificate format</source> <source>Use new (short) certificate format</source>
<translation type="unfinished"></translation> <translation>Использовать (короткий) формат сертификата</translation>
</message> </message>
<message> <message>
<location line="+143"/> <location line="+143"/>
@ -11499,7 +11499,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="-41"/> <location line="-41"/>
<source>Friend votes:</source> <source>Friend votes:</source>
<translation>Рейтинг согласно мнению участников из окружения:</translation> <translation>Голоса друзей:</translation>
</message> </message>
<message> <message>
<location line="+358"/> <location line="+358"/>
@ -11520,12 +11520,12 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="-291"/> <location line="-291"/>
<source>Created on :</source> <source>Created on :</source>
<translation type="unfinished"></translation> <translation>Создано:</translation>
</message> </message>
<message> <message>
<location line="-64"/> <location line="-64"/>
<source>Auto-Ban profile</source> <source>Auto-Ban profile</source>
<translation type="unfinished"></translation> <translation>Профиль автобана</translation>
</message> </message>
<message> <message>
<location line="+150"/> <location line="+150"/>
@ -11535,7 +11535,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+84"/> <location line="+84"/>
<source>Edit Identity</source> <source>Edit Identity</source>
<translation type="unfinished"></translation> <translation>Изменить личность</translation>
</message> </message>
<message> <message>
<location line="+151"/> <location line="+151"/>
@ -11595,7 +11595,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="-407"/> <location line="-407"/>
<source>Owner node ID :</source> <source>Owner node ID :</source>
<translation>Идентификатор владельца узла:</translation> <translation>Идентификатор узла:</translation>
</message> </message>
<message> <message>
<location line="-58"/> <location line="-58"/>
@ -11630,7 +11630,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+58"/> <location line="+58"/>
<source>Owner node name :</source> <source>Owner node name :</source>
<translation>Имя владельца узла:</translation> <translation>Имя узла:</translation>
</message> </message>
<message> <message>
<location line="-569"/> <location line="-569"/>
@ -11660,19 +11660,19 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+116"/> <location line="+116"/>
<source>Negative</source> <source>Negative</source>
<translation>Отрицательное мнение</translation> <translation>Отрицательно</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location filename="../gui/Identity/IdDialog.cpp" line="-405"/> <location filename="../gui/Identity/IdDialog.cpp" line="-405"/>
<source>Neutral</source> <source>Neutral</source>
<translation>Нейтральное мнение</translation> <translation>Нейтральный</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<location filename="../gui/Identity/IdDialog.cpp" line="-11"/> <location filename="../gui/Identity/IdDialog.cpp" line="-11"/>
<source>Positive</source> <source>Positive</source>
<translation>Положительное мнение</translation> <translation>Положительный</translation>
</message> </message>
<message> <message>
<location line="-144"/> <location line="-144"/>
@ -11799,7 +11799,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>unsubscribed (Only receive invite list). Last seen: %1 days ago.</source> <source>unsubscribed (Only receive invite list). Last seen: %1 days ago.</source>
<translation type="unfinished"></translation> <translation>отписался (Только получать список приглашений). Последний раз был в сети: %1 дней назад.</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
@ -11829,7 +11829,7 @@ p, li { white-space: pre-wrap; }
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Status: </source> <source>Status: </source>
<translation>Статус:</translation> <translation>Статус: </translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
@ -12011,7 +12011,7 @@ These identities will soon be not supported anymore.</source>
<message> <message>
<location line="+2"/> <location line="+2"/>
<source>Message</source> <source>Message</source>
<translation type="unfinished">Сообщение</translation> <translation>Сообщение</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
@ -12281,7 +12281,7 @@ These identities will soon be not supported anymore.</source>
<message> <message>
<location filename="../gui/Identity/IdDialog.ui" line="-231"/> <location filename="../gui/Identity/IdDialog.ui" line="-231"/>
<source>Last used:</source> <source>Last used:</source>
<translation>Последний раз появлялся: </translation> <translation>Последний раз появлялся:</translation>
</message> </message>
<message> <message>
<location filename="../gui/Identity/IdDialog.cpp" line="-608"/> <location filename="../gui/Identity/IdDialog.cpp" line="-608"/>
@ -12321,7 +12321,7 @@ These identities will soon be not supported anymore.</source>
<message> <message>
<location line="+607"/> <location line="+607"/>
<source>Really delete?</source> <source>Really delete?</source>
<translation>Действительно удалить? </translation> <translation>Действительно удалить?</translation>
</message> </message>
</context> </context>
<context> <context>
@ -14916,105 +14916,105 @@ Reported error:</source>
<message> <message>
<location filename="../gui/common/NewFriendList.ui" line="+83"/> <location filename="../gui/common/NewFriendList.ui" line="+83"/>
<source>Offline Friends</source> <source>Offline Friends</source>
<translation type="unfinished"></translation> <translation>Друзья офлайн</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Show Offline Friends</source> <source>Show Offline Friends</source>
<translation type="unfinished"></translation> <translation>Показать друзей офлайн</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+8"/>
<source>Status</source> <source>Status</source>
<translation type="unfinished">Статус</translation> <translation>Статус</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Show status</source> <source>Show status</source>
<translation type="unfinished"></translation> <translation>Показать статус</translation>
</message> </message>
<message> <message>
<location line="+8"/> <location line="+8"/>
<location filename="../gui/common/NewFriendList.cpp" line="+690"/> <location filename="../gui/common/NewFriendList.cpp" line="+690"/>
<source>Groups</source> <source>Groups</source>
<translation type="unfinished">Группы</translation> <translation>Группы</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Show groups</source> <source>Show groups</source>
<translation type="unfinished"></translation> <translation>Показать группы</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>export friendlist</source> <source>export friendlist</source>
<translation type="unfinished">Экспорт списка контактов</translation> <translation>Экспорт списка контактов</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>export your friendlist including groups</source> <source>export your friendlist including groups</source>
<translation type="unfinished">Экспорт списка контактов, включая информацию о группах</translation> <translation>Экспорт списка контактов, включая информацию о группах</translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>import friendlist</source> <source>import friendlist</source>
<translation type="unfinished">Импорт списка контактов</translation> <translation>Импорт списка контактов</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>import your friendlist including groups</source> <source>import your friendlist including groups</source>
<translation type="unfinished">Импорт списка контактов, включая информацию о группах</translation> <translation>Импорт списка контактов, включая информацию о группах</translation>
</message> </message>
<message> <message>
<location filename="../gui/common/NewFriendList.cpp" line="-496"/> <location filename="../gui/common/NewFriendList.cpp" line="-496"/>
<location line="+28"/> <location line="+28"/>
<source>Search</source> <source>Search</source>
<translation type="unfinished"></translation> <translation>Поиск</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<location line="+144"/> <location line="+144"/>
<source>ID</source> <source>ID</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location line="-144"/> <location line="-144"/>
<source>Search ID</source> <source>Search ID</source>
<translation type="unfinished">Поиск идентификатора</translation> <translation>Поиск идентификатора</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
<source>Online friends on top</source> <source>Online friends on top</source>
<translation type="unfinished"></translation> <translation>Онлайн-друзья наверху</translation>
</message> </message>
<message> <message>
<location line="+82"/> <location line="+82"/>
<source>Show Items</source> <source>Show Items</source>
<translation type="unfinished">Показать...</translation> <translation>Показать...</translation>
</message> </message>
<message> <message>
<location line="+46"/> <location line="+46"/>
<source>Last contact</source> <source>Last contact</source>
<translation type="unfinished"></translation> <translation>Последний контакт</translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+7"/>
<source>IP</source> <source>IP</source>
<translation type="unfinished">IP</translation> <translation>IP</translation>
</message> </message>
<message> <message>
<location line="+251"/> <location line="+251"/>
<source>Group</source> <source>Group</source>
<translation type="unfinished">Группа</translation> <translation>Группа</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Friend</source> <source>Friend</source>
<translation type="unfinished"></translation> <translation>Друг</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Node</source> <source>Node</source>
<translation type="unfinished"></translation> <translation>Узел</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
@ -15024,126 +15024,126 @@ Reported error:</source>
<message> <message>
<location line="+12"/> <location line="+12"/>
<source>Edit Group</source> <source>Edit Group</source>
<translation type="unfinished">Редактировать группу</translation> <translation>Редактировать группу</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
<source>Remove Group</source> <source>Remove Group</source>
<translation type="unfinished">Удалить группу</translation> <translation>Удалить группу</translation>
</message> </message>
<message> <message>
<location line="+7"/> <location line="+7"/>
<source>Profile details</source> <source>Profile details</source>
<translation type="unfinished">Сведения об узле</translation> <translation>Сведения об узле</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Deny connections</source> <source>Deny connections</source>
<translation type="unfinished"></translation> <translation>Запретить соединения</translation>
</message> </message>
<message> <message>
<location line="+26"/> <location line="+26"/>
<source>Add to group</source> <source>Add to group</source>
<translation type="unfinished">добавить в группу</translation> <translation>добавить в группу</translation>
</message> </message>
<message> <message>
<location line="+9"/> <location line="+9"/>
<source>Move to group</source> <source>Move to group</source>
<translation type="unfinished">Переместить в группу</translation> <translation>Переместить в группу</translation>
</message> </message>
<message> <message>
<location line="+12"/> <location line="+12"/>
<source>Create new group</source> <source>Create new group</source>
<translation type="unfinished">Создать новую группу</translation> <translation>Создать новую группу</translation>
</message> </message>
<message> <message>
<location line="+19"/> <location line="+19"/>
<source>Remove from group </source> <source>Remove from group </source>
<translation type="unfinished"></translation> <translation>Удалить из группы </translation>
</message> </message>
<message> <message>
<location line="+5"/> <location line="+5"/>
<source>Remove from all groups</source> <source>Remove from all groups</source>
<translation type="unfinished">Удалить из всех групп</translation> <translation>Удалить из всех групп</translation>
</message> </message>
<message> <message>
<location line="+13"/> <location line="+13"/>
<source>Chat</source> <source>Chat</source>
<translation type="unfinished"></translation> <translation>Чат</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Send message to this node</source> <source>Send message to this node</source>
<translation type="unfinished">Послать сообщение этому узлу</translation> <translation>Послать сообщение этому узлу</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Node details</source> <source>Node details</source>
<translation type="unfinished">Сведения об узле</translation> <translation>Сведения об узле</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Recommend this node to...</source> <source>Recommend this node to...</source>
<translation type="unfinished">Рекомендовать этого участника...</translation> <translation>Рекомендовать этого участника...</translation>
</message> </message>
<message> <message>
<location line="+6"/> <location line="+6"/>
<source>Attempt to connect</source> <source>Attempt to connect</source>
<translation type="unfinished">Соединиться</translation> <translation>Соединиться</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
<source>Copy certificate link</source> <source>Copy certificate link</source>
<translation type="unfinished">Скопировать ссылку сертификата</translation> <translation>Скопировать ссылку сертификата</translation>
</message> </message>
<message> <message>
<location line="+3"/> <location line="+3"/>
<source>Remove Friend Node</source> <source>Remove Friend Node</source>
<translation type="unfinished">Удалить этого участника</translation> <translation>Удалить этого участника</translation>
</message> </message>
<message> <message>
<location line="+15"/> <location line="+15"/>
<source>Paste certificate link</source> <source>Paste certificate link</source>
<translation type="unfinished">Вставить ссылку на сертификат</translation> <translation>Вставить ссылку на сертификат</translation>
</message> </message>
<message> <message>
<location line="+4"/> <location line="+4"/>
<source>Expand all</source> <source>Expand all</source>
<translation type="unfinished">Раскрыть всё</translation> <translation>Раскрыть всё</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source>Collapse all</source> <source>Collapse all</source>
<translation type="unfinished">Свернуть всё</translation> <translation>Свернуть всё</translation>
</message> </message>
<message> <message>
<location line="+236"/> <location line="+236"/>
<source>Do you want to remove this node?</source> <source>Do you want to remove this node?</source>
<translation type="unfinished">Вы хотите удалить этот узел?</translation> <translation>Вы хотите удалить этот узел?</translation>
</message> </message>
<message> <message>
<location line="+12"/> <location line="+12"/>
<source>Do you want to remove this Friend?</source> <source>Do you want to remove this Friend?</source>
<translation type="unfinished"></translation> <translation>Вы хотите удалить этот контакт?</translation>
</message> </message>
<message> <message>
<location line="+235"/> <location line="+235"/>
<location line="+18"/> <location line="+18"/>
<source>Done!</source> <source>Done!</source>
<translation type="unfinished">Готово!</translation> <translation>Готово!</translation>
</message> </message>
<message> <message>
<location line="-17"/> <location line="-17"/>
<source>Your friendlist is stored at: <source>Your friendlist is stored at:
</source> </source>
<translation type="unfinished">Ваш список список контактов сохранён в: <translation>Ваш список список контактов сохранён в:
</translation> </translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source> <source>
(keep in mind that the file is unencrypted!)</source> (keep in mind that the file is unencrypted!)</source>
<translation type="unfinished"> <translation>
(помните, что файл не зашифрован!)</translation> (помните, что файл не зашифрован!)</translation>
</message> </message>
<message> <message>
@ -15151,32 +15151,32 @@ Reported error:</source>
<location line="+7"/> <location line="+7"/>
<source>Your friendlist was imported from: <source>Your friendlist was imported from:
</source> </source>
<translation type="unfinished">Ваш список контактов импортирован из: <translation>Ваш список контактов импортирован из:
</translation> </translation>
</message> </message>
<message> <message>
<location line="-1"/> <location line="-1"/>
<source>Done - but errors happened!</source> <source>Done - but errors happened!</source>
<translation type="unfinished">Выполнено, но с ошибками!</translation> <translation>Выполнено, но с ошибками!</translation>
</message> </message>
<message> <message>
<location line="+2"/> <location line="+2"/>
<source> <source>
at least one peer was not added</source> at least one peer was not added</source>
<translation type="unfinished"> <translation>
как минимум один участник не добавлен</translation> как минимум один участник не добавлен</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
<source> <source>
at least one peer was not added to a group</source> at least one peer was not added to a group</source>
<translation type="unfinished"> <translation>
как минимум один участник не добавлен в группу</translation> как минимум один участник не добавлен в группу</translation>
</message> </message>
<message> <message>
<location line="+20"/> <location line="+20"/>
<source>Select file for importing your friendlist from</source> <source>Select file for importing your friendlist from</source>
<translation type="unfinished">Выберите файл, в котором хранится список ваших контактов</translation> <translation>Выберите файл, в котором хранится список ваших контактов</translation>
</message> </message>
<message> <message>
<location line="+1"/> <location line="+1"/>
@ -15193,7 +15193,7 @@ at least one peer was not added to a group</source>
<location line="+30"/> <location line="+30"/>
<location line="+116"/> <location line="+116"/>
<source>Error</source> <source>Error</source>
<translation type="unfinished">Ошибка</translation> <translation>Ошибка</translation>
</message> </message>
<message> <message>
<location line="-115"/> <location line="-115"/>

View file

@ -274,7 +274,9 @@ bool ImageUtil::optimizeSizeHtml(QString &html, const QImage& original, QImage &
if(optimizeSizeBytes(bytearray, original, optimized,has_transparency?"PNG":"JPG",maxPixels, maxBytes)) if(optimizeSizeBytes(bytearray, original, optimized,has_transparency?"PNG":"JPG",maxPixels, maxBytes))
{ {
QByteArray encodedByteArray = bytearray.toBase64(); QByteArray encodedByteArray = bytearray.toBase64();
html = "<img src=\"data:image/png;base64,"; html = "<img src=\"data:image/";
html.append(has_transparency ? "png" : "jpeg");
html.append(";base64,");
html.append(encodedByteArray); html.append(encodedByteArray);
html.append("\">"); html.append("\">");
return true; return true;

View file

@ -182,6 +182,12 @@ rs_deep_files_index_taglib:CONFIG -= no_rs_deep_files_index_taglib
CONFIG *= no_rs_use_native_dialogs CONFIG *= no_rs_use_native_dialogs
rs_use_native_dialogs: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 # To disable broadcast discovery append the following assignation to qmake
# command line "CONFIG+=no_rs_broadcast_discovery" # command line "CONFIG+=no_rs_broadcast_discovery"
CONFIG *= 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_001
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_002 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_002
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_003 DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_003
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_004 DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_004
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_005
DEFINES += V07_NON_BACKWARD_COMPATIBLE_CHANGE_UNNAMED 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, none):RS_UPNP_LIB=
equals(RS_UPNP_LIB, miniupnpc):DEFINES*=RS_USE_LIBMINIUPNPC equals(RS_UPNP_LIB, miniupnpc):DEFINES*=RS_USE_LIBMINIUPNPC
contains(RS_UPNP_LIB, upnp):DEFINES*=RS_USE_LIBUPNP contains(RS_UPNP_LIB, upnp):DEFINES*=RS_USE_LIBUPNP

1
supportlibs/librnp Submodule

@ -0,0 +1 @@
Subproject commit ec78117269461b2cdce15a085033a8c6bff6d7e3