mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 02:55:18 -04:00
fixed flags conflicts
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5758 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dc82cee700
commit
e753f22909
43 changed files with 383 additions and 386 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "ShareDialog.h"
|
||||
|
||||
#include <retroshare/rsfiles.h>
|
||||
#include <retroshare/rstypes.h>
|
||||
|
||||
#include <QContextMenuEvent>
|
||||
#include <QFileDialog>
|
||||
|
@ -61,8 +62,8 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent, Qt::WFlags flags
|
|||
ui.browseButton->setDisabled(true);
|
||||
ui.virtualpath_lineEdit->setText(QString::fromUtf8(it->virtualname.c_str()));
|
||||
|
||||
ui.browsableCheckBox->setChecked(it->shareflags & RS_FILE_HINTS_BROWSABLE);
|
||||
ui.networkwideCheckBox->setChecked(it->shareflags & RS_FILE_HINTS_NETWORK_WIDE);
|
||||
ui.browsableCheckBox->setChecked(it->shareflags & DIR_FLAGS_BROWSABLE_OTHERS);
|
||||
ui.networkwideCheckBox->setChecked(it->shareflags & DIR_FLAGS_NETWORK_WIDE_OTHERS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -89,13 +90,13 @@ void ShareDialog::addDirectory()
|
|||
sdi.filename = ui.localpath_lineEdit->text().toUtf8().constData();
|
||||
sdi.virtualname = ui.virtualpath_lineEdit->text().toUtf8().constData();
|
||||
|
||||
sdi.shareflags = 0;
|
||||
sdi.shareflags.clear() ;
|
||||
|
||||
if (ui.browsableCheckBox->isChecked()) {
|
||||
sdi.shareflags |= RS_FILE_HINTS_BROWSABLE ;
|
||||
sdi.shareflags |= DIR_FLAGS_BROWSABLE_OTHERS ;
|
||||
}
|
||||
if (ui.networkwideCheckBox->isChecked()) {
|
||||
sdi.shareflags |= RS_FILE_HINTS_NETWORK_WIDE;
|
||||
sdi.shareflags |= DIR_FLAGS_NETWORK_WIDE_OTHERS;
|
||||
}
|
||||
|
||||
if (ui.localpath_lineEdit->isEnabled()) {
|
||||
|
@ -119,7 +120,7 @@ void ShareDialog::addDirectory()
|
|||
rsFiles->addSharedDirectory(sdi);
|
||||
break;
|
||||
}
|
||||
if (it->shareflags ^ sdi.shareflags) {
|
||||
if (it->shareflags != sdi.shareflags) {
|
||||
/* modifies the flags */
|
||||
it->shareflags = sdi.shareflags;
|
||||
rsFiles->updateShareFlags(*it);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue