mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-29 00:27:27 -04:00
fixed two bugs in ShareManager popup menu
This commit is contained in:
parent
29b5bfe049
commit
8653649132
2 changed files with 15 additions and 6 deletions
|
@ -69,7 +69,7 @@ ShareManager::ShareManager()
|
|||
connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(applyAndClose()));
|
||||
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
|
||||
|
||||
connect(ui.shareddirList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCostumPopupMenu(QPoint)));
|
||||
connect(ui.shareddirList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCustomPopupMenu(QPoint)));
|
||||
connect(ui.shareddirList, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(doubleClickedCell(int,int)));
|
||||
connect(ui.shareddirList, SIGNAL(cellChanged(int,int)), this, SLOT(handleCellChange(int,int)));
|
||||
|
||||
|
@ -106,6 +106,14 @@ void ShareManager::handleCellChange(int row,int column)
|
|||
}
|
||||
}
|
||||
|
||||
void ShareManager::editShareDirectory()
|
||||
{
|
||||
QTableWidget *listWidget = ui.shareddirList;
|
||||
int row = listWidget -> currentRow();
|
||||
|
||||
doubleClickedCell(row,COLUMN_PATH) ;
|
||||
}
|
||||
|
||||
void ShareManager::doubleClickedCell(int row,int column)
|
||||
{
|
||||
if(column == COLUMN_PATH)
|
||||
|
@ -158,7 +166,7 @@ void ShareManager::applyAndClose()
|
|||
close() ;
|
||||
}
|
||||
|
||||
void ShareManager::shareddirListCostumPopupMenu( QPoint /*point*/ )
|
||||
void ShareManager::shareddirListCustomPopupMenu( QPoint /*point*/ )
|
||||
{
|
||||
QMenu contextMnu( this );
|
||||
|
||||
|
@ -300,9 +308,10 @@ void ShareManager::removeShareDirectory()
|
|||
{
|
||||
if ((QMessageBox::question(this, tr("Warning!"),tr("Do you really want to stop sharing this directory ?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
|
||||
{
|
||||
for(uint32_t i=row;i+1<mDirInfos.size();++i)
|
||||
mDirInfos[i] = mDirInfos[i+1] ;
|
||||
for(uint32_t i=row;i+1<mDirInfos.size();++i)
|
||||
mDirInfos[i] = mDirInfos[i+1] ;
|
||||
|
||||
mDirInfos.pop_back() ;
|
||||
load();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue