Merge remote-tracking branch 'upstream/master' into v0.6-FriendServer2

This commit is contained in:
csoler 2022-02-04 21:27:10 +01:00
commit fe1b00dfc7
51 changed files with 793 additions and 370 deletions

View File

@ -32,6 +32,16 @@ if not "%ParamNoupdate%"=="1" (
if "%ParamIndexing%"=="1" %EnvMSYS2Cmd% "pacman --noconfirm --needed -S mingw-w64-%RsMSYS2Architecture%-xapian-core mingw-w64-%RsMSYS2Architecture%-libvorbis mingw-w64-%RsMSYS2Architecture%-flac mingw-w64-%RsMSYS2Architecture%-taglib"
)
:: Fix webui compilation (TODO: remove when whole RS switched to cmake)
if "%ParamWebui%"=="1" (
pushd "%SourcePath%"
copy "%SourcePath%\libretroshare\src\jsonapi\jsonapi-generator-doxygen.conf" "%SourcePath%\jsonapi-generator\src\jsonapi-generator-doxygen.conf" %Quite%
copy "%SourcePath%\libretroshare\src\jsonapi\async-method-wrapper-template.cpp.tmpl" "%SourcePath%\jsonapi-generator\src\async-method-wrapper-template.cpp.tmpl" %Quite%
copy "%SourcePath%\libretroshare\src\jsonapi\method-wrapper-template.cpp.tmpl" "%SourcePath%\jsonapi-generator\src\method-wrapper-template.cpp.tmpl" %Quite%
git update-index --assume-unchanged "jsonapi-generator\src\jsonapi-generator-doxygen.conf" "jsonapi-generator\src\async-method-wrapper-template.cpp.tmpl" "jsonapi-generator\src\method-wrapper-template.cpp.tmpl"
popd
)
:: Initialize environment
call "%~dp0env.bat" %*
if errorlevel 2 exit /B 2
@ -66,6 +76,7 @@ echo %RS_QMAKE_CONFIG% > buildinfo.txt
echo %RsBuildConfig% >> buildinfo.txt
echo %RsArchitecture% >> buildinfo.txt
echo Qt %QtVersion% >> buildinfo.txt
echo %RsToolchain% >> buildinfo.txt
echo %RsCompiler% >> buildinfo.txt
call "%ToolsPath%\msys2-path.bat" "%SourcePath%" MSYS2SourcePath

View File

