Various Gui improvements:

* Added fallback to only <id> if peer is unknown in LinkCloud.
 * Added CheckFiles, and display status icon to SharedFiles.
 * Fixed SMPlayer startup and added play slot in Main Window.
 * Added Play Files to Local Shared Files. (context menu)
 * Added Play File to completed File Transfers. (context menu)
 * Ensured that selected Transfer stays selected.
 * Corrected Download State enumeration
 * Renamed Peer Details/ Authenticate to Make Friend / Peer Details
 * Removed Network View from Application Window.
 * Mods to RemoteDirModel to get Paths from files.
 * updated Rs Interface files.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@450 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-31 18:37:50 +00:00
parent 29a74b9898
commit e07783ac2b
14 changed files with 323 additions and 112 deletions

View file

@ -692,3 +692,53 @@ void RemoteDirModel::openSelected(QModelIndexList list)
recommendSelected(list);
}
void RemoteDirModel::getFilePaths(QModelIndexList list, std::list<std::string> &fullpaths)
{
std::cerr << "RemoteDirModel::getFilePaths()" << std::endl;
if (RemoteMode)
{
std::cerr << "No File Paths for remote files" << std::endl;
return;
}
/* translate */
QModelIndexList::iterator it;
for(it = list.begin(); it != list.end(); it++)
{
void *ref = it -> internalPointer();
DirDetails details;
uint32_t flags = DIR_FLAGS_DETAILS;
flags |= DIR_FLAGS_LOCAL;
if (!rsicontrol->RequestDirDetails(ref, details, flags))
{
std::cerr << "getFilePaths() Bad Request" << std::endl;
continue;
}
if (details.type != DIR_TYPE_FILE)
{
std::cerr << "getFilePaths() Not File" << std::endl;
continue; /* not file! */
}
std::cerr << "::::::::::::File Details:::: " << std::endl;
std::cerr << "Name: " << details.name << std::endl;
std::cerr << "Hash: " << details.hash << std::endl;
std::cerr << "Size: " << details.count << std::endl;
std::cerr << "Path: " << details.path << std::endl;
std::string filepath = details.path + "/";
filepath += details.name;
std::cerr << "Constructed FilePath: " << filepath << std::endl;
if (fullpaths.end() == std::find(fullpaths.begin(), fullpaths.end(), filepath))
{
fullpaths.push_back(filepath);
}
}
std::cerr << "::::::::::::Done getFilePaths" << std::endl;
}