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" diff --git a/libbitdht b/libbitdht index 659423769..2ddc86fb5 160000 --- a/libbitdht +++ b/libbitdht @@ -1 +1 @@ -Subproject commit 659423769541169457c41f71c8a038e2d64ba079 +Subproject commit 2ddc86fb575a61170f4c06a00152e3e7dc74c8f4 diff --git a/libretroshare b/libretroshare index 5d7c50e21..a9d4447c5 160000 --- a/libretroshare +++ b/libretroshare @@ -1 +1 @@ -Subproject commit 5d7c50e2161ca11661b7b61c5a2663364aab5b59 +Subproject commit a9d4447c5660337b4f7945d20e0f4ffd68d918e9 diff --git a/retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp b/retroshare-gui/src/gui/FileTransfer/SearchDialog.cpp index 5f7889790..c421e67e0 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; } 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" || 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; 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; }