From 47d89a69594b76a61dcb1674e07b9e37a2520958 Mon Sep 17 00:00:00 2001
From: RetroPooh Chat rooms work pretty much like IRC. \
- They allow you to talk anonymously with tons of people without the need to make friends. A chat room can be public (your friends see it) or private (your friends can't see it, unless you \
- invite them with The list at left shows \
- chat lobbies your friends are participating in. You can either \
-
\
- Chat Rooms
). \
- Once you have been invited to a private room, you will be able to see it when your friends \
- are using it.
\
-
\
- Note: For the chat rooms to work properly, your computer needs be on time. So check your system clock!\
-
Chat rooms work pretty much like IRC." + " They allow you to talk anonymously with tons of people without the need to make friends.
" + "A chat room can be public (your friends see it) or private (your friends can't see it, unless you"
+ " invite them with )."
+ " Once you have been invited to a private room, you will be able to see it when your friends"
+ " are using it.
The list at left shows" + " chat lobbies your friends are participating in. You can either" + "
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)
" - "You can share files using the "
- ""
- " icon from the left side bar. These files will be listed in "
- "the My Files tab. You can decide for each friend group whether"
- " they can or not see these files in their Friends Files tab
The search tab reports files from your friends' file lists," - " and distant files that can be reached anonymously using the " - "multi-hop tunnelling system.
") - .arg(QString::number(2*S)).arg(QString::number(S)) ; - + "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)
" + "You can share files using the "
+ " "
+ " icon from the left side bar. These files will be listed in "
+ " the My Files tab. You can decide for each friend group whether"
+ " they can or not see these files in their Friends Files tab
The search tab reports files from your friends' file lists," + " and distant files that can be reached anonymously using the " + " multi-hop tunnelling system.
" + ).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::setThe Network tab shows your friend Retroshare nodes: the neighbor Retroshare nodes that are connected to you. \ -
\ -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.
\ -On the right, you will find 3 useful tabs: \ -
The Network tab shows your friend Retroshare nodes: the neighbor Retroshare nodes that are connected to you.
" + "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.
" + "On the right, you will find 3 useful tabs:" + "
You need to make friends! After you create a network of friends or join an existing network,\ - you'll be able to exchange files, chat, talk in forums, etc.
\ -To do so, copy your Retroshare ID on this page and send it to friends, and add your friends' Retroshare ID.
\ -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.
").arg(QString::number(2*S)).arg(width()*0.5); - registerHelpButton(ui->helpButton,help_str,"HomePage") ; + int H = misc::getFontSizeFactor("HelpButton").height(); + QString help_str = tr( + "You need to make friends! After you create a network of friends or join an existing network," + " you'll be able to exchange files, chat, talk in forums, etc.
" + "To do so, copy your Retroshare ID on this page and send it to friends, and add your friends' Retroshare ID.
" + "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.
" + ).arg(QString::number(2*H), QString::number(width()*0.5), QString::number(width()*0.5*(337.0/800.0)));//In this tab you can create/edit pseudo-anonymous identities, and circles.
\ -Identities 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.
\ -Identities can optionally be signed by your Retroshare node's certificate. \ - Signed identities are easier to trust but are easily linked to your node's IP address.
\ -Anonymous identities allow you to anonymously interact with other users. They cannot be \ - spoofed, but noone can prove who really owns a given identity.
\ -Circles 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.
\ -An circle 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.
") ; + "In this tab you can create/edit pseudo-anonymous identities, and circles.
" + "Identities 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.
" + "Identities can optionally be signed by your Retroshare node's certificate." + " Signed identities are easier to trust but are easily linked to your node's IP address.
" + "Anonymous identities allow you to anonymously interact with other users. They cannot be" + " spoofed, but noone can prove who really owns a given identity.
" + "Circles 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.
" + "An circle 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.
" + ).arg(QString::number(2*H)); registerHelpButton(ui->helpButton, hlp_str,"PeopleDialog") ; diff --git a/retroshare-gui/src/gui/MainPage.cpp b/retroshare-gui/src/gui/MainPage.cpp index 545f1270e..6136343d7 100644 --- a/retroshare-gui/src/gui/MainPage.cpp +++ b/retroshare-gui/src/gui/MainPage.cpp @@ -18,12 +18,14 @@ * * *******************************************************************************/ -#includeThe 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 Options.
\ -The various events shown are: \ -
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 Options.
" + "The various events shown are:" + "
The Boards service allows you to share images, blog posts & internet links, that spread among Retroshare nodes like forums and \ - channels
\ -Posts can be commented by subscribed users. A promotion system also gives the opportunity to \ - enlight important links.
\ -There is no restriction on which links are shared. Be careful when clicking on them.
\ -Boards are kept for %1 days, and sync-ed over the last %2 days, unless you change this.
\ - ").arg(QString::number(rsPosted->getDefaultStoragePeriod()/86400)).arg(QString::number(rsPosted->getDefaultSyncPeriod()/86400)); + int H = misc::getFontSizeFactor("HelpButton").height(); + + QString hlp_str = tr( + "The Boards service allows you to share images, blog posts & internet links, that spread among Retroshare nodes like forums and" + " channels
" + "Posts can be commented by subscribed users. A promotion system also gives the opportunity to" + " enlight important links.
" + "There is no restriction on which links are shared. Be careful when clicking on them.
" + "Boards are kept for %2 days, and sync-ed over the last %3 days, unless you change this.
" + ).arg( QString::number(2*H) + , QString::number(rsPosted->getDefaultStoragePeriod()/86400) + , QString::number(rsPosted->getDefaultSyncPeriod()/86400)); return hlp_str ; } diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp index 5c6d1ae31..1abed7c64 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp @@ -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 // { @@ -90,8 +91,8 @@ void GxsChannelDialog::handleEvent_main_thread(std::shared_ptrChannels allow you to post data (e.g. movies, music) that will spread in the network
\ -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.
\ -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.
\ -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.
\ -Channel posts are kept for %1 days, and sync-ed over the last %2 days, unless you change this.
\ -UI Tip: use Control + mouse wheel to control image size in the thumbnail view.
\ - ").arg(QString::number(rsGxsChannels->getDefaultStoragePeriod()/86400)).arg(QString::number(rsGxsChannels->getDefaultSyncPeriod()/86400)); + int H = misc::getFontSizeFactor("HelpButton").height(); + + QString hlp_str = tr( + "Channels allow you to post data (e.g. movies, music) that will spread in the network
" + "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.
" + "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.
" + "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.
" + "Channel posts are kept for %2 days, and sync-ed over the last %3 days, unless you change this.
" + "UI Tip: use Control + mouse wheel to control image size in the thumbnail view.
" + ).arg( QString::number(2*H) + , QString::number(rsGxsChannels->getDefaultStoragePeriod()/86400) + , QString::number(rsGxsChannels->getDefaultSyncPeriod()/86400)); return hlp_str ; } @@ -260,11 +266,13 @@ void GxsChannelDialog::groupTreeCustomActions(RsGxsGroupId grpId, int subscribeF 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)); + { + 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); + 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::listRetroshare Forums look like internet forums, but they work in a decentralized way
\ -You see forums your friends are subscribed to, and you forward subscribed forums to \ - your friends. This automatically promotes interesting forums in the network.
\ -Forum messages are kept for %1 days and sync-ed over the last %2 days, unless you configure it otherwise.
\ - ").arg(QString::number(rsGxsForums->getDefaultStoragePeriod()/86400)).arg(QString::number(rsGxsForums->getDefaultSyncPeriod()/86400)); + "Retroshare Forums look like internet forums, but they work in a decentralized way
" + "You see forums your friends are subscribed to, and you forward subscribed forums to" + " your friends. This automatically promotes interesting forums in the network.
" + "Forum messages are kept for %2 days and sync-ed over the last %3 days, unless you configure it otherwise.
" + ).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"); + } } diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp index c5c3c543c..d39baf6d5 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -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" #includeRetroshare has its own internal email system. You can send/receive emails to/from connected friend nodes.
\ -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.
\ -Distant messages stay into your Outbox until an acknowledgement of receipt has been received.
\ -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.
\ - ").arg(QString::number(2*S), QString::number(S)) ; + int H = misc::getFontSizeFactor("HelpButton").height(); + QString help_str = tr( + "Retroshare has its own internal email system. You can send/receive emails to/from connected friend nodes.
" + "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.
" + "Distant messages stay into your Outbox until an acknowledgement of receipt has been received.
" + "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.
" + ).arg(QString::number(2*H)) ; registerHelpButton(ui.helpButton,help_str,"MessagesDialog") ; diff --git a/retroshare-gui/src/util/misc.cpp b/retroshare-gui/src/util/misc.cpp index e63ad2fd6..c24ea2d11 100644 --- a/retroshare-gui/src/util/misc.cpp +++ b/retroshare-gui/src/util/misc.cpp @@ -19,17 +19,20 @@ * * *******************************************************************************/ -#includeThis configuration panel allows you to specify the onion address of a \ + friend server. Retroshare will talk to that server anonymously through Tor \ + and use it to acquire a fixed number of friends.
\ +The friend server will continue supplying new friends until that number is reached \ + in particular if you add your own friends manually, the friend server may become useless \ + and you will save bandwidth disabling it. When disabling it, you will keep existing friends.
\ +The friend server only knows your peer ID and profile public key. It doesn't know your IP address.
\ + " + ).arg(QString::number(2*H), QString::number(2*H)) ; + + registerHelpButton(helpButton,help_str,"Friend Server") ; + mConnectionCheckTimer = new QTimer; // init values @@ -69,18 +87,6 @@ FriendServerControl::FriendServerControl(QWidget *parent) serverStatusCheckResult_LB->setMovie(mCheckingServerMovie); updateFriendServerStatusIcon(false); - updateTorProxyInfo(); -} - -void FriendServerControl::updateTorProxyInfo() -{ - std::string friend_proxy_address; - uint16_t friend_proxy_port; - - RsTor::getProxyServerInfo(friend_proxy_address,friend_proxy_port); - - torProxyPort_SB->setValue(friend_proxy_port); - torProxyAddress_LE->setText(QString::fromStdString(friend_proxy_address)); } FriendServerControl::~FriendServerControl() @@ -92,7 +98,16 @@ FriendServerControl::~FriendServerControl() void FriendServerControl::onOnOffClick(bool b) { if(b) + { + if(passphrase_LE->text().isNull()) + { + QMessageBox::critical(nullptr,tr("Missing profile passphrase."),tr("Your profile passphrase is missing. Please enter is in the field below before enabling the friend server.")); + whileBlocking(friendServerOnOff_CB)->setCheckState(Qt::Unchecked); + return; + } + rsFriendServer->setProfilePassphrase(passphrase_LE->text().toStdString()); rsFriendServer->startServer(); + } else rsFriendServer->stopServer(); } diff --git a/retroshare-gui/src/gui/FriendServerControl.h b/retroshare-gui/src/gui/FriendServerControl.h index 7217bcd5d..465c5d1ec 100644 --- a/retroshare-gui/src/gui/FriendServerControl.h +++ b/retroshare-gui/src/gui/FriendServerControl.h @@ -22,9 +22,10 @@ #includeS}yQG zt#-A(`zpsVs}r+!ZqGwNk&G$BME?0Q)_Dt5a_LA6*CdmoL#=7Q0#6gGR1h07$W>+0 zVrsi52*H?^A5U<9Uh}7)!{R`RHsCtWTu`hOxJ)<;VwjByM*= zO{++yYZ;~v4`j5c&?(c 9W|twfwkT9uQ} z?4E{2XJI7svK>6lp|hy&OAts=-}yBVj+#hS`*ntbqGGxXN-MuHpIK?&_OL?n{ApOC z12{$JsLXLYlhm%a` 4!ylJ#)XJ+l|;wdd^lcC6LUDMTJLQ+I_ z+w0 z3X7#xsxAfw7xA#d#)MbFP?DT_)5ypOZ<(Lz(pg&g6YTcWzG|~-{^)6~J2=sZ?aJ!Y zT5RslK{BIl{ya?ErJt7&zOJC15{#DA6xyyKbQ}qEo(-;Y% )VQWcBr^vjzD=djA6vn#*EKVyzE;O!U% o5GQ|7+?Izko*DwZ2%Zs{b_Yxk$L|BOGez% literal 1704 zcmZ`&dpML?7(esP_c7x#W!#fXk=)Iot*nY7gB^rg+7jy;ikPsmnvrfQB)QCtNU}&` zySfxBEb%1FjBC5H$wq~!C1THqcAx!Y&vVXs&-=c=_xE1D=R51{Xe%wTN&)~NZO5>7 zfs&0M5)s~00~cqYKm)9pRsfVIOU`*?P}lHbxG(`YrVVik0DQvne*$on2Ed3H0Opwh zD2DMXcUb^HsB!+r%?1KMR;w6Sh-M2=t_Wmxpj-iwFC_Bd7J%Xf!0RM(MMRzmWOqX& z;0w`3FJRX!!BCzM;Xwc%f^Y>0UjV@vR{-++paptCRuAsQNgx1+fxLEPDFswvYHsHu z0B43&%PyEbYmt^O06D)SJRz3dxyaUva79?Q0H<1HLwR^c$gorxPPJI)(gPL=*bDGp zDiZQ6B1Ish2fkql?3xIBgdqzHOCflcjCQ=`RM-N}EQSvO4_w}S(UJ
q>~U=e_p zWo7|%VgC#SlB9Pmm&b(@76M*3%nPnS<1!oU7i4r1Ap>6ImlXI^;pm`>Gh-0L?OJ+6 z6%^wz`02WTS#1l&C6 Z_fW28lG@BpVnN2?nb(tjt}&i`F4B6Pu@@;hIC|{UR+Ww& zNiO4r{1 ib(DM zRiKvpfv#;o?Jc%XcP9eNBYf{*YYom|stl-*!x$bB08r}jL%6I@QGrHrmL1bZ{3W6w zP1mhU$maq;l(w_Ba*OVL%N;#HwURp}?xNXhBJF@0*chC%zt&-IDrt7t<+h|>YR~2R z(v;_+k>v(AW={Jw89#{d+Q^TZrH%cxd6qLgll@2KYBpVUd1Wu?Qii!E=0n93^1=J7 zy+jqe2lcxq^NL&o%e;M#JhDGA!t|f!cM0^U-62W0O2i$LJqR{pM+;^W3(6Ye*{NzF zch~0Tic=h7pN>A<(=jlqXi9OHE8{mF>U%3cP+ipHPf!af_h859g(wVM-NVDCDOFfx zui-QQ+qI?7MQB~j$9KVF?hoH2yH`q5R$J7E(MhaG!fPt$v2EF$JaQ$y<3PC<=UU6R zRWV6I9md$iqbKpm`gzZ ZxU6E%9<5oN~G`6p-^YfW*07 zq2gt|A!o9kUQwG{*j6$B`6M%--%x&&@rWeYI;`l2WYnXBYtGdAWm(qfRB6P<*=P^Q z4xu}}Slv1+tMs1Ood-@zSm{|kYW+A*OH)Z^w|XJLmC6~- N6}FGEs~;n4T|hnz#;&N(NwY}mYv_@rW?m%a*Z-iPm0~8r zO7!{gqtv!gqy~Ke48eU`plK4!UF1CLVA&;}oQR?mpw)PN{9&g?s!h&7L=8Pt%== z9r~z=)3A29y7pEgSxfoiuu@#wU=7%y!6a9s Wo;|tXf_ksnPSgm!A;*Ol%}t|g(Ky^Zg%@uUZlF=E%}zl2~JMnPHOwVe!@K< zlc_nQOUl`pf~c;H8`sxOIYnwsjoqWRgESpT_$XbgZak%O=X{a6TY6f
WVZF|Uq)HhS8o-M+tI?L1qzGU>}=&JYWuE%-N0y-MM~vW{ir z&hqtU`I-BK`#}LrXeKm6nu(!_i5uP2+-$SC8C{=7GpEt~*qHKv0uF`x9`yg={{!Tn zKfDeDl<^F%q5iBW?{Gg56%}Q4@NjU1k9U}#QD}Go@14ae2m*FCj@G5yz2g4{#8uDe From dadf59ac04c4192c85611b8e784761bb3014689c Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 27 Jan 2022 22:09:47 +0100 Subject: [PATCH 008/503] Added to fix font metrics for messages tree --- retroshare-gui/src/gui/msgs/MessagesDialog.cpp | 3 +++ retroshare-gui/src/gui/msgs/MessagesDialog.ui | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp index d39baf6d5..b2beba606 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -228,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(); diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.ui b/retroshare-gui/src/gui/msgs/MessagesDialog.ui index e0bf5c9a0..5f1d83eca 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.ui +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.ui @@ -375,6 +375,11 @@ Qt::Vertical + + + 10 + +From 8b5c4bc7c52c676d11fabe425f5b00a194d7e4f3 Mon Sep 17 00:00:00 2001 From: defnax Qt::CustomContextMenu Date: Fri, 28 Jan 2022 20:56:06 +0100 Subject: [PATCH 009/503] fixed the notification icon --- retroshare-gui/src/gui/common/FilesDefs.cpp | 2 +- .../src/gui/gxs/GxsIdTreeWidgetItem.cpp | 2 +- retroshare-gui/src/gui/icons.qrc | 1 + retroshare-gui/src/gui/icons/notification.svg | 38 +++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 retroshare-gui/src/gui/icons/notification.svg diff --git a/retroshare-gui/src/gui/common/FilesDefs.cpp b/retroshare-gui/src/gui/common/FilesDefs.cpp index b7f0192a4..4d9f9c903 100644 --- a/retroshare-gui/src/gui/common/FilesDefs.cpp +++ b/retroshare-gui/src/gui/common/FilesDefs.cpp @@ -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); diff --git a/retroshare-gui/src/gui/gxs/GxsIdTreeWidgetItem.cpp b/retroshare-gui/src/gui/gxs/GxsIdTreeWidgetItem.cpp index 4c1715a39..97f128447 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdTreeWidgetItem.cpp +++ b/retroshare-gui/src/gui/gxs/GxsIdTreeWidgetItem.cpp @@ -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 { diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index d28594130..89c0f83d9 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -341,5 +341,6 @@ icons/wire.png icons/wire-circle.png icons/folder-account.svg +icons/notification.svg diff --git a/retroshare-gui/src/gui/icons/notification.svg b/retroshare-gui/src/gui/icons/notification.svg new file mode 100644 index 000000000..c0cb95ba0 --- /dev/null +++ b/retroshare-gui/src/gui/icons/notification.svg @@ -0,0 +1,38 @@ + + From 00f82602d2d71e86e3d5654bf07537a6f5fe199c Mon Sep 17 00:00:00 2001 From: hunberndDate: Mon, 24 Jan 2022 22:28:01 +0100 Subject: [PATCH 010/503] Added support for other msys2 environments --- build_scripts/Windows-msys2/build/build.bat | 1 + .../Windows-msys2/build/env-base.bat | 76 ++++++++++++++----- build_scripts/Windows-msys2/build/env.bat | 8 +- 3 files changed, 60 insertions(+), 25 deletions(-) diff --git a/build_scripts/Windows-msys2/build/build.bat b/build_scripts/Windows-msys2/build/build.bat index 4d366f28c..c9ad27f9f 100644 --- a/build_scripts/Windows-msys2/build/build.bat +++ b/build_scripts/Windows-msys2/build/build.bat @@ -66,6 +66,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 diff --git a/build_scripts/Windows-msys2/build/env-base.bat b/build_scripts/Windows-msys2/build/env-base.bat index 9d9fa5379..883884262 100644 --- a/build_scripts/Windows-msys2/build/env-base.bat +++ b/build_scripts/Windows-msys2/build/env-base.bat @@ -1,6 +1,4 @@ :: Process commandline parameter -set Param32=0 -set Param64=0 set ParamRelease=0 set ParamDebug=0 set ParamAutologin=0 @@ -12,14 +10,36 @@ set ParamIndexing=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" ( @@ -52,22 +72,37 @@ if "%~1" NEQ "" ( goto parameter_loop ) -if "%Param32%"=="1" ( - if "%Param64%"=="1" ( - echo. - echo 32-bit or 64-bit? - goto :usage - ) - - set RsBit=32 - set RsArchitecture=x86 - set RsMSYS2Architecture=i686 +if %tcc% NEQ 1 ( + echo Multiple or no toolchain specified + goto :usage ) -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 +111,6 @@ if "%ParamClang%"=="1" ( set RsCompiler=GCC ) -if "%RsBit%"=="" goto :usage - if "%ParamRelease%"=="1" ( if "%ParamDebug%"=="1" ( echo. @@ -108,10 +141,13 @@ 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 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) diff --git a/build_scripts/Windows-msys2/build/env.bat b/build_scripts/Windows-msys2/build/env.bat index bfe2afeba..c8cb71ff4 100644 --- a/build_scripts/Windows-msys2/build/env.bat +++ b/build_scripts/Windows-msys2/build/env.bat @@ -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 From a3f6d516e793a56da31448884196ef9aee8dc828 Mon Sep 17 00:00:00 2001 From: hunbernd Date: Mon, 31 Jan 2022 01:05:32 +0100 Subject: [PATCH 011/503] Fix webui compilation Copy files, instead of using the symlink. --- build_scripts/Windows-msys2/build/build.bat | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build_scripts/Windows-msys2/build/build.bat b/build_scripts/Windows-msys2/build/build.bat index c9ad27f9f..972379aad 100644 --- a/build_scripts/Windows-msys2/build/build.bat +++ b/build_scripts/Windows-msys2/build/build.bat @@ -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 From af0bea49c5efc373e12b7cb72e5532d587e01f72 Mon Sep 17 00:00:00 2001 From: csoler Date: Mon, 31 Jan 2022 15:32:04 +0100 Subject: [PATCH 012/503] fixed using of rs_socket_error() --- libretroshare | 2 +- retroshare-friendserver/src/network.cc | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libretroshare b/libretroshare index 47548627a..55efaf9c7 160000 --- a/libretroshare +++ b/libretroshare @@ -1 +1 @@ -Subproject commit 47548627adddc444a5d36368bd7a5f5baeed17ba +Subproject commit 55efaf9c730859ef3fc5c6f6049595c1225f9204 diff --git a/retroshare-friendserver/src/network.cc b/retroshare-friendserver/src/network.cc index 3ed5b22a2..a607a89c2 100644 --- a/retroshare-friendserver/src/network.cc +++ b/retroshare-friendserver/src/network.cc @@ -134,7 +134,9 @@ bool FsNetworkInterface::checkForNewConnections() if(clintConnt < 0) { - if(errno == EWOULDBLOCK) + int err = rs_socket_error(); + + if(err == EWOULDBLOCK || err == EAGAIN) ;//RsErr()<< "Incoming connection with nothing to read!" << std::endl; else RsErr()<< "Error when accepting connection." << std::endl; From 1de12129da7cbff670eaf57b48212c861ce72e2c Mon Sep 17 00:00:00 2001 From: hunbernd Date: Mon, 31 Jan 2022 01:47:26 +0100 Subject: [PATCH 013/503] Friendserver support --- build_scripts/Windows-msys2/build/env-base.bat | 10 +++++++++- build_scripts/Windows-msys2/build/pack.bat | 3 +++ .../src/retroshare-friendserver.pro | 1 + retroshare-service/src/retroshare-service.pro | 7 +------ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build_scripts/Windows-msys2/build/env-base.bat b/build_scripts/Windows-msys2/build/env-base.bat index 883884262..01a7a8f12 100644 --- a/build_scripts/Windows-msys2/build/env-base.bat +++ b/build_scripts/Windows-msys2/build/env-base.bat @@ -7,6 +7,7 @@ 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= @@ -58,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+" ( @@ -137,11 +140,15 @@ 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^|other 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 (same as mingw32 or mingw64) @@ -157,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. diff --git a/build_scripts/Windows-msys2/build/pack.bat b/build_scripts/Windows-msys2/build/pack.bat index 4948c1541..ceefd0144 100644 --- a/build_scripts/Windows-msys2/build/pack.bat +++ b/build_scripts/Windows-msys2/build/pack.bat @@ -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 ( diff --git a/retroshare-friendserver/src/retroshare-friendserver.pro b/retroshare-friendserver/src/retroshare-friendserver.pro index 61c604e43..a566a0927 100644 --- a/retroshare-friendserver/src/retroshare-friendserver.pro +++ b/retroshare-friendserver/src/retroshare-friendserver.pro @@ -44,6 +44,7 @@ unix { win32-g++|win32-clang-g++ { dLib = ws2_32 iphlpapi crypt32 LIBS *= $$linkDynamicLibs(dLib) + CONFIG += console } ################################### COMMON stuff ################################## diff --git a/retroshare-service/src/retroshare-service.pro b/retroshare-service/src/retroshare-service.pro index 2c7a3d094..6458e03ed 100644 --- a/retroshare-service/src/retroshare-service.pro +++ b/retroshare-service/src/retroshare-service.pro @@ -87,12 +87,7 @@ macx { ################################# Windows ########################################## win32-g++|win32-clang-g++ { - CONFIG(debug, debug|release) { - # show console output - CONFIG += console - } else { - CONFIG -= console - } + CONFIG += console CONFIG(debug, debug|release) { } else { From 631b9b5f7a09fa45595b517e87c1bbfbc70dda8b Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 1 Feb 2022 20:01:38 +0100 Subject: [PATCH 014/503] Fix default font metrics for forums tree --- retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp | 4 ++++ retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index fb962ca5c..19c408336 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -321,6 +321,10 @@ GxsForumThreadWidget::GxsForumThreadWidget(const RsGxsGroupId &forumId, QWidget float f = QFontMetricsF(font()).height()/14.0f ; + QFontMetricsF fontMetrics(ui->threadTreeWidget->font()); + int iconHeight = fontMetrics.height() * 1.4; + ui->threadTreeWidget->setIconSize(QSize(iconHeight, iconHeight)); + /* Set header resize modes and initial section sizes */ QHeaderView * ttheader = ui->threadTreeWidget->header () ; diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui index b27354e8b..c74ea5ebb 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.ui @@ -233,6 +233,11 @@
You can use this Retroshare ID to make new friends. Send it by email, or give it hand to hand.
") ; - else - infotext += tr("You can use this certificate to make new friends. Send it by email, or give it hand to hand.
") ; + infotext += tr("You can use this Retroshare ID to make new friends. Send it by email, or give it hand to hand.
") ; + else + infotext += tr("You can use this certificate to make new friends. Send it by email, or give it hand to hand.
") ; return infotext; } diff --git a/retroshare-gui/src/gui/settings/CryptoPage.cpp b/retroshare-gui/src/gui/settings/CryptoPage.cpp index 99317c14d..450ae4330 100755 --- a/retroshare-gui/src/gui/settings/CryptoPage.cpp +++ b/retroshare-gui/src/gui/settings/CryptoPage.cpp @@ -103,7 +103,7 @@ void CryptoPage::showEvent ( QShowEvent * /*event*/ ) ui.pgpfingerprint->setText(misc::fingerPrintStyleSplit(QString::fromStdString(detail.fpr.toStdString()))); std::string invite ; - rsPeers->getShortInvite(invite,rsPeers->getOwnId(),RetroshareInviteFlags::RADIX_FORMAT | RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP); + rsPeers->getShortInvite(invite,rsPeers->getOwnId(),RetroshareInviteFlags::RADIX_FORMAT | RsPeers::defaultCertificateFlags); ui.retroshareid->setText(QString::fromUtf8(invite.c_str())); /* set retroshare version */ @@ -139,7 +139,7 @@ void CryptoPage::load() { std::string cert ; - RetroshareInviteFlags flags = RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP; + RetroshareInviteFlags flags = RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_LOCAL_IP | RetroshareInviteFlags::CURRENT_EXTERNAL_IP; if(ui._shortFormat_CB->isChecked()) { From 33800e9cb9561160d7e909e1a0d13bdd042f15a9 Mon Sep 17 00:00:00 2001 From: csolerB2X+&ViIn>H
zfl_ISPxs`=$K$dEhNWUTfELIA-}iBVKEtRUOr?^g(lr7gLpb*nYCZ9(amMdH#x9^k
zfn>tMV7au!!5wJ|v6$^Z%mV@`5wG5`m)gP=^h8%}uMta?D-~Q7G^VN`4h&_pylfcw
zn&3p>Ghez+O-W{}#2P?vF3)spi}_|V6@!N6yEY>aek(Zsqi0gpN(G{l}gf*6M55?~L5gj`1f
z&N-7(el_a4My6?wUZC&$aR&$?*wCUr{N5R3