@ -1,6 +1,4 @@
:: Process commandline parameter
set Param32=0
set Param64=0
set ParamRelease=0
set ParamDebug=0
set ParamAutologin=0
@ -9,17 +7,40 @@ set ParamTor=0
set ParamWebui=0
set ParamClang=0
set ParamIndexing=0
set ParamFriendserver=0
set ParamNoupdate=0
set CoreCount=%NUMBER_OF_PROCESSORS%
set RS_QMAKE_CONFIG=
set RsToolchain=
set tcc=0
:parameter_loop
if "%~1" NEQ "" (
for /f "tokens=1,2 delims==" %%a in ("%~1") do (
if "%%~a"=="32" (
set Param32=1
set RsToolchain=mingw32
set /A tcc=tcc+1
) else if "%%~a"=="64" (
set Param64=1
set RsToolchain=mingw64
set /A tcc=tcc+1
) else if "%%~a"=="mingw32" (
set RsToolchain=mingw32
set /A tcc=tcc+1
) else if "%%~a"=="mingw64" (
set RsToolchain=mingw64
set /A tcc=tcc+1
) else if "%%~a"=="ucrt64" (
set RsToolchain=ucrt64
set /A tcc=tcc+1
) else if "%%~a"=="clang64" (
set RsToolchain=clang64
set /A tcc=tcc+1
) else if "%%~a"=="clang32" (
set RsToolchain=clang32
set /A tcc=tcc+1
) else if "%%~a"=="clangarm64" (
set RsToolchain=clangarm64
set /A tcc=tcc+1
) else if "%%~a"=="release" (
set ParamRelease=1
) else if "%%~a"=="debug" (
@ -38,6 +59,8 @@ if "%~1" NEQ "" (
set ParamClang=1
) else if "%%~a"=="indexing" (
set ParamIndexing=1
) else if "%%~a"=="friendserver" (
set ParamFriendserver=1
) else if "%%~a"=="noupdate" (
set ParamNoupdate=1
) else if "%%~a"=="CONFIG+" (
@ -52,22 +75,37 @@ if "%~1" NEQ "" (
goto parameter_loop
)
if "%Param32%"=="1" (
if "%Param64%"=="1" (
echo.
echo 32-bit or 64-bit?
if %tcc% NEQ 1 (
echo Multiple or no toolchain specified
goto :usage
)
set RsBit=32
set RsArchitecture=x86
set RsMSYS2Architecture=i686
)
if "%Param64%"=="1" (
set RsBit=64
if "%RsToolchain%"=="mingw32" (
set RsArchitecture=x86
set RsMSYS2Architecture=i686
set MSYSTEM=MINGW32
) else if "%RsToolchain%"=="mingw64" (
set RsArchitecture=x64
set RsMSYS2Architecture=x86_64
set MSYSTEM=MINGW64
) else if "%RsToolchain%"=="ucrt64" (
set RsArchitecture=x64
set RsMSYS2Architecture=ucrt-x86_64
set MSYSTEM=UCRT64
) else if "%RsToolchain%"=="clang64" (
set RsArchitecture=x64
set RsMSYS2Architecture=clang-x86_64
set MSYSTEM=CLANG64
set ParamClang=1
) else if "%RsToolchain%"=="clang32" (
set RsArchitecture=x86
set RsMSYS2Architecture=clang-i686
set MSYSTEM=CLANG32
set ParamClang=1
) else if "%RsToolchain%"=="clangarm64" (
set RsArchitecture=arm64
set RsMSYS2Architecture=clang-aarch64
set MSYSTEM=CLANGARM64
)
if "%ParamClang%"=="1" (
@ -76,8 +114,6 @@ if "%ParamClang%"=="1" (
set RsCompiler=GCC
)
if "%RsBit%"=="" goto :usage
if "%ParamRelease%"=="1" (
if "%ParamDebug%"=="1" (
echo.
@ -104,14 +140,21 @@ if "%ParamIndexing%"=="1" (
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_deep_channels_index" "CONFIG+=rs_deep_files_index" "CONFIG+=rs_deep_files_index_ogg" "CONFIG+=rs_deep_files_index_flac" "CONFIG+=rs_deep_files_index_taglib"
)
if "%ParamFriendserver%"=="1" (
set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% "CONFIG+=rs_efs"
)
exit /B 0
:usage
echo.
echo Usage: 32^|64 release^|debug [autologin plugins webui singlethread clang indexing noupdate] ["CONFIG+=..."]
echo Usage: 32^|64^|other release^|debug [autologin plugins webui singlethread clang indexing friendserver noupdate] ["CONFIG+=..."]
echo.
echo Mandatory parameter
echo 32^|64 32-bit or 64-bit Version
echo 32^|64 32-bit or 64-bit version (same as mingw32 or mingw64)
echo Or you can specify any other toolchain supported by msys2:
echo mingw32^|mingw64^|clang32^|clang64^|ucrt64^|clangarm64
echo More info: https://www.msys2.org/docs/environments
echo release^|debug Build release or debug version
echo.
echo Optional parameter (need clean when changed)
@ -121,6 +164,7 @@ echo webui Enable JsonAPI and pack webui files
echo singlethread Use only 1 thread for building
echo clang Use clang compiler instead of GCC
echo indexing Build with deep channel and file indexing support
echo friendserver Enable friendserver support
echo noupdate Skip updating the libraries
echo "CONFIG+=..." Enable some extra features, you can find the almost complete list in retroshare.pri
echo.

View File

@ -2,8 +2,6 @@ call "%~dp0env-base.bat" %*
if errorlevel 2 exit /B 2
if errorlevel 1 goto error_env
set MSYSTEM=MINGW%RsBit%
set BuildPath=%EnvRootPath%\builds
set DeployPath=%EnvRootPath%\deploy
@ -14,10 +12,10 @@ if not exist "%DeployPath%" mkdir "%DeployPath%"
call "%ToolsPath%\get-qt-version.bat" QtVersion
if "%QtVersion%"=="" %cecho% error "Cannot get Qt version." & exit /B 1
set RsMinGWPath=%EnvMSYS2BasePath%\mingw%RsBit%
set RsMinGWPath=%EnvMSYS2BasePath%\%RsToolchain%
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsArchitecture%-%RsCompiler%-%RsBuildConfig%
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsArchitecture%-%RsCompiler%-%RsBuildConfig%
set RsBuildPath=%BuildPath%\Qt-%QtVersion%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
set RsDeployPath=%DeployPath%\Qt-%QtVersion%%RsType%-%RsToolchain%-%RsCompiler%-%RsBuildConfig%
set RsPackPath=%DeployPath%
set RsArchiveAdd=
set RsWebuiPath=%RootPath%\%SourceName%-webui

View File

@ -105,6 +105,9 @@ copy "%RsBuildPath%\retroshare-nogui\src\%RsBuildConfig%\retroshare*-nogui.exe"
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
copy "%RsBuildPath%\supportlibs\cmark\build\src\libcmark.dll" "%RsDeployPath%" %Quite%
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
if exist "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" (
copy "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" "%RsDeployPath%" %Quite%
)
echo copy extensions
for /D %%D in ("%RsBuildPath%\plugins\*") do (

View File

@ -13,11 +13,11 @@ call "%~dp0build-libs\build-libs.bat"
if errorlevel 1 %cecho% error "Failed to build libraries." & exit /B %ERRORLEVEL%
%cecho% info "Build %SourceName%"
call "%~dp0build\build.bat" release autologin jsonapi plugins nativedialogs
call "%~dp0build\build.bat" release autologin jsonapi plugins nativedialogs service
if errorlevel 1 %cecho% error "Failed to build %SourceName%." & exit /B %ERRORLEVEL%
%cecho% info "Pack %SourceName%"
call "%~dp0build\pack.bat" release plugins
call "%~dp0build\pack.bat" release plugins service
if errorlevel 1 %cecho% error "Failed to pack %SourceName%." & exit /B %ERRORLEVEL%
%cecho% info "Build installer"

View File

@ -9,7 +9,7 @@ call "%EnvPath%\env.bat"
if errorlevel 1 goto error_env
:: Initialize environment
call "%~dp0env.bat" release
call "%~dp0env.bat" installer release
if errorlevel 2 exit /B 2
if errorlevel 1 goto error_env

View File

@ -9,7 +9,7 @@ call "%EnvPath%\env.bat"
if errorlevel 1 goto error_env
:: Initialize environment
call "%~dp0env.bat" %*
call "%~dp0env.bat" build %*
if errorlevel 2 exit /B 2
if errorlevel 1 goto error_env
@ -49,11 +49,14 @@ echo.
title Build - %SourceName%-%RsBuildConfig% [qmake]
set RS_QMAKE_CONFIG=%RsBuildConfig% no_rs_cppwarning
set RS_QMAKE_CONFIG=%RsBuildConfig%
if "%ParamAutologin%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_autologin
if "%ParamJsonApi%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_jsonapi
if "%ParamPlugins%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% retroshare_plugins
if "%ParamUseNativeDialogs%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_use_native_dialogs
if "%ParamService%" NEQ "1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% no_retroshare_service
if "%ParamFriendServer%" NEQ "1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% no_rs_friendserver
if "%ParamEmbeddedFriendServer%"=="1" set RS_QMAKE_CONFIG=%RS_QMAKE_CONFIG% rs_efs
qmake "%SourcePath%\RetroShare.pro" -r -spec win32-g++ "CONFIG+=%RS_QMAKE_CONFIG%" "EXTERNAL_LIB_DIR=%BuildLibsPath%\libs"
if errorlevel 1 goto error

View File

@ -4,11 +4,17 @@ set ParamDebug=0
set ParamAutologin=0
set ParamPlugins=0
set ParamJsonApi=0
set ParamService=0
set ParamFriendServer=0
set ParamEmbeddedFriendServer=0
set ParamUseNativeDialogs=0
set ParamTor=0
set NonInteractive=0
set CoreCount=%NUMBER_OF_PROCESSORS%
set Module=%~1
shift /1
:parameter_loop
if "%~1" NEQ "" (
for /f "tokens=1,2 delims==" %%a in ("%~1") do (
@ -20,6 +26,12 @@ if "%~1" NEQ "" (
set ParamAutologin=1
) else if "%%~a"=="jsonapi" (
set ParamJsonApi=1
) else if "%%~a"=="service" (
set ParamService=1
) else if "%%~a"=="friendserver" (
set ParamFriendServer=1
) else if "%%~a"=="embedded-friendserver" (
set ParamEmbeddedFriendServer=1
) else if "%%~a"=="plugins" (
set ParamPlugins=1
) else if "%%~a"=="tor" (
@ -32,7 +44,7 @@ if "%~1" NEQ "" (
set ParamUseNativeDialogs=1
) else (
echo.
echo Unknown parameter %1
echo Unknown parameter %1 for %Module%
goto :usage
)
)
@ -104,19 +116,29 @@ echo.
echo Mandatory parameter
echo release^|debug Build release or debug version
echo.
echo Optional parameter (need clean when changed)
echo autologin Build with autologin
echo jsonapi Build with jsonapi
echo plugins Build plugins
echo nativedialogs Build with native dialogs
echo.
echo Optional parameter
echo singlethread Use only 1 thread for building
echo.
echo Parameter for pack
echo tor Pack tor version
echo.
echo Parameter for git-log
echo non-interactive Non-interactive mode
if "%Module%"=="build" (
echo Optional parameter ^(need clean when changed^)
echo autologin Build with autologin
echo jsonapi Build with jsonapi
echo service Build service
echo friendserver Build Friend Server
echo embedded-friendserver Build with embedded Friend Server
echo plugins Build plugins
echo nativedialogs Build with native dialogs
echo.
echo Optional parameter
echo singlethread Use only 1 thread for building
)
if "%Module%"=="pack" (
echo Optional parameter
echo service Pack service
echo friendserver Pack Friend Server ^(needs Tor^)
echo tor Pack Tor version
echo plugins Pack plugins
)
if "%Module%"=="git-log" (
echo Optional parameter
echo non-interactive Non-interactive mode
)
echo.
exit /B 2

View File

@ -8,7 +8,7 @@ if errorlevel 1 goto error_env
call "%EnvPath%\env.bat"
if errorlevel 1 goto error_env
call "%~dp0env.bat" %*
call "%~dp0env.bat" git-log %*
if errorlevel 2 exit /B 2
if errorlevel 1 goto error_env

View File

@ -11,7 +11,7 @@ call "%EnvPath%\env.bat"
if errorlevel 1 goto error_env
:: Initialize environment
call "%~dp0env.bat" %*
call "%~dp0env.bat" pack %*
if errorlevel 2 exit /B 2
if errorlevel 1 goto error_env
@ -95,9 +95,23 @@ copy nul "%RsDeployPath%\portable" %Quite%
echo copy binaries
copy "%RsBuildPath%\retroshare-gui\src\%RsBuildConfig%\retroshare*.exe" "%RsDeployPath%" %Quite%
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
if exist "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" copy "%RsBuildPath%\libretroshare\src\lib\retroshare.dll" "%RsDeployPath%" %Quite%
if "%ParamService%"=="1" (
copy "%RsBuildPath%\retroshare-service\src\%RsBuildConfig%\retroshare*-service.exe" "%RsDeployPath%" %Quite%
if errorlevel 1 %cecho% error "Service not found"& goto error
)
if "%ParamFriendServer%"=="1" (
if "%ParamTor%"=="1" (
copy "%RsBuildPath%\retroshare-friendserver\src\%RsBuildConfig%\retroshare-friendserver.exe" "%RsDeployPath%" %Quite%
if errorlevel 1 %cecho% error "Friend Server not found"& goto error
) else (
%cecho% error "Friend Server needs Tor"
goto error
)
)
echo copy extensions
if "%ParamPlugins%"=="1" (
for /D %%D in ("%RsBuildPath%\plugins\*") do (

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Instal·la ${APPNAME} i els components necessaris."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Pells"
!insertmacro LANG_STRING Section_Data_Desc "Instal·la pells."
!insertmacro LANG_STRING Section_Shortcuts "Icones d'accés directe"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Installiert ${APPNAME} und die benötigten Komponenten."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installiert Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installiert Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installiert Friend Server."
!insertmacro LANG_STRING Section_Data "Skins"
!insertmacro LANG_STRING Section_Data_Desc "Skins installieren."
!insertmacro LANG_STRING Section_Shortcuts "Verknüpfungssymbole"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Installs ${APPNAME} and required components."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Skins"
!insertmacro LANG_STRING Section_Data_Desc "Installs skins."
!insertmacro LANG_STRING Section_Shortcuts "Shortcut icons"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Instala ${APPNAME} y los componentes requeridos."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Coberturas (skins)"
!insertmacro LANG_STRING Section_Data_Desc "Instalar coberturas"
!insertmacro LANG_STRING Section_Shortcuts "Iconos de accesos directos"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Installe ${APPNAME} et les composants requis."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Habillages"
!insertmacro LANG_STRING Section_Data_Desc "Installe des habillages."
!insertmacro LANG_STRING Section_Shortcuts "Icônes de raccourci"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Instaluje ${APPNAME} oraz wymagane komponenty."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Skórki"
!insertmacro LANG_STRING Section_Data_Desc "Instaluje skórki."
!insertmacro LANG_STRING Section_Shortcuts "Ikony skrótów"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Установка ${APPNAME} и необходимых компонентов."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Оболочки"
!insertmacro LANG_STRING Section_Data_Desc "Установка оболочек."
!insertmacro LANG_STRING Section_Shortcuts "Ярлыки"

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "${APPNAME} ve gerekli bileşenleri kurar."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "Temalar"
!insertmacro LANG_STRING Section_Data_Desc "Tema yükleyin."
!insertmacro LANG_STRING Section_Shortcuts "Kısayol simgeleri"

View File

@ -22,6 +22,34 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Section_Service</name>
<message>
<source>Service</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Section_Service_Desc</name>
<message>
<source>Installs Service.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Section_FriendServer</name>
<message>
<source>Friend Server</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Section_FriendServer_Desc</name>
<message>
<source>Installs Friend Server.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Section_Data</name>
<message>

View File

@ -2,6 +2,10 @@
!insertmacro LANG_STRING Section_Main_Desc "Installs ${APPNAME} and required components."
!insertmacro LANG_STRING Section_Tor "Tor"
!insertmacro LANG_STRING Section_Tor_Desc "Installs Tor."
!insertmacro LANG_STRING Section_Service "Service"
!insertmacro LANG_STRING Section_Service_Desc "Installs Service."
!insertmacro LANG_STRING Section_FriendServer "Friend Server"
!insertmacro LANG_STRING Section_FriendServer_Desc "Installs Friend Server."
!insertmacro LANG_STRING Section_Data "皮肤"
!insertmacro LANG_STRING Section_Data_Desc "安装皮肤"
!insertmacro LANG_STRING Section_Shortcuts "快捷方式图标"

View File

@ -60,6 +60,9 @@
!define /date DATE "%Y%m%d"
!endif
# Service
${!defineifexist} SERVICE_EXISTS "${RELEASEDIR}\retroshare-service\src\release\retroshare-service.exe"
# Tor
!ifdef TORDIR
${!defineifexist} TOR_EXISTS "${TORDIR}\tor.exe"
@ -68,6 +71,12 @@ ${!defineifexist} TOR_EXISTS "${TORDIR}\tor.exe"
!endif
!endif
# Friend Server
!ifdef TOR_EXISTS
# Add Friend Server with Tor only
#${!defineifexist} FRIENDSERVER_EXISTS "${RELEASEDIR}\retroshare-friendserver\src\release\retroshare-friendserver.exe"
!endif
# Application name and version
!define APPNAME "RetroShare"
!define APPNAMEANDVERSION "${APPNAME} ${VERSION}"
@ -193,7 +202,6 @@ Section $(Section_Main) Section_Main
; Main binaries
SetOutPath "$INSTDIR"
File "${RELEASEDIR}\retroshare-gui\src\release\retroshare.exe"
File "${RELEASEDIR}\retroshare-service\src\release\retroshare-service.exe"
File /nonfatal "${RELEASEDIR}\libretroshare\src\lib\retroshare.dll"
; Qt binaries
@ -282,6 +290,22 @@ Section $(Section_Main) Section_Main
File /r "${SOURCEDIR}\retroshare-gui\src\license\*.*"
SectionEnd
# Service
!ifdef SERVICE_EXISTS
Section /o $(Section_Service) Section_Service
SetOutPath "$INSTDIR"
File "${RELEASEDIR}\retroshare-service\src\release\retroshare-service.exe"
SectionEnd
!endif
# Friend Server
!ifdef FRIENDSERVER_EXISTS
Section /o $(Section_FriendServer) Section_FriendServer
SetOutPath "$INSTDIR"
File "${RELEASEDIR}\retroshare-friendserver\src\release\retroshare-friendserver.exe"
SectionEnd
!endif
# Tor
!ifdef TOR_EXISTS
Section /o $(Section_Tor) Section_Tor
@ -355,6 +379,22 @@ Section $(Section_StartMenu) Section_StartMenu
CreateDirectory "$SMPROGRAMS\${APPNAME}"
CreateShortCut "$SMPROGRAMS\${APPNAME}\$(Link_Uninstall).lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\retroshare.exe" "" "$INSTDIR\retroshare.exe" 0
!ifdef SERVICE_EXISTS
SectionGetFlags ${Section_Service} $0
IntOp $0 $0 & ${SF_SELECTED}
${If} $0 == ${SF_SELECTED}
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME} Service.lnk" "$INSTDIR\retroshare-service.exe" "" "$INSTDIR\retroshare-service.exe" 0
${EndIf}
!endif
!ifdef FRIENDSERVER_EXISTS
SectionGetFlags ${Section_FriendServer} $0
IntOp $0 $0 & ${SF_SELECTED}
${If} $0 == ${SF_SELECTED}
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME} Friend Server.lnk" "$INSTDIR\retroshare-friendserver.exe" "" "$INSTDIR\retroshare-friendserver.exe" 0
${EndIf}
!endif
SectionEnd
Section $(Section_Desktop) Section_Desktop
@ -407,6 +447,8 @@ SectionEnd
; !insertmacro MUI_DESCRIPTION_TEXT ${Section_Link} $(Section_Link_Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${Section_AutoStart} $(Section_AutoStart_Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Tor} $(Section_Tor_Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${Section_Service} $(Section_Service_Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${Section_FriendServer} $(Section_FriendServer_Desc)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
# Uninstall
@ -461,6 +503,26 @@ Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
!ifdef FRIENDSERVER_EXISTS
Function .onSelChange
SectionGetFlags ${Section_FriendServer} $0
IntOp $0 $0 & ${SF_SELECTED}
${If} $0 == ${SF_SELECTED}
# Activate Tor and set readonly
SectionGetFlags ${Section_Tor} $1
IntOp $1 $1 | ${SF_SELECTED}
IntOp $1 $1 | ${SF_RO}
SectionSetFlags ${Section_Tor} $1
${Else}
# Remove readonly from Tor
SectionGetFlags ${Section_Tor} $1
IntOp $2 ${SF_RO} ~
IntOp $1 $1 & $2
SectionSetFlags ${Section_Tor} $1
${EndIf}
FunctionEnd
!endif
# Installation mode
Function RequireAdmin

View File

@ -44,6 +44,7 @@ unix {
win32-g++|win32-clang-g++ {
dLib = ws2_32 iphlpapi crypt32
LIBS *= $$linkDynamicLibs(dLib)
CONFIG += console
}
################################### COMMON stuff ##################################

View File

@ -22,19 +22,20 @@
#include "ChatLobbyWidget.h"
#include "notifyqt.h"
#include "RetroShareLink.h"
#include "chat/ChatLobbyDialog.h"
#include "chat/ChatLobbyUserNotify.h"
#include "chat/ChatTabWidget.h"
#include "chat/CreateLobbyDialog.h"
#include "common/FilesDefs.h"
#include "common/RSTreeWidgetItem.h"
#include "common/RSElidedItemDelegate.h"
#include "gui/RetroShareLink.h"
#include "gui/gxs/GxsIdDetails.h"
#include "gui/Identity/IdEditDialog.h"
#include "gui/settings/rsharesettings.h"
#include "gxs/GxsIdDetails.h"
#include "Identity/IdEditDialog.h"
#include "settings/rsharesettings.h"
#include "util/HandleRichText.h"
#include "util/misc.h"
#include "util/QtVersion.h"
#include "gui/common/FilesDefs.h"
#include "retroshare/rsmsgs.h"
#include "retroshare/rspeers.h"
@ -206,28 +207,29 @@ ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WindowFlags flags)
// load settings
processSettings(true);
QString help_str = tr("\
<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Chat Rooms</h1> \
<p>Chat rooms work pretty much like IRC. \
They allow you to talk anonymously with tons of people without the need to make friends.</p> \
<p>A chat room can be public (your friends see it) or private (your friends can't see it, unless you \
invite them with <img src=\":/icons/png/add.png\" width=%2/>). \
Once you have been invited to a private room, you will be able to see it when your friends \
are using it.</p> \
<p>The list at left shows \
chat lobbies your friends are participating in. You can either \
<ul> \
<li>Right click to create a new chat room</li> \
<li>Double click a chat room to enter, chat, and show it to your friends</li> \
</ul> \
Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!\
</p> \
"
).arg(QString::number(4*W), QString::number(2*W)) ;
int hbH = misc::getFontSizeFactor("HelpButton").height();
QString help_str = tr(
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Chat Rooms</h1>"
"<p>Chat rooms work pretty much like IRC."
" They allow you to talk anonymously with tons of people without the need to make friends.</p>"
"<p>A chat room can be public (your friends see it) or private (your friends can't see it, unless you"
" invite them with <img src=\":/icons/png/add.png\" width=%2/>)."
" Once you have been invited to a private room, you will be able to see it when your friends"
" are using it.</p>"
"<p>The list at left shows"
" chat lobbies your friends are participating in. You can either"
" <ul>"
" <li>Right click to create a new chat room</li>"
" <li>Double click a chat room to enter, chat, and show it to your friends</li>"
" </ul>"
" Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!"
"</p>"
).arg(QString::number(2*hbH), QString::number(hbH)) ;
registerHelpButton(ui.helpButton,help_str,"ChatLobbyDialog") ;
ui.lobbyTreeWidget->setIconSize(QSize(H*1.5,H*1.5));
int ltwH = misc::getFontSizeFactor("LobbyTreeWidget", 1.5).height();
ui.lobbyTreeWidget->setIconSize(QSize(ltwH,ltwH));
}
ChatLobbyWidget::~ChatLobbyWidget()
@ -306,9 +308,6 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_UNSUBSCRIBE), tr("Leave this room"), this, SLOT(unsubscribeItem()));
else
{
QTreeWidgetItem *item = ui.lobbyTreeWidget->currentItem();
//ChatLobbyId id = item->data(COLUMN_DATA, ROLE_ID).toULongLong();
ChatLobbyFlags flags(item->data(COLUMN_DATA, ROLE_FLAGS).toUInt());
bool removed = false ;
@ -373,7 +372,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
void ChatLobbyWidget::lobbyChanged()
{
updateDisplay();
ChatLobbyWidget::updateDisplay();
}
static void updateItem(QTreeWidget *treeWidget, QTreeWidgetItem *item, ChatLobbyId id, const std::string &name, const std::string &topic, int count, bool subscribed, bool autoSubscribe,ChatLobbyFlags lobby_flags)
@ -607,7 +606,7 @@ void ChatLobbyWidget::updateDisplay()
QTreeWidgetItem *itemLoop = lobby_other_item->child(childIndex);
if (itemLoop->type() == TYPE_LOBBY && itemLoop->data(COLUMN_DATA, ROLE_ID).toULongLong() == lobby.lobby_id) {
delete(lobby_other_item->takeChild(lobby_other_item->indexOfChild(itemLoop)));
childCnt = lobby_other_item->childCount();
//childCnt = lobby_other_item->childCount();
break;
}
}

View File

@ -56,18 +56,18 @@ class ChatLobbyWidget : public RsAutoUpdatePage
public:
/** Default constructor */
ChatLobbyWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0);
ChatLobbyWidget(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
/** Default destructor */
~ChatLobbyWidget();
virtual QIcon iconPixmap() const { return QIcon(IMAGE_CHATLOBBY) ; } //MainPage
virtual QString pageName() const { return tr("Chats") ; } //MainPage
virtual QString helpText() const { return ""; } //MainPage
virtual QIcon iconPixmap() const override { return QIcon(IMAGE_CHATLOBBY) ; } //MainPage
virtual QString pageName() const override { return tr("Chats") ; } //MainPage
virtual QString helpText() const override { return ""; } //MainPage
virtual UserNotify *createUserNotify(QObject *parent) override; //MainPage
virtual void updateDisplay();
virtual void updateDisplay() override; //RsAutoUpdatePage
void setCurrentChatPage(ChatLobbyDialog *) ; // used by ChatLobbyDialog to raise.
void addChatPage(ChatLobbyDialog *) ;

View File

@ -231,6 +231,10 @@ SharedFilesDialog::SharedFilesDialog(bool remote_mode, QWidget *parent)
/* Set Multi Selection */
ui.dirTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
QFontMetricsF fontMetrics(ui.dirTreeView->font());
int iconHeight = fontMetrics.height() * 1.5;
ui.dirTreeView->setIconSize(QSize(iconHeight, iconHeight));
/* Hide platform specific features */
copylinkAct = new QAction(QIcon(IMAGE_COPYLINK), tr( "Copy retroshare Links to Clipboard" ), this );
connect( copylinkAct , SIGNAL( triggered() ), this, SLOT( copyLink() ) );

View File

@ -352,6 +352,11 @@ border-image: url(:/images/closepressed.png)
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>

View File

@ -449,7 +449,7 @@ public:
case COLUMN_SOURCES:
{
int active = 0;
QString fileHash = QString::fromStdString(fileInfo.hash.toStdString());
//QString fileHash = QString::fromStdString(fileInfo.hash.toStdString());
if (fileInfo.downloadStatus != FT_STATE_COMPLETE)
for (std::vector<TransferInfo>::const_iterator pit = fileInfo.peers.begin() ; pit != fileInfo.peers.end(); ++pit)
@ -635,27 +635,27 @@ public:
for(auto it(downHashes.begin());it!=downHashes.end();++it,++i)
{
FileInfo fileInfo(mDownloads[i]); // we dont update the data itself but only a copy of it....
int old_size = fileInfo.peers.size() ;
int old_peers_size = fileInfo.peers.size() ;
rsFiles->FileDetails(*it, RS_FILE_HINTS_DOWNLOAD, fileInfo);
int new_size = fileInfo.peers.size() ;
if(old_size < new_size)
if(old_peers_size < new_size)
{
beginInsertRows(index(i,0), old_size, new_size-1);
insertRows(old_size, new_size - old_size,index(i,0));
beginInsertRows(index(i,0), old_peers_size, new_size-1);
insertRows(old_peers_size, new_size - old_peers_size,index(i,0));
#ifdef DEBUG_DOWNLOADLIST
std::cerr << "called insert rows ( " << old_size << ", " << new_size - old_size << ",index(" << index(i,0)<< "))" << std::endl;
std::cerr << "called insert rows ( " << old_peers_size << ", " << new_size - old_peers_size << ",index(" << index(i,0)<< "))" << std::endl;
#endif
endInsertRows();
}
else if(new_size < old_size)
else if(new_size < old_peers_size)
{
beginRemoveRows(index(i,0), new_size, old_size-1);
removeRows(new_size, old_size - new_size,index(i,0));
beginRemoveRows(index(i,0), new_size, old_peers_size-1);
removeRows(new_size, old_peers_size - new_size,index(i,0));
#ifdef DEBUG_DOWNLOADLIST
std::cerr << "called remove rows ( " << old_size << ", " << old_size - new_size << ",index(" << index(i,0)<< "))" << std::endl;
std::cerr << "called remove rows ( " << old_peers_size << ", " << old_peers_size - new_size << ",index(" << index(i,0)<< "))" << std::endl;
#endif
endRemoveRows();
}
@ -742,7 +742,7 @@ private:
class SortByNameItem : public QStandardItem
{
public:
SortByNameItem(QHeaderView *header) : QStandardItem()
explicit SortByNameItem(QHeaderView *header) : QStandardItem()
{
this->header = header;
}
@ -780,9 +780,9 @@ private:
class ProgressItem : public SortByNameItem
{
public:
ProgressItem(QHeaderView *header) : SortByNameItem(header) {}
explicit ProgressItem(QHeaderView *header) : SortByNameItem(header) {}
virtual bool operator<(const QStandardItem &other) const
virtual bool operator<(const QStandardItem &other) const override
{
const int role = model() ? model()->sortRole() : Qt::DisplayRole;
@ -1077,24 +1077,23 @@ TransfersDialog::TransfersDialog(QWidget *parent)
// load settings
processSettings(true);
int S = static_cast<int>(QFontMetricsF(font()).height());
int H = misc::getFontSizeFactor("HelpButton").height();
QString help_str = tr(
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;"
"File Transfer</h1>"
" File Transfer</h1>"
"<p>Retroshare brings two ways of transferring files: direct "
"transfers from your friends, and distant anonymous tunnelled "
"transfers. In addition, file transfer is multi-source and "
"allows swarming (you can be a source while downloading)</p>"
" transfers from your friends, and distant anonymous tunnelled "
" transfers. In addition, file transfer is multi-source and "
" allows swarming (you can be a source while downloading)</p>"
"<p>You can share files using the "
"<img src=\":/images/directoryadd_24x24_shadow.png\" width=%2 />"
" <img src=\":/images/directoryadd_24x24_shadow.png\" width=%2 />"
" icon from the left side bar. These files will be listed in "
"the My Files tab. You can decide for each friend group whether"
" the My Files tab. You can decide for each friend group whether"
" they can or not see these files in their Friends Files tab</p>"
"<p>The search tab reports files from your friends' file lists,"
" and distant files that can be reached anonymously using the "
"multi-hop tunnelling system.</p>")
.arg(QString::number(2*S)).arg(QString::number(S)) ;
" multi-hop tunnelling system.</p>"
).arg(QString::number(2*H), QString::number(H)) ;
registerHelpButton(ui.helpButton,help_str,"TransfersDialog") ;
@ -1584,7 +1583,6 @@ int TransfersDialog::addULItem(int row, const FileInfo &fileInfo)
//unique combination: fileHash + peerId, variant: hash + peerName (too long)
QString hashFileAndPeerId = fileHash + QString::fromStdString(transferInfo.peerId.toStdString());
qlonglong completed = transferInfo.transfered;
double peerULSpeed = transferInfo.tfRate * 1024.0;
@ -1602,6 +1600,7 @@ int TransfersDialog::addULItem(int row, const FileInfo &fileInfo)
peerpinfo.type = FileProgressInfo::UPLOAD_LINE ;
peerpinfo.nb_chunks = peerpinfo.cmap._map.empty()?0:nb_chunks ;
qlonglong completed = 0;
if(filled_chunks > 0 && nb_chunks > 0)
{
completed = peerpinfo.cmap.computeProgress(fileInfo.size,chunk_size) ;
@ -1720,9 +1719,6 @@ void TransfersDialog::insertTransfers()
{
// Since downloads use an AstractItemModel, we just need to update it, while saving the selected and expanded items.
std::set<QString> expanded_hashes ;
std::set<QString> selected_hashes ;
DLListModel->update_transfers();
// Now show upload hashes. Here we use the "old" way, since the number of uploads is generally not so large.
@ -1957,16 +1953,16 @@ void TransfersDialog::pasteLink()
RsCollection col ;
RSLinkClipboard::pasteLinks(links,RetroShareLink::TYPE_FILE_TREE);
for(QList<RetroShareLink>::const_iterator it(links.begin());it!=links.end();++it)
for(auto &it: links)
{
auto ft = RsFileTree::fromRadix64((*it).radix().toStdString());
auto ft = RsFileTree::fromRadix64(it.radix().toStdString());
col.merge_in(*ft);
}
links.clear();
RSLinkClipboard::pasteLinks(links,RetroShareLink::TYPE_FILE);
for(QList<RetroShareLink>::const_iterator it(links.begin());it!=links.end();++it)
col.merge_in((*it).name(),(*it).size(),RsFileHash((*it).hash().toStdString())) ;
for(auto &it : links)
col.merge_in(it.name(),it.size(),RsFileHash(it.hash().toStdString())) ;
col.downloadFiles();
}
@ -1985,7 +1981,7 @@ void TransfersDialog::getDLSelectedItems(std::set<RsFileHash> *ids, std::set<int
int i, imax = selectedRows.count();
for (i = 0; i < imax; ++i) {
QModelIndex index = selectedRows.at(i);
if (index.parent().isValid())
if (index.parent().isValid() && index.model())
index = index.model()->index(index.parent().row(), COLUMN_ID);
if (ids) {

View File

@ -129,19 +129,19 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
ui.nicknameLabel->setText(QString::fromUtf8(pd.name.c_str()) + " (" + QString::fromUtf8(pd.location.c_str())+")");
}
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
" <h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Network</h1> \
<p>The Network tab shows your friend Retroshare nodes: the neighbor Retroshare nodes that are connected to you. \
</p> \
<p>You can group nodes together to allow a finer level of information access, for instance to only allow \
some nodes to see some of your files.</p> \
<p>On the right, you will find 3 useful tabs: \
<ul> \
<li>Broadcast sends messages to all connected nodes at once</li> \
<li>Local network graph shows the network around you, based on discovery information</li> \
<li>Keyring contains node keys you collected, mostly forwarded to you by your friend nodes</li> \
</ul> </p> \
") ;
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Network</h1>"
"<p>The Network tab shows your friend Retroshare nodes: the neighbor Retroshare nodes that are connected to you.</p>"
"<p>You can group nodes together to allow a finer level of information access, for instance to only allow"
" some nodes to see some of your files.</p>"
"<p>On the right, you will find 3 useful tabs:"
" <ul>"
" <li>Broadcast sends messages to all connected nodes at once</li>"
" <li>Local network graph shows the network around you, based on discovery information</li>"
" <li>Keyring contains node keys you collected, mostly forwarded to you by your friend nodes</li>"
" </ul> </p>"
).arg(QString::number(2*H));
registerHelpButton(ui.helpButton, hlp_str,"FriendsDialog") ;
}

View File

@ -24,6 +24,7 @@
#include "retroshare/rsinit.h"
#include "util/qtthreadsutils.h"
#include "util/misc.h"
#include "gui/notifyqt.h"
#include "gui/msgs/MessageComposer.h"
@ -100,18 +101,17 @@ HomePage::HomePage(QWidget *parent) :
connect(ui->openwebhelp,SIGNAL(clicked()), this,SLOT(openWebHelp())) ;
int S = QFontMetricsF(font()).height();
int H = misc::getFontSizeFactor("HelpButton").height();
QString help_str = tr(
" <h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Welcome to Retroshare!</h1>\
<p>You need to <b>make friends</b>! After you create a network of friends or join an existing network,\
you'll be able to exchange files, chat, talk in forums, etc. </p>\
<div align=center>\
<IMG align=\"center\" width=\"%2\" src=\":/images/network_map.png\"/> \
</div>\
<p>To do so, copy your Retroshare ID on this page and send it to friends, and add your friends' Retroshare ID.</p> \
<p>Another option is to search the internet for \"Retroshare chat servers\" (independently administrated). These servers allow you to exchange \
Retroshare ID with a dedicated Retroshare node, through which\
you will be able to anonymously meet other people.</p> ").arg(QString::number(2*S)).arg(width()*0.5);
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Welcome to Retroshare!</h1>"
"<p>You need to <b>make friends</b>! After you create a network of friends or join an existing network,"
" you'll be able to exchange files, chat, talk in forums, etc. </p>"
"<div align=\"center\"><IMG width=\"%2\" height=\"%3\" src=\":/images/network_map.png\" style=\"display: block; margin-left: auto; margin-right: auto; \"/></div>"
"<p>To do so, copy your Retroshare ID on this page and send it to friends, and add your friends' Retroshare ID.</p>"
"<p>Another option is to search the internet for \"Retroshare chat servers\" (independently administrated). These servers allow you to exchange"
" Retroshare ID with a dedicated Retroshare node, through which"
" you will be able to anonymously meet other people.</p>"
).arg(QString::number(2*H), QString::number(width()*0.5), QString::number(width()*0.5*(337.0/800.0)));//<img> needs height and width defined.
registerHelpButton(ui->helpButton,help_str,"HomePage") ;
// register a event handler to catch IP updates
@ -249,13 +249,8 @@ void HomePage::updateOwnCert()
ui->retroshareid->setToolTip(description);
}
static void sendMail(QString sAddress, QString sSubject, QString sBody)
static void sendMail(const QString &sAddress, const QString &sSubject, const QString &sBody)
{
#ifdef Q_OS_WIN
/* search and replace the end of lines with: "%0D%0A" */
sBody.replace("\n", "%0D%0A");
#endif
QUrl url = QUrl("mailto:" + sAddress);
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
@ -265,7 +260,12 @@ static void sendMail(QString sAddress, QString sSubject, QString sBody)
#endif
urlQuery.addQueryItem("subject", sSubject);
#ifdef Q_OS_WIN
/* search and replace the end of lines with: "%0D%0A" */
urlQuery.addQueryItem("body", QString(sBody).replace("\n", "%0D%0A"));
#else
urlQuery.addQueryItem("body", sBody);
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
url.setQuery(urlQuery);

View File

@ -385,20 +385,22 @@ IdDialog::IdDialog(QWidget *parent)
mStateHelper->setActive(IDDIALOG_IDDETAILS, false);
mStateHelper->setActive(IDDIALOG_REPLIST, false);
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
" <h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Identities</h1> \
<p>In this tab you can create/edit <b>pseudo-anonymous identities</b>, and <b>circles</b>.</p> \
<p><b>Identities</b> are used to securely identify your data: sign messages in chat lobbies, forum and channel posts,\
receive feedback using the Retroshare built-in email system, post comments \
after channel posts, chat using secured tunnels, etc.</p> \
<p>Identities can optionally be <b>signed</b> by your Retroshare node's certificate. \
Signed identities are easier to trust but are easily linked to your node's IP address.</p> \
<p><b>Anonymous identities</b> allow you to anonymously interact with other users. They cannot be \
spoofed, but noone can prove who really owns a given identity.</p> \
<p><b>Circles</b> are groups of identities (anonymous or signed), that are shared at a distance over the network. They can be \
used to restrict the visibility to forums, channels, etc. </p> \
<p>An <b>circle</b> can be restricted to another circle, thereby limiting its visibility to members of that circle \
or even self-restricted, meaning that it is only visible to invited members.</p>") ;
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Identities</h1>"
"<p>In this tab you can create/edit <b>pseudo-anonymous identities</b>, and <b>circles</b>.</p>"
"<p><b>Identities</b> are used to securely identify your data: sign messages in chat lobbies, forum and channel posts,"
" receive feedback using the Retroshare built-in email system, post comments"
" after channel posts, chat using secured tunnels, etc.</p>"
"<p>Identities can optionally be <b>signed</b> by your Retroshare node's certificate."
" Signed identities are easier to trust but are easily linked to your node's IP address.</p>"
"<p><b>Anonymous identities</b> allow you to anonymously interact with other users. They cannot be"
" spoofed, but noone can prove who really owns a given identity.</p>"
"<p><b>Circles</b> are groups of identities (anonymous or signed), that are shared at a distance over the network. They can be"
" used to restrict the visibility to forums, channels, etc. </p>"
"<p>An <b>circle</b> can be restricted to another circle, thereby limiting its visibility to members of that circle"
" or even self-restricted, meaning that it is only visible to invited members.</p>"
).arg(QString::number(2*H));
registerHelpButton(ui->helpButton, hlp_str,"PeopleDialog") ;

View File

@ -18,12 +18,14 @@
* *
*******************************************************************************/
#include <QToolButton>
#include <QTimer>
#include <retroshare-gui/mainpage.h>
#include "common/FloatingHelpBrowser.h"
#include "gui/settings/rsharesettings.h"
#include "util/misc.h"
#include <QToolButton>
#include <QTimer>
MainPage::MainPage(QWidget *parent , Qt::WindowFlags flags ) : QWidget(parent, flags)
{
@ -46,11 +48,11 @@ void MainPage::registerHelpButton(QToolButton *button, const QString& help_html_
{
mHelpCodeName = code_name ;
if (mHelpBrowser == NULL)
if (mHelpBrowser == nullptr)
mHelpBrowser = new FloatingHelpBrowser(this, button) ;
float S = QFontMetricsF(button->font()).height() ;
button->setIconSize(QSize(S,S)) ;
int H = misc::getFontSizeFactor("HelpButton").height();
button->setIconSize(QSize(H, H)) ;//Square Icon
mHelpBrowser->setHelpText(help_html_text) ;
}

View File

@ -32,6 +32,7 @@
#include <retroshare/rsplugin.h>
#include <retroshare/rsposted.h>
#include "util/misc.h"
#include "util/qtthreadsutils.h"
#include "feeds/BoardsCommentsItem.h"
#include "feeds/ChatMsgItem.h"
@ -111,22 +112,23 @@ NewsFeed::NewsFeed(QWidget *parent) : MainPage(parent), ui(new Ui::NewsFeed),
connect(ui->feedOptionsButton, SIGNAL(clicked()), this, SLOT(feedoptions()));
ui->feedOptionsButton->hide(); // (csoler) Hidden until we repare the system to display a specific settings page.
QString hlp_str = tr(
" <h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Activity Feed</h1> \
<p>The Activity Feed displays the last events on your network, sorted by the time you received them. \
This gives you a summary of the activity of your friends. \
You can configure which events to show by pressing on <b>Options</b>. </p> \
<p>The various events shown are: \
<ul> \
<li>Connection attempts (useful to make friends with new people and control who's trying to reach you)</li> \
<li>Channel, Forum and Board posts</li> \
<li>Circle membership requests and invites</li> \
<li>New Channels, Forums and Boards you can subscribe to</li> \
<li>Channel and Board comments</li> \
<li>New Mail messages</li> \
<li>Private messages from your friends</li> \
</ul> </p> \
") ;
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Activity Feed</h1>"
"<p>The Activity Feed displays the last events on your network, sorted by the time you received them."
" This gives you a summary of the activity of your friends."
" You can configure which events to show by pressing on <b>Options</b>. </p>"
"<p>The various events shown are:"
" <ul>"
" <li>Connection attempts (useful to make friends with new people and control who's trying to reach you)</li>"
" <li>Channel, Forum and Board posts</li>"
" <li>Circle membership requests and invites</li>"
" <li>New Channels, Forums and Boards you can subscribe to</li>"
" <li>Channel and Board comments</li>"
" <li>New Mail messages</li>"
" <li>Private messages from your friends</li>"
" </ul> </p>"
).arg(QString::number(2*H));
registerHelpButton(ui->helpButton,hlp_str,"NewFeed") ;

View File

@ -26,6 +26,7 @@
#include "gui/gxs/GxsGroupShareKey.h"
#include "gui/settings/rsharesettings.h"
#include "gui/common/GroupTreeWidget.h"
#include "util/misc.h"
#include "util/qtthreadsutils.h"
#include <retroshare/rsposted.h>
@ -95,14 +96,19 @@ UserNotify *PostedDialog::createUserNotify(QObject *parent)
QString PostedDialog::getHelpString() const
{
QString hlp_str = tr("<h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Boards</h1> \
<p>The Boards service allows you to share images, blog posts & internet links, that spread among Retroshare nodes like forums and \
channels</p> \
<p>Posts can be commented by subscribed users. A promotion system also gives the opportunity to \
enlight important links.</p> \
<p>There is no restriction on which links are shared. Be careful when clicking on them.</p>\
<p>Boards are kept for %1 days, and sync-ed over the last %2 days, unless you change this.</p>\
").arg(QString::number(rsPosted->getDefaultStoragePeriod()/86400)).arg(QString::number(rsPosted->getDefaultSyncPeriod()/86400));
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Boards</h1>"
"<p>The Boards service allows you to share images, blog posts & internet links, that spread among Retroshare nodes like forums and"
" channels</p>"
"<p>Posts can be commented by subscribed users. A promotion system also gives the opportunity to"
" enlight important links.</p>"
"<p>There is no restriction on which links are shared. Be careful when clicking on them.</p>"
"<p>Boards are kept for %2 days, and sync-ed over the last %3 days, unless you change this.</p>"
).arg( QString::number(2*H)
, QString::number(rsPosted->getDefaultStoragePeriod()/86400)
, QString::number(rsPosted->getDefaultSyncPeriod()/86400));
return hlp_str ;
}

View File

@ -136,7 +136,7 @@ void RetroshareDirModel::treeStyle()
{
categoryIcon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/folder.png"), QIcon::Normal, QIcon::Off);
categoryIcon.addPixmap(FilesDefs::getPixmapFromQtResourcePath(":/icons/folderopen.png"), QIcon::Normal, QIcon::On);
peerIcon = FilesDefs::getIconFromQtResourcePath(":/images/user/identity16.png");
peerIcon = FilesDefs::getIconFromQtResourcePath(":/icons/folder-account.svg");
}
void TreeStyle_RDM::update()
{

View File

@ -51,7 +51,7 @@ static QHash<QString, QPixmap> iconcache;
void Emoticons::load()
{
loadSmiley();
filters << "*.png" << "*.jpg" << "*.gif";
filters << "*.png" << "*.jpg" << "*.gif" << "*.webp";
stickerFolders << (QString::fromStdString(RsAccounts::AccountDirectory()) + "/stickers"); //under account, unique for user
stickerFolders << (QString::fromStdString(RsAccounts::ConfigDirectory()) + "/stickers"); //under .retroshare, shared between users
stickerFolders << (QString::fromStdString(RsAccounts::systemDataDirectory()) + "/stickers"); //exe's folder, shipped with RS

View File

@ -156,7 +156,7 @@ QIcon FilesDefs::getIconFromGxsIdCache(const RsGxsId& id,const QIcon& setIcon, b
if (setIcon.isNull())
{
if (id.isNull())
return getIconFromQtResourcePath(":/icons/notification.png");
return getIconFromQtResourcePath(":/icons/notification.svg");
auto item = mIconCache.find(id);

View File

@ -199,7 +199,7 @@ void GxsIdTreeItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem
if(id.isNull())
{
if (ownOption.icon.isNull())
ownOption.icon = FilesDefs::getIconFromQtResourcePath(":/icons/notification.png");
ownOption.icon = FilesDefs::getIconFromQtResourcePath(":/icons/notification.svg");
}
else
{

View File

@ -35,6 +35,7 @@
#include "gui/notifyqt.h"
#include "gui/common/GroupTreeWidget.h"
#include "util/qtthreadsutils.h"
#include "util/misc.h"
// class GxsChannelGroupInfoData : public RsUserdata
// {
@ -91,7 +92,7 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
const RsGxsChannelSearchResultEvent*f = dynamic_cast<const RsGxsChannelSearchResultEvent*>(event.get());
if(nullptr != f)
for(auto it:f->mSearchResultsMap)
for(auto &it:f->mSearchResultsMap)
updateSearchResults(it.first);
}
@ -102,18 +103,23 @@ GxsChannelDialog::~GxsChannelDialog()
QString GxsChannelDialog::getHelpString() const
{
QString hlp_str = tr("<h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Channels</h1> \
<p>Channels allow you to post data (e.g. movies, music) that will spread in the network</p> \
<p>You can see the channels your friends are subscribed to, and you automatically forward subscribed channels to \
your friends. This promotes good channels in the network.</p>\
<p>Only the channel's creator can post on that channel. Other peers \
in the network can only read from it, unless the channel is private. You can however share \
the posting rights or the reading rights with friend Retroshare nodes.</p>\
<p>Channels can be made anonymous, or attached to a Retroshare identity so that readers can contact you if needed.\
Enable \"Allow Comments\" if you want to let users comment on your posts.</p>\
<p>Channel posts are kept for %1 days, and sync-ed over the last %2 days, unless you change this.</p>\
<p>UI Tip: use Control + mouse wheel to control image size in the thumbnail view.</p>\
").arg(QString::number(rsGxsChannels->getDefaultStoragePeriod()/86400)).arg(QString::number(rsGxsChannels->getDefaultSyncPeriod()/86400));
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Channels</h1>"
"<p>Channels allow you to post data (e.g. movies, music) that will spread in the network</p>"
"<p>You can see the channels your friends are subscribed to, and you automatically forward subscribed channels to"
" your friends. This promotes good channels in the network.</p>"
"<p>Only the channel's creator can post on that channel. Other peers"
" in the network can only read from it, unless the channel is private. You can however share"
" the posting rights or the reading rights with friend Retroshare nodes.</p>"
"<p>Channels can be made anonymous, or attached to a Retroshare identity so that readers can contact you if needed."
" Enable \"Allow Comments\" if you want to let users comment on your posts.</p>"
"<p>Channel posts are kept for %2 days, and sync-ed over the last %3 days, unless you change this.</p>"
"<p>UI Tip: use Control + mouse wheel to control image size in the thumbnail view.</p>"
).arg( QString::number(2*H)
, QString::number(rsGxsChannels->getDefaultStoragePeriod()/86400)
, QString::number(rsGxsChannels->getDefaultSyncPeriod()/86400));
return hlp_str ;
}
@ -259,12 +265,14 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF
rsGxsChannels->getChannelAutoDownload(grpId,autoDownload);
if (isSubscribed)
{
{
QAction *action = autoDownload ? (new QAction(FilesDefs::getIconFromQtResourcePath(":/images/redled.png"), tr("Disable Auto-Download"), this))
: (new QAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),tr("Enable Auto-Download"), this));
connect(action, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));
actions.append(action);
}
std::string dl_directory;
rsGxsChannels->getChannelDownloadDirectory(grpId,dl_directory) ;
@ -282,20 +290,20 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF
for(std::list<SharedDirInfo>::const_iterator it(lst.begin());it!=lst.end();++it)
{
QAction *action = NULL;
QAction *fileAction = NULL;
if(dl_directory == it->filename)
{
action = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),QString::fromUtf8(it->filename.c_str()),NULL) ;
fileAction = new QAction(FilesDefs::getIconFromQtResourcePath(":/images/start.png"),QString::fromUtf8(it->filename.c_str()),NULL) ;
found = true ;
}
else
action = new QAction(QString::fromUtf8(it->filename.c_str()),NULL) ;
fileAction = new QAction(QString::fromUtf8(it->filename.c_str()),NULL) ;
connect(action,SIGNAL(triggered()),this,SLOT(setDownloadDirectory())) ;
action->setData(QString::fromUtf8(it->filename.c_str())) ;
connect(fileAction,SIGNAL(triggered()),this,SLOT(setDownloadDirectory())) ;
fileAction->setData(QString::fromUtf8(it->filename.c_str())) ;
mnu->addAction(action) ;
mnu->addAction(fileAction) ;
}
if(!found && !dl_directory.empty())

View File

@ -24,9 +24,10 @@
#include "CreateGxsForumMsg.h"
#include "GxsForumUserNotify.h"
#include "gui/notifyqt.h"
#include "gui/gxs/GxsGroupShareKey.h"
#include "util/qtthreadsutils.h"
#include "gui/common/GroupTreeWidget.h"
#include "gui/gxs/GxsGroupShareKey.h"
#include "util/misc.h"
#include "util/qtthreadsutils.h"
class GxsForumGroupInfoData : public RsUserdata
{
@ -110,13 +111,17 @@ bool GxsForumsDialog::getGroupStatistics(const RsGxsGroupId& groupId,GxsGroupSta
QString GxsForumsDialog::getHelpString() const
{
int H = misc::getFontSizeFactor("HelpButton").height();
QString hlp_str = tr(
"<h1><img width=\"32\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Forums</h1> \
<p>Retroshare Forums look like internet forums, but they work in a decentralized way</p> \
<p>You see forums your friends are subscribed to, and you forward subscribed forums to \
your friends. This automatically promotes interesting forums in the network.</p> \
<p>Forum messages are kept for %1 days and sync-ed over the last %2 days, unless you configure it otherwise.</p>\
").arg(QString::number(rsGxsForums->getDefaultStoragePeriod()/86400)).arg(QString::number(rsGxsForums->getDefaultSyncPeriod()/86400));
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Forums</h1>"
"<p>Retroshare Forums look like internet forums, but they work in a decentralized way</p>"
"<p>You see forums your friends are subscribed to, and you forward subscribed forums to"
" your friends. This automatically promotes interesting forums in the network.</p>"
"<p>Forum messages are kept for %2 days and sync-ed over the last %3 days, unless you configure it otherwise.</p>"
).arg( QString::number(2*H)
, QString::number(rsGxsForums->getDefaultStoragePeriod()/86400)
, QString::number(rsGxsForums->getDefaultSyncPeriod()/86400));
return hlp_str ;
}
@ -233,9 +238,11 @@ void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *grou
groupItemInfo.description = QString::fromUtf8(forumGroupData->mDescription.c_str());
if (!groupData->mMeta.mCircleId.isNull() )
{
if (details.mRestrictedCircleId == details.mCircleId)
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums-red.png");
else
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums-signed.png");
}
}

View File

@ -340,5 +340,7 @@
<file>icons/notification.png</file>
<file>icons/wire.png</file>
<file>icons/wire-circle.png</file>
<file>icons/folder-account.svg</file>
<file>icons/notification.svg</file>
</qresource>
</RCC>

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg4"
sodipodi:docname="folder-account.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="21.666667"
inkscape:cx="12"
inkscape:cy="12.023077"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M19,17H11V16C11,14.67 13.67,14 15,14C16.33,14 19,14.67 19,16M15,9A2,2 0 0,1 17,11A2,2 0 0,1 15,13A2,2 0 0,1 13,11C13,9.89 13.9,9 15,9M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z"
id="path2"
style="fill:#039bd5;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg4"
sodipodi:docname="folder-open.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="21.666667"
inkscape:cx="12"
inkscape:cy="12.023077"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z"
id="path2"
style="fill:#039bd5;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg4"
sodipodi:docname="folder.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="21.666667"
inkscape:cx="12"
inkscape:cy="12.023077"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z"
id="path2"
style="fill:#039bd5;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
width="24"
height="24"
viewBox="0 0 24 24"
id="svg4"
sodipodi:docname="notification.svg"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="21.666667"
inkscape:cx="12"
inkscape:cy="12.023077"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M14,21A2,2 0 0,1 12,23A2,2 0 0,1 10,21"
id="path2"
style="fill:#039bd5;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -44,9 +44,10 @@
#include "gui/settings/rsharesettings.h"
#include "util/DateTime.h"
#include "util/RsProtectedTimer.h"
#include "util/misc.h"
#include "util/QtVersion.h"
#include "util/qtthreadsutils.h"
#include "util/RsProtectedTimer.h"
#include <retroshare/rspeers.h>
#include <retroshare/rsmsgs.h>
@ -227,6 +228,9 @@ MessagesDialog::MessagesDialog(QWidget *parent)
/* Set header sizes for the fixed columns and resize modes, must be set after processSettings */
msgwheader->setStretchLastSection(true);
QFontMetricsF fontMetrics(ui.messageTreeWidget->font());
int iconHeight = fontMetrics.height() * 1.4;
ui.messageTreeWidget->setIconSize(QSize(iconHeight, iconHeight));
// fill folder list
updateMessageSummaryList();
@ -254,17 +258,17 @@ MessagesDialog::MessagesDialog(QWidget *parent)
ui.tabWidget->hideCloseButton(0);
ui.tabWidget->setHideTabBarWithOneTab(true);
int S = QFontMetricsF(font()).height();
int H = misc::getFontSizeFactor("HelpButton").height();
QString help_str = tr(
" <h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Messages</h1> \
<p>Retroshare has its own internal email system. You can send/receive emails to/from connected friend nodes.</p> \
<p>It is also possible to send messages to other people's Identities using the global routing system. These messages \
are always encrypted and signed, and are relayed by intermediate nodes until they reach their final destination. </p>\
<p>Distant messages stay into your Outbox until an acknowledgement of receipt has been received.</p>\
<p>Generally, you may use messages to recommend files to your friends by pasting file links, \
or recommend friend nodes to other friend nodes, in order to strengthen your network, or send feedback \
to a channel's owner.</p> \
").arg(QString::number(2*S), QString::number(S)) ;
"<h1><img width=\"%1\" src=\":/icons/help_64.png\">&nbsp;&nbsp;Messages</h1>"
"<p>Retroshare has its own internal email system. You can send/receive emails to/from connected friend nodes.</p>"
"<p>It is also possible to send messages to other people's Identities using the global routing system. These messages"
" are always encrypted and signed, and are relayed by intermediate nodes until they reach their final destination. </p>"
"<p>Distant messages stay into your Outbox until an acknowledgement of receipt has been received.</p>"
"<p>Generally, you may use messages to recommend files to your friends by pasting file links,"
" or recommend friend nodes to other friend nodes, in order to strengthen your network, or send feedback"
" to a channel's owner.</p>"
).arg(QString::number(2*H)) ;
registerHelpButton(ui.helpButton,help_str,"MessagesDialog") ;

View File

@ -375,6 +375,11 @@
<enum>Qt::Vertical</enum>
</property>
<widget class="RSTreeView" name="messageTreeWidget">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>

View File

@ -19,17 +19,20 @@
* *
*******************************************************************************/
#include <QString>
#include "misc.h"
#include "gui/common/FilesDefs.h"
#include "util/rsdebug.h"
#include <QApplication>
#include <QBuffer>
#include <QByteArray>
#include <QDir>
#include <QFileDialog>
#include <QByteArray>
#include <QBuffer>
#include <time.h>
#include <QFontDialog>
#include <QString>
#include "misc.h"
#include "util/rsdebug.h"
#include "gui/common/FilesDefs.h"
#include <time.h>
// return best userfriendly storage unit (B, KiB, MiB, GiB, TiB)
// use Binary prefix standards from IEC 60027-2
@ -67,46 +70,44 @@ QString misc::fingerPrintStyleSplit(const QString& in)
bool misc::isPreviewable(QString extension)
{
extension = extension.toUpper();
if(extension == "AVI") return true;
if(extension == "MP3") return true;
if(extension == "OGG") return true;
if(extension == "OGM") return true;
if(extension == "WMV") return true;
if(extension == "WMA") return true;
if(extension == "MPEG") return true;
if(extension == "MPG") return true;
if(extension == "ASF") return true;
if(extension == "QT") return true;
if(extension == "RM") return true;
if(extension == "RMVB") return true;
if(extension == "RMV") return true;
if(extension == "SWF") return true;
if(extension == "FLV") return true;
if(extension == "WAV") return true;
if(extension == "MOV") return true;
if(extension == "VOB") return true;
if(extension == "MID") return true;
if(extension == "AC3") return true;
if(extension == "MP4") return true;
if(extension == "MP2") return true;
if(extension == "AVI") return true;
if(extension == "FLAC") return true;
if(extension == "AU") return true;
if(extension == "MPE") return true;
if(extension == "MOV") return true;
if(extension == "MKV") return true;
if(extension == "AIF") return true;
if(extension == "AIFF") return true;
if(extension == "AIFC") return true;
if(extension == "RA") return true;
if(extension == "RAM") return true;
if(extension == "M4P") return true;
if(extension == "M4A") return true;
if(extension == "3GP") return true;
if(extension == "AAC") return true;
if(extension == "SWA") return true;
if(extension == "AC3") return true;
if(extension == "AIF") return true;
if(extension == "AIFC") return true;
if(extension == "AIFF") return true;
if(extension == "ASF") return true;
if(extension == "AU") return true;
if(extension == "AVI") return true;
if(extension == "FLAC") return true;
if(extension == "FLV") return true;
if(extension == "M4P") return true;
if(extension == "M4A") return true;
if(extension == "MOV") return true;
if(extension == "MID") return true;
if(extension == "MKV") return true;
if(extension == "MP2") return true;
if(extension == "MP3") return true;
if(extension == "MP4") return true;
if(extension == "MPC") return true;
if(extension == "MPE") return true;
if(extension == "MPEG") return true;
if(extension == "MPG") return true;
if(extension == "MPP") return true;
if(extension == "OGG") return true;
if(extension == "OGM") return true;
if(extension == "QT") return true;
if(extension == "RA") return true;
if(extension == "RAM") return true;
if(extension == "RM") return true;
if(extension == "RMV") return true;
if(extension == "RMVB") return true;
if(extension == "SWA") return true;
if(extension == "SWF") return true;
if(extension == "VOB") return true;
if(extension == "WAV") return true;
if(extension == "WMA") return true;
if(extension == "WMV") return true;
return false;
}
@ -227,8 +228,6 @@ QString misc::userFriendlyUnit(double count, unsigned int decimal, double factor
return "0";
}
QString output;
int i;
for (i = 0; i < 5; ++i) {
if (count < factor) {
@ -434,3 +433,12 @@ void misc::clearLayout(QLayout * layout) {
//delete item;//Auto deleted by Qt.
}
}
QSizeF misc::getFontSizeFactor(const QString &group, const qreal defaultFactor /*= 1.0*/)
{
static qreal appFontWidth = QFontMetrics(QApplication::font()).maxWidth();
static qreal appFontHeight = QFontMetrics(QApplication::font()).height();
qreal factor = Settings->valueFromGroup("FontHeighFactor",group,defaultFactor).toReal();
return QSizeF(appFontWidth*factor,appFontHeight*factor);
}

View File

@ -22,14 +22,15 @@
#ifndef MISC_H
#define MISC_H
#include <stdexcept>
#include "gui/settings/rsharesettings.h"
#include <QFileDialog>
#include <QLayout>
#include <QObject>
#include <QPair>
#include <QThread>
#include <QFileDialog>
#include <QLayout>
#include "gui/settings/rsharesettings.h"
#include <stdexcept>
/* Miscellaneaous functions that can be useful */
class misc : public QObject
@ -165,15 +166,15 @@ class misc : public QObject
static QPixmap getOpenThumbnailedPicture(QWidget *parent, const QString &caption, int width, int height);
static bool getOpenFileName(QWidget *parent, RshareSettings::enumLastDir type
, const QString &caption, const QString &filter
, QString &file, QFileDialog::Options options = 0);
, QString &file, QFileDialog::Options options = QFileDialog::Options());
static bool getOpenFileNames(QWidget *parent, RshareSettings::enumLastDir type
, const QString &caption, const QString &filter
, QStringList &files, QFileDialog::Options options = 0);
, QStringList &files, QFileDialog::Options options = QFileDialog::Options());
static bool getSaveFileName(QWidget *parent, RshareSettings::enumLastDir type
, const QString &caption , const QString &filter
, QString &file, QString *selectedFilter = NULL
, QFileDialog::Options options = 0);
, QFileDialog::Options options = QFileDialog::Options());
static QFont getFont(bool *ok
, const QFont &initial
@ -187,6 +188,9 @@ class misc : public QObject
//Clear QLayout
static void clearLayout(QLayout *layout);
static QSizeF getFontSizeFactor(const QString &group, const qreal defaultFactor = 1.0);
static QSizeF getFontSizeFactor() {return getFontSizeFactor("Main");}
};
// Trick to get a portable sleep() function
@ -201,7 +205,7 @@ class SleeperThread : public QThread{
template<class T> class SignalsBlocker
{
public:
SignalsBlocker(T *blocked) : blocked(blocked), previous(blocked->blockSignals(true)) {}
explicit SignalsBlocker(T *blocked) : blocked(blocked), previous(blocked->blockSignals(true)) {}
~SignalsBlocker() { blocked->blockSignals(previous); }
T *operator->() { return blocked; }

View File

@ -87,12 +87,7 @@ macx {
################################# Windows ##########################################
win32-g++|win32-clang-g++ {
CONFIG(debug, debug|release) {
# show console output
CONFIG += console
} else {
CONFIG -= console
}
CONFIG(debug, debug|release) {
} else {