From 83e3dc708b7746f63ba3c264531845f92a0dc5c4 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 1 Dec 2022 13:36:36 -0300 Subject: [PATCH 1/7] Use non-EOL ubuntu base image for GitlabCI --- build_scripts/GitlabCI/base.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_scripts/GitlabCI/base.Dockerfile b/build_scripts/GitlabCI/base.Dockerfile index 60d122a88..13097f58d 100644 --- a/build_scripts/GitlabCI/base.Dockerfile +++ b/build_scripts/GitlabCI/base.Dockerfile @@ -12,7 +12,7 @@ ## To run the container # docker run -it -p 127.0.0.1:9092:9092 "${CI_REGISTRY_IMAGE}" retroshare-service --jsonApiPort 9092 --jsonApiBindAddress 0.0.0.0 -FROM ubuntu:21.10 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV APT_UNAT="--assume-yes --quiet" From e2eb0d27a205b272cc4fe7b746f7359b00a0a2ac Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Mon, 12 Dec 2022 16:08:56 -0300 Subject: [PATCH 2/7] Update submodules --- libbitdht | 2 +- libretroshare | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libbitdht b/libbitdht index 659423769..6abbec950 160000 --- a/libbitdht +++ b/libbitdht @@ -1 +1 @@ -Subproject commit 659423769541169457c41f71c8a038e2d64ba079 +Subproject commit 6abbec95073f3c1eb5059cbf8441111ef4a317a7 diff --git a/libretroshare b/libretroshare index 5d7c50e21..a9d4447c5 160000 --- a/libretroshare +++ b/libretroshare @@ -1 +1 @@ -Subproject commit 5d7c50e2161ca11661b7b61c5a2663364aab5b59 +Subproject commit a9d4447c5660337b4f7945d20e0f4ffd68d918e9 From 12ef7240e9a993acf2d5479ee352bcebc442e503 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Mon, 12 Dec 2022 18:06:54 -0300 Subject: [PATCH 3/7] Update bitdht submodule after bdboot.txt path fix --- libbitdht | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libbitdht b/libbitdht index 6abbec950..2ddc86fb5 160000 --- a/libbitdht +++ b/libbitdht @@ -1 +1 @@ -Subproject commit 6abbec95073f3c1eb5059cbf8441111ef4a317a7 +Subproject commit 2ddc86fb575a61170f4c06a00152e3e7dc74c8f4 From d3d672dc0d60b6085bdbe73316f99ccf512463fe Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 20 Dec 2022 21:51:21 +0100 Subject: [PATCH 4/7] Added feature to expand To field * Added feature to expand To field * Fixed TreeVersion --- retroshare-gui/src/gui/msgs/MessageWidget.cpp | 29 +- retroshare-gui/src/gui/msgs/MessageWidget.h | 2 +- retroshare-gui/src/gui/msgs/MessageWidget.ui | 319 ++++++++++-------- .../src/gui/msgs/MessagesDialog.cpp | 2 +- 4 files changed, 201 insertions(+), 151 deletions(-) diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.cpp b/retroshare-gui/src/gui/msgs/MessageWidget.cpp index 7467e2e84..d74505e63 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.cpp +++ b/retroshare-gui/src/gui/msgs/MessageWidget.cpp @@ -135,6 +135,7 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags f isWindow = false; currMsgFlags = 0; expandFiles = false; + ui.expandButton->hide(); ui.actionTextBesideIcon->setData(Qt::ToolButtonTextBesideIcon); ui.actionIconOnly->setData(Qt::ToolButtonIconOnly); @@ -144,7 +145,8 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags f connect(ui.downloadButton, SIGNAL(clicked()), this, SLOT(getallrecommended())); connect(ui.msgText, SIGNAL(anchorClicked(QUrl)), this, SLOT(anchorClicked(QUrl))); connect(ui.sendInviteButton, SIGNAL(clicked()), this, SLOT(sendInvite())); - + connect(ui.expandButton, SIGNAL(clicked()), this, SLOT(expandTo())); + connect(ui.replyButton, SIGNAL(clicked()), this, SLOT(reply())); connect(ui.replyallButton, SIGNAL(clicked()), this, SLOT(replyAll())); connect(ui.forwardButton, SIGNAL(clicked()), this, SLOT(forward())); @@ -551,6 +553,9 @@ void MessageWidget::fill(const std::string &msgId) ui.deleteButton->setEnabled(false); ui.moreButton->setEnabled(false); + ui.expandButton->hide(); + ui.trans_ToText->setMaximumHeight(ui.trans_ToText->fontMetrics().lineSpacing()*1.5); + currMsgFlags = 0; return; @@ -635,6 +640,17 @@ void MessageWidget::fill(const std::string &msgId) ui.trans_ToText->setText(to_text); + int recipientsCount = ui.trans_ToText->toPlainText().split(QRegExp("(\\s|\\n|\\r)+"), QString::SkipEmptyParts).count(); + ui.expandButton->setText( QString::number(recipientsCount)+ " " + tr("more")); + + if (recipientsCount >=20) { + ui.expandButton->show(); + } else { + ui.expandButton->hide(); + ui.expandButton->setChecked(false); + ui.trans_ToText->setMaximumHeight(ui.trans_ToText->fontMetrics().lineSpacing()*1.5); + } + if (!cc_text.isNull()) { ui.ccLabel->setVisible(true); @@ -937,3 +953,14 @@ void MessageWidget::checkLength() ui.sizeLabel->setText(text); } + +void MessageWidget::expandTo() +{ + if (ui.expandButton->isChecked()) { + ui.trans_ToText->setMaximumHeight(ui.trans_ToText->fontMetrics().lineSpacing()*3.5); + ui.expandButton->setToolTip(tr("Show less")); + } else { + ui.trans_ToText->setMaximumHeight(ui.trans_ToText->fontMetrics().lineSpacing()*1.5); + ui.expandButton->setToolTip(tr("Show more")); + } +} diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.h b/retroshare-gui/src/gui/msgs/MessageWidget.h index 12438e55c..d6465e5cf 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.h +++ b/retroshare-gui/src/gui/msgs/MessageWidget.h @@ -72,7 +72,7 @@ private slots: void saveAs(); void refill(); void sendInvite(); - + void expandTo(); void msgfilelistWidgetCostumPopupMenu(QPoint); void messagesTagsChanged(); diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.ui b/retroshare-gui/src/gui/msgs/MessageWidget.ui index 6f544a01b..de580d7e5 100644 --- a/retroshare-gui/src/gui/msgs/MessageWidget.ui +++ b/retroshare-gui/src/gui/msgs/MessageWidget.ui @@ -51,93 +51,6 @@ 3 - - - - - 0 - 0 - - - - - 9 - - - - Bcc: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 9 - - - - To: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - 9 - - - - Cc: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - false - - - - - - - - 0 - 0 - - - - - 9 - - - - Tags: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -290,6 +203,114 @@ + + + + + 0 + 0 + + + + + 9 + + + + Tags: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 9 + + + + Subject: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 9 + + + + Cc: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + + + + + + 0 + 0 + + + + + 9 + + + + Bcc: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 9 + + + + To: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -313,6 +334,25 @@ + + + + + 0 + 0 + + + + + 16777215 + 16 + + + + true + + + @@ -346,45 +386,7 @@ - - - - - 0 - 0 - - - - - 16777215 - 16 - - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 16 - - - - true - - - - + @@ -403,30 +405,9 @@ - + - - - - - 0 - 0 - - - - - 9 - - - - Subject: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - @@ -448,6 +429,48 @@ + + + + 6 + + + + + + 0 + 0 + + + + + 16777215 + 16 + + + + true + + + + + + + + + + true + + + QToolButton::InstantPopup + + + Qt::ToolButtonTextBesideIcon + + + + + diff --git a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp index 42e45a96a..1fb55821f 100644 --- a/retroshare-gui/src/gui/msgs/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/msgs/MessagesDialog.cpp @@ -420,7 +420,7 @@ UserNotify *MessagesDialog::createUserNotify(QObject *parent) void MessagesDialog::processSettings(bool load) { - int messageTreeVersion = 3; // version number for the settings to solve problems when modifying the column count + int messageTreeVersion = 4; // version number for the settings to solve problems when modifying the column count inProcessSettings = true; From cae7797b55a691ccb757474e5f272fbe510d1bda Mon Sep 17 00:00:00 2001 From: AskOldIch Date: Tue, 3 Jan 2023 16:47:15 +0000 Subject: [PATCH 5/7] Added "previewable" for .webm and .weba extension - .webm -- basically is full video container (video+audio) - .weba -- is only audio stream --- retroshare-gui/src/util/misc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/retroshare-gui/src/util/misc.cpp b/retroshare-gui/src/util/misc.cpp index c24ea2d11..2f6337d1b 100644 --- a/retroshare-gui/src/util/misc.cpp +++ b/retroshare-gui/src/util/misc.cpp @@ -108,6 +108,8 @@ bool misc::isPreviewable(QString extension) if(extension == "WAV") return true; if(extension == "WMA") return true; if(extension == "WMV") return true; + if(extension == "WEBM") return true; + if(extension == "WEBA") return true; return false; } From c1b71053219e834f5b504dd85249f857736951da Mon Sep 17 00:00:00 2001 From: AskOldIch Date: Tue, 3 Jan 2023 16:54:03 +0000 Subject: [PATCH 6/7] Added extensions to SearchDialog - .webm -- basically is full video container (video+audio) - .weba -- is only audio stream - .webp -- is a picture --- retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp index b284fce3d..80087360a 100644 --- a/retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp +++ b/retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp @@ -286,7 +286,7 @@ void SearchDialog::initialiseFileTypeMappings() /* edit these strings to change the range of extensions recognised by the search */ SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_ANY, ""); SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_AUDIO, - "aac aif flac iff m3u m4a mid midi mp3 mpa ogg ra ram wav wma"); + "aac aif flac iff m3u m4a mid midi mp3 mpa ogg ra ram wav wma weba"); SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_ARCHIVE, "7z bz2 gz pkg rar sea sit sitx tar zip tgz"); SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_CDIMAGE, @@ -295,11 +295,11 @@ void SearchDialog::initialiseFileTypeMappings() "doc odt ott rtf pdf ps txt log msg wpd wps ods xls epub" ); SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_PICTURE, "3dm 3dmf ai bmp drw dxf eps gif ico indd jpe jpeg jpg mng pcx pcc pct pgm " - "pix png psd psp qxd qxprgb sgi svg tga tif tiff xbm xcf"); + "pix png psd psp qxd qxprgb sgi svg tga tif tiff xbm xcf webp"); SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_PROGRAM, "app bat cgi com bin exe js pif py pl sh vb ws bash"); SearchDialog::FileTypeExtensionMap->insert(FILETYPE_IDX_VIDEO, - "3gp asf asx avi mov mp4 mkv flv mpeg mpg qt rm swf vob wmv"); + "3gp asf asx avi mov mp4 mkv flv mpeg mpg qt rm swf vob wmv webm"); SearchDialog::initialised = true; } From 2cf95b410d5f9b1af79de3d465200ddafd44cabe Mon Sep 17 00:00:00 2001 From: AskOldIch Date: Tue, 3 Jan 2023 16:57:42 +0000 Subject: [PATCH 7/7] Added icons association with extensions - .webm -- basically is full video container (video+audio) - .weba -- is only audio stream - .webp -- is a picture --- retroshare-gui/src/gui/common/FilesDefs.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/gui/common/FilesDefs.cpp b/retroshare-gui/src/gui/common/FilesDefs.cpp index 0baaea837..0048d5685 100644 --- a/retroshare-gui/src/gui/common/FilesDefs.cpp +++ b/retroshare-gui/src/gui/common/FilesDefs.cpp @@ -33,13 +33,15 @@ static QString getInfoFromFilename(const QString& filename, bool anyForUnknown, { QString ext = QFileInfo(filename).suffix().toLower(); - if (ext == "jpg" || ext == "jpeg" || ext == "tif" || ext == "tiff" || ext == "png" || ext == "gif" || ext == "bmp" || ext == "ico" || ext == "svg") { + if (ext == "jpg" || ext == "jpeg" || ext == "tif" || ext == "tiff" || ext == "png" || ext == "gif" || + ext == "bmp" || ext == "ico" || ext == "svg" || ext == "webp") { return image ? ":/icons/filetype/picture.svg" : QApplication::translate("FilesDefs", "Picture"); } else if (ext == "avi" || ext == "mpg" || ext == "mpeg" || ext == "wmv" || ext == "divx" || ext == "ts" || ext == "mkv" || ext == "mp4" || ext == "flv" || ext == "mov" || ext == "asf" || ext == "xvid" || - ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp" || ext == "ogm") { + ext == "vob" || ext == "qt" || ext == "rm" || ext == "3gp" || ext == "ogm" || ext == "webm") { return image ? ":/icons/filetype/video.svg" : QApplication::translate("FilesDefs", "Video"); - } else if (ext == "ogg" || ext == "mp3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma" || ext == "m4a" || ext == "flac" ||ext == "xpm") { + } else if (ext == "ogg" || ext == "mp3" || ext == "mp1" || ext == "mp2" || ext == "wav" || ext == "wma" || + ext == "m4a" || ext == "flac" || ext == "xpm" || ext == "weba") { return image ? ":/icons/filetype/audio.svg" : QApplication::translate("FilesDefs", "Audio"); } else if (ext == "tar" || ext == "bz2" || ext == "zip" || ext == "gz" || ext == "7z" || ext == "msi" || ext == "rar" || ext == "rpm" || ext == "ace" || ext == "jar" || ext == "tgz" || ext == "lha" ||