mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-09-14 11:06:01 +05:00
Removed the menu function
This commit is contained in:
parent
cab6efd83e
commit
2d60ff30c1
@ -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<RsGroupMetaData>& 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();
|
||||
}
|
||||
|
||||
@ -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() ;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user