From 42efbbc7da29959c515819731c6ea6a1abbb738e Mon Sep 17 00:00:00 2001 From: evgeny Date: Sat, 10 Oct 2026 11:07:02 +0200 Subject: [PATCH] Remove the file manager button from the channel footer --- tools/chatgui/src/channellist.cpp | 17 ----------------- tools/chatgui/src/channellist.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/tools/chatgui/src/channellist.cpp b/tools/chatgui/src/channellist.cpp index 2666faf7..ec44f810 100644 --- a/tools/chatgui/src/channellist.cpp +++ b/tools/chatgui/src/channellist.cpp @@ -193,21 +193,6 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent) connect(gearBtn, &QPushButton::clicked, this, [this] { emit settingsRequested(); }); - m_ownFilesButton = new QPushButton(footer); - m_ownFilesButton->setObjectName("ownFilesButton"); - m_ownFilesButton->setIcon(style()->standardIcon(QStyle::SP_DirOpenIcon)); - m_ownFilesButton->setFixedSize(28, 28); - m_ownFilesButton->setToolTip(QCoreApplication::translate("ChatGui", "My files in the selected group")); - m_ownFilesButton->setAccessibleName(m_ownFilesButton->toolTip()); - m_ownFilesButton->setStyleSheet( - "QPushButton { border: none; background: transparent; }" - "QPushButton:hover { background: rgba(51,144,236,20); border-radius: 14px; }"); - m_ownFilesButton->setEnabled(false); - fl->addWidget(m_ownFilesButton); - connect(m_ownFilesButton, &QPushButton::clicked, this, [this] { - emit ownFilesRequested(m_listView->currentIndex().data(ChannelChannelIdRole).toString()); - }); - auto *monitorBtn = new QPushButton(QString::fromUtf8("\xF0\x9F\x94\x8D"), footer); /* 🔍 */ monitorBtn->setFixedSize(28, 28); monitorBtn->setToolTip(QCoreApplication::translate("ChatGui", "Connection Monitor")); @@ -253,7 +238,6 @@ ChannelList::ChannelList(DbManager* db, QWidget *parent) connect(m_listView->selectionModel(), &QItemSelectionModel::currentChanged, this, [this](const QModelIndex ¤t, const QModelIndex &) { - m_ownFilesButton->setEnabled(current.data(ChannelChannelIdRole).toString().toULongLong() != 0); if (current.isValid()) { QString cid = current.data(ChannelChannelIdRole).toString(); emit channelSelected(cid); @@ -430,7 +414,6 @@ void ChannelList::loadChannels() { sel->select(idx, QItemSelectionModel::ClearAndSelect); sel->setCurrentIndex(idx, QItemSelectionModel::NoUpdate); } - m_ownFilesButton->setEnabled(m_listView->currentIndex().data(ChannelChannelIdRole).toString().toULongLong() != 0); } void ChannelList::selectChannel(const QString& channelId) { diff --git a/tools/chatgui/src/channellist.h b/tools/chatgui/src/channellist.h index c51fdc26..b3b9b762 100644 --- a/tools/chatgui/src/channellist.h +++ b/tools/chatgui/src/channellist.h @@ -11,7 +11,6 @@ #include class DbManager; -class QPushButton; class QLabel; class ChannelList : public QWidget { @@ -35,7 +34,6 @@ signals: void inviteByLinkRequested(const QString& channelId); void channelSettingsRequested(const QString& channelId); void filesRequested(const QString& channelId); - void ownFilesRequested(const QString& channelId); void ownFilesDropped(const QString& channelId, const QStringList& paths); void joinRequested(); void createGroupRequested(); @@ -49,7 +47,6 @@ private: QListView *m_listView; QStandardItemModel *m_model; DbManager *m_db; - QPushButton *m_ownFilesButton; QWidget *m_footer; QLabel *m_dropHint; bool m_autoConnectActive = false;