Open own group files from the conversation header
This commit is contained in:
1 parent
5ed813fe06
commit
8f908c320a
3 files changed
+16
-1
No files matched your search
@@ -610,7 +610,7 @@ void MainWindow::setupConnects() {
|
||||
m_messageList, &MessageList::reloadLocalNicks);
|
||||
connect(m_accountList, &AccountList::filesRequested, this, &MainWindow::showMemberFiles);
|
||||
connect(m_channelList, &ChannelList::filesRequested, this, [this](const QString& channel) { showMemberFiles(channel); });
|
||||
connect(m_channelList, &ChannelList::ownFilesRequested, this, [this](const QString& channel) {
|
||||
connect(m_messageList, &MessageList::ownFilesRequested, this, [this](const QString& channel) {
|
||||
quint64 owner = m_db ? m_db->myNodeId() : 0;
|
||||
if (!channel.toULongLong() || !owner) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_MEDIA, "file browser: own files unavailable channel=%s owner=%llu",
|
||||
|
||||
@@ -386,6 +386,18 @@ MessageList::MessageList(DbManager* db, AudioRecorder* recorder, QWidget *parent
|
||||
m_talkingLabel->hide();
|
||||
hl->addWidget(m_talkingLabel);
|
||||
|
||||
m_ownFilesButton = new QPushButton(header);
|
||||
m_ownFilesButton->setObjectName("ownFilesButton");
|
||||
m_ownFilesButton->setIcon(style()->standardIcon(QStyle::SP_DirOpenIcon));
|
||||
m_ownFilesButton->setIconSize(QSize(24, 24));
|
||||
m_ownFilesButton->setFixedSize(34, 30);
|
||||
m_ownFilesButton->setCursor(Qt::PointingHandCursor);
|
||||
m_ownFilesButton->setToolTip(QCoreApplication::translate("ChatGui", "My files in the selected group"));
|
||||
m_ownFilesButton->setAccessibleName(m_ownFilesButton->toolTip());
|
||||
m_ownFilesButton->hide();
|
||||
hl->addWidget(m_ownFilesButton);
|
||||
connect(m_ownFilesButton, &QPushButton::clicked, this, [this] { emit ownFilesRequested(m_currentChannelId); });
|
||||
|
||||
m_inviteBtn = new QPushButton(QStringLiteral("+"), header);
|
||||
m_inviteBtn->setAccessibleName(QCoreApplication::translate("ChatGui", "Invite to group"));
|
||||
m_inviteBtn->setToolTip(QCoreApplication::translate("ChatGui", "Invite to group"));
|
||||
@@ -703,6 +715,7 @@ void MessageList::loadChannel(const QString& channelId) {
|
||||
m_avatarCache.clear();
|
||||
if (m_currentChannelId != channelId) { m_feedback.clear(); m_pendingPoll.clear(); }
|
||||
m_currentChannelId = channelId;
|
||||
m_ownFilesButton->setVisible(channelId.toULongLong() != 0);
|
||||
m_pollBtn->setVisible(!isDmChannel(channelId));
|
||||
clearDmCallRoute();
|
||||
m_callBtn->setVisible(isDmChannel(channelId));
|
||||
|
||||
@@ -53,6 +53,7 @@ signals:
|
||||
void openVideoRequested(const QString& filePath);
|
||||
void openImageRequested(const QString& filePath);
|
||||
void inviteRequested(const QString& sourceChannel, quint64 peer, const QString& name);
|
||||
void ownFilesRequested(const QString& channelId);
|
||||
void linkActivated(const QString& link);
|
||||
|
||||
private:
|
||||
@@ -74,6 +75,7 @@ private:
|
||||
QLabel* m_talkingLabel = nullptr; /* шапка: кто говорит в рации */
|
||||
QPushButton* m_callBtn = nullptr;
|
||||
QPushButton* m_inviteBtn = nullptr;
|
||||
QPushButton* m_ownFilesButton = nullptr;
|
||||
quint64 m_callPeer = 0;
|
||||
quint64 m_callGroup = 0;
|
||||
QPushButton* m_radioBtn = nullptr; /* шапка: переключатель рации */
|
||||
|
||||
Reference in new issue
Block a user