mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 12:24:22 -05:00
proper update of shared list when list is modiffied from a different place
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1363 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
17374bf299
commit
fe2934f6db
@ -15,7 +15,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
#include "ShareManager.h"
|
||||
@ -52,7 +52,7 @@ ShareManager::ShareManager(QWidget *parent, Qt::WFlags flags)
|
||||
|
||||
ui.addButton->setToolTip(tr("Add a Share Directory"));
|
||||
ui.removeButton->setToolTip(tr("Remove selected Shared Directory"));
|
||||
|
||||
|
||||
load();
|
||||
|
||||
}
|
||||
@ -78,13 +78,13 @@ void ShareManager::load()
|
||||
std::list<std::string>::const_iterator it;
|
||||
std::list<std::string> dirs;
|
||||
rsFiles->getSharedDirectories(dirs);
|
||||
|
||||
|
||||
/* get a link to the table */
|
||||
QListWidget *listWidget = ui.shareddirList;
|
||||
|
||||
|
||||
/* remove old items ??? */
|
||||
listWidget->clear();
|
||||
|
||||
|
||||
for(it = dirs.begin(); it != dirs.end(); it++)
|
||||
{
|
||||
/* (0) Dir Name */
|
||||
@ -92,7 +92,7 @@ void ShareManager::load()
|
||||
}
|
||||
|
||||
//ui.incomingDir->setText(QString::fromStdString(rsFiles->getDownloadDirectory()));
|
||||
|
||||
|
||||
listWidget->update(); /* update display */
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ void ShareManager::addShareDirectory()
|
||||
|
||||
QString qdir = QFileDialog::getExistingDirectory(this, tr("Add Shared Directory"), "",
|
||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
|
||||
|
||||
/* add it to the server */
|
||||
std::string dir = qdir.toStdString();
|
||||
if (dir != "")
|
||||
@ -149,8 +149,10 @@ bool ShareManager::messageBoxOk(QString msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void ShareManager::showEvent(QShowEvent *event)
|
||||
{
|
||||
if (!event->spontaneous())
|
||||
{
|
||||
load();
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
@ -44,6 +44,7 @@ public:
|
||||
public slots:
|
||||
|
||||
protected:
|
||||
virtual void showEvent(QShowEvent * event);
|
||||
|
||||
private slots:
|
||||
|
||||
@ -52,7 +53,7 @@ private slots:
|
||||
|
||||
void addShareDirectory();
|
||||
void removeShareDirectory();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user