Merge pull request #820 from csoler/v0.6-EditPosts

hide download buttons when the file is local in sub file item
This commit is contained in:
csoler 2017-05-14 21:44:08 +02:00 committed by GitHub
commit 32b7003d49
3 changed files with 7 additions and 4 deletions

View File

@ -130,7 +130,9 @@ void SubFileItem::Setup()
} }
} }
deleteButton->setVisible(mFlag & SFI_FLAG_DELETE); deleteButton->setVisible(mFlag & SFI_FLAG_ALLOW_DELETE);
downloadButton->setVisible(mMode < SFI_STATE_LOCAL);
cancelButton->setVisible(mMode < SFI_STATE_LOCAL);
smaller(); smaller();
updateItemStatic(); updateItemStatic();

View File

@ -41,7 +41,8 @@ const uint32_t SFI_TYPE_CHANNEL = 0x0010;
const uint32_t SFI_TYPE_ATTACH = 0x0020; const uint32_t SFI_TYPE_ATTACH = 0x0020;
const uint32_t SFI_FLAG_CREATE = 0x1000; const uint32_t SFI_FLAG_CREATE = 0x1000;
const uint32_t SFI_FLAG_DELETE = 0x2000; const uint32_t SFI_FLAG_ALLOW_DELETE = 0x2000;
const uint32_t SFI_FLAG_NO_DOWNLOAD = 0x4000;
//! This create a gui widget that allows users to access files shared by user //! This create a gui widget that allows users to access files shared by user

View File

@ -351,7 +351,7 @@ void CreateGxsChannelMsg::addAttachment(const RsFileHash &hash, const std::strin
/* add widget in for new destination */ /* add widget in for new destination */
uint32_t flags = SFI_TYPE_CHANNEL | SFI_FLAG_DELETE; uint32_t flags = SFI_TYPE_CHANNEL | SFI_FLAG_ALLOW_DELETE ;
if (local) if (local)
{ {
flags |= SFI_STATE_LOCAL; flags |= SFI_STATE_LOCAL;