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