mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-09 17:45:15 -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
4 changed files with 13 additions and 4 deletions
retroshare-gui/src/gui
|
@ -77,7 +77,7 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent)
|
||||||
updateInfoMessage() ;
|
updateInfoMessage() ;
|
||||||
|
|
||||||
connect(groupselectionbox,SIGNAL(itemSelectionChanged()),this,SLOT(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())) ;
|
connect(groupflagsbox,SIGNAL(flagsChanged(FileStorageFlags)),this,SLOT(updateInfoMessage())) ;
|
||||||
|
|
||||||
if (!filename.empty())
|
if (!filename.empty())
|
||||||
|
|
|
@ -66,7 +66,7 @@ ShareManager::ShareManager()
|
||||||
connect(ui.addButton, SIGNAL(clicked( bool ) ), this , SLOT( showShareDialog() ) );
|
connect(ui.addButton, SIGNAL(clicked( bool ) ), this , SLOT( showShareDialog() ) );
|
||||||
connect(ui.editButton, SIGNAL(clicked( bool ) ), this , SLOT( editShareDirectory() ) );
|
connect(ui.editButton, SIGNAL(clicked( bool ) ), this , SLOT( editShareDirectory() ) );
|
||||||
connect(ui.removeButton, SIGNAL(clicked( bool ) ), this , SLOT( removeShareDirectory() ) );
|
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(customContextMenuRequested(QPoint)), this, SLOT(shareddirListCostumPopupMenu(QPoint)));
|
||||||
connect(ui.shareddirList, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(shareddirListCurrentCellChanged(int,int,int,int)));
|
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);
|
Settings->saveWidgetInformation(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShareManager::applyAndClose()
|
||||||
|
{
|
||||||
|
std::cerr << "ShareManager:::close(): updating!" << std::endl;
|
||||||
|
|
||||||
|
updateFlags() ;
|
||||||
|
close() ;
|
||||||
|
}
|
||||||
|
|
||||||
void ShareManager::shareddirListCostumPopupMenu( QPoint /*point*/ )
|
void ShareManager::shareddirListCostumPopupMenu( QPoint /*point*/ )
|
||||||
{
|
{
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
|
@ -141,7 +149,7 @@ void ShareManager::load()
|
||||||
listWidget->setItem(row, COLUMN_GROUPS, new QTableWidgetItem()) ;
|
listWidget->setItem(row, COLUMN_GROUPS, new QTableWidgetItem()) ;
|
||||||
listWidget->item(row,COLUMN_GROUPS)->setBackgroundColor(QColor(183,236,181)) ;
|
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) ;
|
listWidget->setColumnWidth(COLUMN_SHARE_FLAGS,132) ;
|
||||||
|
|
|
@ -61,6 +61,7 @@ private slots:
|
||||||
void removeShareDirectory();
|
void removeShareDirectory();
|
||||||
void updateFlags();
|
void updateFlags();
|
||||||
void updateGroups();
|
void updateGroups();
|
||||||
|
void applyAndClose() ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static ShareManager *_instance;
|
static ShareManager *_instance;
|
||||||
|
|
|
@ -208,7 +208,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="QPushButton" name="closeButton">
|
<widget class="QPushButton" name="closeButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Close</string>
|
<string>Apply and close</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue