mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 08:29:32 -05:00
fixed layout and names in ShareManager and SharedFilesDialog
This commit is contained in:
parent
3430eece22
commit
761d595cb7
@ -223,9 +223,15 @@ QString RetroshareDirModel::getFlagsString(FileStorageFlags flags)
|
||||
|
||||
return QString(str) ;
|
||||
}
|
||||
QString RetroshareDirModel::getGroupsString(const std::list<RsNodeGroupId>& group_ids)
|
||||
QString RetroshareDirModel::getGroupsString(FileStorageFlags flags,const std::list<RsNodeGroupId>& group_ids)
|
||||
{
|
||||
QString groups_str ;
|
||||
if(!(flags & DIR_FLAGS_BROWSABLE))
|
||||
return QString();
|
||||
|
||||
if(group_ids.empty())
|
||||
return tr("[Everyone]") ;
|
||||
|
||||
QString groups_str = tr("Only ");
|
||||
RsGroupInfo group_info ;
|
||||
|
||||
for(std::list<RsNodeGroupId>::const_iterator it(group_ids.begin());it!=group_ids.end();)
|
||||
@ -399,16 +405,9 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
||||
case 2:
|
||||
return misc::userFriendlyDuration(details.min_age);
|
||||
case 3:
|
||||
return getFlagsIcon(details.flags);//getFlagsString(details.flags);
|
||||
// case 4:
|
||||
// {
|
||||
// QString ind("");
|
||||
// if (ageIndicator != IND_ALWAYS)
|
||||
// ind = getAgeIndicatorString(details);
|
||||
// return ind;
|
||||
// }
|
||||
return QVariant();
|
||||
case 4:
|
||||
return getGroupsString(details.parent_groups) ;
|
||||
return getGroupsString(details.flags,details.parent_groups) ;
|
||||
|
||||
default:
|
||||
return tr("FILE");
|
||||
@ -430,9 +429,9 @@ QVariant TreeStyle_RDM::displayRole(const DirDetails& details,int coln) const
|
||||
case 2:
|
||||
return misc::userFriendlyDuration(details.min_age);
|
||||
case 3:
|
||||
return QVariant();//getFlagsString(details.flags);
|
||||
return QVariant();
|
||||
case 4:
|
||||
return getGroupsString(details.parent_groups) ;
|
||||
return getGroupsString(details.flags,details.parent_groups) ;
|
||||
|
||||
default:
|
||||
return tr("DIR");
|
||||
@ -710,12 +709,12 @@ QVariant TreeStyle_RDM::headerData(int section, Qt::Orientation orientation, int
|
||||
if (RemoteMode)
|
||||
return tr("Friend");
|
||||
else
|
||||
return tr("Share Flags");
|
||||
return tr("Access");
|
||||
case 4:
|
||||
if (RemoteMode)
|
||||
return tr("What's new");
|
||||
else
|
||||
return tr("Groups");
|
||||
return tr("Visibility");
|
||||
}
|
||||
return QString("Column %1").arg(section);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class RetroshareDirModel : public QAbstractItemModel
|
||||
void treeStyle();
|
||||
void downloadDirectory(const DirDetails & details, int prefixLen);
|
||||
static QString getFlagsString(FileStorageFlags f) ;
|
||||
static QString getGroupsString(const std::list<RsNodeGroupId> &) ;
|
||||
static QString getGroupsString(FileStorageFlags flags, const std::list<RsNodeGroupId> &) ;
|
||||
QString getAgeIndicatorString(const DirDetails &) const;
|
||||
// void getAgeIndicatorRec(const DirDetails &details, QString &ret) const;
|
||||
static const QIcon& getFlagsIcon(FileStorageFlags flags) ;
|
||||
|
@ -160,6 +160,8 @@ void ShareManager::reload()
|
||||
std::list<SharedDirInfo> dirs ;
|
||||
rsFiles->getSharedDirectories(dirs) ;
|
||||
|
||||
mDirInfos.clear();
|
||||
|
||||
for(std::list<SharedDirInfo>::const_iterator it(dirs.begin());it!=dirs.end();++it)
|
||||
mDirInfos.push_back(*it) ;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>741</width>
|
||||
<width>1210</width>
|
||||
<height>334</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -111,7 +111,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Share flags</string>
|
||||
<string>Access</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string comment="If activated, the share is anonymously accessible to anybody"/>
|
||||
@ -119,7 +119,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Groups</string>
|
||||
<string>Visibility</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string comment="If checked, the share is browsable by your friends"/>
|
||||
|
Loading…
Reference in New Issue
Block a user