mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Share Flags
- own directory browsing is now done through FileIndexMonitor. This allows: - to browse shared directories independently of their flags - to update files as they get hashed (yeah!) - still to do: - turtle requests should respect the share flags git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1507 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4157321000
commit
792ddf1d25
6 changed files with 228 additions and 47 deletions
|
@ -55,7 +55,7 @@ ShareManager::ShareManager(QWidget *parent, Qt::WFlags flags)
|
|||
connect( ui.shareddirList, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( shareddirListCostumPopupMenu( QPoint ) ) );
|
||||
|
||||
ui.addButton->setToolTip(tr("Add a Share Directory"));
|
||||
ui.removeButton->setToolTip(tr("Remove selected Shared Directory"));
|
||||
ui.removeButton->setToolTip(tr("Stop sharing selected Directory"));
|
||||
|
||||
load();
|
||||
|
||||
|
@ -86,6 +86,8 @@ void ShareManager::shareddirListCostumPopupMenu( QPoint point )
|
|||
/** Loads the settings for this page */
|
||||
void ShareManager::load()
|
||||
{
|
||||
std::cerr << "ShareManager:: In load !!!!!" << std::endl ;
|
||||
|
||||
std::list<SharedDirInfo>::const_iterator it;
|
||||
std::list<SharedDirInfo> dirs;
|
||||
rsFiles->getSharedDirectories(dirs);
|
||||
|
@ -154,6 +156,7 @@ void ShareManager::load()
|
|||
//ui.incomingDir->setText(QString::fromStdString(rsFiles->getDownloadDirectory()));
|
||||
|
||||
listWidget->update(); /* update display */
|
||||
update();
|
||||
}
|
||||
|
||||
void ShareManager::showYourself()
|
||||
|
@ -171,8 +174,8 @@ void ShareManager::addShareDirectory()
|
|||
*/
|
||||
|
||||
|
||||
QString qdir = QFileDialog::getExistingDirectory(this, tr("Add Shared Directory"), "",
|
||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
QString qdir = QFileDialog::getExistingDirectory(this, tr("Add Shared Directory"), "",
|
||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
|
||||
/* add it to the server */
|
||||
std::string dir = qdir.toStdString();
|
||||
|
@ -184,8 +187,8 @@ void ShareManager::addShareDirectory()
|
|||
|
||||
rsFiles->addSharedDirectory(sdi);
|
||||
|
||||
messageBoxOk(tr("Shared Directory Added!"));
|
||||
load();
|
||||
messageBoxOk(tr("Shared Directory Added!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +239,6 @@ void ShareManager::removeShareDirectory()
|
|||
}
|
||||
else
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue