From 2d60ff30c1d24de57721de4b83b6b66eb110fdd8 Mon Sep 17 00:00:00 2001 From: defnax <9952056+defnax@users.noreply.github.com> Date: Sun, 29 Mar 2026 12:28:54 +0200 Subject: [PATCH] Removed the menu function --- retroshare-gui/src/gui/Identity/IdDialog.cpp | 50 ++------------------ retroshare-gui/src/gui/Identity/IdDialog.h | 2 - 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/retroshare-gui/src/gui/Identity/IdDialog.cpp b/retroshare-gui/src/gui/Identity/IdDialog.cpp index ae767c2dc..5f1d1b04c 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.cpp +++ b/retroshare-gui/src/gui/Identity/IdDialog.cpp @@ -448,8 +448,6 @@ IdDialog::IdDialog(QWidget *parent) //connect(ui->treeWidget_membership, SIGNAL(itemSelectionChanged()), this, SLOT(circle_selected())); connect(ui->treeWidget_membership, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CircleListCustomPopupMenu(QPoint))); connect(ui->autoBanIdentities_CB, SIGNAL(toggled(bool)), this, SLOT(toggleAutoBanIdentities(bool))); - connect(ui->treeWidget_membership, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(createCustomContextMenu(QPoint))); - updateIdTimer.setSingleShot(true); connect(&updateIdTimer, SIGNAL(timeout()), this, SLOT(updateIdList())); @@ -980,24 +978,12 @@ void IdDialog::loadCircles(const std::list& groupInfo) // The bullet colors below are for the *Membership*. This is independent from admin rights, which cannot be shown as a color. // Admin/non admin is shows using Bold font. - if (mUseColoredGroupIcons) - { - if(am_I_in_circle) - item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(":/icons/png/circles-green.png")); - else if(am_I_invited || am_I_pending) - item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(":/icons/png/circles-notify.png")); - else - item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(":/icons/png/circles.png")); - } + if(am_I_in_circle) + item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(":/icons/png/circles-green.png")); + else if(am_I_invited || am_I_pending) + item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(":/icons/png/circles-notify.png")); else - { - if(am_I_in_circle) - item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(IMAGE_MEMBER)); - else if(am_I_invited || am_I_pending) - item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(IMAGE_INVITED)); - else - item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(IMAGE_UNKNOWN)); - } + item->setIcon(CIRCLEGROUP_CIRCLE_COL_GROUPNAME, FilesDefs::getIconFromQtResourcePath(":/icons/png/circles-gray.png")); } ui->treeWidget_membership->setSortingEnabled(true); @@ -1367,8 +1353,6 @@ void IdDialog::processSettings(bool load) ui->idTreeWidget->header()->restoreState(Settings->value(objectName()).toByteArray()); ui->idTreeWidget->header()->setHidden(Settings->value(objectName()+"HiddenHeader", false).toBool()); - mUseColoredGroupIcons = Settings->value("UseColoredGroupIcons", false).toBool(); - // filterColumn //ui->filterLineEdit->setCurrentFilter(Settings->value("filterColumn", RsIdentityListModel::COLUMN_THREAD_NAME).toInt()); @@ -1394,8 +1378,6 @@ void IdDialog::processSettings(bool load) Settings->setValue(objectName(), ui->idTreeWidget->header()->saveState()); Settings->setValue(objectName()+"HiddenHeader", ui->idTreeWidget->header()->isHidden()); - Settings->setValue("UseColoredGroupIcons", mUseColoredGroupIcons); - // filterColumn //Settings->setValue("filterColumn", ui->filterLineEdit->currentFilter()); @@ -2820,25 +2802,3 @@ void IdDialog::sortColumn(int col,Qt::SortOrder so) mLastSortOrder = so; } -void IdDialog::createCustomContextMenu(const QPoint &point) -{ - QMenu contextMenu(tr("Options"), this); - - QAction *toggleIconsAct = new QAction(tr("Use Circle Icons"), this); - toggleIconsAct->setCheckable(true); - toggleIconsAct->setChecked(mUseColoredGroupIcons); - connect(toggleIconsAct, SIGNAL(triggered()), this, SLOT(toggleColoredGroupIcons())); - - contextMenu.addAction(toggleIconsAct); - contextMenu.addSeparator(); - - // ... existing menu actions ... - contextMenu.exec(ui->treeWidget_membership->mapToGlobal(point)); -} - -void IdDialog::toggleColoredGroupIcons() -{ - mUseColoredGroupIcons = !mUseColoredGroupIcons; - // Trigger a refresh of the tree to apply changes immediately - updateCircles(); -} diff --git a/retroshare-gui/src/gui/Identity/IdDialog.h b/retroshare-gui/src/gui/Identity/IdDialog.h index 9ae352364..66748be49 100644 --- a/retroshare-gui/src/gui/Identity/IdDialog.h +++ b/retroshare-gui/src/gui/Identity/IdDialog.h @@ -107,10 +107,8 @@ private slots: void IdListCustomPopupMenu( QPoint point ); void headerContextMenuRequested(QPoint); void toggleColumnVisible(); - void createCustomContextMenu(const QPoint &point); void CircleListCustomPopupMenu(QPoint point) ; - void toggleColoredGroupIcons(); #ifdef SUSPENDED void circle_selected() ;