From e8e054eeaec71e1441a6ce26469b99e6675fe321 Mon Sep 17 00:00:00 2001 From: mr-alice Date: Mon, 31 Oct 2016 14:26:01 +0100 Subject: [PATCH] addednew flag for anonymous search. Merged the two browsable flags in one single flag. --- libretroshare/src/file_sharing/p3filelists.cc | 3 +- libretroshare/src/ft/ftcontroller.cc | 2 +- libretroshare/src/ft/ftextralist.cc | 5 +- libretroshare/src/ft/ftserver.cc | 4 +- libretroshare/src/retroshare/rstypes.h | 13 +- libretroshare/src/rsserver/p3peers.cc | 6 +- retroshare-gui/src/gui/QuickStartWizard.cpp | 10 +- retroshare-gui/src/gui/RemoteDirModel.cpp | 7 +- retroshare-gui/src/gui/ShareDialog.cpp | 2 +- .../src/gui/common/GroupFlagsWidget.cpp | 154 +++++++----------- .../src/gui/common/GroupFlagsWidget.h | 7 +- retroshare-gui/src/gui/icons.qrc | 8 +- retroshare-gui/src/gui/icons/make_qrc_file.sh | 2 +- retroshare-nogui/src/menu/menus.cc | 4 +- 14 files changed, 99 insertions(+), 128 deletions(-) diff --git a/libretroshare/src/file_sharing/p3filelists.cc b/libretroshare/src/file_sharing/p3filelists.cc index bad026bbf..7aa9c5316 100644 --- a/libretroshare/src/file_sharing/p3filelists.cc +++ b/libretroshare/src/file_sharing/p3filelists.cc @@ -338,7 +338,7 @@ bool p3FileDatabase::loadList(std::list& load) /* for each item, check it exists .... * - remove any that are dead (or flag?) */ - static const FileStorageFlags PERMISSION_MASK = DIR_FLAGS_BROWSABLE_OTHERS | DIR_FLAGS_NETWORK_WIDE_OTHERS | DIR_FLAGS_BROWSABLE_GROUPS | DIR_FLAGS_NETWORK_WIDE_GROUPS ; + static const FileStorageFlags PERMISSION_MASK = DIR_FLAGS_PERMISSIONS_MASK; #ifdef DEBUG_FILE_HIERARCHY P3FILELISTS_DEBUG() << "Load list" << std::endl; @@ -388,7 +388,6 @@ bool p3FileDatabase::loadList(std::list& load) info.virtualname = fi->file.name; info.shareflags = FileStorageFlags(fi->flags) ; info.shareflags &= PERMISSION_MASK ; - info.shareflags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ; // disabling this flag for know, for consistency reasons for(std::set::const_iterator itt(fi->parent_groups.ids.begin());itt!=fi->parent_groups.ids.end();++itt) info.parent_groups.push_back(*itt) ; diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 6e0bbccbd..fe6ada159 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -1611,7 +1611,7 @@ bool ftController::FileDetails(const RsFileHash &hash, FileInfo &info) info.queue_position = it->second->mQueuePosition ; if(it->second->mFlags & RS_FILE_REQ_ANONYMOUS_ROUTING) - info.storage_permission_flags |= DIR_FLAGS_NETWORK_WIDE_OTHERS ; // file being downloaded anonymously are always anonymously available. + info.storage_permission_flags |= DIR_FLAGS_ANONYMOUS_DOWNLOAD ; // file being downloaded anonymously are always anonymously available. /* get list of sources from transferModule */ std::list peerIds; diff --git a/libretroshare/src/ft/ftextralist.cc b/libretroshare/src/ft/ftextralist.cc index 094e07c8d..84ba0692b 100644 --- a/libretroshare/src/ft/ftextralist.cc +++ b/libretroshare/src/ft/ftextralist.cc @@ -350,9 +350,10 @@ bool ftExtraList::search(const RsFileHash &hash, FileSearchFlags /*hintflags* // Now setup the file storage flags so that the client can know how to handle permissions // - info.storage_permission_flags = DIR_FLAGS_BROWSABLE_OTHERS ; +#warning make sure this is right + info.storage_permission_flags = FileStorageFlags(0) ;//DIR_FLAGS_BROWSABLE_OTHERS ; - if(info.transfer_info_flags & RS_FILE_REQ_ANONYMOUS_ROUTING) info.storage_permission_flags |= DIR_FLAGS_NETWORK_WIDE_OTHERS ; + if(info.transfer_info_flags & RS_FILE_REQ_ANONYMOUS_ROUTING) info.storage_permission_flags |= DIR_FLAGS_ANONYMOUS_DOWNLOAD ; return true; } diff --git a/libretroshare/src/ft/ftserver.cc b/libretroshare/src/ft/ftserver.cc index 3b0b8d3f8..62d24a8d9 100644 --- a/libretroshare/src/ft/ftserver.cc +++ b/libretroshare/src/ft/ftserver.cc @@ -644,7 +644,7 @@ int ftServer::RequestDirDetails(void *ref, DirDetails &details, FileSearchFlags { return mFileDatabase->RequestDirDetails(ref,details,flags) ; } -uint32_t ftServer::getType(void *ref, FileSearchFlags flags) +uint32_t ftServer::getType(void *ref, FileSearchFlags /* flags */) { return mFileDatabase->getType(ref) ; } @@ -797,7 +797,7 @@ bool ftServer::shareDownloadDirectory(bool share) /* Share */ SharedDirInfo inf ; inf.filename = mFtController->getDownloadDirectory(); - inf.shareflags = DIR_FLAGS_NETWORK_WIDE_OTHERS ; + inf.shareflags = DIR_FLAGS_ANONYMOUS_DOWNLOAD ; return addSharedDirectory(inf); } diff --git a/libretroshare/src/retroshare/rstypes.h b/libretroshare/src/retroshare/rstypes.h index 0a8537bb7..aef2d118e 100644 --- a/libretroshare/src/retroshare/rstypes.h +++ b/libretroshare/src/retroshare/rstypes.h @@ -155,12 +155,13 @@ const FileStorageFlags DIR_FLAGS_PARENT ( 0x0001 ); const FileStorageFlags DIR_FLAGS_DETAILS ( 0x0002 ); // apparently unused const FileStorageFlags DIR_FLAGS_CHILDREN ( 0x0004 ); // apparently unused -const FileStorageFlags DIR_FLAGS_NETWORK_WIDE_OTHERS ( 0x0080 ); // Flags for directory sharing permissions. The last -const FileStorageFlags DIR_FLAGS_BROWSABLE_OTHERS ( 0x0100 ); // one should be the OR of the all four flags. -const FileStorageFlags DIR_FLAGS_NETWORK_WIDE_GROUPS ( 0x0200 ); -const FileStorageFlags DIR_FLAGS_BROWSABLE_GROUPS ( 0x0400 ); -const FileStorageFlags DIR_FLAGS_PERMISSIONS_MASK ( DIR_FLAGS_NETWORK_WIDE_OTHERS | DIR_FLAGS_BROWSABLE_OTHERS - | DIR_FLAGS_NETWORK_WIDE_GROUPS | DIR_FLAGS_BROWSABLE_GROUPS ); +const FileStorageFlags DIR_FLAGS_ANONYMOUS_DOWNLOAD ( 0x0080 ); // Flags for directory sharing permissions. The last +//const FileStorageFlags DIR_FLAGS_BROWSABLE_OTHERS ( 0x0100 ); // one should be the OR of the all four flags. +//const FileStorageFlags DIR_FLAGS_NETWORK_WIDE_GROUPS ( 0x0200 ); +const FileStorageFlags DIR_FLAGS_BROWSABLE ( 0x0400 ); +const FileStorageFlags DIR_FLAGS_ANONYMOUS_SEARCH ( 0x0800 ); +const FileStorageFlags DIR_FLAGS_PERMISSIONS_MASK ( DIR_FLAGS_ANONYMOUS_DOWNLOAD | /*DIR_FLAGS_BROWSABLE_OTHERS + DIR_FLAGS_NETWORK_WIDE_GROUPS*/ DIR_FLAGS_BROWSABLE | DIR_FLAGS_ANONYMOUS_SEARCH); const FileStorageFlags DIR_FLAGS_LOCAL ( 0x1000 ); const FileStorageFlags DIR_FLAGS_REMOTE ( 0x2000 ); diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc index bd4e11cbd..aea128867 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc @@ -1359,7 +1359,7 @@ FileSearchFlags p3Peers::computePeerPermissionFlags(const RsPeerId& peer_ssl_id, // very simple algorithm. // - bool found = false ; + bool found = directory_parent_groups.empty() ; // by default, empty list means browsable by everyone. RsPgpId pgp_id = getGPGId(peer_ssl_id) ; for(std::list::const_iterator it(directory_parent_groups.begin());it!=directory_parent_groups.end() && !found;++it) @@ -1378,8 +1378,8 @@ FileSearchFlags p3Peers::computePeerPermissionFlags(const RsPeerId& peer_ssl_id, // found = true ; } - bool network_wide = (share_flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) ;//|| ( (share_flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) && found) ; - bool browsable = (share_flags & DIR_FLAGS_BROWSABLE_OTHERS) || ( (share_flags & DIR_FLAGS_BROWSABLE_GROUPS) && found) ; + bool network_wide = (share_flags & DIR_FLAGS_ANONYMOUS_DOWNLOAD) ;//|| ( (share_flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) && found) ; + bool browsable = (share_flags & DIR_FLAGS_BROWSABLE) && found ; FileSearchFlags final_flags ; diff --git a/retroshare-gui/src/gui/QuickStartWizard.cpp b/retroshare-gui/src/gui/QuickStartWizard.cpp index 08f314959..bbed898d5 100644 --- a/retroshare-gui/src/gui/QuickStartWizard.cpp +++ b/retroshare-gui/src/gui/QuickStartWizard.cpp @@ -235,7 +235,7 @@ void QuickStartWizard::on_pushButtonSharesAdd_clicked() { SharedDirInfo sdi ; sdi.filename = dir ; - sdi.shareflags = DIR_FLAGS_BROWSABLE_OTHERS | DIR_FLAGS_NETWORK_WIDE_OTHERS ; + sdi.shareflags = DIR_FLAGS_BROWSABLE | DIR_FLAGS_ANONYMOUS_DOWNLOAD ; rsFiles->addSharedDirectory(sdi); @@ -331,8 +331,8 @@ void QuickStartWizard::loadShare() QCheckBox *cb1 = new QCheckBox ; QCheckBox *cb2 = new QCheckBox ; - cb1->setChecked( (*it).shareflags & DIR_FLAGS_NETWORK_WIDE_OTHERS ) ; - cb2->setChecked( (*it).shareflags & DIR_FLAGS_BROWSABLE_OTHERS ) ; + cb1->setChecked( (*it).shareflags & DIR_FLAGS_ANONYMOUS_DOWNLOAD ) ; + cb2->setChecked( (*it).shareflags & DIR_FLAGS_BROWSABLE ) ; cb1->setToolTip(tr("If checked, the share is anonymously shared to anybody.")) ; cb2->setToolTip(tr("If checked, the share is browsable by your friends.")) ; @@ -364,8 +364,8 @@ void QuickStartWizard::updateFlags(bool b) { std::cerr << "Looking for row=" << row << ", file=" << (*it).filename << ", flags=" << (*it).shareflags << std::endl ; FileStorageFlags current_flags(0u) ; - current_flags |= (dynamic_cast(ui.shareddirList->cellWidget(row,1)))->isChecked()? DIR_FLAGS_NETWORK_WIDE_OTHERS:(FileStorageFlags)0u ; - current_flags |= (dynamic_cast(ui.shareddirList->cellWidget(row,2)))->isChecked()? DIR_FLAGS_BROWSABLE_OTHERS :(FileStorageFlags)0u ; + current_flags |= (dynamic_cast(ui.shareddirList->cellWidget(row,1)))->isChecked()? DIR_FLAGS_ANONYMOUS_DOWNLOAD:(FileStorageFlags)0u ; + current_flags |= (dynamic_cast(ui.shareddirList->cellWidget(row,2)))->isChecked()? DIR_FLAGS_BROWSABLE :(FileStorageFlags)0u ; if( ((*it).shareflags ^ current_flags).toUInt32() ) { diff --git a/retroshare-gui/src/gui/RemoteDirModel.cpp b/retroshare-gui/src/gui/RemoteDirModel.cpp index bfe7e2dbe..250eadfe4 100644 --- a/retroshare-gui/src/gui/RemoteDirModel.cpp +++ b/retroshare-gui/src/gui/RemoteDirModel.cpp @@ -216,10 +216,9 @@ QString RetroshareDirModel::getFlagsString(FileStorageFlags flags) { char str[11] = "- - -" ; - if(flags & DIR_FLAGS_BROWSABLE_GROUPS) str[0] = 'B' ; - //if(flags & DIR_FLAGS_NETWORK_WIDE_GROUPS) str[3] = 'N' ; - if(flags & DIR_FLAGS_BROWSABLE_OTHERS) str[3] = 'B' ; - if(flags & DIR_FLAGS_NETWORK_WIDE_OTHERS) str[6] = 'N' ; + if(flags & DIR_FLAGS_BROWSABLE) str[0] = 'B' ; + if(flags & DIR_FLAGS_ANONYMOUS_SEARCH) str[3] = 'S' ; + if(flags & DIR_FLAGS_ANONYMOUS_DOWNLOAD) str[6] = 'N' ; return QString(str) ; } diff --git a/retroshare-gui/src/gui/ShareDialog.cpp b/retroshare-gui/src/gui/ShareDialog.cpp index 2f7ebcffe..6c4287888 100644 --- a/retroshare-gui/src/gui/ShareDialog.cpp +++ b/retroshare-gui/src/gui/ShareDialog.cpp @@ -57,7 +57,7 @@ ShareDialog::ShareDialog(std::string filename, QWidget *parent) hb2->addWidget(new QLabel(tr("Share flags and groups:")+" ")) ; groupflagsbox = new GroupFlagsWidget(ui.shareflags_GB) ; - groupflagsbox->setFlags(DIR_FLAGS_NETWORK_WIDE_OTHERS) ; // default value + groupflagsbox->setFlags(DIR_FLAGS_ANONYMOUS_DOWNLOAD) ; // default value messageBox = new QTextEdit(ui.shareflags_GB) ; messageBox->setReadOnly(true) ; diff --git a/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp b/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp index a86703fc7..ac8969690 100644 --- a/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp +++ b/retroshare-gui/src/gui/common/GroupFlagsWidget.cpp @@ -3,31 +3,26 @@ #include "GroupFlagsWidget.h" #include -#define FLAGS_GROUP_NETWORK_WIDE_ICON ":images/anonymous_128_green.png" -#define FLAGS_GROUP_BROWSABLE_ICON ":images/browsable_128_green.png" -#define FLAGS_GROUP_UNCHECKED ":images/blank_128_green.png" -#define FLAGS_OTHER_NETWORK_WIDE_ICON ":images/anonymous_128_blue.png" -#define FLAGS_OTHER_BROWSABLE_ICON ":images/browsable_128_blue.png" -#define FLAGS_OTHER_UNCHECKED ":images/blank_128_blue.png" +#define FLAGS_ANONYMOUS_SEARCH_ON ":icons/search_red_128.png" +#define FLAGS_ANONYMOUS_SEARCH_OFF ":icons/blank_red_128.png" +#define FLAGS_BROWSABLE_ON ":icons/browsable_green_128.png" +#define FLAGS_BROWSABLE_OFF ":icons/blank_green_128.png" +#define FLAGS_ANONYMOUS_DL_ON ":icons/anonymous_blue_128.png" +#define FLAGS_ANONYMOUS_DL_OFF ":icons/blank_blue_128.png" -#define INDEX_GROUP_BROWSABLE 0 -#define INDEX_GROUP_NETWORK_W 1 -#define INDEX_OTHER_BROWSABLE 2 -#define INDEX_OTHER_NETWORK_W 3 -#define INDEX_GROUP_UNCHECKED 4 -#define INDEX_OTHER_UNCHECKED 5 +#define INDEX_BROWSABLE 0 +#define INDEX_ANON_SEARCH 1 +#define INDEX_ANON_DL 2 /*QString GroupFlagsWidget::_tooltips_on[4] = { - QObject::tr("Directory is browsable for friends from groups"), - QObject::tr("Directory is accessible by anonymous tunnels from friends from groups"), - QObject::tr("Directory is browsable for any friend"), - QObject::tr("Directory is accessible by anonymous tunnels from any friend") + QObject::tr("Directory is visible to friends"), + QObject::tr("Directory can be search anonymously"), + QObject::tr("Directory is accessible by anonymous tunnels") }; QString GroupFlagsWidget::_tooltips_off[4] = { - QObject::tr("Directory is NOT browsable for friends from groups"), - QObject::tr("Directory is NOT accessible by anonymous tunnels from friends from groups"), - QObject::tr("Directory is NOT browsable for any friend"), - QObject::tr("Directory is NOT accessible by anonymous tunnels from any friend") + QObject::tr("Directory is not visible to friends"), + QObject::tr("Directory cannot be searched anonymously"), + QObject::tr("Directory is NOT accessible by anonymous tunnels") }; */ GroupFlagsWidget::GroupFlagsWidget(QWidget *parent,FileStorageFlags flags) @@ -39,35 +34,33 @@ GroupFlagsWidget::GroupFlagsWidget(QWidget *parent,FileStorageFlags flags) setMaximumSize(128 * QFontMetricsF(font()).height()/14.0,32 * QFontMetricsF(font()).height()/14.0) ; setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); - _icons[INDEX_GROUP_BROWSABLE] = new QIcon(FLAGS_GROUP_BROWSABLE_ICON) ; - _icons[INDEX_GROUP_NETWORK_W] = new QIcon(FLAGS_GROUP_NETWORK_WIDE_ICON) ; - _icons[INDEX_OTHER_BROWSABLE] = new QIcon(FLAGS_OTHER_BROWSABLE_ICON) ; - _icons[INDEX_OTHER_NETWORK_W] = new QIcon(FLAGS_OTHER_NETWORK_WIDE_ICON) ; - _icons[INDEX_GROUP_UNCHECKED] = new QIcon(FLAGS_GROUP_UNCHECKED) ; - _icons[INDEX_OTHER_UNCHECKED] = new QIcon(FLAGS_OTHER_UNCHECKED) ; + _icons[2*INDEX_BROWSABLE+0] = new QIcon(FLAGS_BROWSABLE_OFF) ; + _icons[2*INDEX_BROWSABLE+1] = new QIcon(FLAGS_BROWSABLE_ON) ; + _icons[2*INDEX_ANON_SEARCH+0] = new QIcon(FLAGS_ANONYMOUS_SEARCH_OFF) ; + _icons[2*INDEX_ANON_SEARCH+1] = new QIcon(FLAGS_ANONYMOUS_SEARCH_ON) ; + _icons[2*INDEX_ANON_DL+0] = new QIcon(FLAGS_ANONYMOUS_DL_OFF) ; + _icons[2*INDEX_ANON_DL+1] = new QIcon(FLAGS_ANONYMOUS_DL_ON) ; setLayout(_layout) ; - _flags[0] = DIR_FLAGS_BROWSABLE_GROUPS ; - _flags[1] = DIR_FLAGS_NETWORK_WIDE_GROUPS ; - _flags[2] = DIR_FLAGS_BROWSABLE_OTHERS ; - _flags[3] = DIR_FLAGS_NETWORK_WIDE_OTHERS ; + _flags[INDEX_BROWSABLE ] = DIR_FLAGS_BROWSABLE ; + _flags[INDEX_ANON_SEARCH] = DIR_FLAGS_ANONYMOUS_SEARCH ; + _flags[INDEX_ANON_DL ] = DIR_FLAGS_ANONYMOUS_DOWNLOAD ; - for(int i=0;i<4;++i) + for(int i=0;i<3;++i) { _buttons[i] = new QPushButton(this) ; _buttons[i]->setCheckable(true) ; _buttons[i]->setChecked(flags & _flags[i]) ; _buttons[i]->setIconSize(QSize(32 * QFontMetricsF(font()).height()/14.0,32 * QFontMetricsF(font()).height()/14.0)); + update_button_state(_buttons[i]->isChecked(),i) ; _layout->addWidget(_buttons[i]) ; } - _buttons[INDEX_GROUP_NETWORK_W]->setHidden(true); - connect(_buttons[INDEX_GROUP_NETWORK_W],SIGNAL(toggled(bool)),this,SLOT(update_GN_button(bool))) ; - connect(_buttons[INDEX_OTHER_NETWORK_W],SIGNAL(toggled(bool)),this,SLOT(update_ON_button(bool))) ; - connect(_buttons[INDEX_GROUP_BROWSABLE],SIGNAL(toggled(bool)),this,SLOT(update_GB_button(bool))) ; - connect(_buttons[INDEX_OTHER_BROWSABLE],SIGNAL(toggled(bool)),this,SLOT(update_OB_button(bool))) ; + connect(_buttons[INDEX_ANON_DL ],SIGNAL(toggled(bool)),this,SLOT(update_DL_button(bool))) ; + connect(_buttons[INDEX_ANON_SEARCH],SIGNAL(toggled(bool)),this,SLOT(update_SR_button(bool))) ; + connect(_buttons[INDEX_BROWSABLE ],SIGNAL(toggled(bool)),this,SLOT(update_BR_button(bool))) ; _layout->setSpacing(0); _layout->setContentsMargins(0, 0, 0, 0); @@ -84,16 +77,15 @@ FileStorageFlags GroupFlagsWidget::flags() const { FileStorageFlags flags ; - for(int i=0;i<4;++i) + for(int i=0;i<3;++i) if(_buttons[i]->isChecked()) flags |= _flags[i] ; - flags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ; return flags ; } void GroupFlagsWidget::setFlags(FileStorageFlags flags) { - for(int i=0;i<4;++i) + for(int i=0;i<3;++i) { _buttons[i]->setChecked(flags & _flags[i]) ; update_button_state(_buttons[i]->isChecked(),i) ; @@ -105,40 +97,23 @@ void GroupFlagsWidget::update_button_state(bool b,int button_id) QString tip_on, tip_off; switch (button_id) { case 0: - tip_on = tr("Directory is browsable for friends from groups"); - tip_off = tr("Directory is NOT browsable for friends from groups"); + tip_on = tr("Directory is visible to friends"); + tip_off = tr("Directory is NOT visible to friends"); break; case 1: - tip_on = tr("Directory is accessible by anonymous tunnels from friends from groups"); - tip_off = tr("Directory is NOT accessible by anonymous tunnels from friends from groups"); + tip_on = tr("Directory can be searched anonymously"); + tip_off = tr("Directory cannot be searched anonymously"); break; case 2: - tip_on = tr("Directory is browsable for any friend"); - tip_off = tr("Directory is NOT browsable for any friend"); - break; - case 3: - tip_on = tr("Directory is accessible by anonymous tunnels from any friend"); - tip_off = tr("Directory is NOT accessible by anonymous tunnels from any friend"); + tip_on = tr("Files can be downloaded anonymously"); + tip_off = tr("Files cannot be downloaded anonymously"); break; default: tip_on = ""; tip_off = ""; } - if(b) - { - _buttons[button_id]->setIcon(*_icons[button_id]) ; - _buttons[button_id]->setToolTip(tip_on) ; - } - else if(button_id == INDEX_GROUP_NETWORK_W || button_id == INDEX_GROUP_BROWSABLE) - { - _buttons[button_id]->setIcon(*_icons[INDEX_GROUP_UNCHECKED]) ; - _buttons[button_id]->setToolTip(tip_off) ; - } - else - { - _buttons[button_id]->setIcon(*_icons[INDEX_OTHER_UNCHECKED]) ; - _buttons[button_id]->setToolTip(tip_off) ; - } + _buttons[button_id]->setIcon(*_icons[2*button_id+(int)b]) ; + _buttons[button_id]->setToolTip(b?tip_on:tip_off) ; } QString GroupFlagsWidget::groupInfoString(FileStorageFlags flags, const QList& groupNames) @@ -155,42 +130,39 @@ QString GroupFlagsWidget::groupInfoString(FileStorageFlags flags, const QListicons/settings/sound.svg icons/settings/webinterface.svg icons/add_user_256.png - icons/anonymous_blue_128.png - icons/anonymous_green_128.png icons/aol.png icons/avatar_128.png icons/avatar_grey_128.png - icons/blank_blue_128.png + icons/blank_red_128.png icons/blank_green_128.png - icons/browsable_blue_128.png + icons/blank_blue_128.png icons/browsable_green_128.png + icons/search_red_128.png + icons/anonymous_blue_128.png icons/bullet_blue_128.png icons/bullet_green_128.png icons/bullet_grey_128.png diff --git a/retroshare-gui/src/gui/icons/make_qrc_file.sh b/retroshare-gui/src/gui/icons/make_qrc_file.sh index 970eed055..a958fc2b3 100755 --- a/retroshare-gui/src/gui/icons/make_qrc_file.sh +++ b/retroshare-gui/src/gui/icons/make_qrc_file.sh @@ -3,7 +3,7 @@ echo '' echo '\t' -for i in `ls *.png`; do +for i in `ls *.png */*png */*svg`; do echo '\t\ticons/'$i'' done diff --git a/retroshare-nogui/src/menu/menus.cc b/retroshare-nogui/src/menu/menus.cc index 299aeb665..3eeab4bae 100644 --- a/retroshare-nogui/src/menu/menus.cc +++ b/retroshare-nogui/src/menu/menus.cc @@ -656,7 +656,7 @@ int MenuListShared::getEntryDesc(int idx, std::string &desc) for (it = dirs.begin(); (i < idx) && (it != dirs.end()); it++, i++); if (it != dirs.end()) { - bool networkwide = (it->shareflags & DIR_FLAGS_NETWORK_WIDE_OTHERS); + bool networkwide = (it->shareflags & DIR_FLAGS_ANONYMOUS_DOWNLOAD); bool browsable = (it->shareflags & DIR_FLAGS_BROWSABLE_OTHERS); if (networkwide && browsable) { @@ -759,7 +759,7 @@ uint32_t MenuListSharedTogglePublic::op_basic(std::string key) return MENU_OP_ERROR; } - mls->toggleFlagSelected(DIR_FLAGS_NETWORK_WIDE_OTHERS); + mls->toggleFlagSelected(DIR_FLAGS_ANONYMOUS_DOWNLOAD); return MENU_OP_INSTANT; }