mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
reduced calls to flags/group update code to the minimum, to avoid sending file lists except when the share manager / share dialog gets closed
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5822 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7fa9dbb2b1
commit
4e2f454907
@ -77,7 +77,7 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent)
|
||||
updateInfoMessage() ;
|
||||
|
||||
connect(groupselectionbox,SIGNAL(itemSelectionChanged()),this,SLOT(updateInfoMessage())) ;
|
||||
connect(groupselectionbox,SIGNAL(itemSelectionChanged()),this,SLOT(groupSelectionChanged())) ;
|
||||
// connect(groupselectionbox,SIGNAL(itemSelectionChanged()),this,SLOT(groupSelectionChanged())) ;
|
||||
connect(groupflagsbox,SIGNAL(flagsChanged(FileStorageFlags)),this,SLOT(updateInfoMessage())) ;
|
||||
|
||||
if (!filename.empty())
|
||||
|
@ -66,7 +66,7 @@ ShareManager::ShareManager()
|
||||
connect(ui.addButton, SIGNAL(clicked( bool ) ), this , SLOT( showShareDialog() ) );
|
||||
connect(ui.editButton, SIGNAL(clicked( bool ) ), this , SLOT( editShareDirectory() ) );
|
||||
connect(ui.removeButton, SIGNAL(clicked( bool ) ), this , SLOT( removeShareDirectory() ) );
|
||||
connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(applyAndClose()));
|
||||
|
||||
connect(ui.shareddirList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCostumPopupMenu(QPoint)));
|
||||
connect(ui.shareddirList, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(shareddirListCurrentCellChanged(int,int,int,int)));
|
||||
@ -95,6 +95,14 @@ ShareManager::~ShareManager()
|
||||
Settings->saveWidgetInformation(this);
|
||||
}
|
||||
|
||||
void ShareManager::applyAndClose()
|
||||
{
|
||||
std::cerr << "ShareManager:::close(): updating!" << std::endl;
|
||||
|
||||
updateFlags() ;
|
||||
close() ;
|
||||
}
|
||||
|
||||
void ShareManager::shareddirListCostumPopupMenu( QPoint /*point*/ )
|
||||
{
|
||||
QMenu contextMnu( this );
|
||||
@ -141,7 +149,7 @@ void ShareManager::load()
|
||||
listWidget->setItem(row, COLUMN_GROUPS, new QTableWidgetItem()) ;
|
||||
listWidget->item(row,COLUMN_GROUPS)->setBackgroundColor(QColor(183,236,181)) ;
|
||||
|
||||
connect(widget,SIGNAL(flagsChanged(FileStorageFlags)),this,SLOT(updateFlags())) ;
|
||||
//connect(widget,SIGNAL(flagsChanged(FileStorageFlags)),this,SLOT(updateFlags())) ;
|
||||
}
|
||||
|
||||
listWidget->setColumnWidth(COLUMN_SHARE_FLAGS,132) ;
|
||||
|
@ -61,6 +61,7 @@ private slots:
|
||||
void removeShareDirectory();
|
||||
void updateFlags();
|
||||
void updateGroups();
|
||||
void applyAndClose() ;
|
||||
|
||||
private:
|
||||
static ShareManager *_instance;
|
||||
|
@ -208,7 +208,7 @@ p, li { white-space: pre-wrap; }
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="closeButton">
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
<string>Apply and close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
Reference in New Issue
Block a user